update
							parent
							
								
									70857a6176
								
							
						
					
					
						commit
						6495641b3b
					
				
							
								
								
									
										1
									
								
								_embed
								
								
								
								
							
							
								
								
								
								
								
								
							
						
						
									
										1
									
								
								_embed
								
								
								
								
							|  | @ -1 +0,0 @@ | |||
| Subproject commit 9393fcac3548131e8e7f621d56710943d5c3fdcf | ||||
|  | @ -0,0 +1,137 @@ | |||
| @font-face { | ||||
|   font-family: 'Roboto'; | ||||
|   font-style: normal; | ||||
|   font-weight: 400; | ||||
|   src: local('Roboto'), local('Roboto-Regular'), url(roboto/normal-cyrillic-ext.woff2) format('woff2'); | ||||
|   unicode-range: U+0460-052F, U+20B4, U+2DE0-2DFF, U+A640-A69F; | ||||
| } | ||||
| 
 | ||||
| @font-face { | ||||
|   font-family: 'Roboto'; | ||||
|   font-style: normal; | ||||
|   font-weight: 400; | ||||
|   src: local('Roboto'), local('Roboto-Regular'), url(roboto/normal-cyrillic.woff2) format('woff2'); | ||||
|   unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; | ||||
| } | ||||
| 
 | ||||
| @font-face { | ||||
|   font-family: 'Roboto'; | ||||
|   font-style: normal; | ||||
|   font-weight: 400; | ||||
|   src: local('Roboto'), local('Roboto-Regular'), url(roboto/normal-greek-ext.woff2) format('woff2'); | ||||
|   unicode-range: U+1F00-1FFF; | ||||
| } | ||||
| 
 | ||||
| @font-face { | ||||
|   font-family: 'Roboto'; | ||||
|   font-style: normal; | ||||
|   font-weight: 400; | ||||
|   src: local('Roboto'), local('Roboto-Regular'), url(roboto/normal-greek.woff2) format('woff2'); | ||||
|   unicode-range: U+0370-03FF; | ||||
| } | ||||
| 
 | ||||
| @font-face { | ||||
|   font-family: 'Roboto'; | ||||
|   font-style: normal; | ||||
|   font-weight: 400; | ||||
|   src: local('Roboto'), local('Roboto-Regular'), url(roboto/normal-vietnamese.woff2) format('woff2'); | ||||
|   unicode-range: U+0102-0103, U+1EA0-1EF9, U+20AB; | ||||
| } | ||||
| 
 | ||||
| @font-face { | ||||
|   font-family: 'Roboto'; | ||||
|   font-style: normal; | ||||
|   font-weight: 400; | ||||
|   src: local('Roboto'), local('Roboto-Regular'), url(roboto/normal-latin-ext.woff2) format('woff2'); | ||||
|   unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF; | ||||
| } | ||||
| 
 | ||||
| @font-face { | ||||
|   font-family: 'Roboto'; | ||||
|   font-style: normal; | ||||
|   font-weight: 400; | ||||
|   src: local('Roboto'), local('Roboto-Regular'), url(roboto/normal-latin.woff2) format('woff2'); | ||||
|   unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215, U+E0FF, U+EFFD, U+F000; | ||||
| } | ||||
| 
 | ||||
| @font-face { | ||||
|   font-family: 'Roboto'; | ||||
|   font-style: normal; | ||||
|   font-weight: 500; | ||||
|   src: local('Roboto Medium'), local('Roboto-Medium'), url(roboto/medium-cyrillic-ext.woff2) format('woff2'); | ||||
|   unicode-range: U+0460-052F, U+20B4, U+2DE0-2DFF, U+A640-A69F; | ||||
| } | ||||
| 
 | ||||
| @font-face { | ||||
|   font-family: 'Roboto'; | ||||
|   font-style: normal; | ||||
|   font-weight: 500; | ||||
|   src: local('Roboto Medium'), local('Roboto-Medium'), url(roboto/medium-cyrillic.woff2) format('woff2'); | ||||
|   unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; | ||||
| } | ||||
| 
 | ||||
| @font-face { | ||||
|   font-family: 'Roboto'; | ||||
|   font-style: normal; | ||||
|   font-weight: 500; | ||||
|   src: local('Roboto Medium'), local('Roboto-Medium'), url(roboto/medium-greek-ext.woff2) format('woff2'); | ||||
|   unicode-range: U+1F00-1FFF; | ||||
| } | ||||
| 
 | ||||
| @font-face { | ||||
|   font-family: 'Roboto'; | ||||
|   font-style: normal; | ||||
|   font-weight: 500; | ||||
|   src: local('Roboto Medium'), local('Roboto-Medium'), url(roboto/medium-greek.woff2) format('woff2'); | ||||
|   unicode-range: U+0370-03FF; | ||||
| } | ||||
| 
 | ||||
| @font-face { | ||||
|   font-family: 'Roboto'; | ||||
|   font-style: normal; | ||||
|   font-weight: 500; | ||||
|   src: local('Roboto Medium'), local('Roboto-Medium'), url(roboto/medium-vietnamese.woff2) format('woff2'); | ||||
|   unicode-range: U+0102-0103, U+1EA0-1EF9, U+20AB; | ||||
| } | ||||
| 
 | ||||
| @font-face { | ||||
|   font-family: 'Roboto'; | ||||
|   font-style: normal; | ||||
|   font-weight: 500; | ||||
|   src: local('Roboto Medium'), local('Roboto-Medium'), url(roboto/medium-latin-ext.woff2) format('woff2'); | ||||
|   unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF; | ||||
| } | ||||
| 
 | ||||
| @font-face { | ||||
|   font-family: 'Roboto'; | ||||
|   font-style: normal; | ||||
|   font-weight: 500; | ||||
|   src: local('Roboto Medium'), local('Roboto-Medium'), url(roboto/medium-latin.woff2) format('woff2'); | ||||
|   unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215, U+E0FF, U+EFFD, U+F000; | ||||
| } | ||||
| 
 | ||||
| @font-face { | ||||
|   font-family: 'Material Icons'; | ||||
|   font-style: normal; | ||||
|   font-weight: 400; | ||||
|   src: local('Material Icons'), local('MaterialIcons-Regular'), url(material/icons.woff2) format('woff2'); | ||||
| } | ||||
| 
 | ||||
| .prompt .file-list ul li:before, | ||||
| .material-icons { | ||||
|   font-family: 'Material Icons'; | ||||
|   font-weight: normal; | ||||
|   font-style: normal; | ||||
|   font-size: 24px; | ||||
|   line-height: 1; | ||||
|   letter-spacing: normal; | ||||
|   text-transform: none; | ||||
|   display: inline-block; | ||||
|   white-space: nowrap; | ||||
|   word-wrap: normal; | ||||
|   direction: ltr; | ||||
|   -webkit-font-smoothing: antialiased; | ||||
|   text-rendering: optimizeLegibility; | ||||
|   -moz-osx-font-smoothing: grayscale; | ||||
|   font-feature-settings: 'liga'; | ||||
| } | ||||
										
											Binary file not shown.
										
									
								
							|  | @ -0,0 +1,461 @@ | |||
| /*! normalize.css v5.0.0 | MIT License | github.com/necolas/normalize.css */ | ||||
| 
 | ||||
| /** | ||||
|  * 1. Change the default font family in all browsers (opinionated). | ||||
|  * 2. Correct the line height in all browsers. | ||||
|  * 3. Prevent adjustments of font size after orientation changes in | ||||
|  *    IE on Windows Phone and in iOS. | ||||
|  */ | ||||
| 
 | ||||
| /* Document | ||||
|    ========================================================================== */ | ||||
| 
 | ||||
| html { | ||||
|   font-family: sans-serif; /* 1 */ | ||||
|   line-height: 1.15; /* 2 */ | ||||
|   -ms-text-size-adjust: 100%; /* 3 */ | ||||
|   -webkit-text-size-adjust: 100%; /* 3 */ | ||||
| } | ||||
| 
 | ||||
| /* Sections | ||||
|    ========================================================================== */ | ||||
| 
 | ||||
| /** | ||||
|  * Remove the margin in all browsers (opinionated). | ||||
|  */ | ||||
| 
 | ||||
| body { | ||||
|   margin: 0; | ||||
| } | ||||
| 
 | ||||
| /** | ||||
|  * Add the correct display in IE 9-. | ||||
|  */ | ||||
| 
 | ||||
| article, | ||||
| aside, | ||||
| footer, | ||||
| header, | ||||
| nav, | ||||
| section { | ||||
|   display: block; | ||||
| } | ||||
| 
 | ||||
| /** | ||||
|  * Correct the font size and margin on `h1` elements within `section` and | ||||
|  * `article` contexts in Chrome, Firefox, and Safari. | ||||
|  */ | ||||
| 
 | ||||
| h1 { | ||||
|   font-size: 2em; | ||||
|   margin: 0.67em 0; | ||||
| } | ||||
| 
 | ||||
| /* Grouping content | ||||
|    ========================================================================== */ | ||||
| 
 | ||||
| /** | ||||
|  * Add the correct display in IE 9-. | ||||
|  * 1. Add the correct display in IE. | ||||
|  */ | ||||
| 
 | ||||
| figcaption, | ||||
| figure, | ||||
| main { /* 1 */ | ||||
|   display: block; | ||||
| } | ||||
| 
 | ||||
| /** | ||||
|  * Add the correct margin in IE 8. | ||||
|  */ | ||||
| 
 | ||||
| figure { | ||||
|   margin: 1em 40px; | ||||
| } | ||||
| 
 | ||||
| /** | ||||
|  * 1. Add the correct box sizing in Firefox. | ||||
|  * 2. Show the overflow in Edge and IE. | ||||
|  */ | ||||
| 
 | ||||
| hr { | ||||
|   box-sizing: content-box; /* 1 */ | ||||
|   height: 0; /* 1 */ | ||||
|   overflow: visible; /* 2 */ | ||||
| } | ||||
| 
 | ||||
| /** | ||||
|  * 1. Correct the inheritance and scaling of font size in all browsers. | ||||
|  * 2. Correct the odd `em` font sizing in all browsers. | ||||
|  */ | ||||
| 
 | ||||
| pre { | ||||
|   font-family: monospace, monospace; /* 1 */ | ||||
|   font-size: 1em; /* 2 */ | ||||
| } | ||||
| 
 | ||||
| /* Text-level semantics | ||||
|    ========================================================================== */ | ||||
| 
 | ||||
| /** | ||||
|  * 1. Remove the gray background on active links in IE 10. | ||||
|  * 2. Remove gaps in links underline in iOS 8+ and Safari 8+. | ||||
|  */ | ||||
| 
 | ||||
| a { | ||||
|   background-color: transparent; /* 1 */ | ||||
|   -webkit-text-decoration-skip: objects; /* 2 */ | ||||
| } | ||||
| 
 | ||||
| /** | ||||
|  * Remove the outline on focused links when they are also active or hovered | ||||
|  * in all browsers (opinionated). | ||||
|  */ | ||||
| 
 | ||||
| a:active, | ||||
| a:hover { | ||||
|   outline-width: 0; | ||||
| } | ||||
| 
 | ||||
| /** | ||||
|  * 1. Remove the bottom border in Firefox 39-. | ||||
|  * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari. | ||||
|  */ | ||||
| 
 | ||||
| abbr[title] { | ||||
|   border-bottom: none; /* 1 */ | ||||
|   text-decoration: underline; /* 2 */ | ||||
|   text-decoration: underline dotted; /* 2 */ | ||||
| } | ||||
| 
 | ||||
| /** | ||||
|  * Prevent the duplicate application of `bolder` by the next rule in Safari 6. | ||||
|  */ | ||||
| 
 | ||||
| b, | ||||
| strong { | ||||
|   font-weight: inherit; | ||||
| } | ||||
| 
 | ||||
| /** | ||||
|  * Add the correct font weight in Chrome, Edge, and Safari. | ||||
|  */ | ||||
| 
 | ||||
| b, | ||||
| strong { | ||||
|   font-weight: bolder; | ||||
| } | ||||
| 
 | ||||
| /** | ||||
|  * 1. Correct the inheritance and scaling of font size in all browsers. | ||||
|  * 2. Correct the odd `em` font sizing in all browsers. | ||||
|  */ | ||||
| 
 | ||||
| code, | ||||
| kbd, | ||||
| samp { | ||||
|   font-family: monospace, monospace; /* 1 */ | ||||
|   font-size: 1em; /* 2 */ | ||||
| } | ||||
| 
 | ||||
| /** | ||||
|  * Add the correct font style in Android 4.3-. | ||||
|  */ | ||||
| 
 | ||||
| dfn { | ||||
|   font-style: italic; | ||||
| } | ||||
| 
 | ||||
| /** | ||||
|  * Add the correct background and color in IE 9-. | ||||
|  */ | ||||
| 
 | ||||
| mark { | ||||
|   background-color: #ff0; | ||||
|   color: #000; | ||||
| } | ||||
| 
 | ||||
| /** | ||||
|  * Add the correct font size in all browsers. | ||||
|  */ | ||||
| 
 | ||||
| small { | ||||
|   font-size: 80%; | ||||
| } | ||||
| 
 | ||||
| /** | ||||
|  * Prevent `sub` and `sup` elements from affecting the line height in | ||||
|  * all browsers. | ||||
|  */ | ||||
| 
 | ||||
| sub, | ||||
| sup { | ||||
|   font-size: 75%; | ||||
|   line-height: 0; | ||||
|   position: relative; | ||||
|   vertical-align: baseline; | ||||
| } | ||||
| 
 | ||||
| sub { | ||||
|   bottom: -0.25em; | ||||
| } | ||||
| 
 | ||||
| sup { | ||||
|   top: -0.5em; | ||||
| } | ||||
| 
 | ||||
| /* Embedded content | ||||
|    ========================================================================== */ | ||||
| 
 | ||||
| /** | ||||
|  * Add the correct display in IE 9-. | ||||
|  */ | ||||
| 
 | ||||
| audio, | ||||
| video { | ||||
|   display: inline-block; | ||||
| } | ||||
| 
 | ||||
| /** | ||||
|  * Add the correct display in iOS 4-7. | ||||
|  */ | ||||
| 
 | ||||
| audio:not([controls]) { | ||||
|   display: none; | ||||
|   height: 0; | ||||
| } | ||||
| 
 | ||||
| /** | ||||
|  * Remove the border on images inside links in IE 10-. | ||||
|  */ | ||||
| 
 | ||||
| img { | ||||
|   border-style: none; | ||||
| } | ||||
| 
 | ||||
| /** | ||||
|  * Hide the overflow in IE. | ||||
|  */ | ||||
| 
 | ||||
| svg:not(:root) { | ||||
|   overflow: hidden; | ||||
| } | ||||
| 
 | ||||
| /* Forms | ||||
|    ========================================================================== */ | ||||
| 
 | ||||
| /** | ||||
|  * 1. Change the font styles in all browsers (opinionated). | ||||
|  * 2. Remove the margin in Firefox and Safari. | ||||
|  */ | ||||
| 
 | ||||
| button, | ||||
| input, | ||||
| optgroup, | ||||
| select, | ||||
| textarea { | ||||
|   font-family: sans-serif; /* 1 */ | ||||
|   font-size: 100%; /* 1 */ | ||||
|   line-height: 1.15; /* 1 */ | ||||
|   margin: 0; /* 2 */ | ||||
| } | ||||
| 
 | ||||
| /** | ||||
|  * Show the overflow in IE. | ||||
|  * 1. Show the overflow in Edge. | ||||
|  */ | ||||
| 
 | ||||
| button, | ||||
| input { /* 1 */ | ||||
|   overflow: visible; | ||||
| } | ||||
| 
 | ||||
| /** | ||||
|  * Remove the inheritance of text transform in Edge, Firefox, and IE. | ||||
|  * 1. Remove the inheritance of text transform in Firefox. | ||||
|  */ | ||||
| 
 | ||||
| button, | ||||
| select { /* 1 */ | ||||
|   text-transform: none; | ||||
| } | ||||
| 
 | ||||
| /** | ||||
|  * 1. Prevent a WebKit bug where (2) destroys native `audio` and `video` | ||||
|  *    controls in Android 4. | ||||
|  * 2. Correct the inability to style clickable types in iOS and Safari. | ||||
|  */ | ||||
| 
 | ||||
| button, | ||||
| html [type="button"], /* 1 */ | ||||
| [type="reset"], | ||||
| [type="submit"] { | ||||
|   -webkit-appearance: button; /* 2 */ | ||||
| } | ||||
| 
 | ||||
| /** | ||||
|  * Remove the inner border and padding in Firefox. | ||||
|  */ | ||||
| 
 | ||||
| button::-moz-focus-inner, | ||||
| [type="button"]::-moz-focus-inner, | ||||
| [type="reset"]::-moz-focus-inner, | ||||
| [type="submit"]::-moz-focus-inner { | ||||
|   border-style: none; | ||||
|   padding: 0; | ||||
| } | ||||
| 
 | ||||
| /** | ||||
|  * Restore the focus styles unset by the previous rule. | ||||
|  */ | ||||
| 
 | ||||
| button:-moz-focusring, | ||||
| [type="button"]:-moz-focusring, | ||||
| [type="reset"]:-moz-focusring, | ||||
| [type="submit"]:-moz-focusring { | ||||
|   outline: 1px dotted ButtonText; | ||||
| } | ||||
| 
 | ||||
| /** | ||||
|  * Change the border, margin, and padding in all browsers (opinionated). | ||||
|  */ | ||||
| 
 | ||||
| fieldset { | ||||
|   border: 1px solid #c0c0c0; | ||||
|   margin: 0 2px; | ||||
|   padding: 0.35em 0.625em 0.75em; | ||||
| } | ||||
| 
 | ||||
| /** | ||||
|  * 1. Correct the text wrapping in Edge and IE. | ||||
|  * 2. Correct the color inheritance from `fieldset` elements in IE. | ||||
|  * 3. Remove the padding so developers are not caught out when they zero out | ||||
|  *    `fieldset` elements in all browsers. | ||||
|  */ | ||||
| 
 | ||||
| legend { | ||||
|   box-sizing: border-box; /* 1 */ | ||||
|   color: inherit; /* 2 */ | ||||
|   display: table; /* 1 */ | ||||
|   max-width: 100%; /* 1 */ | ||||
|   padding: 0; /* 3 */ | ||||
|   white-space: normal; /* 1 */ | ||||
| } | ||||
| 
 | ||||
| /** | ||||
|  * 1. Add the correct display in IE 9-. | ||||
|  * 2. Add the correct vertical alignment in Chrome, Firefox, and Opera. | ||||
|  */ | ||||
| 
 | ||||
| progress { | ||||
|   display: inline-block; /* 1 */ | ||||
|   vertical-align: baseline; /* 2 */ | ||||
| } | ||||
| 
 | ||||
| /** | ||||
|  * Remove the default vertical scrollbar in IE. | ||||
|  */ | ||||
| 
 | ||||
| textarea { | ||||
|   overflow: auto; | ||||
| } | ||||
| 
 | ||||
| /** | ||||
|  * 1. Add the correct box sizing in IE 10-. | ||||
|  * 2. Remove the padding in IE 10-. | ||||
|  */ | ||||
| 
 | ||||
| [type="checkbox"], | ||||
| [type="radio"] { | ||||
|   box-sizing: border-box; /* 1 */ | ||||
|   padding: 0; /* 2 */ | ||||
| } | ||||
| 
 | ||||
| /** | ||||
|  * Correct the cursor style of increment and decrement buttons in Chrome. | ||||
|  */ | ||||
| 
 | ||||
| [type="number"]::-webkit-inner-spin-button, | ||||
| [type="number"]::-webkit-outer-spin-button { | ||||
|   height: auto; | ||||
| } | ||||
| 
 | ||||
| /** | ||||
|  * 1. Correct the odd appearance in Chrome and Safari. | ||||
|  * 2. Correct the outline style in Safari. | ||||
|  */ | ||||
| 
 | ||||
| [type="search"] { | ||||
|   -webkit-appearance: textfield; /* 1 */ | ||||
|   outline-offset: -2px; /* 2 */ | ||||
| } | ||||
| 
 | ||||
| /** | ||||
|  * Remove the inner padding and cancel buttons in Chrome and Safari on macOS. | ||||
|  */ | ||||
| 
 | ||||
| [type="search"]::-webkit-search-cancel-button, | ||||
| [type="search"]::-webkit-search-decoration { | ||||
|   -webkit-appearance: none; | ||||
| } | ||||
| 
 | ||||
| /** | ||||
|  * 1. Correct the inability to style clickable types in iOS and Safari. | ||||
|  * 2. Change font properties to `inherit` in Safari. | ||||
|  */ | ||||
| 
 | ||||
| ::-webkit-file-upload-button { | ||||
|   -webkit-appearance: button; /* 1 */ | ||||
|   font: inherit; /* 2 */ | ||||
| } | ||||
| 
 | ||||
| /* Interactive | ||||
|    ========================================================================== */ | ||||
| 
 | ||||
| /* | ||||
|  * Add the correct display in IE 9-. | ||||
|  * 1. Add the correct display in Edge, IE, and Firefox. | ||||
|  */ | ||||
| 
 | ||||
| details, /* 1 */ | ||||
| menu { | ||||
|   display: block; | ||||
| } | ||||
| 
 | ||||
| /* | ||||
|  * Add the correct display in all browsers. | ||||
|  */ | ||||
| 
 | ||||
| summary { | ||||
|   display: list-item; | ||||
| } | ||||
| 
 | ||||
| /* Scripting | ||||
|    ========================================================================== */ | ||||
| 
 | ||||
| /** | ||||
|  * Add the correct display in IE 9-. | ||||
|  */ | ||||
| 
 | ||||
| canvas { | ||||
|   display: inline-block; | ||||
| } | ||||
| 
 | ||||
| /** | ||||
|  * Add the correct display in IE. | ||||
|  */ | ||||
| 
 | ||||
| template { | ||||
|   display: none; | ||||
| } | ||||
| 
 | ||||
| /* Hidden | ||||
|    ========================================================================== */ | ||||
| 
 | ||||
| /** | ||||
|  * Add the correct display in IE 10-. | ||||
|  */ | ||||
| 
 | ||||
| [hidden] { | ||||
|   display: none; | ||||
| } | ||||
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							|  | @ -0,0 +1,572 @@ | |||
| 'use strict'; | ||||
| 
 | ||||
| var tempID = "_fm_internal_temporary_id", | ||||
|   ssl = (location.protocol === 'https:'), | ||||
|   templates = {}, | ||||
|   selectedItems = [], | ||||
|   overlay, | ||||
|   clickOverlay; | ||||
| 
 | ||||
| // Removes an element, if exists, from an array
 | ||||
| Array.prototype.removeElement = function (element) { | ||||
|   var i = this.indexOf(element); | ||||
|   if(i != -1) | ||||
|     this.splice(i, 1); | ||||
| } | ||||
| 
 | ||||
| // Replaces an element inside an array by another
 | ||||
| Array.prototype.replaceElement = function (oldElement, newElement) { | ||||
|   var i = this.indexOf(oldElement); | ||||
|   if(i != -1) | ||||
|     this[i] = newElement; | ||||
| } | ||||
| 
 | ||||
| // Sends a costum event to itself
 | ||||
| Document.prototype.sendCostumEvent = function (text) { | ||||
|   this.dispatchEvent(new CustomEvent(text)); | ||||
| } | ||||
| 
 | ||||
| // Gets the content of a cookie
 | ||||
| Document.prototype.getCookie = function (name) { | ||||
|   var re = new RegExp("(?:(?:^|.*;\\s*)" + name + "\\s*\\=\\s*([^;]*).*$)|^.*$"); | ||||
|   return document.cookie.replace(re, "$1"); | ||||
| } | ||||
| 
 | ||||
| // Remove the last directory of an url
 | ||||
| var removeLastDirectoryPartOf = function (url) { | ||||
|   var arr = url.split('/'); | ||||
|   if(arr.pop() === "") { | ||||
|     arr.pop(); | ||||
|   } | ||||
|   return(arr.join('/')); | ||||
| } | ||||
| 
 | ||||
| function getCSSRule(rules) { | ||||
|   for(let i = 0; i < rules.length; i++) { | ||||
|     rules[i] = rules[i].toLowerCase(); | ||||
|   } | ||||
| 
 | ||||
|   var result = null, | ||||
|     find = Array.prototype.find; | ||||
| 
 | ||||
|   find.call(document.styleSheets, styleSheet => { | ||||
|     result = find.call(styleSheet.cssRules, cssRule => { | ||||
|       let found = false; | ||||
| 
 | ||||
|       if(cssRule instanceof CSSStyleRule) { | ||||
|         for(let i = 0; i < rules.length; i++) { | ||||
|           if(cssRule.selectorText.toLowerCase() == rules[i]) | ||||
|             found = true; | ||||
|         } | ||||
|       } | ||||
| 
 | ||||
|       return found; | ||||
|     }); | ||||
| 
 | ||||
|     return result != null; | ||||
|   }); | ||||
| 
 | ||||
|   return result; | ||||
| } | ||||
| 
 | ||||
| /* * * * * * * * * * * * * * * * | ||||
|  *                             * | ||||
|  *            BUTTONS          * | ||||
|  *                             * | ||||
|  * * * * * * * * * * * * * * * */ | ||||
| var buttons = { | ||||
|   previousState: {}, | ||||
| }; | ||||
| 
 | ||||
| buttons.setLoading = function (name) { | ||||
|   if(typeof this[name] === 'undefined') return; | ||||
|   let i = this[name].querySelector('i'); | ||||
| 
 | ||||
|   this.previousState[name] = i.innerHTML; | ||||
|   i.style.opacity = 0; | ||||
| 
 | ||||
|   setTimeout(function () { | ||||
|     i.classList.add('spin'); | ||||
|     i.innerHTML = 'autorenew'; | ||||
|     i.style.opacity = 1; | ||||
|   }, 200); | ||||
| } | ||||
| 
 | ||||
| // Changes an element to done animation
 | ||||
| buttons.setDone = function (name, success = true) { | ||||
|   let i = this[name].querySelector('i'); | ||||
| 
 | ||||
|   i.style.opacity = 0; | ||||
| 
 | ||||
|   let thirdStep = () => { | ||||
|     i.innerHTML = this.previousState[name]; | ||||
|     i.style.opacity = null; | ||||
| 
 | ||||
|     if(selectedItems.length == 0 && document.getElementById('listing')) | ||||
|       document.sendCostumEvent('changed-selected'); | ||||
|   } | ||||
| 
 | ||||
|   let secondStep = () => { | ||||
|     i.style.opacity = 0; | ||||
|     setTimeout(thirdStep, 200); | ||||
|   } | ||||
| 
 | ||||
|   let firstStep = () => { | ||||
|     i.classList.remove('spin'); | ||||
|     i.innerHTML = success ? | ||||
|       'done' : | ||||
|       'close'; | ||||
|     i.style.opacity = 1; | ||||
|     setTimeout(secondStep, 1000); | ||||
|   } | ||||
| 
 | ||||
|   setTimeout(firstStep, 200); | ||||
|   return false; | ||||
| } | ||||
| 
 | ||||
| /* * * * * * * * * * * * * * * * | ||||
|  *                             * | ||||
|  *            WEBDAV           * | ||||
|  *                             * | ||||
|  * * * * * * * * * * * * * * * */ | ||||
| var webdav = {}; | ||||
| 
 | ||||
| webdav.convertURL = function (url) { | ||||
|   return window.location.origin + url.replace(baseURL + "/", webdavURL + "/"); | ||||
| } | ||||
| 
 | ||||
| webdav.move = function (oldLink, newLink) { | ||||
|   return new Promise((resolve, reject) => { | ||||
|     let request = new XMLHttpRequest(), | ||||
|       destination = newLink.replace(baseURL + "/", webdavURL + "/"); | ||||
| 
 | ||||
|     destination = window.location.origin + destination.substring(prefixURL.length); | ||||
| 
 | ||||
|     request.open('MOVE', webdav.convertURL(oldLink), true); | ||||
|     request.setRequestHeader('Destination', destination); | ||||
|     request.onload = () => { | ||||
|       if(request.status == 201 || request.status == 204) { | ||||
|         resolve(); | ||||
|       } else { | ||||
|         reject(request.statusText); | ||||
|       } | ||||
|     } | ||||
|     request.onerror = () => reject(request.statusText); | ||||
|     request.send(); | ||||
|   }); | ||||
| } | ||||
| 
 | ||||
| webdav.put = function (link, body, headers = {}) { | ||||
|   return new Promise((resolve, reject) => { | ||||
|     let request = new XMLHttpRequest(); | ||||
|     request.open('PUT', webdav.convertURL(link), true); | ||||
| 
 | ||||
|     for(let key in headers) { | ||||
|       request.setRequestHeader(key, headers[key]); | ||||
|     } | ||||
| 
 | ||||
|     request.onload = () => { | ||||
|       if(request.status == 201) { | ||||
|         resolve(); | ||||
|       } else { | ||||
|         reject(request.statusText); | ||||
|       } | ||||
|     } | ||||
|     request.onerror = () => reject(request.statusText); | ||||
|     request.send(body); | ||||
|   }); | ||||
| } | ||||
| 
 | ||||
| webdav.delete = function (link) { | ||||
|   return new Promise((resolve, reject) => { | ||||
|     let request = new XMLHttpRequest(); | ||||
|     request.open('DELETE', webdav.convertURL(link), true); | ||||
|     request.onload = () => { | ||||
|       if(request.status == 204) { | ||||
|         resolve(); | ||||
|       } else { | ||||
|         reject(request.statusText); | ||||
|       } | ||||
|     } | ||||
|     request.onerror = () => reject(request.statusText); | ||||
|     request.send(); | ||||
|   }); | ||||
| } | ||||
| 
 | ||||
| webdav.new = function (link) { | ||||
|   return new Promise((resolve, reject) => { | ||||
|     let request = new XMLHttpRequest(); | ||||
|     request.open((link.endsWith("/") ? "MKCOL" : "PUT"), webdav.convertURL(link), true); | ||||
|     request.onload = () => { | ||||
|       if(request.status == 201) { | ||||
|         resolve(); | ||||
|       } else { | ||||
|         reject(request.statusText); | ||||
|       } | ||||
|     } | ||||
|     request.onerror = () => reject(request.statusText); | ||||
|     request.send(); | ||||
|   }); | ||||
| } | ||||
| 
 | ||||
| /* * * * * * * * * * * * * * * * | ||||
|  *                             * | ||||
|  *            EVENTS           * | ||||
|  *                             * | ||||
|  * * * * * * * * * * * * * * * */ | ||||
| function closePrompt(event) { | ||||
|   let prompt = document.querySelector('.prompt'); | ||||
| 
 | ||||
|   if(!prompt) | ||||
|     return; | ||||
| 
 | ||||
|   if(typeof event != 'undefined') { | ||||
|     event.preventDefault(); | ||||
|   } | ||||
| 
 | ||||
|   document.querySelector('.overlay').classList.remove('active'); | ||||
|   prompt.classList.remove('active'); | ||||
| 
 | ||||
|   setTimeout(() => { | ||||
|     prompt.remove(); | ||||
|   }, 100); | ||||
| } | ||||
| 
 | ||||
| function notImplemented(event) { | ||||
|   event.preventDefault(); | ||||
|   clickOverlay.click(); | ||||
| 
 | ||||
|   let clone = document.importNode(templates.info.content, true); | ||||
|   clone.querySelector('h3').innerHTML = 'Not implemented'; | ||||
|   clone.querySelector('p').innerHTML = "Sorry, but this feature wasn't implemented yet."; | ||||
| 
 | ||||
|   document.querySelector('body').appendChild(clone) | ||||
|   document.querySelector('.overlay').classList.add('active'); | ||||
|   document.querySelector('.prompt').classList.add('active'); | ||||
| } | ||||
| 
 | ||||
| // Prevent Default event
 | ||||
| var preventDefault = function (event) { | ||||
|   event.preventDefault(); | ||||
| } | ||||
| 
 | ||||
| function logoutEvent(event) { | ||||
|   let request = new XMLHttpRequest(); | ||||
|   request.open('GET', window.location.pathname, true, "username", "password"); | ||||
|   request.send(); | ||||
|   request.onreadystatechange = function () { | ||||
|     if(request.readyState == 4) { | ||||
|       window.location = "/"; | ||||
|     } | ||||
|   } | ||||
| } | ||||
| 
 | ||||
| function openEvent(event) { | ||||
|   if(event.currentTarget.classList.contains('disabled')) | ||||
|     return false; | ||||
| 
 | ||||
|   let link = '?raw=true'; | ||||
| 
 | ||||
|   if(selectedItems.length) { | ||||
|     link = document.getElementById(selectedItems[0]).dataset.url + link; | ||||
|   } else { | ||||
|     link = window.location.pathname + link; | ||||
|   } | ||||
| 
 | ||||
|   window.open(link); | ||||
|   return false; | ||||
| } | ||||
| 
 | ||||
| function deleteOnSingleFile() { | ||||
|   closePrompt(); | ||||
|   buttons.setLoading('delete'); | ||||
| 
 | ||||
|   let promises = []; | ||||
| 
 | ||||
|   webdav.delete(window.location.pathname) | ||||
|     .then(() => { | ||||
|       window.location.pathname = removeLastDirectoryPartOf(window.location.pathname); | ||||
|     }) | ||||
|     .catch(e => { | ||||
|       buttons.setDone('delete', false); | ||||
|       console.log(e) | ||||
|     }) | ||||
| } | ||||
| 
 | ||||
| function deleteOnListing() { | ||||
|   closePrompt(); | ||||
|   buttons.setLoading('delete'); | ||||
| 
 | ||||
|   let promises = []; | ||||
| 
 | ||||
|   for(let id of selectedItems) { | ||||
|     promises.push(webdav.delete(document.getElementById(id).dataset.url)); | ||||
|   } | ||||
| 
 | ||||
|   Promise.all(promises) | ||||
|     .then(() => { | ||||
|       listing.reload(); | ||||
|       buttons.setDone('delete'); | ||||
|     }) | ||||
|     .catch(e => { | ||||
|       console.log(e); | ||||
|       buttons.setDone('delete', false); | ||||
|     }) | ||||
| } | ||||
| 
 | ||||
| // Handles the delete button event
 | ||||
| function deleteEvent(event) { | ||||
|   let single = false; | ||||
| 
 | ||||
|   if(!selectedItems.length) { | ||||
|     selectedItems = ["placeholder"]; | ||||
|     single = true; | ||||
|   } | ||||
| 
 | ||||
|   let clone = document.importNode(templates.question.content, true); | ||||
|   clone.querySelector('h3').innerHTML = 'Delete files'; | ||||
| 
 | ||||
|   if(single) { | ||||
|     clone.querySelector('form').addEventListener('submit', deleteOnSingleFile); | ||||
|     clone.querySelector('p').innerHTML = `Are you sure you want to delete this file/folder?`; | ||||
|   } else { | ||||
|     clone.querySelector('form').addEventListener('submit', deleteOnListing); | ||||
|     clone.querySelector('p').innerHTML = `Are you sure you want to delete ${selectedItems.length} file(s)?`; | ||||
|   } | ||||
| 
 | ||||
|   clone.querySelector('input').remove(); | ||||
|   clone.querySelector('.ok').innerHTML = 'Delete'; | ||||
| 
 | ||||
|   document.body.appendChild(clone); | ||||
|   document.querySelector('.overlay').classList.add('active'); | ||||
|   document.querySelector('.prompt').classList.add('active'); | ||||
| 
 | ||||
|   return false; | ||||
| } | ||||
| 
 | ||||
| function resetSearchText() { | ||||
|   let box = document.querySelector('#search > div div'); | ||||
| 
 | ||||
|   if(user.AllowCommands) { | ||||
|     box.innerHTML = `Search or use one of your supported commands: ${user.Commands.join(", ")}.`; | ||||
|   } else { | ||||
|     box.innerHTML = "Type and press enter to search."; | ||||
|   } | ||||
| } | ||||
| 
 | ||||
| function searchEvent(event) { | ||||
|   if(this.value.length == 0) { | ||||
|     resetSearchText(); | ||||
|     return; | ||||
|   } | ||||
| 
 | ||||
|   let value = this.value, | ||||
|     search = document.getElementById('search'), | ||||
|     scrollable = document.querySelector('#search > div'), | ||||
|     box = document.querySelector('#search > div div'), | ||||
|     pieces = value.split(' '), | ||||
|     supported = false; | ||||
| 
 | ||||
|   user.Commands.forEach(function (cmd) { | ||||
|     if(cmd == pieces[0]) { | ||||
|       supported = true; | ||||
|     } | ||||
|   }); | ||||
| 
 | ||||
|   if(!supported || !user.AllowCommands) { | ||||
|     box.innerHTML = "Press enter to search." | ||||
|   } else { | ||||
|     box.innerHTML = "Press enter to execute." | ||||
|   } | ||||
| 
 | ||||
|   if(event.keyCode == 13) { | ||||
|     box.innerHTML = ''; | ||||
|     search.classList.add('ongoing'); | ||||
| 
 | ||||
|     let url = window.location.host + window.location.pathname; | ||||
| 
 | ||||
|     if(document.getElementById("editor")) { | ||||
|       url = removeLastDirectoryPartOf(url); | ||||
|     } | ||||
| 
 | ||||
|     let protocol = ssl ? 'wss:' : 'ws:'; | ||||
| 
 | ||||
|     if(supported && user.AllowCommands) { | ||||
|       let conn = new WebSocket(`${protocol}//${url}?command=true`); | ||||
| 
 | ||||
|       conn.onopen = function () { | ||||
|         conn.send(value); | ||||
|       }; | ||||
| 
 | ||||
|       conn.onmessage = function (event) { | ||||
|         box.innerHTML = event.data; | ||||
|         scrollable.scrollTop = scrollable.scrollHeight; | ||||
|       } | ||||
| 
 | ||||
|       conn.onclose = function (event) { | ||||
|         search.classList.remove('ongoing'); | ||||
|         listing.reload(); | ||||
|       } | ||||
| 
 | ||||
|       return; | ||||
|     } | ||||
| 
 | ||||
|     box.innerHTML = '<ul></ul>'; | ||||
| 
 | ||||
|     let ul = box.querySelector('ul'), | ||||
|       conn = new WebSocket(`${protocol}//${url}?search=true`); | ||||
| 
 | ||||
|     conn.onopen = function () { | ||||
|       conn.send(value); | ||||
|     }; | ||||
| 
 | ||||
|     conn.onmessage = function (event) { | ||||
|       ul.innerHTML += '<li><a href="' + event.data + '">' + event.data + '</a></li>'; | ||||
|       scrollable.scrollTop = scrollable.scrollHeight; | ||||
|     } | ||||
| 
 | ||||
|     conn.onclose = function (event) { | ||||
|       search.classList.remove('ongoing'); | ||||
|     } | ||||
|   } | ||||
| } | ||||
| 
 | ||||
| function setupSearch() { | ||||
|   let search = document.getElementById("search"), | ||||
|     searchInput = search.querySelector("input"), | ||||
|     searchDiv = search.querySelector("div"), | ||||
|     hover = false, | ||||
|     focus = false; | ||||
| 
 | ||||
|   resetSearchText(); | ||||
| 
 | ||||
|   searchInput.addEventListener('focus', event => { | ||||
|     focus = true; | ||||
|     search.classList.add('active'); | ||||
|   }); | ||||
| 
 | ||||
|   searchDiv.addEventListener('mouseover', event => { | ||||
|     hover = true; | ||||
|     search.classList.add('active'); | ||||
|   }); | ||||
| 
 | ||||
|   searchInput.addEventListener('blur', event => { | ||||
|     focus = false; | ||||
|     if(hover) | ||||
|       return; | ||||
|     search.classList.remove('active'); | ||||
|   }); | ||||
| 
 | ||||
|   search.addEventListener('mouseleave', event => { | ||||
|     hover = false; | ||||
|     if(focus) | ||||
|       return; | ||||
|     search.classList.remove('active'); | ||||
|   }); | ||||
| 
 | ||||
|   search.addEventListener("click", event => { | ||||
|     search.classList.add("active"); | ||||
|     search.querySelector("input").focus(); | ||||
|   }); | ||||
| 
 | ||||
|   searchInput.addEventListener('keyup', searchEvent); | ||||
| } | ||||
| 
 | ||||
| function closeHelp(event) { | ||||
|   event.preventDefault(); | ||||
| 
 | ||||
|   document.querySelector('.help').classList.remove('active'); | ||||
|   document.querySelector('.overlay').classList.remove('active'); | ||||
| } | ||||
| 
 | ||||
| function openHelp(event) { | ||||
|   closePrompt(event); | ||||
| 
 | ||||
|   document.querySelector('.help').classList.add('active'); | ||||
|   document.querySelector('.overlay').classList.add('active'); | ||||
| } | ||||
| 
 | ||||
| window.addEventListener('keydown', (event) => { | ||||
|   if(event.keyCode == 27) { | ||||
|     if(document.querySelector('.help.active')) { | ||||
|       closeHelp(event); | ||||
|     } | ||||
|   } | ||||
| 
 | ||||
|   if(event.keyCode == 46) { | ||||
|     deleteEvent(event); | ||||
|   } | ||||
| 
 | ||||
|   if(event.keyCode == 112) { | ||||
|     event.preventDefault(); | ||||
|     openHelp(event); | ||||
|   } | ||||
| }); | ||||
| 
 | ||||
| /* * * * * * * * * * * * * * * * | ||||
|  *                             * | ||||
|  *           BOOTSTRAP         * | ||||
|  *                             * | ||||
|  * * * * * * * * * * * * * * * */ | ||||
| 
 | ||||
| document.addEventListener("DOMContentLoaded", function (event) { | ||||
|   overlay = document.querySelector('.overlay'); | ||||
|   clickOverlay = document.querySelector('#click-overlay'); | ||||
| 
 | ||||
|   buttons.logout = document.getElementById("logout"); | ||||
|   buttons.open = document.getElementById("open"); | ||||
|   buttons.delete = document.getElementById("delete"); | ||||
|   buttons.previous = document.getElementById("previous"); | ||||
| 
 | ||||
|   // Attach event listeners
 | ||||
|   buttons.logout.addEventListener("click", logoutEvent); | ||||
|   buttons.open.addEventListener("click", openEvent); | ||||
| 
 | ||||
|   templates.question = document.querySelector('#question-template'); | ||||
|   templates.info = document.querySelector('#info-template'); | ||||
|   templates.move = document.querySelector("#move-template"); | ||||
| 
 | ||||
|   if(user.AllowEdit) { | ||||
|     buttons.delete.addEventListener("click", deleteEvent); | ||||
|   } | ||||
| 
 | ||||
|   let dropdownButtons = document.querySelectorAll('.action[data-dropdown]') | ||||
|   Array.from(dropdownButtons).forEach(button => { | ||||
|     button.addEventListener("click", event => { | ||||
|       button.querySelector('ul').classList.toggle("active"); | ||||
|       clickOverlay.classList.add('active'); | ||||
| 
 | ||||
|       clickOverlay.addEventListener('click', event => { | ||||
|         button.querySelector('ul').classList.remove("active"); | ||||
|         clickOverlay.classList.remove('active'); | ||||
|       }) | ||||
|     }); | ||||
|   }); | ||||
| 
 | ||||
|   overlay.addEventListener('click', event => { | ||||
|     if(document.querySelector('.help.active')) { | ||||
|       closeHelp(event); | ||||
|       return; | ||||
|     } | ||||
| 
 | ||||
|     closePrompt(event); | ||||
|   }) | ||||
| 
 | ||||
|   let mainActions = document.getElementById('main-actions'); | ||||
| 
 | ||||
|   document.getElementById('more').addEventListener('click', event => { | ||||
|     event.preventDefault(); | ||||
|     event.stopPropagation(); | ||||
| 
 | ||||
|     clickOverlay.classList.add('active'); | ||||
|     mainActions.classList.add('active'); | ||||
| 
 | ||||
|     clickOverlay.addEventListener('click', event => { | ||||
|       mainActions.classList.remove('active'); | ||||
|       clickOverlay.classList.remove('active'); | ||||
|     }) | ||||
|   }) | ||||
| 
 | ||||
|   setupSearch(); | ||||
|   return false; | ||||
| }); | ||||
|  | @ -0,0 +1,278 @@ | |||
| 'use strict'; | ||||
| 
 | ||||
| var editor = {}; | ||||
| 
 | ||||
| editor.textareaAutoGrow = function () { | ||||
|   let autogrow = function () { | ||||
|     console.log(this.style.height) | ||||
|     this.style.height = 'auto'; | ||||
|     this.style.height = (this.scrollHeight) + 'px'; | ||||
|   } | ||||
| 
 | ||||
|   let textareas = document.getElementsByTagName('textarea'); | ||||
| 
 | ||||
|   let addAutoGrow = () => { | ||||
|     Array.from(textareas).forEach(textarea => { | ||||
|       autogrow.bind(textarea)(); | ||||
|       textarea.addEventListener('keyup', autogrow); | ||||
|     }); | ||||
|   } | ||||
| 
 | ||||
|   addAutoGrow(); | ||||
|   window.addEventListener('resize', addAutoGrow) | ||||
| } | ||||
| 
 | ||||
| editor.toggleSourceEditor = function (event) { | ||||
|   event.preventDefault(); | ||||
| 
 | ||||
|   if(document.querySelector('[data-kind="content-only"]')) { | ||||
|     window.location = window.location.pathname + "?visual=true" | ||||
|     return; | ||||
|   } | ||||
| 
 | ||||
|   window.location = window.location.pathname + "?visual=false" | ||||
| } | ||||
| 
 | ||||
| function deleteFrontMatterItem(event) { | ||||
|   event.preventDefault(); | ||||
|   document.getElementById(this.dataset.delete).remove(); | ||||
| } | ||||
| 
 | ||||
| function makeFromBaseTemplate(id, type, name, parent) { | ||||
|   let clone = document.importNode(templates.base.content, true); | ||||
|   clone.querySelector('fieldset').id = id; | ||||
|   clone.querySelector('fieldset').dataset.type = type; | ||||
|   clone.querySelector('h3').innerHTML = name; | ||||
|   clone.querySelector('.delete').dataset.delete = id; | ||||
|   clone.querySelector('.delete').addEventListener('click', deleteFrontMatterItem); | ||||
|   clone.querySelector('.add').addEventListener('click', addFrontMatterItem); | ||||
| 
 | ||||
|   if(parent.classList.contains("frontmatter")) { | ||||
|     parent.insertBefore(clone, document.querySelector('div.button.add')); | ||||
|     return | ||||
|   } | ||||
| 
 | ||||
|   parent.appendChild(clone); | ||||
| } | ||||
| 
 | ||||
| function makeFromArrayItemTemplate(id, number, parent) { | ||||
|   let clone = document.importNode(templates.arrayItem.content, true); | ||||
|   clone.querySelector('[data-type="array-item"]').id = `${id}-${number}`; | ||||
|   clone.querySelector('input').name = id; | ||||
|   clone.querySelector('input').id = id; | ||||
|   clone.querySelector('div.action').dataset.delete = `${id}-${number}`; | ||||
|   clone.querySelector('div.action').addEventListener('click', deleteFrontMatterItem); | ||||
|   parent.querySelector('.group').appendChild(clone) | ||||
|   document.getElementById(`${id}-${number}`).querySelector('input').focus(); | ||||
| } | ||||
| 
 | ||||
| function makeFromObjectItemTemplate(id, name, parent) { | ||||
|   let clone = document.importNode(templates.objectItem.content, true); | ||||
|   clone.querySelector('.block').id = `block-${id}`; | ||||
|   clone.querySelector('.block').dataset.content = id; | ||||
|   clone.querySelector('label').for = id; | ||||
|   clone.querySelector('label').innerHTML = name; | ||||
|   clone.querySelector('input').name = id; | ||||
|   clone.querySelector('input').id = id; | ||||
|   clone.querySelector('.action').dataset.delete = `block-${id}`; | ||||
|   clone.querySelector('.action').addEventListener('click', deleteFrontMatterItem); | ||||
| 
 | ||||
|   parent.appendChild(clone) | ||||
|   document.getElementById(id).focus(); | ||||
| } | ||||
| 
 | ||||
| function addFrontMatterItemPrompt(parent) { | ||||
|   return function (event) { | ||||
|     event.preventDefault(); | ||||
| 
 | ||||
|     let value = event.currentTarget.querySelector('input').value; | ||||
|     if(value === '') { | ||||
|       return true; | ||||
|     } | ||||
| 
 | ||||
|     closePrompt(event); | ||||
| 
 | ||||
|     let name = value.substring(0, value.lastIndexOf(':')), | ||||
|       type = value.substring(value.lastIndexOf(':') + 1, value.length); | ||||
| 
 | ||||
|     if(type !== "" && type !== "array" && type !== "object") { | ||||
|       name = value; | ||||
|     } | ||||
| 
 | ||||
|     name = name.replace(' ', '_'); | ||||
| 
 | ||||
|     let id = name; | ||||
| 
 | ||||
|     if(parent.id != '') { | ||||
|       id = parent.id + "." + id; | ||||
|     } | ||||
| 
 | ||||
|     if(type == "array" || type == "object") { | ||||
|       if(parent.dataset.type == "parent") { | ||||
|         makeFromBaseTemplate(id, type, name, document.querySelector('.frontmatter')); | ||||
|         return; | ||||
|       } | ||||
| 
 | ||||
|       makeFromBaseTemplate(id, type, name, block); | ||||
|       return; | ||||
|     } | ||||
| 
 | ||||
|     let group = parent.querySelector('.group'); | ||||
| 
 | ||||
|     if(group == null) { | ||||
|       parent.insertAdjacentHTML('afterbegin', '<div class="group"></div>'); | ||||
|       group = parent.querySelector('.group'); | ||||
|     } | ||||
| 
 | ||||
|     makeFromObjectItemTemplate(id, name, group); | ||||
|   } | ||||
| } | ||||
| 
 | ||||
| function addFrontMatterItem(event) { | ||||
|   event.preventDefault(); | ||||
| 
 | ||||
|   let parent = event.currentTarget.parentNode, | ||||
|     type = parent.dataset.type; | ||||
| 
 | ||||
|   // If the block is an array
 | ||||
|   if(type === "array") { | ||||
|     let id = parent.id + "[]", | ||||
|       count = parent.querySelectorAll('.group > div').length, | ||||
|       fieldsets = parent.getElementsByTagName("fieldset"); | ||||
| 
 | ||||
|     if(fieldsets.length > 0) { | ||||
|       let itemType = fieldsets[0].dataset.type, | ||||
|         itemID = parent.id + "[" + fieldsets.length + "]", | ||||
|         itemName = fieldsets.length; | ||||
| 
 | ||||
|       makeFromBaseTemplate(itemID, itemType, itemName, parent); | ||||
|     } else { | ||||
|       makeFromArrayItemTemplate(id, count, parent); | ||||
|     } | ||||
| 
 | ||||
|     return; | ||||
|   } | ||||
| 
 | ||||
|   if(type == "object" || type == "parent") { | ||||
|     let clone = document.importNode(templates.question.content, true); | ||||
|     clone.querySelector('form').id = tempID; | ||||
|     clone.querySelector('h3').innerHTML = 'New field'; | ||||
|     clone.querySelector('p').innerHTML = 'Write the field name and then press enter. If you want to create an array or an object, end the name with <code>:array</code> or <code>:object.</code>'; | ||||
|     clone.querySelector('.ok').innerHTML = 'Create'; | ||||
|     clone.querySelector('form').addEventListener('submit', addFrontMatterItemPrompt(parent)); | ||||
|     clone.querySelector('form').classList.add('active') | ||||
|     document.querySelector('body').appendChild(clone); | ||||
| 
 | ||||
|     document.querySelector('.overlay').classList.add('active'); | ||||
|     document.getElementById(tempID).classList.add('active'); | ||||
|   } | ||||
| 
 | ||||
|   return false; | ||||
| } | ||||
| 
 | ||||
| document.addEventListener("DOMContentLoaded", (event) => { | ||||
|   if(!document.getElementById('editor')) return; | ||||
| 
 | ||||
|   editor.textareaAutoGrow(); | ||||
| 
 | ||||
|   templates.arrayItem = document.getElementById("array-item-template"); | ||||
|   templates.base = document.getElementById('base-template'); | ||||
|   templates.objectItem = document.getElementById("object-item-template"); | ||||
|   templates.temporary = document.getElementById('temporary-template'); | ||||
| 
 | ||||
|   buttons.save = document.querySelector('#save'); | ||||
|   buttons.editSource = document.querySelector('#edit-source'); | ||||
| 
 | ||||
|   if(buttons.editSource) { | ||||
|     buttons.editSource.addEventListener('click', editor.toggleSourceEditor) | ||||
|   } | ||||
| 
 | ||||
|   let container = document.getElementById('editor'), | ||||
|     kind = container.dataset.kind, | ||||
|     rune = container.dataset.rune; | ||||
| 
 | ||||
|   if(kind != 'frontmatter-only') { | ||||
|     let editor = document.querySelector('.content #ace'), | ||||
|       mode = editor.dataset.mode, | ||||
|       textarea = document.querySelector('textarea[name="content"]'), | ||||
|       aceEditor = ace.edit('ace'), | ||||
|       options = { | ||||
|         wrap: true, | ||||
|         maxLines: Infinity, | ||||
|         theme: "ace/theme/github", | ||||
|         showPrintMargin: false, | ||||
|         fontSize: "1em", | ||||
|         minLines: 20 | ||||
|       }; | ||||
| 
 | ||||
|     aceEditor.getSession().setMode("ace/mode/" + mode); | ||||
|     aceEditor.getSession().setValue(textarea.value); | ||||
|     aceEditor.getSession().on('change', function () { | ||||
|       textarea.value = aceEditor.getSession().getValue(); | ||||
|     }); | ||||
| 
 | ||||
|     if(mode == "markdown") options.showGutter = false; | ||||
|     aceEditor.setOptions(options); | ||||
|   } | ||||
| 
 | ||||
|   let deleteFrontMatterItemButtons = document.getElementsByClassName('delete'); | ||||
|   Array.from(deleteFrontMatterItemButtons).forEach(button => { | ||||
|     button.addEventListener('click', deleteFrontMatterItem); | ||||
|   }); | ||||
| 
 | ||||
|   let addFrontMatterItemButtons = document.getElementsByClassName('add'); | ||||
|   Array.from(addFrontMatterItemButtons).forEach(button => { | ||||
|     button.addEventListener('click', addFrontMatterItem); | ||||
|   }); | ||||
| 
 | ||||
|   let saveContent = function () { | ||||
|     let data = form2js(document.querySelector('form')); | ||||
| 
 | ||||
|     if(typeof data.content === "undefined" && kind != 'frontmatter-only') { | ||||
|       data.content = ""; | ||||
|     } | ||||
| 
 | ||||
|     if(typeof data.content === "number") { | ||||
|       data.content = data.content.toString(); | ||||
|     } | ||||
| 
 | ||||
|     let request = new XMLHttpRequest(); | ||||
| 
 | ||||
|     buttons.setLoading('save') | ||||
| 
 | ||||
|     webdav.put(window.location.pathname, JSON.stringify(data), { | ||||
|         'Kind': kind, | ||||
|         'Rune': rune | ||||
|       }) | ||||
|       .then(() => { | ||||
|         buttons.setDone('save') | ||||
|       }) | ||||
|       .catch(e => { | ||||
|         console.log(e); | ||||
|         buttons.setDone('save', false) | ||||
|       }) | ||||
|   } | ||||
| 
 | ||||
|   document.querySelector('#save').addEventListener('click', event => { | ||||
|     event.preventDefault(); | ||||
|     saveContent(); | ||||
|   }); | ||||
| 
 | ||||
|   document.querySelector('form').addEventListener('submit', (event) => { | ||||
|     event.preventDefault(); | ||||
|     saveContent(); | ||||
|   }); | ||||
| 
 | ||||
|   window.addEventListener('keydown', (event) => { | ||||
|     if(event.ctrlKey || event.metaKey) { | ||||
|       switch(String.fromCharCode(event.which).toLowerCase()) { | ||||
|       case 's': | ||||
|         event.preventDefault(); | ||||
|         saveContent(); | ||||
|         break; | ||||
|       } | ||||
|     } | ||||
|   }); | ||||
| 
 | ||||
|   return false; | ||||
| }); | ||||
|  | @ -0,0 +1,579 @@ | |||
| 'use strict'; | ||||
| 
 | ||||
| var listing = { | ||||
|   selectMultiple: false | ||||
| }; | ||||
| 
 | ||||
| listing.reload = function (callback) { | ||||
|   let request = new XMLHttpRequest(); | ||||
| 
 | ||||
|   request.open('GET', window.location); | ||||
|   request.setRequestHeader('Minimal', 'true'); | ||||
|   request.send(); | ||||
|   request.onreadystatechange = function () { | ||||
|     if(request.readyState == 4) { | ||||
|       if(request.status == 200) { | ||||
|         document.querySelector('body main').innerHTML = request.responseText; | ||||
|         listing.addDoubleTapEvent(); | ||||
| 
 | ||||
|         if(typeof callback == 'function') { | ||||
|           callback(); | ||||
|         } | ||||
|       } | ||||
|     } | ||||
|   } | ||||
| } | ||||
| 
 | ||||
| listing.itemDragStart = function (event) { | ||||
|   let el = event.target; | ||||
| 
 | ||||
|   for(let i = 0; i < 5; i++) { | ||||
|     if(!el.classList.contains('item')) { | ||||
|       el = el.parentElement; | ||||
|     } | ||||
|   } | ||||
| 
 | ||||
|   event.dataTransfer.setData("id", el.id); | ||||
|   event.dataTransfer.setData("name", el.querySelector('.name').innerHTML); | ||||
| } | ||||
| 
 | ||||
| listing.itemDragOver = function (event) { | ||||
|   event.preventDefault(); | ||||
|   let el = event.target; | ||||
| 
 | ||||
|   for(let i = 0; i < 5; i++) { | ||||
|     if(!el.classList.contains('item')) { | ||||
|       el = el.parentElement; | ||||
|     } | ||||
|   } | ||||
| 
 | ||||
|   el.style.opacity = 1; | ||||
| } | ||||
| 
 | ||||
| listing.itemDrop = function (e) { | ||||
|   e.preventDefault(); | ||||
| 
 | ||||
|   let el = e.target, | ||||
|     id = e.dataTransfer.getData("id"), | ||||
|     name = e.dataTransfer.getData("name"); | ||||
| 
 | ||||
|   if(id == "" || name == "") return; | ||||
| 
 | ||||
|   for(let i = 0; i < 5; i++) { | ||||
|     if(!el.classList.contains('item')) { | ||||
|       el = el.parentElement; | ||||
|     } | ||||
|   } | ||||
| 
 | ||||
|   if(el.id === id) return; | ||||
| 
 | ||||
|   let oldLink = document.getElementById(id).dataset.url, | ||||
|     newLink = el.dataset.url + name; | ||||
| 
 | ||||
|   webdav.move(oldLink, newLink) | ||||
|     .then(() => listing.reload()) | ||||
|     .catch(e => console.log(e)); | ||||
| } | ||||
| 
 | ||||
| listing.documentDrop = function (event) { | ||||
|   event.preventDefault(); | ||||
|   let dt = event.dataTransfer, | ||||
|     files = dt.files, | ||||
|     el = event.target, | ||||
|     items = document.getElementsByClassName('item'); | ||||
| 
 | ||||
|   for(let i = 0; i < 5; i++) { | ||||
|     if(el != null && !el.classList.contains('item')) { | ||||
|       el = el.parentElement; | ||||
|     } | ||||
|   } | ||||
| 
 | ||||
|   if(files.length > 0) { | ||||
|     if(el != null && el.classList.contains('item') && el.dataset.dir == "true") { | ||||
|       listing.handleFiles(files, el.querySelector('.name').innerHTML + "/"); | ||||
|       return; | ||||
|     } | ||||
| 
 | ||||
|     listing.handleFiles(files, ""); | ||||
|   } else { | ||||
|     Array.from(items).forEach(file => { | ||||
|       file.style.opacity = 1; | ||||
|     }); | ||||
|   } | ||||
| } | ||||
| 
 | ||||
| listing.rename = function (event) { | ||||
|   if(!selectedItems.length || selectedItems.length > 1) { | ||||
|     return false; | ||||
|   } | ||||
| 
 | ||||
|   let item = document.getElementById(selectedItems[0]); | ||||
| 
 | ||||
|   if(item.classList.contains('disabled')) { | ||||
|     return false; | ||||
|   } | ||||
| 
 | ||||
|   let link = item.dataset.url, | ||||
|     field = item.querySelector('.name'), | ||||
|     name = field.innerHTML; | ||||
| 
 | ||||
|   let submit = (event) => { | ||||
|     event.preventDefault(); | ||||
| 
 | ||||
|     let newName = event.currentTarget.querySelector('input').value, | ||||
|       newLink = removeLastDirectoryPartOf(link) + "/" + newName; | ||||
| 
 | ||||
|     closePrompt(event); | ||||
|     buttons.setLoading('rename'); | ||||
| 
 | ||||
|     webdav.move(link, newLink).then(() => { | ||||
|       listing.reload(() => { | ||||
|         newName = btoa(newName); | ||||
|         selectedItems = [newName]; | ||||
|         document.getElementById(newName).setAttribute("aria-selected", true); | ||||
|         listing.handleSelectionChange(); | ||||
|       }); | ||||
| 
 | ||||
|       buttons.setDone('rename'); | ||||
|     }).catch(error => { | ||||
|       field.innerHTML = name; | ||||
|       buttons.setDone('rename', false); | ||||
|       console.log(error); | ||||
|     }); | ||||
| 
 | ||||
|     return false; | ||||
|   } | ||||
| 
 | ||||
|   let clone = document.importNode(templates.question.content, true); | ||||
|   clone.querySelector('h3').innerHTML = 'Rename'; | ||||
|   clone.querySelector('input').value = name; | ||||
|   clone.querySelector('.ok').innerHTML = 'Rename'; | ||||
|   clone.querySelector('form').addEventListener('submit', submit); | ||||
| 
 | ||||
|   document.querySelector('body').appendChild(clone) | ||||
|   document.querySelector('.overlay').classList.add('active'); | ||||
|   document.querySelector('.prompt').classList.add('active'); | ||||
| 
 | ||||
|   return false; | ||||
| } | ||||
| 
 | ||||
| listing.handleFiles = function (files, base) { | ||||
|   buttons.setLoading('upload'); | ||||
| 
 | ||||
|   let promises = []; | ||||
| 
 | ||||
|   for(let file of files) { | ||||
|     promises.push(webdav.put(window.location.pathname + base + file.name, file)); | ||||
|   } | ||||
| 
 | ||||
|   Promise.all(promises) | ||||
|     .then(() => { | ||||
|       listing.reload(); | ||||
|       buttons.setDone('upload'); | ||||
|     }) | ||||
|     .catch(e => { | ||||
|       console.log(e); | ||||
|       buttons.setDone('upload', false); | ||||
|     }) | ||||
| 
 | ||||
|   return false; | ||||
| } | ||||
| 
 | ||||
| listing.unselectAll = function () { | ||||
|   let items = document.getElementsByClassName('item'); | ||||
|   Array.from(items).forEach(link => { | ||||
|     link.setAttribute("aria-selected", false); | ||||
|   }); | ||||
| 
 | ||||
|   selectedItems = []; | ||||
| 
 | ||||
|   listing.handleSelectionChange(); | ||||
|   return false; | ||||
| } | ||||
| 
 | ||||
| listing.handleSelectionChange = function (event) { | ||||
|   listing.redefineDownloadURLs(); | ||||
| 
 | ||||
|   let selectedNumber = selectedItems.length, | ||||
|     fileAction = document.getElementById("file-only"); | ||||
| 
 | ||||
|   if(selectedNumber) { | ||||
|     fileAction.classList.remove("disabled"); | ||||
| 
 | ||||
|     if(selectedNumber > 1) { | ||||
|       buttons.open.classList.add("disabled"); | ||||
|       buttons.rename.classList.add("disabled"); | ||||
|     } | ||||
| 
 | ||||
|     if(selectedNumber == 1) { | ||||
|       if(document.getElementById(selectedItems[0]).dataset.dir == "true") { | ||||
|         buttons.open.classList.add("disabled"); | ||||
|       } else { | ||||
|         buttons.open.classList.remove("disabled"); | ||||
|       } | ||||
| 
 | ||||
|       buttons.rename.classList.remove("disabled"); | ||||
|     } | ||||
| 
 | ||||
|     return false; | ||||
|   } | ||||
| 
 | ||||
|   fileAction.classList.add("disabled"); | ||||
|   return false; | ||||
| } | ||||
| 
 | ||||
| listing.redefineDownloadURLs = function () { | ||||
|   let files = ""; | ||||
| 
 | ||||
|   for(let i = 0; i < selectedItems.length; i++) { | ||||
|     let url = document.getElementById(selectedItems[i]).dataset.url; | ||||
|     files += url.replace(window.location.pathname, "") + ","; | ||||
|   } | ||||
| 
 | ||||
|   files = files.substring(0, files.length - 1); | ||||
|   files = encodeURIComponent(files); | ||||
| 
 | ||||
|   let links = document.querySelectorAll("#download ul a"); | ||||
|   Array.from(links).forEach(link => { | ||||
|     link.href = "?download=" + link.dataset.format + "&files=" + files; | ||||
|   }); | ||||
| } | ||||
| 
 | ||||
| listing.openItem = function (event) { | ||||
|   window.location = event.currentTarget.dataset.url; | ||||
| } | ||||
| 
 | ||||
| listing.selectItem = function (event) { | ||||
|   let el = event.currentTarget; | ||||
| 
 | ||||
|   if(selectedItems.length != 0) event.preventDefault(); | ||||
|   if(selectedItems.indexOf(el.id) == -1) { | ||||
|     if(!event.ctrlKey && !listing.selectMultiple) listing.unselectAll(); | ||||
| 
 | ||||
|     el.setAttribute("aria-selected", true); | ||||
|     selectedItems.push(el.id); | ||||
|   } else { | ||||
|     el.setAttribute("aria-selected", false); | ||||
|     selectedItems.removeElement(el.id); | ||||
|   } | ||||
| 
 | ||||
|   listing.handleSelectionChange(); | ||||
|   return false; | ||||
| } | ||||
| 
 | ||||
| listing.newFileButton = function (event) { | ||||
|   event.preventDefault(); | ||||
| 
 | ||||
|   let clone = document.importNode(templates.question.content, true); | ||||
|   clone.querySelector('h3').innerHTML = 'New file'; | ||||
|   clone.querySelector('p').innerHTML = 'End with a trailing slash to create a dir.'; | ||||
|   clone.querySelector('.ok').innerHTML = 'Create'; | ||||
|   clone.querySelector('form').addEventListener('submit', listing.newFilePrompt); | ||||
| 
 | ||||
|   document.querySelector('body').appendChild(clone) | ||||
|   document.querySelector('.overlay').classList.add('active'); | ||||
|   document.querySelector('.prompt').classList.add('active'); | ||||
| } | ||||
| 
 | ||||
| listing.newFilePrompt = function (event) { | ||||
|   event.preventDefault(); | ||||
|   buttons.setLoading('new'); | ||||
| 
 | ||||
|   let name = event.currentTarget.querySelector('input').value; | ||||
| 
 | ||||
|   webdav.new(window.location.pathname + name) | ||||
|     .then(() => { | ||||
|       buttons.setDone('new'); | ||||
|       listing.reload(); | ||||
|     }) | ||||
|     .catch(e => { | ||||
|       console.log(e); | ||||
|       buttons.setDone('new', false); | ||||
|     }); | ||||
| 
 | ||||
|   closePrompt(event); | ||||
|   return false; | ||||
| } | ||||
| 
 | ||||
| listing.updateColumns = function (event) { | ||||
|   let columns = Math.floor(document.getElementById('listing').offsetWidth / 300), | ||||
|     items = getCSSRule(['#listing.mosaic .item', '.mosaic#listing .item']); | ||||
| 
 | ||||
|   items.style.width = `calc(${100/columns}% - 1em)`; | ||||
| } | ||||
| 
 | ||||
| listing.addDoubleTapEvent = function () { | ||||
|   let items = document.getElementsByClassName('item'), | ||||
|     touches = { | ||||
|       id: '', | ||||
|       count: 0 | ||||
|     }; | ||||
| 
 | ||||
|   Array.from(items).forEach(file => { | ||||
|     file.addEventListener('touchstart', event => { | ||||
|       if(touches.id != file.id) { | ||||
|         touches.id = file.id; | ||||
|         touches.count = 1; | ||||
| 
 | ||||
|         setTimeout(() => { | ||||
|           touches.count = 0; | ||||
|         }, 300) | ||||
| 
 | ||||
|         return; | ||||
|       } | ||||
| 
 | ||||
|       touches.count++; | ||||
| 
 | ||||
|       if(touches.count > 1) { | ||||
|         window.location = file.dataset.url; | ||||
|       } | ||||
|     }); | ||||
|   }); | ||||
| } | ||||
| 
 | ||||
| // Keydown events
 | ||||
| window.addEventListener('keydown', (event) => { | ||||
|   if(event.keyCode == 27) { | ||||
|     listing.unselectAll(); | ||||
| 
 | ||||
|     if(document.querySelectorAll('.prompt').length) { | ||||
|       closePrompt(event); | ||||
|     } | ||||
|   } | ||||
| 
 | ||||
|   if(event.keyCode == 113) { | ||||
|     listing.rename(); | ||||
|   } | ||||
| 
 | ||||
|   if(event.ctrlKey || event.metaKey) { | ||||
|     switch(String.fromCharCode(event.which).toLowerCase()) { | ||||
|     case 's': | ||||
|       event.preventDefault(); | ||||
|       window.location = "?download=true" | ||||
|     } | ||||
|   } | ||||
| }); | ||||
| 
 | ||||
| window.addEventListener("resize", () => { | ||||
|   listing.updateColumns(); | ||||
| }); | ||||
| 
 | ||||
| listing.selectMoveFolder = function (event) { | ||||
|   if(event.target.getAttribute("aria-selected") === "true") { | ||||
|     event.target.setAttribute("aria-selected", false); | ||||
|     return; | ||||
|   } else { | ||||
|     if(document.querySelector(".file-list li[aria-selected=true]")) { | ||||
|       document.querySelector(".file-list li[aria-selected=true]").setAttribute("aria-selected", false); | ||||
|     } | ||||
|     event.target.setAttribute("aria-selected", true); | ||||
|     return; | ||||
|   } | ||||
| } | ||||
| 
 | ||||
| listing.getJSON = function (link) { | ||||
|   return new Promise((resolve, reject) => { | ||||
|     let request = new XMLHttpRequest(); | ||||
|     request.open("GET", link); | ||||
|     request.setRequestHeader("Accept", "application/json"); | ||||
|     request.onload = () => { | ||||
|       if(request.status == 200) { | ||||
|         resolve(request.responseText); | ||||
|       } else { | ||||
|         reject(request.statusText); | ||||
|       } | ||||
|     } | ||||
|     request.onerror = () => reject(request.statusText); | ||||
|     request.send(); | ||||
|   }); | ||||
| } | ||||
| 
 | ||||
| listing.moveMakeItem = function (url, name) { | ||||
|   let node = document.createElement("li"), | ||||
|     count = 0; | ||||
| 
 | ||||
|   node.dataset.url = url; | ||||
|   node.innerHTML = name; | ||||
|   node.setAttribute("aria-selected", false); | ||||
| 
 | ||||
|   node.addEventListener("dblclick", listing.moveDialogNext); | ||||
|   node.addEventListener("click", listing.selectMoveFolder); | ||||
|   node.addEventListener('touchstart', event => { | ||||
|     count++; | ||||
| 
 | ||||
|     setTimeout(() => { | ||||
|       count = 0; | ||||
|     }, 300) | ||||
| 
 | ||||
|     if(count > 1) { | ||||
|       listing.moveDialogNext(event); | ||||
|     } | ||||
|   }); | ||||
| 
 | ||||
|   return node; | ||||
| } | ||||
| 
 | ||||
| listing.moveDialogNext = function (event) { | ||||
|   let request = new XMLHttpRequest(), | ||||
|     prompt = document.querySelector("form.prompt.active"), | ||||
|     list = prompt.querySelector("div.file-list ul"); | ||||
| 
 | ||||
|   prompt.addEventListener("submit", listing.moveSelected); | ||||
| 
 | ||||
|   listing.getJSON(event.target.dataset.url) | ||||
|     .then((data) => { | ||||
|       let dirs = 0; | ||||
| 
 | ||||
|       prompt.querySelector("ul").innerHTML = ""; | ||||
|       prompt.querySelector('code').innerHTML = event.target.dataset.url; | ||||
| 
 | ||||
|       if(event.target.dataset.url != baseURL + "/") { | ||||
|         let node = listing.moveMakeItem(removeLastDirectoryPartOf(event.target.dataset.url) + "/", "..") | ||||
|         list.appendChild(node); | ||||
|       } | ||||
| 
 | ||||
|       if(JSON.parse(data) == null) { | ||||
|         prompt.querySelector("p").innerHTML = `There aren't any folders in this directory.`; | ||||
|         return; | ||||
|       } | ||||
| 
 | ||||
|       for(let f of JSON.parse(data)) { | ||||
|         if(f.IsDir === true) { | ||||
|           dirs++; | ||||
|           list.appendChild(listing.moveMakeItem(f.URL, f.Name)); | ||||
|         } | ||||
|       } | ||||
| 
 | ||||
|       if(dirs === 0) | ||||
|         prompt.querySelector("p").innerHTML = `There aren't any folders in this directory.`; | ||||
|     }) | ||||
|     .catch(e => console.log(e)); | ||||
| } | ||||
| 
 | ||||
| listing.moveSelected = function (event) { | ||||
|   event.preventDefault(); | ||||
| 
 | ||||
|   let promises = []; | ||||
|   buttons.setLoading("move"); | ||||
| 
 | ||||
|   for(let file of selectedItems) { | ||||
|     let fileElement = document.getElementById(file), | ||||
|       destFolder = event.target.querySelector("p code").innerHTML; | ||||
| 
 | ||||
|     if(event.currentTarget.querySelector("li[aria-selected=true]") != null) { | ||||
|       destFolder = event.currentTarget.querySelector("li[aria-selected=true]").dataset.url; | ||||
|     } | ||||
| 
 | ||||
|     let destPath = "/" + destFolder + "/" + fileElement.querySelector(".name").innerHTML; | ||||
|     destPath = destPath.replace('//', '/'); | ||||
| 
 | ||||
|     promises.push(webdav.move(fileElement.dataset.url, destPath)); | ||||
|   } | ||||
| 
 | ||||
|   Promise.all(promises) | ||||
|     .then(() => { | ||||
|       closePrompt(event); | ||||
|       buttons.setDone("move"); | ||||
|       listing.reload(); | ||||
|     }) | ||||
|     .catch(e => { | ||||
|       console.log(e); | ||||
|     }) | ||||
| } | ||||
| 
 | ||||
| listing.moveEvent = function (event) { | ||||
|   if(event.currentTarget.classList.contains("disabled")) | ||||
|     return; | ||||
| 
 | ||||
|   listing.getJSON(window.location.pathname) | ||||
|     .then((data) => { | ||||
|       let prompt = document.importNode(templates.move.content, true), | ||||
|         list = prompt.querySelector("div.file-list ul"), | ||||
|         dirs = 0; | ||||
| 
 | ||||
|       prompt.querySelector("form").addEventListener("submit", listing.moveSelected); | ||||
|       prompt.querySelector('code').innerHTML = window.location.pathname; | ||||
| 
 | ||||
|       if(window.location.pathname !== baseURL + "/") { | ||||
|         list.appendChild(listing.moveMakeItem(removeLastDirectoryPartOf(window.location.pathname) + "/", "..")); | ||||
|       } | ||||
| 
 | ||||
|       for(let f of JSON.parse(data)) { | ||||
|         if(f.IsDir === true) { | ||||
|           dirs++; | ||||
|           list.appendChild(listing.moveMakeItem(f.URL, f.Name)); | ||||
|         } | ||||
|       } | ||||
| 
 | ||||
|       if(dirs === 0) { | ||||
|         prompt.querySelector("p").innerHTML = `There aren't any folders in this directory.`; | ||||
|       } | ||||
| 
 | ||||
|       document.body.appendChild(prompt); | ||||
|       document.querySelector(".overlay").classList.add("active"); | ||||
|       document.querySelector(".prompt").classList.add("active"); | ||||
|     }) | ||||
|     .catch(e => console.log(e)); | ||||
| } | ||||
| 
 | ||||
| document.addEventListener('DOMContentLoaded', event => { | ||||
|   listing.updateColumns(); | ||||
|   listing.addDoubleTapEvent(); | ||||
| 
 | ||||
|   buttons.rename = document.getElementById("rename"); | ||||
|   buttons.upload = document.getElementById("upload"); | ||||
|   buttons.new = document.getElementById('new'); | ||||
|   buttons.download = document.getElementById('download'); | ||||
|   buttons.move = document.getElementById("move"); | ||||
| 
 | ||||
|   buttons.move.addEventListener("click", listing.moveEvent); | ||||
| 
 | ||||
|   document.getElementById('multiple-selection-activate').addEventListener('click', event => { | ||||
|     listing.selectMultiple = true; | ||||
|     clickOverlay.click(); | ||||
| 
 | ||||
|     document.getElementById('multiple-selection').classList.add('active'); | ||||
|     document.querySelector('body').style.paddingBottom = "4em"; | ||||
|   }) | ||||
| 
 | ||||
|   document.getElementById('multiple-selection-cancel').addEventListener('click', event => { | ||||
|     listing.selectMultiple = false; | ||||
| 
 | ||||
|     document.querySelector('body').style.paddingBottom = "0"; | ||||
|     document.getElementById('multiple-selection').classList.remove('active'); | ||||
|   }) | ||||
| 
 | ||||
|   if(user.AllowEdit) { | ||||
|     buttons.rename.addEventListener("click", listing.rename); | ||||
|   } | ||||
| 
 | ||||
|   let items = document.getElementsByClassName('item'); | ||||
| 
 | ||||
|   if(user.AllowNew) { | ||||
|     buttons.upload.addEventListener("click", (event) => { | ||||
|       document.getElementById("upload-input").click(); | ||||
|     }); | ||||
| 
 | ||||
|     buttons.new.addEventListener('click', listing.newFileButton); | ||||
| 
 | ||||
|     // Drag and Drop
 | ||||
|     document.addEventListener("dragover", function (event) { | ||||
|       event.preventDefault(); | ||||
|     }, false); | ||||
| 
 | ||||
|     document.addEventListener("dragenter", (event) => { | ||||
|       Array.from(items).forEach(file => { | ||||
|         file.style.opacity = 0.5; | ||||
|       }); | ||||
|     }, false); | ||||
| 
 | ||||
|     document.addEventListener("dragend", (event) => { | ||||
|       Array.from(items).forEach(file => { | ||||
|         file.style.opacity = 1; | ||||
|       }); | ||||
|     }, false); | ||||
| 
 | ||||
|     document.addEventListener("drop", listing.documentDrop, false); | ||||
|   } | ||||
| 
 | ||||
| }); | ||||
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							|  | @ -0,0 +1,5 @@ | |||
| define("ace/ext/beautify/php_rules",["require","exports","module","ace/token_iterator"],function(e,t,n){"use strict";var r=e("ace/token_iterator").TokenIterator;t.newLines=[{type:"support.php_tag",value:"<?php"},{type:"support.php_tag",value:"<?"},{type:"support.php_tag",value:"?>"},{type:"paren.lparen",value:"{",indent:!0},{type:"paren.rparen",breakBefore:!0,value:"}",indent:!1},{type:"paren.rparen",breakBefore:!0,value:"})",indent:!1,dontBreak:!0},{type:"comment"},{type:"text",value:";"},{type:"text",value:":",context:"php"},{type:"keyword",value:"case",indent:!0,dontBreak:!0},{type:"keyword",value:"default",indent:!0,dontBreak:!0},{type:"keyword",value:"break",indent:!1,dontBreak:!0},{type:"punctuation.doctype.end",value:">"},{type:"meta.tag.punctuation.end",value:">"},{type:"meta.tag.punctuation.begin",value:"<",blockTag:!0,indent:!0,dontBreak:!0},{type:"meta.tag.punctuation.begin",value:"</",indent:!1,breakBefore:!0,dontBreak:!0},{type:"punctuation.operator",value:";"}],t.spaces=[{type:"xml-pe",prepend:!0},{type:"entity.other.attribute-name",prepend:!0},{type:"storage.type",value:"var",append:!0},{type:"storage.type",value:"function",append:!0},{type:"keyword.operator",value:"="},{type:"keyword",value:"as",prepend:!0,append:!0},{type:"keyword",value:"function",append:!0},{type:"support.function",next:/[^\(]/,append:!0},{type:"keyword",value:"or",append:!0,prepend:!0},{type:"keyword",value:"and",append:!0,prepend:!0},{type:"keyword",value:"case",append:!0},{type:"keyword.operator",value:"||",append:!0,prepend:!0},{type:"keyword.operator",value:"&&",append:!0,prepend:!0}],t.singleTags=["!doctype","area","base","br","hr","input","img","link","meta"],t.transform=function(e,n,r){var i=e.getCurrentToken(),s=t.newLines,o=t.spaces,u=t.singleTags,a="",f=0,l=!1,c,h,p={},d,v={},m=!1,g="";while(i!==null){console.log(i);if(!i){i=e.stepForward();continue}i.type=="support.php_tag"&&i.value!="?>"?r="php":i.type=="support.php_tag"&&i.value=="?>"?r="html":i.type=="meta.tag.name.style"&&r!="css"?r="css":i.type=="meta.tag.name.style"&&r=="css"?r="html":i.type=="meta.tag.name.script"&&r!="js"?r="js":i.type=="meta.tag.name.script"&&r=="js"&&(r="html"),v=e.stepForward(),v&&v.type.indexOf("meta.tag.name")==0&&(d=v.value),p.type=="support.php_tag"&&p.value=="<?="&&(l=!0),i.type=="meta.tag.name"&&(i.value=i.value.toLowerCase()),i.type=="text"&&(i.value=i.value.trim());if(!i.value){i=v;continue}g=i.value;for(var y in o)i.type==o[y].type&&(!o[y].value||i.value==o[y].value)&&v&&(!o[y].next||o[y].next.test(v.value))&&(o[y].prepend&&(g=" "+i.value),o[y].append&&(g+=" "));i.type.indexOf("meta.tag.name")==0&&(c=i.value),m=!1;for(y in s)if(i.type==s[y].type&&(!s[y].value||i.value==s[y].value)&&(!s[y].blockTag||u.indexOf(d)===-1)&&(!s[y].context||s[y].context===r)){s[y].indent===!1&&f--;if(s[y].breakBefore&&(!s[y].prev||s[y].prev.test(p.value))){a+="\n",m=!0;for(y=0;y<f;y++)a+="	"}break}if(l===!1)for(y in s)if(p.type==s[y].type&&(!s[y].value||p.value==s[y].value)&&(!s[y].blockTag||u.indexOf(c)===-1)&&(!s[y].context||s[y].context===r)){s[y].indent===!0&&f++;if(!s[y].dontBreak&&!m){a+="\n";for(y=0;y<f;y++)a+="	"}break}a+=g,p.type=="support.php_tag"&&p.value=="?>"&&(l=!1),h=c,p=i,i=v;if(i===null)break}return a}}),define("ace/ext/beautify",["require","exports","module","ace/token_iterator","ace/ext/beautify/php_rules"],function(e,t,n){"use strict";var r=e("ace/token_iterator").TokenIterator,i=e("./beautify/php_rules").transform;t.beautify=function(e){var t=new r(e,0,0),n=t.getCurrentToken(),s=e.$modeId.split("/").pop(),o=i(t,s);e.doc.setValue(o)},t.commands=[{name:"beautify",exec:function(e){t.beautify(e.session)},bindKey:"Ctrl-Shift-B"}]}); | ||||
|                 (function() { | ||||
|                     window.require(["ace/ext/beautify"], function() {}); | ||||
|                 })(); | ||||
|              | ||||
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							|  | @ -0,0 +1,5 @@ | |||
| define("ace/ext/elastic_tabstops_lite",["require","exports","module","ace/editor","ace/config"],function(e,t,n){"use strict";var r=function(e){this.$editor=e;var t=this,n=[],r=!1;this.onAfterExec=function(){r=!1,t.processRows(n),n=[]},this.onExec=function(){r=!0},this.onChange=function(e){r&&(n.indexOf(e.start.row)==-1&&n.push(e.start.row),e.end.row!=e.start.row&&n.push(e.end.row))}};(function(){this.processRows=function(e){this.$inChange=!0;var t=[];for(var n=0,r=e.length;n<r;n++){var i=e[n];if(t.indexOf(i)>-1)continue;var s=this.$findCellWidthsForBlock(i),o=this.$setBlockCellWidthsToMax(s.cellWidths),u=s.firstRow;for(var a=0,f=o.length;a<f;a++){var l=o[a];t.push(u),this.$adjustRow(u,l),u++}}this.$inChange=!1},this.$findCellWidthsForBlock=function(e){var t=[],n,r=e;while(r>=0){n=this.$cellWidthsForRow(r);if(n.length==0)break;t.unshift(n),r--}var i=r+1;r=e;var s=this.$editor.session.getLength();while(r<s-1){r++,n=this.$cellWidthsForRow(r);if(n.length==0)break;t.push(n)}return{cellWidths:t,firstRow:i}},this.$cellWidthsForRow=function(e){var t=this.$selectionColumnsForRow(e),n=[-1].concat(this.$tabsForRow(e)),r=n.map(function(e){return 0}).slice(1),i=this.$editor.session.getLine(e);for(var s=0,o=n.length-1;s<o;s++){var u=n[s]+1,a=n[s+1],f=this.$rightmostSelectionInCell(t,a),l=i.substring(u,a);r[s]=Math.max(l.replace(/\s+$/g,"").length,f-u)}return r},this.$selectionColumnsForRow=function(e){var t=[],n=this.$editor.getCursorPosition();return this.$editor.session.getSelection().isEmpty()&&e==n.row&&t.push(n.column),t},this.$setBlockCellWidthsToMax=function(e){var t=!0,n,r,i,s=this.$izip_longest(e);for(var o=0,u=s.length;o<u;o++){var a=s[o];if(!a.push){console.error(a);continue}a.push(NaN);for(var f=0,l=a.length;f<l;f++){var c=a[f];t&&(n=f,i=0,t=!1);if(isNaN(c)){r=f;for(var h=n;h<r;h++)e[h][o]=i;t=!0}i=Math.max(i,c)}}return e},this.$rightmostSelectionInCell=function(e,t){var n=0;if(e.length){var r=[];for(var i=0,s=e.length;i<s;i++)e[i]<=t?r.push(i):r.push(0);n=Math.max.apply(Math,r)}return n},this.$tabsForRow=function(e){var t=[],n=this.$editor.session.getLine(e),r=/\t/g,i;while((i=r.exec(n))!=null)t.push(i.index);return t},this.$adjustRow=function(e,t){var n=this.$tabsForRow(e);if(n.length==0)return;var r=0,i=-1,s=this.$izip(t,n);for(var o=0,u=s.length;o<u;o++){var a=s[o][0],f=s[o][1];i+=1+a,f+=r;var l=i-f;if(l==0)continue;var c=this.$editor.session.getLine(e).substr(0,f),h=c.replace(/\s*$/g,""),p=c.length-h.length;l>0&&(this.$editor.session.getDocument().insertInLine({row:e,column:f+1},Array(l+1).join(" ")+"	"),this.$editor.session.getDocument().removeInLine(e,f,f+1),r+=l),l<0&&p>=-l&&(this.$editor.session.getDocument().removeInLine(e,f+l,f),r+=l)}},this.$izip_longest=function(e){if(!e[0])return[];var t=e[0].length,n=e.length;for(var r=1;r<n;r++){var i=e[r].length;i>t&&(t=i)}var s=[];for(var o=0;o<t;o++){var u=[];for(var r=0;r<n;r++)e[r][o]===""?u.push(NaN):u.push(e[r][o]);s.push(u)}return s},this.$izip=function(e,t){var n=e.length>=t.length?t.length:e.length,r=[];for(var i=0;i<n;i++){var s=[e[i],t[i]];r.push(s)}return r}}).call(r.prototype),t.ElasticTabstopsLite=r;var i=e("../editor").Editor;e("../config").defineOptions(i.prototype,"editor",{useElasticTabstops:{set:function(e){e?(this.elasticTabstops||(this.elasticTabstops=new r(this)),this.commands.on("afterExec",this.elasticTabstops.onAfterExec),this.commands.on("exec",this.elasticTabstops.onExec),this.on("change",this.elasticTabstops.onChange)):this.elasticTabstops&&(this.commands.removeListener("afterExec",this.elasticTabstops.onAfterExec),this.commands.removeListener("exec",this.elasticTabstops.onExec),this.removeListener("change",this.elasticTabstops.onChange))}}})}); | ||||
|                 (function() { | ||||
|                     window.require(["ace/ext/elastic_tabstops_lite"], function() {}); | ||||
|                 })(); | ||||
|              | ||||
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							|  | @ -0,0 +1,5 @@ | |||
| ; | ||||
|                 (function() { | ||||
|                     window.require(["ace/ext/error_marker"], function() {}); | ||||
|                 })(); | ||||
|              | ||||
|  | @ -0,0 +1,5 @@ | |||
| define("ace/ext/menu_tools/overlay_page",["require","exports","module","ace/lib/dom"],function(e,t,n){"use strict";var r=e("../../lib/dom"),i="#ace_settingsmenu, #kbshortcutmenu {background-color: #F7F7F7;color: black;box-shadow: -5px 4px 5px rgba(126, 126, 126, 0.55);padding: 1em 0.5em 2em 1em;overflow: auto;position: absolute;margin: 0;bottom: 0;right: 0;top: 0;z-index: 9991;cursor: default;}.ace_dark #ace_settingsmenu, .ace_dark #kbshortcutmenu {box-shadow: -20px 10px 25px rgba(126, 126, 126, 0.25);background-color: rgba(255, 255, 255, 0.6);color: black;}.ace_optionsMenuEntry:hover {background-color: rgba(100, 100, 100, 0.1);-webkit-transition: all 0.5s;transition: all 0.3s}.ace_closeButton {background: rgba(245, 146, 146, 0.5);border: 1px solid #F48A8A;border-radius: 50%;padding: 7px;position: absolute;right: -8px;top: -8px;z-index: 1000;}.ace_closeButton{background: rgba(245, 146, 146, 0.9);}.ace_optionsMenuKey {color: darkslateblue;font-weight: bold;}.ace_optionsMenuCommand {color: darkcyan;font-weight: normal;}";r.importCssString(i),n.exports.overlayPage=function(t,n,i,s,o,u){function l(e){e.keyCode===27&&a.click()}i=i?"top: "+i+";":"",o=o?"bottom: "+o+";":"",s=s?"right: "+s+";":"",u=u?"left: "+u+";":"";var a=document.createElement("div"),f=document.createElement("div");a.style.cssText="margin: 0; padding: 0; position: fixed; top:0; bottom:0; left:0; right:0;z-index: 9990; background-color: rgba(0, 0, 0, 0.3);",a.addEventListener("click",function(){document.removeEventListener("keydown",l),a.parentNode.removeChild(a),t.focus(),a=null}),document.addEventListener("keydown",l),f.style.cssText=i+s+o+u,f.addEventListener("click",function(e){e.stopPropagation()});var c=r.createElement("div");c.style.position="relative";var h=r.createElement("div");h.className="ace_closeButton",h.addEventListener("click",function(){a.click()}),c.appendChild(h),f.appendChild(c),f.appendChild(n),a.appendChild(f),document.body.appendChild(a),t.blur()}}),define("ace/ext/menu_tools/get_editor_keyboard_shortcuts",["require","exports","module","ace/lib/keys"],function(e,t,n){"use strict";var r=e("../../lib/keys");n.exports.getEditorKeybordShortcuts=function(e){var t=r.KEY_MODS,n=[],i={};return e.keyBinding.$handlers.forEach(function(e){var t=e.commandKeyBinding;for(var r in t){var s=r.replace(/(^|-)\w/g,function(e){return e.toUpperCase()}),o=t[r];Array.isArray(o)||(o=[o]),o.forEach(function(e){typeof e!="string"&&(e=e.name),i[e]?i[e].key+="|"+s:(i[e]={key:s,command:e},n.push(i[e]))})}}),n}}),define("ace/ext/keybinding_menu",["require","exports","module","ace/editor","ace/ext/menu_tools/overlay_page","ace/ext/menu_tools/get_editor_keyboard_shortcuts"],function(e,t,n){"use strict";function i(t){if(!document.getElementById("kbshortcutmenu")){var n=e("./menu_tools/overlay_page").overlayPage,r=e("./menu_tools/get_editor_keyboard_shortcuts").getEditorKeybordShortcuts,i=r(t),s=document.createElement("div"),o=i.reduce(function(e,t){return e+'<div class="ace_optionsMenuEntry"><span class="ace_optionsMenuCommand">'+t.command+"</span> : "+'<span class="ace_optionsMenuKey">'+t.key+"</span></div>"},"");s.id="kbshortcutmenu",s.innerHTML="<h1>Keyboard Shortcuts</h1>"+o+"</div>",n(t,s,"0","0","0",null)}}var r=e("ace/editor").Editor;n.exports.init=function(e){r.prototype.showKeyboardShortcuts=function(){i(this)},e.commands.addCommands([{name:"showKeyboardShortcuts",bindKey:{win:"Ctrl-Alt-h",mac:"Command-Alt-h"},exec:function(e,t){e.showKeyboardShortcuts()}}])}}); | ||||
|                 (function() { | ||||
|                     window.require(["ace/ext/keybinding_menu"], function() {}); | ||||
|                 })(); | ||||
|              | ||||
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							|  | @ -0,0 +1,5 @@ | |||
| define("ace/ext/linking",["require","exports","module","ace/editor","ace/config"],function(e,t,n){function i(e){var t=e.editor,n=e.getAccelKey();if(n){var t=e.editor,r=e.getDocumentPosition(),i=t.session,s=i.getTokenAt(r.row,r.column);t._emit("linkHover",{position:r,token:s})}}function s(e){var t=e.getAccelKey(),n=e.getButton();if(n==0&&t){var r=e.editor,i=e.getDocumentPosition(),s=r.session,o=s.getTokenAt(i.row,i.column);r._emit("linkClick",{position:i,token:o})}}var r=e("ace/editor").Editor;e("../config").defineOptions(r.prototype,"editor",{enableLinking:{set:function(e){e?(this.on("click",s),this.on("mousemove",i)):(this.off("click",s),this.off("mousemove",i))},value:!1}})}); | ||||
|                 (function() { | ||||
|                     window.require(["ace/ext/linking"], function() {}); | ||||
|                 })(); | ||||
|              | ||||
|  | @ -0,0 +1,5 @@ | |||
| define("ace/ext/modelist",["require","exports","module"],function(e,t,n){"use strict";function i(e){var t=a.text,n=e.split(/[\/\\]/).pop();for(var i=0;i<r.length;i++)if(r[i].supportsFile(n)){t=r[i];break}return t}var r=[],s=function(e,t,n){this.name=e,this.caption=t,this.mode="ace/mode/"+e,this.extensions=n;var r;/\^/.test(n)?r=n.replace(/\|(\^)?/g,function(e,t){return"$|"+(t?"^":"^.*\\.")})+"$":r="^.*\\.("+n+")$",this.extRe=new RegExp(r,"gi")};s.prototype.supportsFile=function(e){return e.match(this.extRe)};var o={ABAP:["abap"],ABC:["abc"],ActionScript:["as"],ADA:["ada|adb"],Apache_Conf:["^htaccess|^htgroups|^htpasswd|^conf|htaccess|htgroups|htpasswd"],AsciiDoc:["asciidoc|adoc"],Assembly_x86:["asm|a"],AutoHotKey:["ahk"],BatchFile:["bat|cmd"],Bro:["bro"],C_Cpp:["cpp|c|cc|cxx|h|hh|hpp|ino"],C9Search:["c9search_results"],Cirru:["cirru|cr"],Clojure:["clj|cljs"],Cobol:["CBL|COB"],coffee:["coffee|cf|cson|^Cakefile"],ColdFusion:["cfm"],CSharp:["cs"],CSS:["css"],Curly:["curly"],D:["d|di"],Dart:["dart"],Diff:["diff|patch"],Dockerfile:["^Dockerfile"],Dot:["dot"],Drools:["drl"],Dummy:["dummy"],DummySyntax:["dummy"],Eiffel:["e|ge"],EJS:["ejs"],Elixir:["ex|exs"],Elm:["elm"],Erlang:["erl|hrl"],Forth:["frt|fs|ldr|fth|4th"],Fortran:["f|f90"],FTL:["ftl"],Gcode:["gcode"],Gherkin:["feature"],Gitignore:["^.gitignore"],Glsl:["glsl|frag|vert"],Gobstones:["gbs"],golang:["go"],Groovy:["groovy"],HAML:["haml"],Handlebars:["hbs|handlebars|tpl|mustache"],Haskell:["hs"],Haskell_Cabal:["cabal"],haXe:["hx"],Hjson:["hjson"],HTML:["html|htm|xhtml"],HTML_Elixir:["eex|html.eex"],HTML_Ruby:["erb|rhtml|html.erb"],INI:["ini|conf|cfg|prefs"],Io:["io"],Jack:["jack"],Jade:["jade|pug"],Java:["java"],JavaScript:["js|jsm|jsx"],JSON:["json"],JSONiq:["jq"],JSP:["jsp"],JSX:["jsx"],Julia:["jl"],Kotlin:["kt|kts"],LaTeX:["tex|latex|ltx|bib"],LESS:["less"],Liquid:["liquid"],Lisp:["lisp"],LiveScript:["ls"],LogiQL:["logic|lql"],LSL:["lsl"],Lua:["lua"],LuaPage:["lp"],Lucene:["lucene"],Makefile:["^Makefile|^GNUmakefile|^makefile|^OCamlMakefile|make"],Markdown:["md|markdown"],Mask:["mask"],MATLAB:["matlab"],Maze:["mz"],MEL:["mel"],MUSHCode:["mc|mush"],MySQL:["mysql"],Nix:["nix"],NSIS:["nsi|nsh"],ObjectiveC:["m|mm"],OCaml:["ml|mli"],Pascal:["pas|p"],Perl:["pl|pm"],pgSQL:["pgsql"],PHP:["php|phtml|shtml|php3|php4|php5|phps|phpt|aw|ctp|module"],Powershell:["ps1"],Praat:["praat|praatscript|psc|proc"],Prolog:["plg|prolog"],Properties:["properties"],Protobuf:["proto"],Python:["py"],R:["r"],Razor:["cshtml|asp"],RDoc:["Rd"],RHTML:["Rhtml"],RST:["rst"],Ruby:["rb|ru|gemspec|rake|^Guardfile|^Rakefile|^Gemfile"],Rust:["rs"],SASS:["sass"],SCAD:["scad"],Scala:["scala"],Scheme:["scm|sm|rkt|oak|scheme"],SCSS:["scss"],SH:["sh|bash|^.bashrc"],SJS:["sjs"],Smarty:["smarty|tpl"],snippets:["snippets"],Soy_Template:["soy"],Space:["space"],SQL:["sql"],SQLServer:["sqlserver"],Stylus:["styl|stylus"],SVG:["svg"],Swift:["swift"],Tcl:["tcl"],Tex:["tex"],Text:["txt"],Textile:["textile"],Toml:["toml"],TSX:["tsx"],Twig:["twig|swig"],Typescript:["ts|typescript|str"],Vala:["vala"],VBScript:["vbs|vb"],Velocity:["vm"],Verilog:["v|vh|sv|svh"],VHDL:["vhd|vhdl"],Wollok:["wlk|wpgm|wtest"],XML:["xml|rdf|rss|wsdl|xslt|atom|mathml|mml|xul|xbl|xaml"],XQuery:["xq"],YAML:["yaml|yml"],Django:["html"]},u={ObjectiveC:"Objective-C",CSharp:"C#",golang:"Go",C_Cpp:"C and C++",coffee:"CoffeeScript",HTML_Ruby:"HTML (Ruby)",HTML_Elixir:"HTML (Elixir)",FTL:"FreeMarker"},a={};for(var f in o){var l=o[f],c=(u[f]||f).replace(/_/g," "),h=f.toLowerCase(),p=new s(h,c,l[0]);a[h]=p,r.push(p)}n.exports={getModeForPath:i,modes:r,modesByName:a}}); | ||||
|                 (function() { | ||||
|                     window.require(["ace/ext/modelist"], function() {}); | ||||
|                 })(); | ||||
|              | ||||
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							|  | @ -0,0 +1,5 @@ | |||
| define("ace/ext/spellcheck",["require","exports","module","ace/lib/event","ace/editor","ace/config"],function(e,t,n){"use strict";var r=e("../lib/event");t.contextMenuHandler=function(e){var t=e.target,n=t.textInput.getElement();if(!t.selection.isEmpty())return;var i=t.getCursorPosition(),s=t.session.getWordRange(i.row,i.column),o=t.session.getTextRange(s);t.session.tokenRe.lastIndex=0;if(!t.session.tokenRe.test(o))return;var u="",a=o+" "+u;n.value=a,n.setSelectionRange(o.length,o.length+1),n.setSelectionRange(0,0),n.setSelectionRange(0,o.length);var f=!1;r.addListener(n,"keydown",function l(){r.removeListener(n,"keydown",l),f=!0}),t.textInput.setInputHandler(function(e){console.log(e,a,n.selectionStart,n.selectionEnd);if(e==a)return"";if(e.lastIndexOf(a,0)===0)return e.slice(a.length);if(e.substr(n.selectionEnd)==a)return e.slice(0,-a.length);if(e.slice(-2)==u){var r=e.slice(0,-2);if(r.slice(-1)==" ")return f?r.substring(0,n.selectionEnd):(r=r.slice(0,-1),t.session.replace(s,r),"")}return e})};var i=e("../editor").Editor;e("../config").defineOptions(i.prototype,"editor",{spellcheck:{set:function(e){var n=this.textInput.getElement();n.spellcheck=!!e,e?this.on("nativecontextmenu",t.contextMenuHandler):this.removeListener("nativecontextmenu",t.contextMenuHandler)},value:!0}})}); | ||||
|                 (function() { | ||||
|                     window.require(["ace/ext/spellcheck"], function() {}); | ||||
|                 })(); | ||||
|              | ||||
|  | @ -0,0 +1,5 @@ | |||
| define("ace/split",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/editor","ace/virtual_renderer","ace/edit_session"],function(e,t,n){"use strict";function l(e,t){this.$u=e,this.$doc=t}var r=e("./lib/oop"),i=e("./lib/lang"),s=e("./lib/event_emitter").EventEmitter,o=e("./editor").Editor,u=e("./virtual_renderer").VirtualRenderer,a=e("./edit_session").EditSession,f=function(e,t,n){this.BELOW=1,this.BESIDE=0,this.$container=e,this.$theme=t,this.$splits=0,this.$editorCSS="",this.$editors=[],this.$orientation=this.BESIDE,this.setSplits(n||1),this.$cEditor=this.$editors[0],this.on("focus",function(e){this.$cEditor=e}.bind(this))};(function(){r.implement(this,s),this.$createEditor=function(){var e=document.createElement("div");e.className=this.$editorCSS,e.style.cssText="position: absolute; top:0px; bottom:0px",this.$container.appendChild(e);var t=new o(new u(e,this.$theme));return t.on("focus",function(){this._emit("focus",t)}.bind(this)),this.$editors.push(t),t.setFontSize(this.$fontSize),t},this.setSplits=function(e){var t;if(e<1)throw"The number of splits have to be > 0!";if(e==this.$splits)return;if(e>this.$splits){while(this.$splits<this.$editors.length&&this.$splits<e)t=this.$editors[this.$splits],this.$container.appendChild(t.container),t.setFontSize(this.$fontSize),this.$splits++;while(this.$splits<e)this.$createEditor(),this.$splits++}else while(this.$splits>e)t=this.$editors[this.$splits-1],this.$container.removeChild(t.container),this.$splits--;this.resize()},this.getSplits=function(){return this.$splits},this.getEditor=function(e){return this.$editors[e]},this.getCurrentEditor=function(){return this.$cEditor},this.focus=function(){this.$cEditor.focus()},this.blur=function(){this.$cEditor.blur()},this.setTheme=function(e){this.$editors.forEach(function(t){t.setTheme(e)})},this.setKeyboardHandler=function(e){this.$editors.forEach(function(t){t.setKeyboardHandler(e)})},this.forEach=function(e,t){this.$editors.forEach(e,t)},this.$fontSize="",this.setFontSize=function(e){this.$fontSize=e,this.forEach(function(t){t.setFontSize(e)})},this.$cloneSession=function(e){var t=new a(e.getDocument(),e.getMode()),n=e.getUndoManager();if(n){var r=new l(n,t);t.setUndoManager(r)}return t.$informUndoManager=i.delayedCall(function(){t.$deltas=[]}),t.setTabSize(e.getTabSize()),t.setUseSoftTabs(e.getUseSoftTabs()),t.setOverwrite(e.getOverwrite()),t.setBreakpoints(e.getBreakpoints()),t.setUseWrapMode(e.getUseWrapMode()),t.setUseWorker(e.getUseWorker()),t.setWrapLimitRange(e.$wrapLimitRange.min,e.$wrapLimitRange.max),t.$foldData=e.$cloneFoldData(),t},this.setSession=function(e,t){var n;t==null?n=this.$cEditor:n=this.$editors[t];var r=this.$editors.some(function(t){return t.session===e});return r&&(e=this.$cloneSession(e)),n.setSession(e),e},this.getOrientation=function(){return this.$orientation},this.setOrientation=function(e){if(this.$orientation==e)return;this.$orientation=e,this.resize()},this.resize=function(){var e=this.$container.clientWidth,t=this.$container.clientHeight,n;if(this.$orientation==this.BESIDE){var r=e/this.$splits;for(var i=0;i<this.$splits;i++)n=this.$editors[i],n.container.style.width=r+"px",n.container.style.top="0px",n.container.style.left=i*r+"px",n.container.style.height=t+"px",n.resize()}else{var s=t/this.$splits;for(var i=0;i<this.$splits;i++)n=this.$editors[i],n.container.style.width=e+"px",n.container.style.top=i*s+"px",n.container.style.left="0px",n.container.style.height=s+"px",n.resize()}}}).call(f.prototype),function(){this.execute=function(e){this.$u.execute(e)},this.undo=function(){var e=this.$u.undo(!0);e&&this.$doc.selection.setSelectionRange(e)},this.redo=function(){var e=this.$u.redo(!0);e&&this.$doc.selection.setSelectionRange(e)},this.reset=function(){this.$u.reset()},this.hasUndo=function(){return this.$u.hasUndo()},this.hasRedo=function(){return this.$u.hasRedo()}}.call(l.prototype),t.Split=f}),define("ace/ext/split",["require","exports","module","ace/split"],function(e,t,n){"use strict";n.exports=e("../split")}); | ||||
|                 (function() { | ||||
|                     window.require(["ace/ext/split"], function() {}); | ||||
|                 })(); | ||||
|              | ||||
|  | @ -0,0 +1,5 @@ | |||
| define("ace/ext/static_highlight",["require","exports","module","ace/edit_session","ace/layer/text","ace/config","ace/lib/dom"],function(e,t,n){"use strict";var r=e("../edit_session").EditSession,i=e("../layer/text").Text,s=".ace_static_highlight {font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'source-code-pro', 'Droid Sans Mono', monospace;font-size: 12px;white-space: pre-wrap}.ace_static_highlight .ace_gutter {width: 2em;text-align: right;padding: 0 3px 0 0;margin-right: 3px;}.ace_static_highlight.ace_show_gutter .ace_line {padding-left: 2.6em;}.ace_static_highlight .ace_line { position: relative; }.ace_static_highlight .ace_gutter-cell {-moz-user-select: -moz-none;-khtml-user-select: none;-webkit-user-select: none;user-select: none;top: 0;bottom: 0;left: 0;position: absolute;}.ace_static_highlight .ace_gutter-cell:before {content: counter(ace_line, decimal);counter-increment: ace_line;}.ace_static_highlight {counter-reset: ace_line;}",o=e("../config"),u=e("../lib/dom"),a=function(){this.config={}};a.prototype=i.prototype;var f=function(e,t,n){var r=e.className.match(/lang-(\w+)/),i=t.mode||r&&"ace/mode/"+r[1];if(!i)return!1;var s=t.theme||"ace/theme/textmate",o="",a=[];if(e.firstElementChild){var l=0;for(var c=0;c<e.childNodes.length;c++){var h=e.childNodes[c];h.nodeType==3?(l+=h.data.length,o+=h.data):a.push(l,h)}}else o=u.getInnerText(e),t.trim&&(o=o.trim());f.render(o,i,s,t.firstLineNumber,!t.showGutter,function(t){u.importCssString(t.css,"ace_highlight"),e.innerHTML=t.html;var r=e.firstChild.firstChild;for(var i=0;i<a.length;i+=2){var s=t.session.doc.indexToPosition(a[i]),o=a[i+1],f=r.children[s.row];f&&f.appendChild(o)}n&&n()})};f.render=function(e,t,n,i,s,u){function h(){var r=f.renderSync(e,t,n,i,s);return u?u(r):r}var a=1,l=r.prototype.$modes;typeof n=="string"&&(a++,o.loadModule(["theme",n],function(e){n=e,--a||h()}));var c;return t&&typeof t=="object"&&!t.getTokenizer&&(c=t,t=c.path),typeof t=="string"&&(a++,o.loadModule(["mode",t],function(e){if(!l[t]||c)l[t]=new e.Mode(c);t=l[t],--a||h()})),--a||h()},f.renderSync=function(e,t,n,i,o){i=parseInt(i||1,10);var u=new r("");u.setUseWorker(!1),u.setMode(t);var f=new a;f.setSession(u),u.setValue(e);var l=[],c=u.getLength();for(var h=0;h<c;h++)l.push("<div class='ace_line'>"),o||l.push("<span class='ace_gutter ace_gutter-cell' unselectable='on'></span>"),f.$renderLine(l,h,!0,!1),l.push("\n</div>");var p="<div class='"+n.cssClass+"'>"+"<div class='ace_static_highlight"+(o?"":" ace_show_gutter")+"' style='counter-reset:ace_line "+(i-1)+"'>"+l.join("")+"</div>"+"</div>";return f.destroy(),{css:s+n.cssText,html:p,session:u}},n.exports=f,n.exports.highlight=f}); | ||||
|                 (function() { | ||||
|                     window.require(["ace/ext/static_highlight"], function() {}); | ||||
|                 })(); | ||||
|              | ||||
|  | @ -0,0 +1,5 @@ | |||
| define("ace/ext/statusbar",["require","exports","module","ace/lib/dom","ace/lib/lang"],function(e,t,n){"use strict";var r=e("ace/lib/dom"),i=e("ace/lib/lang"),s=function(e,t){this.element=r.createElement("div"),this.element.className="ace_status-indicator",this.element.style.cssText="display: inline-block;",t.appendChild(this.element);var n=i.delayedCall(function(){this.updateStatus(e)}.bind(this)).schedule.bind(null,100);e.on("changeStatus",n),e.on("changeSelection",n),e.on("keyboardActivity",n)};(function(){this.updateStatus=function(e){function n(e,n){e&&t.push(e,n||"|")}var t=[];n(e.keyBinding.getStatusText(e)),e.commands.recording&&n("REC");var r=e.selection,i=r.lead;if(!r.isEmpty()){var s=e.getSelectionRange();n("("+(s.end.row-s.start.row)+":"+(s.end.column-s.start.column)+")"," ")}n(i.row+":"+i.column," "),r.rangeCount&&n("["+r.rangeCount+"]"," "),t.pop(),this.element.textContent=t.join("")}}).call(s.prototype),t.StatusBar=s}); | ||||
|                 (function() { | ||||
|                     window.require(["ace/ext/statusbar"], function() {}); | ||||
|                 })(); | ||||
|              | ||||
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							|  | @ -0,0 +1,5 @@ | |||
| define("ace/ext/themelist",["require","exports","module","ace/lib/fixoldbrowsers"],function(e,t,n){"use strict";e("ace/lib/fixoldbrowsers");var r=[["Chrome"],["Clouds"],["Crimson Editor"],["Dawn"],["Dreamweaver"],["Eclipse"],["GitHub"],["IPlastic"],["Solarized Light"],["TextMate"],["Tomorrow"],["XCode"],["Kuroir"],["KatzenMilch"],["SQL Server","sqlserver","light"],["Ambiance","ambiance","dark"],["Chaos","chaos","dark"],["Clouds Midnight","clouds_midnight","dark"],["Cobalt","cobalt","dark"],["Gruvbox","gruvbox","dark"],["idle Fingers","idle_fingers","dark"],["krTheme","kr_theme","dark"],["Merbivore","merbivore","dark"],["Merbivore Soft","merbivore_soft","dark"],["Mono Industrial","mono_industrial","dark"],["Monokai","monokai","dark"],["Pastel on dark","pastel_on_dark","dark"],["Solarized Dark","solarized_dark","dark"],["Terminal","terminal","dark"],["Tomorrow Night","tomorrow_night","dark"],["Tomorrow Night Blue","tomorrow_night_blue","dark"],["Tomorrow Night Bright","tomorrow_night_bright","dark"],["Tomorrow Night 80s","tomorrow_night_eighties","dark"],["Twilight","twilight","dark"],["Vibrant Ink","vibrant_ink","dark"]];t.themesByName={},t.themes=r.map(function(e){var n=e[1]||e[0].replace(/ /g,"_").toLowerCase(),r={caption:e[0],theme:"ace/theme/"+n,isDark:e[2]=="dark",name:n};return t.themesByName[n]=r,r})}); | ||||
|                 (function() { | ||||
|                     window.require(["ace/ext/themelist"], function() {}); | ||||
|                 })(); | ||||
|              | ||||
|  | @ -0,0 +1,5 @@ | |||
| define("ace/ext/whitespace",["require","exports","module","ace/lib/lang"],function(e,t,n){"use strict";var r=e("../lib/lang");t.$detectIndentation=function(e,t){function c(e){var t=0;for(var r=e;r<n.length;r+=e)t+=n[r]||0;return t}var n=[],r=[],i=0,s=0,o=Math.min(e.length,1e3);for(var u=0;u<o;u++){var a=e[u];if(!/^\s*[^*+\-\s]/.test(a))continue;if(a[0]=="	")i++,s=-Number.MAX_VALUE;else{var f=a.match(/^ */)[0].length;if(f&&a[f]!="	"){var l=f-s;l>0&&!(s%l)&&!(f%l)&&(r[l]=(r[l]||0)+1),n[f]=(n[f]||0)+1}s=f}while(u<o&&a[a.length-1]=="\\")a=e[u++]}var h=r.reduce(function(e,t){return e+t},0),p={score:0,length:0},d=0;for(var u=1;u<12;u++){var v=c(u);u==1?(d=v,v=n[1]?.9:.8,n.length||(v=0)):v/=d,r[u]&&(v+=r[u]/h),v>p.score&&(p={score:v,length:u})}if(p.score&&p.score>1.4)var m=p.length;if(i>d+1){if(m==1||d<i/4||p.score<1.8)m=undefined;return{ch:"	",length:m}}if(d>i+1)return{ch:" ",length:m}},t.detectIndentation=function(e){var n=e.getLines(0,1e3),r=t.$detectIndentation(n)||{};return r.ch&&e.setUseSoftTabs(r.ch==" "),r.length&&e.setTabSize(r.length),r},t.trimTrailingSpace=function(e,t){var n=e.getDocument(),r=n.getAllLines(),i=t?-1:0;for(var s=0,o=r.length;s<o;s++){var u=r[s],a=u.search(/\s+$/);a>i&&n.removeInLine(s,a,u.length)}},t.convertIndentation=function(e,t,n){var i=e.getTabString()[0],s=e.getTabSize();n||(n=s),t||(t=i);var o=t=="	"?t:r.stringRepeat(t,n),u=e.doc,a=u.getAllLines(),f={},l={};for(var c=0,h=a.length;c<h;c++){var p=a[c],d=p.match(/^\s*/)[0];if(d){var v=e.$getStringScreenWidth(d)[0],m=Math.floor(v/s),g=v%s,y=f[m]||(f[m]=r.stringRepeat(o,m));y+=l[g]||(l[g]=r.stringRepeat(" ",g)),y!=d&&(u.removeInLine(c,0,d.length),u.insertInLine({row:c,column:0},y))}}e.setTabSize(n),e.setUseSoftTabs(t==" ")},t.$parseStringArg=function(e){var t={};/t/.test(e)?t.ch="	":/s/.test(e)&&(t.ch=" ");var n=e.match(/\d+/);return n&&(t.length=parseInt(n[0],10)),t},t.$parseArg=function(e){return e?typeof e=="string"?t.$parseStringArg(e):typeof e.text=="string"?t.$parseStringArg(e.text):e:{}},t.commands=[{name:"detectIndentation",exec:function(e){t.detectIndentation(e.session)}},{name:"trimTrailingSpace",exec:function(e){t.trimTrailingSpace(e.session)}},{name:"convertIndentation",exec:function(e,n){var r=t.$parseArg(n);t.convertIndentation(e.session,r.ch,r.length)}},{name:"setIndentation",exec:function(e,n){var r=t.$parseArg(n);r.length&&e.session.setTabSize(r.length),r.ch&&e.session.setUseSoftTabs(r.ch==" ")}}]}); | ||||
|                 (function() { | ||||
|                     window.require(["ace/ext/whitespace"], function() {}); | ||||
|                 })(); | ||||
|              | ||||
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							|  | @ -0,0 +1 @@ | |||
| define("ace/mode/abc_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:["zupfnoter.information.comment.line.percentage","information.keyword","in formation.keyword.embedded"],regex:"(%%%%)(hn\\.[a-z]*)(.*)",comment:"Instruction Comment"},{token:["information.comment.line.percentage","information.keyword.embedded"],regex:"(%%)(.*)",comment:"Instruction Comment"},{token:"comment.line.percentage",regex:"%.*",comment:"Comments"},{token:"barline.keyword.operator",regex:"[\\[:]*[|:][|\\]:]*(?:\\[?[0-9]+)?|\\[[0-9]+",comment:"Bar lines"},{token:["information.keyword.embedded","information.argument.string.unquoted"],regex:"(\\[[A-Za-z]:)([^\\]]*\\])",comment:"embedded Header lines"},{token:["information.keyword","information.argument.string.unquoted"],regex:"^([A-Za-z]:)([^%\\\\]*)",comment:"Header lines"},{token:["text","entity.name.function","string.unquoted","text"],regex:"(\\[)([A-Z]:)(.*?)(\\])",comment:"Inline fields"},{token:["accent.constant.language","pitch.constant.numeric","duration.constant.numeric"],regex:"([\\^=_]*)([A-Ga-gz][,']*)([0-9]*/*[><0-9]*)",comment:"Notes"},{token:"zupfnoter.jumptarget.string.quoted",regex:'[\\"!]\\^\\:.*?[\\"!]',comment:"Zupfnoter jumptarget"},{token:"zupfnoter.goto.string.quoted",regex:'[\\"!]\\^\\@.*?[\\"!]',comment:"Zupfnoter goto"},{token:"zupfnoter.annotation.string.quoted",regex:'[\\"!]\\^\\!.*?[\\"!]',comment:"Zupfnoter annoation"},{token:"zupfnoter.annotationref.string.quoted",regex:'[\\"!]\\^\\#.*?[\\"!]',comment:"Zupfnoter annotation reference"},{token:"chordname.string.quoted",regex:'[\\"!]\\^.*?[\\"!]',comment:"abc chord"},{token:"string.quoted",regex:'[\\"!].*?[\\"!]',comment:"abc annotation"}]},this.normalizeRules()};s.metaData={fileTypes:["abc"],name:"ABC",scopeName:"text.abcnotation"},r.inherits(s,i),t.ABCHighlightRules=s}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),function(){this.foldingStartMarker=/(\{|\[)[^\}\]]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++t<a){n=e.getLine(t);var f=n.search(/\S/);if(f===-1)continue;if(r>f)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++n<s){t=e.getLine(n);var f=u.exec(t);if(!f)continue;f[1]?a--:a++;if(!a)break}var l=n;if(l>o)return new i(o,r,l,t.length)}}.call(o.prototype)}),define("ace/mode/abc",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/abc_highlight_rules","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./abc_highlight_rules").ABCHighlightRules,o=e("./folding/cstyle").FoldMode,u=function(){this.HighlightRules=s,this.foldingRules=new o,this.$behaviour=this.$defaultBehaviour};r.inherits(u,i),function(){this.$id="ace/mode/abc"}.call(u.prototype),t.Mode=u}) | ||||
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							|  | @ -0,0 +1 @@ | |||
| define("ace/mode/ada_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){var e="abort|else|new|return|abs|elsif|not|reverse|abstract|end|null|accept|entry|select|access|exception|of|separate|aliased|exit|or|some|all|others|subtype|and|for|out|synchronized|array|function|overriding|at|tagged|generic|package|task|begin|goto|pragma|terminate|body|private|then|if|procedure|type|case|in|protected|constant|interface|until||is|raise|use|declare|range|delay|limited|record|when|delta|loop|rem|while|digits|renames|with|do|mod|requeue|xor",t="true|false|null",n="count|min|max|avg|sum|rank|now|coalesce|main",r=this.createKeywordMapper({"support.function":n,keyword:e,"constant.language":t},"identifier",!0);this.$rules={start:[{token:"comment",regex:"--.*$"},{token:"string",regex:'".*?"'},{token:"string",regex:"'.*?'"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:r,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"\\+|\\-|\\/|\\/\\/|%|<@>|@>|<@|&|\\^|~|<|>|<=|=>|==|!=|<>|="},{token:"paren.lparen",regex:"[\\(]"},{token:"paren.rparen",regex:"[\\)]"},{token:"text",regex:"\\s+"}]}};r.inherits(s,i),t.AdaHighlightRules=s}),define("ace/mode/ada",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/ada_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./ada_highlight_rules").AdaHighlightRules,o=function(){this.HighlightRules=s,this.$behaviour=this.$defaultBehaviour};r.inherits(o,i),function(){this.lineCommentStart="--",this.$id="ace/mode/ada"}.call(o.prototype),t.Mode=o}) | ||||
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							|  | @ -0,0 +1 @@ | |||
| define("ace/mode/batchfile_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:"keyword.command.dosbatch",regex:"\\b(?:append|assoc|at|attrib|break|cacls|cd|chcp|chdir|chkdsk|chkntfs|cls|cmd|color|comp|compact|convert|copy|date|del|dir|diskcomp|diskcopy|doskey|echo|endlocal|erase|fc|find|findstr|format|ftype|graftabl|help|keyb|label|md|mkdir|mode|more|move|path|pause|popd|print|prompt|pushd|rd|recover|ren|rename|replace|restore|rmdir|set|setlocal|shift|sort|start|subst|time|title|tree|type|ver|verify|vol|xcopy)\\b",caseInsensitive:!0},{token:"keyword.control.statement.dosbatch",regex:"\\b(?:goto|call|exit)\\b",caseInsensitive:!0},{token:"keyword.control.conditional.if.dosbatch",regex:"\\bif\\s+not\\s+(?:exist|defined|errorlevel|cmdextversion)\\b",caseInsensitive:!0},{token:"keyword.control.conditional.dosbatch",regex:"\\b(?:if|else)\\b",caseInsensitive:!0},{token:"keyword.control.repeat.dosbatch",regex:"\\bfor\\b",caseInsensitive:!0},{token:"keyword.operator.dosbatch",regex:"\\b(?:EQU|NEQ|LSS|LEQ|GTR|GEQ)\\b"},{token:["doc.comment","comment"],regex:"(?:^|\\b)(rem)($|\\s.*$)",caseInsensitive:!0},{token:"comment.line.colons.dosbatch",regex:"::.*$"},{include:"variable"},{token:"punctuation.definition.string.begin.shell",regex:'"',push:[{token:"punctuation.definition.string.end.shell",regex:'"',next:"pop"},{include:"variable"},{defaultToken:"string.quoted.double.dosbatch"}]},{token:"keyword.operator.pipe.dosbatch",regex:"[|]"},{token:"keyword.operator.redirect.shell",regex:"&>|\\d*>&\\d*|\\d*(?:>>|>|<)|\\d*<&|\\d*<>"}],variable:[{token:"constant.numeric",regex:"%%\\w+|%[*\\d]|%\\w+%"},{token:"constant.numeric",regex:"%~\\d+"},{token:["markup.list","constant.other","markup.list"],regex:"(%)(\\w+)(%?)"}]},this.normalizeRules()};s.metaData={name:"Batch File",scopeName:"source.dosbatch",fileTypes:["bat"]},r.inherits(s,i),t.BatchFileHighlightRules=s}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),function(){this.foldingStartMarker=/(\{|\[)[^\}\]]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++t<a){n=e.getLine(t);var f=n.search(/\S/);if(f===-1)continue;if(r>f)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++n<s){t=e.getLine(n);var f=u.exec(t);if(!f)continue;f[1]?a--:a++;if(!a)break}var l=n;if(l>o)return new i(o,r,l,t.length)}}.call(o.prototype)}),define("ace/mode/batchfile",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/batchfile_highlight_rules","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./batchfile_highlight_rules").BatchFileHighlightRules,o=e("./folding/cstyle").FoldMode,u=function(){this.HighlightRules=s,this.foldingRules=new o,this.$behaviour=this.$defaultBehaviour};r.inherits(u,i),function(){this.lineCommentStart="::",this.blockComment="",this.$id="ace/mode/batchfile"}.call(u.prototype),t.Mode=u}) | ||||
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							|  | @ -0,0 +1 @@ | |||
| define("ace/mode/c9search_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";function o(e,t){try{return new RegExp(e,t)}catch(n){}}var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./text_highlight_rules").TextHighlightRules,u=function(){this.$rules={start:[{tokenNames:["c9searchresults.constant.numeric","c9searchresults.text","c9searchresults.text","c9searchresults.keyword"],regex:/(^\s+[0-9]+)(:)(\d*\s?)([^\r\n]+)/,onMatch:function(e,t,n){var r=this.splitRegex.exec(e),i=this.tokenNames,s=[{type:i[0],value:r[1]},{type:i[1],value:r[2]}];r[3]&&(r[3]==" "?s[1]={type:i[1],value:r[2]+" "}:s.push({type:i[1],value:r[3]}));var o=n[1],u=r[4],a,f=0;if(o&&o.exec){o.lastIndex=0;while(a=o.exec(u)){var l=u.substring(f,a.index);f=o.lastIndex,l&&s.push({type:i[2],value:l});if(a[0])s.push({type:i[3],value:a[0]});else if(!l)break}}return f<u.length&&s.push({type:i[2],value:u.substr(f)}),s}},{regex:"^Searching for [^\\r\\n]*$",onMatch:function(e,t,n){var r=e.split("");if(r.length<3)return"text";var s,u,a,f=0,l=[{value:r[f++]+"'",type:"text"},{value:u=r[f++],type:"text"},{value:"'"+r[f++],type:"text"}];r[2]!==" in"&&(a=r[f],l.push({value:"'"+r[f++]+"'",type:"text"},{value:r[f++],type:"text"})),l.push({value:" "+r[f++]+" ",type:"text"}),r[f+1]?(s=r[f+1],l.push({value:"("+r[f+1]+")",type:"text"}),f+=1):f-=1;while(f++<r.length)r[f]&&l.push({value:r[f],type:"text"});a&&(u=a,s=""),u&&(/regex/.test(s)||(u=i.escapeRegExp(u)),/whole/.test(s)&&(u="\\b"+u+"\\b"));var c=u&&o("("+u+")",/ sensitive/.test(s)?"g":"ig");return c&&(n[0]=t,n[1]=c),l}},{regex:"^(?=Found \\d+ matches)",token:"text",next:"numbers"},{token:"string",regex:"^\\S:?[^:]+",next:"numbers"}],numbers:[{regex:"\\d+",token:"constant.numeric"},{regex:"$",token:"text",next:"start"}]},this.normalizeRules()};r.inherits(u,s),t.C9SearchHighlightRules=u}),define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),define("ace/mode/folding/c9search",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(){};r.inherits(o,s),function(){this.foldingStartMarker=/^(\S.*:|Searching for.*)$/,this.foldingStopMarker=/^(\s+|Found.*)$/,this.getFoldWidgetRange=function(e,t,n){var r=e.doc.getAllLines(n),s=r[n],o=/^(Found.*|Searching for.*)$/,u=/^(\S.*:|\s*)$/,a=o.test(s)?o:u,f=n,l=n;if(this.foldingStartMarker.test(s)){for(var c=n+1,h=e.getLength();c<h;c++)if(a.test(r[c]))break;l=c}else if(this.foldingStopMarker.test(s)){for(var c=n-1;c>=0;c--){s=r[c];if(a.test(s))break}f=c}if(f!=l){var p=s.length;return a===o&&(p=s.search(/\(Found[^)]+\)$|$/)),new i(f,p,l,0)}}}.call(o.prototype)}),define("ace/mode/c9search",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/c9search_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/folding/c9search"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./c9search_highlight_rules").C9SearchHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("./folding/c9search").FoldMode,a=function(){this.HighlightRules=s,this.$outdent=new o,this.foldingRules=new u};r.inherits(a,i),function(){this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t);return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.$id="ace/mode/c9search"}.call(a.prototype),t.Mode=a}) | ||||
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							|  | @ -0,0 +1 @@ | |||
| define("ace/mode/cirru_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:"constant.numeric",regex:/[\d\.]+/},{token:"comment.line.double-dash",regex:/--/,next:"comment"},{token:"storage.modifier",regex:/\(/},{token:"storage.modifier",regex:/,/,next:"line"},{token:"support.function",regex:/[^\(\)"\s]+/,next:"line"},{token:"string.quoted.double",regex:/"/,next:"string"},{token:"storage.modifier",regex:/\)/}],comment:[{token:"comment.line.double-dash",regex:/ +[^\n]+/,next:"start"}],string:[{token:"string.quoted.double",regex:/"/,next:"line"},{token:"constant.character.escape",regex:/\\/,next:"escape"},{token:"string.quoted.double",regex:/[^\\"]+/}],escape:[{token:"constant.character.escape",regex:/./,next:"string"}],line:[{token:"constant.numeric",regex:/[\d\.]+/},{token:"markup.raw",regex:/^\s*/,next:"start"},{token:"storage.modifier",regex:/\$/,next:"start"},{token:"variable.parameter",regex:/[^\(\)"\s]+/},{token:"storage.modifier",regex:/\(/,next:"start"},{token:"storage.modifier",regex:/\)/},{token:"markup.raw",regex:/^ */,next:"start"},{token:"string.quoted.double",regex:/"/,next:"string"}]}};r.inherits(s,i),t.CirruHighlightRules=s}),define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./fold_mode").FoldMode,s=e("../../range").Range,o=t.FoldMode=function(){};r.inherits(o,i),function(){this.getFoldWidgetRange=function(e,t,n){var r=this.indentationBlock(e,n);if(r)return r;var i=/\S/,o=e.getLine(n),u=o.search(i);if(u==-1||o[u]!="#")return;var a=o.length,f=e.getLength(),l=n,c=n;while(++n<f){o=e.getLine(n);var h=o.search(i);if(h==-1)continue;if(o[h]!="#")break;c=n}if(c>l){var p=e.getLine(c).length;return new s(l,a,c,p)}},this.getFoldWidget=function(e,t,n){var r=e.getLine(n),i=r.search(/\S/),s=e.getLine(n+1),o=e.getLine(n-1),u=o.search(/\S/),a=s.search(/\S/);if(i==-1)return e.foldWidgets[n-1]=u!=-1&&u<a?"start":"","";if(u==-1){if(i==a&&r[i]=="#"&&s[i]=="#")return e.foldWidgets[n-1]="",e.foldWidgets[n+1]="","start"}else if(u==i&&r[i]=="#"&&o[i]=="#"&&e.getLine(n-2).search(/\S/)==-1)return e.foldWidgets[n-1]="start",e.foldWidgets[n+1]="","";return u!=-1&&u<i?e.foldWidgets[n-1]="start":e.foldWidgets[n-1]="",i<a?"start":""}}.call(o.prototype)}),define("ace/mode/cirru",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/cirru_highlight_rules","ace/mode/folding/coffee"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./cirru_highlight_rules").CirruHighlightRules,o=e("./folding/coffee").FoldMode,u=function(){this.HighlightRules=s,this.foldingRules=new o,this.$behaviour=this.$defaultBehaviour};r.inherits(u,i),function(){this.lineCommentStart="--",this.$id="ace/mode/cirru"}.call(u.prototype),t.Mode=u}) | ||||
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							|  | @ -0,0 +1 @@ | |||
| define("ace/mode/cobol_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){var e="ACCEPT|MERGE|SUM|ADD||MESSAGE|TABLE|ADVANCING|MODE|TAPE|AFTER|MULTIPLY|TEST|ALL|NEGATIVE|TEXT|ALPHABET|NEXT|THAN|ALSO|NO|THEN|ALTERNATE|NOT|THROUGH|AND|NUMBER|THRU|ANY|OCCURS|TIME|ARE|OF|TO|AREA|OFF|TOP||ASCENDING|OMITTED|TRUE|ASSIGN|ON|TYPE|AT|OPEN|UNIT|AUTHOR|OR|UNTIL|BEFORE|OTHER|UP|BLANK|OUTPUT|USE|BLOCK|PAGE|USING|BOTTOM|PERFORM|VALUE|BY|PIC|VALUES|CALL|PICTURE|WHEN|CANCEL|PLUS|WITH|CD|POINTER|WRITE|CHARACTER|POSITION||ZERO|CLOSE|POSITIVE|ZEROS|COLUMN|PROCEDURE|ZEROES|COMMA|PROGRAM|COMMON|PROGRAM-ID|COMMUNICATION|QUOTE|COMP|RANDOM|COMPUTE|READ|CONTAINS|RECEIVE|CONFIGURATION|RECORD|CONTINUE|REDEFINES|CONTROL|REFERENCE|COPY|REMAINDER|COUNT|REPLACE|DATA|REPORT|DATE|RESERVE|DAY|RESET|DELETE|RETURN|DESTINATION|REWIND|DISABLE|REWRITE|DISPLAY|RIGHT|DIVIDE|RUN|DOWN|SAME|ELSE|SEARCH|ENABLE|SECTION|END|SELECT|ENVIRONMENT|SENTENCE|EQUAL|SET|ERROR|SIGN|EXIT|SEQUENTIAL|EXTERNAL|SIZE|FLASE|SORT|FILE|SOURCE|LENGTH|SPACE|LESS|STANDARD|LIMIT|START|LINE|STOP|LOCK|STRING|LOW-VALUE|SUBTRACT",t="true|false|null",n="count|min|max|avg|sum|rank|now|coalesce|main",r=this.createKeywordMapper({"support.function":n,keyword:e,"constant.language":t},"identifier",!0);this.$rules={start:[{token:"comment",regex:"\\*.*$"},{token:"string",regex:'".*?"'},{token:"string",regex:"'.*?'"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:r,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"\\+|\\-|\\/|\\/\\/|%|<@>|@>|<@|&|\\^|~|<|>|<=|=>|==|!=|<>|="},{token:"paren.lparen",regex:"[\\(]"},{token:"paren.rparen",regex:"[\\)]"},{token:"text",regex:"\\s+"}]}};r.inherits(s,i),t.CobolHighlightRules=s}),define("ace/mode/cobol",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/cobol_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./cobol_highlight_rules").CobolHighlightRules,o=function(){this.HighlightRules=s,this.$behaviour=this.$defaultBehaviour};r.inherits(o,i),function(){this.lineCommentStart="*",this.$id="ace/mode/cobol"}.call(o.prototype),t.Mode=o}) | ||||
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							|  | @ -0,0 +1 @@ | |||
| define("ace/mode/diff_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{regex:"^(?:\\*{15}|={67}|-{3}|\\+{3})$",token:"punctuation.definition.separator.diff",name:"keyword"},{regex:"^(@@)(\\s*.+?\\s*)(@@)(.*)$",token:["constant","constant.numeric","constant","comment.doc.tag"]},{regex:"^(\\d+)([,\\d]+)(a|d|c)(\\d+)([,\\d]+)(.*)$",token:["constant.numeric","punctuation.definition.range.diff","constant.function","constant.numeric","punctuation.definition.range.diff","invalid"],name:"meta."},{regex:"^(\\-{3}|\\+{3}|\\*{3})( .+)$",token:["constant.numeric","meta.tag"]},{regex:"^([!+>])(.*?)(\\s*)$",token:["support.constant","text","invalid"]},{regex:"^([<\\-])(.*?)(\\s*)$",token:["support.function","string","invalid"]},{regex:"^(diff)(\\s+--\\w+)?(.+?)( .+)?$",token:["variable","variable","keyword","variable"]},{regex:"^Index.+$",token:"variable"},{regex:"^\\s+$",token:"text"},{regex:"\\s*$",token:"invalid"},{defaultToken:"invisible",caseInsensitive:!0}]}};r.inherits(s,i),t.DiffHighlightRules=s}),define("ace/mode/folding/diff",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./fold_mode").FoldMode,s=e("../../range").Range,o=t.FoldMode=function(e,t){this.regExpList=e,this.flag=t,this.foldingStartMarker=RegExp("^("+e.join("|")+")",this.flag)};r.inherits(o,i),function(){this.getFoldWidgetRange=function(e,t,n){var r=e.getLine(n),i={row:n,column:r.length},o=this.regExpList;for(var u=1;u<=o.length;u++){var a=RegExp("^("+o.slice(0,u).join("|")+")",this.flag);if(a.test(r))break}for(var f=e.getLength();++n<f;){r=e.getLine(n);if(a.test(r))break}if(n==i.row+1)return;return s.fromPoints(i,{row:n-1,column:r.length})}}.call(o.prototype)}),define("ace/mode/diff",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/diff_highlight_rules","ace/mode/folding/diff"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./diff_highlight_rules").DiffHighlightRules,o=e("./folding/diff").FoldMode,u=function(){this.HighlightRules=s,this.foldingRules=new o(["diff","index","\\+{3}","@@|\\*{5}"],"i")};r.inherits(u,i),function(){this.$id="ace/mode/diff"}.call(u.prototype),t.Mode=u}) | ||||
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							|  | @ -0,0 +1 @@ | |||
| define("ace/mode/eiffel_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){var e="across|agent|alias|all|attached|as|assign|attribute|check|class|convert|create|debug|deferred|detachable|do|else|elseif|end|ensure|expanded|export|external|feature|from|frozen|if|inherit|inspect|invariant|like|local|loop|not|note|obsolete|old|once|Precursor|redefine|rename|require|rescue|retry|select|separate|some|then|undefine|until|variant|when",t="and|implies|or|xor",n="Void",r="True|False",i="Current|Result",s=this.createKeywordMapper({"constant.language":n,"constant.language.boolean":r,"variable.language":i,"keyword.operator":t,keyword:e},"identifier",!0),o=/(?:[^"%\b\f\v]|%[A-DFHLNQR-V%'"()<>]|%\/(?:0[xX][\da-fA-F](?:_*[\da-fA-F])*|0[cC][0-7](?:_*[0-7])*|0[bB][01](?:_*[01])*|\d(?:_*\d)*)\/)+?/;this.$rules={start:[{token:"string.quoted.other",regex:/"\[/,next:"aligned_verbatim_string"},{token:"string.quoted.other",regex:/"\{/,next:"non-aligned_verbatim_string"},{token:"string.quoted.double",regex:/"(?:[^%\b\f\n\r\v]|%[A-DFHLNQR-V%'"()<>]|%\/(?:0[xX][\da-fA-F](?:_*[\da-fA-F])*|0[cC][0-7](?:_*[0-7])*|0[bB][01](?:_*[01])*|\d(?:_*\d)*)\/)*?"/},{token:"comment.line.double-dash",regex:/--.*/},{token:"constant.character",regex:/'(?:[^%\b\f\n\r\t\v]|%[A-DFHLNQR-V%'"()<>]|%\/(?:0[xX][\da-fA-F](?:_*[\da-fA-F])*|0[cC][0-7](?:_*[0-7])*|0[bB][01](?:_*[01])*|\d(?:_*\d)*)\/)'/},{token:"constant.numeric",regex:/\b0(?:[xX][\da-fA-F](?:_*[\da-fA-F])*|[cC][0-7](?:_*[0-7])*|[bB][01](?:_*[01])*)\b/},{token:"constant.numeric",regex:/(?:\d(?:_*\d)*)?\.(?:(?:\d(?:_*\d)*)?[eE][+-]?)?\d(?:_*\d)*|\d(?:_*\d)*\.?/},{token:"paren.lparen",regex:/[\[({]|<<|\|\(/},{token:"paren.rparen",regex:/[\])}]|>>|\|\)/},{token:"keyword.operator",regex:/:=|->|\.(?=\w)|[;,:?]/},{token:"keyword.operator",regex:/\\\\|\|\.\.\||\.\.|\/[~\/]?|[><\/]=?|[-+*^=~]/},{token:function(e){var t=s(e);return t==="identifier"&&e===e.toUpperCase()&&(t="entity.name.type"),t},regex:/[a-zA-Z][a-zA-Z\d_]*\b/},{token:"text",regex:/\s+/}],aligned_verbatim_string:[{token:"string",regex:/]"/,next:"start"},{token:"string",regex:o}],"non-aligned_verbatim_string":[{token:"string.quoted.other",regex:/}"/,next:"start"},{token:"string.quoted.other",regex:o}]}};r.inherits(s,i),t.EiffelHighlightRules=s}),define("ace/mode/eiffel",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/eiffel_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./eiffel_highlight_rules").EiffelHighlightRules,o=function(){this.HighlightRules=s,this.$behaviour=this.$defaultBehaviour};r.inherits(o,i),function(){this.lineCommentStart="--",this.$id="ace/mode/eiffel"}.call(o.prototype),t.Mode=o}) | ||||
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							|  | @ -0,0 +1 @@ | |||
| define("ace/mode/elm_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){var e=this.createKeywordMapper({keyword:"as|case|class|data|default|deriving|do|else|export|foreign|hiding|jsevent|if|import|in|infix|infixl|infixr|instance|let|module|newtype|of|open|then|type|where|_|port|\u03bb"},"identifier"),t=/\\(\d+|['"\\&trnbvf])/,n=/[a-z_]/.source,r=/[A-Z]/.source,i=/[a-z_A-Z0-9']/.source;this.$rules={start:[{token:"string.start",regex:'"',next:"string"},{token:"string.character",regex:"'(?:"+t.source+"|.)'?"},{regex:/0(?:[xX][0-9A-Fa-f]+|[oO][0-7]+)|\d+(\.\d+)?([eE][-+]?\d*)?/,token:"constant.numeric"},{token:"comment",regex:"--.*"},{token:"keyword",regex:/\.\.|\||:|=|\\|"|->|<-|\u2192/},{token:"keyword.operator",regex:/[-!#$%&*+.\/<=>?@\\^|~:\u03BB\u2192]+/},{token:"operator.punctuation",regex:/[,;`]/},{regex:r+i+"+\\.?",token:function(e){return e[e.length-1]=="."?"entity.name.function":"constant.language"}},{regex:"^"+n+i+"+",token:function(e){return"constant.language"}},{token:e,regex:"[\\w\\xff-\\u218e\\u2455-\\uffff]+\\b"},{regex:"{-#?",token:"comment.start",onMatch:function(e,t,n){return this.next=e.length==2?"blockComment":"docComment",this.token}},{token:"variable.language",regex:/\[markdown\|/,next:"markdown"},{token:"paren.lparen",regex:/[\[({]/},{token:"paren.rparen",regex:/[\])}]/}],markdown:[{regex:/\|\]/,next:"start"},{defaultToken:"string"}],blockComment:[{regex:"{-",token:"comment.start",push:"blockComment"},{regex:"-}",token:"comment.end",next:"pop"},{defaultToken:"comment"}],docComment:[{regex:"{-",token:"comment.start",push:"docComment"},{regex:"-}",token:"comment.end",next:"pop"},{defaultToken:"doc.comment"}],string:[{token:"constant.language.escape",regex:t},{token:"text",regex:/\\(\s|$)/,next:"stringGap"},{token:"string.end",regex:'"',next:"start"},{defaultToken:"string"}],stringGap:[{token:"text",regex:/\\/,next:"string"},{token:"error",regex:"",next:"start"}]},this.normalizeRules()};r.inherits(s,i),t.ElmHighlightRules=s}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),function(){this.foldingStartMarker=/(\{|\[)[^\}\]]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++t<a){n=e.getLine(t);var f=n.search(/\S/);if(f===-1)continue;if(r>f)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++n<s){t=e.getLine(n);var f=u.exec(t);if(!f)continue;f[1]?a--:a++;if(!a)break}var l=n;if(l>o)return new i(o,r,l,t.length)}}.call(o.prototype)}),define("ace/mode/elm",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/elm_highlight_rules","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./elm_highlight_rules").ElmHighlightRules,o=e("./folding/cstyle").FoldMode,u=function(){this.HighlightRules=s,this.foldingRules=new o,this.$behaviour=this.$defaultBehaviour};r.inherits(u,i),function(){this.lineCommentStart="--",this.blockComment={start:"{-",end:"-}",nestable:!0},this.$id="ace/mode/elm"}.call(u.prototype),t.Mode=u}) | ||||
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							|  | @ -0,0 +1 @@ | |||
| define("ace/mode/gcode_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){var e="IF|DO|WHILE|ENDWHILE|CALL|ENDIF|SUB|ENDSUB|GOTO|REPEAT|ENDREPEAT|CALL",t="PI",n="ATAN|ABS|ACOS|ASIN|SIN|COS|EXP|FIX|FUP|ROUND|LN|TAN",r=this.createKeywordMapper({"support.function":n,keyword:e,"constant.language":t},"identifier",!0);this.$rules={start:[{token:"comment",regex:"\\(.*\\)"},{token:"comment",regex:"([N])([0-9]+)"},{token:"string",regex:"([G])([0-9]+\\.?[0-9]?)"},{token:"string",regex:"([M])([0-9]+\\.?[0-9]?)"},{token:"constant.numeric",regex:"([-+]?([0-9]*\\.?[0-9]+\\.?))|(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)"},{token:r,regex:"[A-Z]"},{token:"keyword.operator",regex:"EQ|LT|GT|NE|GE|LE|OR|XOR"},{token:"paren.lparen",regex:"[\\[]"},{token:"paren.rparen",regex:"[\\]]"},{token:"text",regex:"\\s+"}]}};r.inherits(s,i),t.GcodeHighlightRules=s}),define("ace/mode/gcode",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/gcode_highlight_rules","ace/range"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./gcode_highlight_rules").GcodeHighlightRules,o=e("../range").Range,u=function(){this.HighlightRules=s,this.$behaviour=this.$defaultBehaviour};r.inherits(u,i),function(){this.$id="ace/mode/gcode"}.call(u.prototype),t.Mode=u}) | ||||
|  | @ -0,0 +1 @@ | |||
| define("ace/mode/gherkin_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s="\\\\(x[0-9A-Fa-f]{2}|[0-7]{3}|[\\\\abfnrtv'\"]|U[0-9A-Fa-f]{8}|u[0-9A-Fa-f]{4})",o=function(){var e=[{name:"en",labels:"Feature|Background|Scenario(?: Outline)?|Examples",keywords:"Given|When|Then|And|But"}],t=e.map(function(e){return e.labels}).join("|"),n=e.map(function(e){return e.keywords}).join("|");this.$rules={start:[{token:"constant.numeric",regex:"(?:(?:[1-9]\\d*)|(?:0))"},{token:"comment",regex:"#.*$"},{token:"keyword",regex:"(?:"+t+"):|(?:"+n+")\\b"},{token:"keyword",regex:"\\*"},{token:"string",regex:'"{3}',next:"qqstring3"},{token:"string",regex:'"',next:"qqstring"},{token:"text",regex:"^\\s*(?=@[\\w])",next:[{token:"text",regex:"\\s+"},{token:"variable.parameter",regex:"@[\\w]+"},{token:"empty",regex:"",next:"start"}]},{token:"comment",regex:"<[^>]+>"},{token:"comment",regex:"\\|(?=.)",next:"table-item"},{token:"comment",regex:"\\|$",next:"start"}],qqstring3:[{token:"constant.language.escape",regex:s},{token:"string",regex:'"{3}',next:"start"},{defaultToken:"string"}],qqstring:[{token:"constant.language.escape",regex:s},{token:"string",regex:"\\\\$",next:"qqstring"},{token:"string",regex:'"|$',next:"start"},{defaultToken:"string"}],"table-item":[{token:"comment",regex:/$/,next:"start"},{token:"comment",regex:/\|/},{token:"string",regex:/\\./},{defaultToken:"string"}]},this.normalizeRules()};r.inherits(o,i),t.GherkinHighlightRules=o}),define("ace/mode/gherkin",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/gherkin_highlight_rules"],function(e,t,n){var r=e("../lib/oop"),i=e("./text").Mode,s=e("./gherkin_highlight_rules").GherkinHighlightRules,o=function(){this.HighlightRules=s,this.$behaviour=this.$defaultBehaviour};r.inherits(o,i),function(){this.lineCommentStart="#",this.$id="ace/mode/gherkin",this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i="  ",s=this.getTokenizer().getLineTokens(t,e),o=s.tokens;return console.log(e),t.match("[ ]*\\|")&&(r+="| "),o.length&&o[o.length-1].type=="comment"?r:(e=="start"&&(t.match("Scenario:|Feature:|Scenario Outline:|Background:")?r+=i:t.match("(Given|Then).+(:)$|Examples:")?r+=i:t.match("\\*.+")&&(r+="* ")),r)}}.call(o.prototype),t.Mode=o}) | ||||
|  | @ -0,0 +1 @@ | |||
| define("ace/mode/gitignore_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:"comment",regex:/^\s*#.*$/},{token:"keyword",regex:/^\s*!.*$/}]},this.normalizeRules()};s.metaData={fileTypes:["gitignore"],name:"Gitignore"},r.inherits(s,i),t.GitignoreHighlightRules=s}),define("ace/mode/gitignore",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/gitignore_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./gitignore_highlight_rules").GitignoreHighlightRules,o=function(){this.HighlightRules=s,this.$behaviour=this.$defaultBehaviour};r.inherits(o,i),function(){this.lineCommentStart="#",this.$id="ace/mode/gitignore"}.call(o.prototype),t.Mode=o}) | ||||
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							|  | @ -0,0 +1 @@ | |||
| define("ace/mode/haskell_cabal_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:"comment",regex:"^\\s*--.*$"},{token:["keyword"],regex:/^(\s*\w.*?)(:(?:\s+|$))/},{token:"constant.numeric",regex:/[\d_]+(?:(?:[\.\d_]*)?)/},{token:"constant.language.boolean",regex:"(?:true|false|TRUE|FALSE|True|False|yes|no)\\b"},{token:"markup.heading",regex:/^(\w.*)$/}]}};r.inherits(s,i),t.CabalHighlightRules=s}),define("ace/mode/folding/haskell_cabal",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./fold_mode").FoldMode,s=e("../../range").Range,o=t.FoldMode=function(){};r.inherits(o,i),function(){this.isHeading=function(e,t){var n="markup.heading",r=e.getTokens(t)[0];return t==0||r&&r.type.lastIndexOf(n,0)===0},this.getFoldWidget=function(e,t,n){if(this.isHeading(e,n))return"start";if(t==="markbeginend"&&!/^\s*$/.test(e.getLine(n))){var r=e.getLength();while(++n<r)if(!/^\s*$/.test(e.getLine(n)))break;if(n==r||this.isHeading(e,n))return"end"}return""},this.getFoldWidgetRange=function(e,t,n){var r=e.getLine(n),i=r.length,o=e.getLength(),u=n,a=n;if(this.isHeading(e,n)){while(++n<o)if(this.isHeading(e,n)){n--;break}a=n;if(a>u)while(a>u&&/^\s*$/.test(e.getLine(a)))a--;if(a>u){var f=e.getLine(a).length;return new s(u,i,a,f)}}else if(this.getFoldWidget(e,t,n)==="end"){var a=n,f=e.getLine(a).length;while(--n>=0)if(this.isHeading(e,n))break;var r=e.getLine(n),i=r.length;return new s(n,i,a,f)}}}.call(o.prototype)}),define("ace/mode/haskell_cabal",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/haskell_cabal_highlight_rules","ace/mode/folding/haskell_cabal"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./haskell_cabal_highlight_rules").CabalHighlightRules,o=e("./folding/haskell_cabal").FoldMode,u=function(){this.HighlightRules=s,this.foldingRules=new o,this.$behaviour=this.$defaultBehaviour};r.inherits(u,i),function(){this.lineCommentStart="--",this.blockComment=null,this.$id="ace/mode/haskell_cabal"}.call(u.prototype),t.Mode=u}) | ||||
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							|  | @ -0,0 +1 @@ | |||
| define("ace/mode/ini_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s="\\\\(?:[\\\\0abtrn;#=:]|x[a-fA-F\\d]{4})",o=function(){this.$rules={start:[{token:"punctuation.definition.comment.ini",regex:"#.*",push_:[{token:"comment.line.number-sign.ini",regex:"$|^",next:"pop"},{defaultToken:"comment.line.number-sign.ini"}]},{token:"punctuation.definition.comment.ini",regex:";.*",push_:[{token:"comment.line.semicolon.ini",regex:"$|^",next:"pop"},{defaultToken:"comment.line.semicolon.ini"}]},{token:["keyword.other.definition.ini","text","punctuation.separator.key-value.ini"],regex:"\\b([a-zA-Z0-9_.-]+)\\b(\\s*)(=)"},{token:["punctuation.definition.entity.ini","constant.section.group-title.ini","punctuation.definition.entity.ini"],regex:"^(\\[)(.*?)(\\])"},{token:"punctuation.definition.string.begin.ini",regex:"'",push:[{token:"punctuation.definition.string.end.ini",regex:"'",next:"pop"},{token:"constant.language.escape",regex:s},{defaultToken:"string.quoted.single.ini"}]},{token:"punctuation.definition.string.begin.ini",regex:'"',push:[{token:"constant.language.escape",regex:s},{token:"punctuation.definition.string.end.ini",regex:'"',next:"pop"},{defaultToken:"string.quoted.double.ini"}]}]},this.normalizeRules()};o.metaData={fileTypes:["ini","conf"],keyEquivalent:"^~I",name:"Ini",scopeName:"source.ini"},r.inherits(o,i),t.IniHighlightRules=o}),define("ace/mode/folding/ini",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(){};r.inherits(o,s),function(){this.foldingStartMarker=/^\s*\[([^\])]*)]\s*(?:$|[;#])/,this.getFoldWidgetRange=function(e,t,n){var r=this.foldingStartMarker,s=e.getLine(n),o=s.match(r);if(!o)return;var u=o[1]+".",a=s.length,f=e.getLength(),l=n,c=n;while(++n<f){s=e.getLine(n);if(/^\s*$/.test(s))continue;o=s.match(r);if(o&&o[1].lastIndexOf(u,0)!==0)break;c=n}if(c>l){var h=e.getLine(c).length;return new i(l,a,c,h)}}}.call(o.prototype)}),define("ace/mode/ini",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/ini_highlight_rules","ace/mode/folding/ini"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./ini_highlight_rules").IniHighlightRules,o=e("./folding/ini").FoldMode,u=function(){this.HighlightRules=s,this.foldingRules=new o,this.$behaviour=this.$defaultBehaviour};r.inherits(u,i),function(){this.lineCommentStart=";",this.blockComment=null,this.$id="ace/mode/ini"}.call(u.prototype),t.Mode=u}) | ||||
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							Some files were not shown because too many files have changed in this diff Show More
		Loading…
	
		Reference in New Issue
	
	 Henrique Dias
						Henrique Dias