diff --git a/config/api_sample.php b/config/api_sample.php
index b8983e074d..94d744560a 100644
--- a/config/api_sample.php
+++ b/config/api_sample.php
@@ -2,19 +2,12 @@
return [
'app' => [
- 'path' => '/',
- 'env' => 'development',
- 'debug' => true,
- 'default_language' => 'en',
+ 'env' => 'production',
'timezone' => 'America/New_York',
],
'settings' => [
- 'debug' => true,
- 'displayErrorDetails' => true,
'logger' => [
- 'name' => 'directus-api',
- 'level' => Monolog\Logger::DEBUG,
'path' => __DIR__ . '/logs/app.log',
],
],
@@ -25,8 +18,7 @@
'port' => 3306,
'name' => 'directus',
'username' => 'root',
- 'password' => 'pass',
- 'prefix' => '', // not used
+ 'password' => 'root',
'engine' => 'InnoDB',
'charset' => 'utf8mb4'
],
@@ -34,8 +26,6 @@
'cache' => [
'enabled' => false,
'response_ttl' => 3600, // seconds
- 'adapter' => 'filesystem',
- 'path' => '/storage/cache',
// 'pool' => [
// 'adapter' => 'apc'
// ],
@@ -60,37 +50,28 @@
'filesystem' => [
'adapter' => 'local',
- // By default media directory are located at the same level of directus root
- // To make them a level up outsite the root directory
- // use this instead
- // Ex: 'root' => realpath(ROOT_PATH.'/../storage/uploads'),
- // Note: ROOT_PATH constant doesn't end with trailing slash
- 'root' => 'public/storage/uploads',
+ // The filesystem root is the directus root directory.
+ // All path are relative to the filesystem root when the path is not starting with a forward slash.
+ // By default the uploads directory is located at the directus public root
+ // An absolute path can be used as alternative.
+ 'root' => 'public/uploads/_/originals',
// This is the url where all the media will be pointing to
- // here all assets will be (yourdomain)/storage/uploads
- // same with thumbnails (yourdomain)/storage/uploads/thumbs
- 'root_url' => '/storage/uploads',
- 'root_thumb_url' => '/storage/uploads/thumbs',
+ // here is where Directus will assume all assets will be accesed
+ // Ex: (yourdomain)/uploads/_/originals
+ 'root_url' => '/uploads/_/originals',
+ // Same as "root", but for the thumbnails
+ 'thumb_root' => 'public/uploads/_/thumbnails',
// 'key' => 's3-key',
- // 'secret' => 's3-key',
+ // 'secret' => 's3-secret',
// 'region' => 's3-region',
// 'version' => 's3-version',
// 'bucket' => 's3-bucket'
],
- // HTTP Settings
- 'http' => [
- 'emulate_enabled' => false,
- // can be null, or an array list of method to be emulated
- // Ex: ['PATH', 'DELETE', 'PUT']
- // 'emulate_methods' => null,
- 'force_https' => false
- ],
-
'mail' => [
'default' => [
'transport' => 'sendmail',
- 'from' => 'admin@admin.com'
+ 'from' => 'admin@example.com'
],
],
diff --git a/migrations/db/schemas/20180220023232_create_relations_table.php b/migrations/db/schemas/20180220023232_create_relations_table.php
index c825bb06f8..7a2408abd8 100644
--- a/migrations/db/schemas/20180220023232_create_relations_table.php
+++ b/migrations/db/schemas/20180220023232_create_relations_table.php
@@ -29,35 +29,23 @@ public function change()
{
$table = $this->table('directus_relations', ['signed' => false]);
- $table->addColumn('collection_a', 'string', [
+ $table->addColumn('collection_many', 'string', [
'limit' => 64,
'null' => false
]);
- $table->addColumn('field_a', 'string', [
+ $table->addColumn('field_many', 'string', [
'limit' => 45,
'null' => false
]);
- $table->addColumn('junction_key_a', 'string', [
+ $table->addColumn('collection_one', 'string', [
'limit' => 64,
'null' => true
]);
- $table->addColumn('junction_collection', 'string', [
+ $table->addColumn('field_one', 'string', [
'limit' => 64,
'null' => true
]);
- $table->addColumn('junction_mixed_collections', 'string', [
- 'limit' => 64,
- 'null' => true
- ]);
- $table->addColumn('junction_key_b', 'string', [
- 'limit' => 64,
- 'null' => true
- ]);
- $table->addColumn('collection_b', 'string', [
- 'limit' => 64,
- 'null' => true
- ]);
- $table->addColumn('field_b', 'string', [
+ $table->addColumn('junction_field', 'string', [
'limit' => 64,
'null' => true
]);
diff --git a/migrations/db/seeds/FieldsSeeder.php b/migrations/db/seeds/FieldsSeeder.php
index 644d501ec7..cfab4d6d48 100644
--- a/migrations/db/seeds/FieldsSeeder.php
+++ b/migrations/db/seeds/FieldsSeeder.php
@@ -509,7 +509,7 @@ public function run()
[
'collection' => 'directus_users',
'field' => 'status',
- 'type' => \Directus\Database\Schema\DataTypes::TYPE_VARCHAR,
+ 'type' => \Directus\Database\Schema\DataTypes::TYPE_STATUS,
'interface' => 'status',
'options' => json_encode([
'status_mapping' => [
@@ -557,8 +557,8 @@ public function run()
[
'collection' => 'directus_users',
'field' => 'roles',
- 'type' => \Directus\Database\Schema\DataTypes::TYPE_M2M,
- 'interface' => 'm2m'
+ 'type' => \Directus\Database\Schema\DataTypes::TYPE_O2M,
+ 'interface' => 'one-to-many'
],
[
'collection' => 'directus_users',
@@ -714,43 +714,31 @@ public function run()
],
[
'collection' => 'directus_relations',
- 'field' => 'collection_a',
- 'type' => \Directus\Database\Schema\DataTypes::TYPE_VARCHAR,
- 'interface' => 'text-input'
- ],
- [
- 'collection' => 'directus_relations',
- 'field' => 'field_a',
- 'type' => \Directus\Database\Schema\DataTypes::TYPE_VARCHAR,
- 'interface' => 'text-input'
- ],
- [
- 'collection' => 'directus_relations',
- 'field' => 'junction_key_a',
+ 'field' => 'collection_many',
'type' => \Directus\Database\Schema\DataTypes::TYPE_VARCHAR,
'interface' => 'text-input'
],
[
'collection' => 'directus_relations',
- 'field' => 'junction_mixed_collections',
+ 'field' => 'field_many',
'type' => \Directus\Database\Schema\DataTypes::TYPE_VARCHAR,
'interface' => 'text-input'
],
[
'collection' => 'directus_relations',
- 'field' => 'junction_key_b',
+ 'field' => 'collection_one',
'type' => \Directus\Database\Schema\DataTypes::TYPE_VARCHAR,
'interface' => 'text-input'
],
[
'collection' => 'directus_relations',
- 'field' => 'collection_b',
+ 'field' => 'field_one',
'type' => \Directus\Database\Schema\DataTypes::TYPE_VARCHAR,
'interface' => 'text-input'
],
[
'collection' => 'directus_relations',
- 'field' => 'field_b',
+ 'field' => 'junction_field',
'type' => \Directus\Database\Schema\DataTypes::TYPE_VARCHAR,
'interface' => 'text-input'
],
diff --git a/migrations/db/seeds/RelationsSeeder.php b/migrations/db/seeds/RelationsSeeder.php
index 29756de4f0..bceb759ff5 100644
--- a/migrations/db/seeds/RelationsSeeder.php
+++ b/migrations/db/seeds/RelationsSeeder.php
@@ -16,68 +16,73 @@ public function run()
{
$data = [
[
- 'collection_a' => 'directus_activity',
- 'field_a' => 'user',
- 'collection_b' => 'directus_users'
+ 'collection_many' => 'directus_activity',
+ 'field_many' => 'user',
+ 'collection_one' => 'directus_users'
],
[
- 'collection_a' => 'directus_activity_read',
- 'field_a' => 'user',
- 'collection_b' => 'directus_users'
+ 'collection_many' => 'directus_activity_read',
+ 'field_many' => 'user',
+ 'collection_one' => 'directus_users'
],
[
- 'collection_a' => 'directus_activity_read',
- 'field_a' => 'activity',
- 'collection_b' => 'directus_activity'
+ 'collection_many' => 'directus_activity_read',
+ 'field_many' => 'activity',
+ 'collection_one' => 'directus_activity'
],
[
- 'collection_a' => 'directus_collections_presets',
- 'field_a' => 'user',
- 'collection_b' => 'directus_users'
+ 'collection_many' => 'directus_collections_presets',
+ 'field_many' => 'user',
+ 'collection_one' => 'directus_users'
],
[
- 'collection_a' => 'directus_collections_presets',
- 'field_a' => 'group',
- 'collection_b' => 'directus_groups'
+ 'collection_many' => 'directus_collections_presets',
+ 'field_many' => 'group',
+ 'collection_one' => 'directus_groups'
],
[
- 'collection_a' => 'directus_files',
- 'field_a' => 'upload_user',
- 'collection_b' => 'directus_users'
+ 'collection_many' => 'directus_files',
+ 'field_many' => 'upload_user',
+ 'collection_one' => 'directus_users'
],
[
- 'collection_a' => 'directus_files',
- 'field_a' => 'folder',
- 'collection_b' => 'directus_folders'
+ 'collection_many' => 'directus_files',
+ 'field_many' => 'folder',
+ 'collection_one' => 'directus_folders'
],
[
- 'collection_a' => 'directus_folders',
- 'field_a' => 'parent_folder',
- 'collection_b' => 'directus_folders'
+ 'collection_many' => 'directus_folders',
+ 'field_many' => 'parent_folder',
+ 'collection_one' => 'directus_folders'
],
[
- 'collection_a' => 'directus_permissions',
- 'field_a' => 'group',
- 'collection_b' => 'directus_groups'
+ 'collection_many' => 'directus_permissions',
+ 'field_many' => 'group',
+ 'collection_one' => 'directus_groups'
],
[
- 'collection_a' => 'directus_revisions',
- 'field_a' => 'activity',
- 'collection_b' => 'directus_activity'
+ 'collection_many' => 'directus_revisions',
+ 'field_many' => 'activity',
+ 'collection_one' => 'directus_activity'
],
[
- 'collection_a' => 'directus_users',
- 'field_a' => 'roles',
- 'junction_key_a' => 'user',
- 'junction_collection' => 'directus_user_roles',
- 'junction_key_b' => 'role',
- 'field_b' => 'users',
- 'collection_b' => 'directus_roles'
+ 'collection_many' => 'directus_user_roles',
+ 'field_many' => 'user',
+ 'collection_one' => 'directus_users',
+ 'field_one' => 'roles',
+ 'junction_field' => 'role',
],
[
- 'collection_a' => 'directus_users',
- 'field_a' => 'avatar',
- 'collection_b' => 'directus_files'
+ 'collection_many' => 'directus_user_roles',
+ 'field_many' => 'role',
+ 'collection_one' => 'directus_roles',
+ 'field_one' => 'users',
+ 'junction_field' => 'user',
+ ],
+ [
+ 'collection_many' => 'directus_users',
+ 'field_many' => 'avatar',
+ 'collection_one' => 'directus_files'
]
];
diff --git a/public/.htaccess b/public/.htaccess
index d124ba6e99..3ba0236b33 100644
--- a/public/.htaccess
+++ b/public/.htaccess
@@ -4,33 +4,17 @@ Options +SymLinksIfOwnerMatch
RewriteEngine On
- # Uncomment this if you are getting routing errors:
- # RewriteBase /api
RewriteRule .* - [env=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
# Yield static media
RewriteCond %{REQUEST_FILENAME} !-f
- # Map extension requests to their front controller
- # RewriteRule ^extensions/([^/]+) index.php?run_extension=$1&%{QUERY_STRING} [L]
-
# Map all other requests to the main front controller, invoking the API router
RewriteRule ^ index.php?%{QUERY_STRING} [L]
-
- # Set CORS header for static files
- Header set Access-Control-Allow-Origin "*"
-
-
# Fix $HTTP_RAW_POST_DATA deprecated warning
php_value always_populate_raw_post_data -1
-
-# Prevent PageSpeed module from rewriting the templates files
-# Avoiding it from breaking the template
-#
-# ModPagespeedDisallow "*/app/**/*.twig"
-#
diff --git a/public/extensions/.gitignore b/public/extensions/.gitignore
deleted file mode 100644
index 0688954b81..0000000000
--- a/public/extensions/.gitignore
+++ /dev/null
@@ -1,3 +0,0 @@
-core/interfaces
-core/layouts
-core/pages
diff --git a/public/extensions/core/interfaces/activity-icon/display.js b/public/extensions/core/interfaces/activity-icon/display.js
index 4e890a409d..e65c07046a 100644
--- a/public/extensions/core/interfaces/activity-icon/display.js
+++ b/public/extensions/core/interfaces/activity-icon/display.js
@@ -1,6 +1,6 @@
parcelRequire=function(e,r,n,t){var i="function"==typeof parcelRequire&&parcelRequire,o="function"==typeof require&&require;function u(n,t){if(!r[n]){if(!e[n]){var f="function"==typeof parcelRequire&&parcelRequire;if(!t&&f)return f(n,!0);if(i)return i(n,!0);if(o&&"string"==typeof n)return o(n);var c=new Error("Cannot find module '"+n+"'");throw c.code="MODULE_NOT_FOUND",c}p.resolve=function(r){return e[n][1][r]||r};var l=r[n]=new u.Module(n);e[n][0].call(l.exports,p,l,l.exports,this)}return r[n].exports;function p(e){return u(p.resolve(e))}}u.isParcelRequire=!0,u.Module=function(e){this.id=e,this.bundle=u,this.exports={}},u.modules=e,u.cache=r,u.parent=i,u.register=function(r,n){e[r]=[function(e,r){r.exports=n},{}]};for(var f=0;f0?"-":"+")+i(100*Math.floor(Math.abs(N)/60)+Math.abs(N)%60,4),S:["th","st","nd","rd"][l%10>3?0:(l%100-l%10!=10)*l%10],W:p,N:H};return t.replace(a,function(e){return e in S?S[e]:e.slice(1,e.length-1)})});function i(e,t){for(e=String(e),t=t||2;e.length11)]},M:function(e,t){return o(e.getMonth(),!0,t)},S:function(t){return e(t.getSeconds())},U:function(e){return e.getTime()/1e3},W:function(e,t,n){return n.getWeek(e)},Y:function(e){return e.getFullYear()},d:function(t){return e(t.getDate())},h:function(e){return e.getHours()%12?e.getHours()%12:12},i:function(t){return e(t.getMinutes())},j:function(e){return e.getDate()},l:function(e,t){return t.weekdays.longhand[e.getDay()]},m:function(t){return e(t.getMonth()+1)},n:function(e){return e.getMonth()+1},s:function(e){return e.getSeconds()},w:function(e){return e.getDay()},y:function(e){return String(e.getFullYear()).substring(2)}},d={weekdays:{shorthand:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],longhand:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},months:{shorthand:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],longhand:["January","February","March","April","May","June","July","August","September","October","November","December"]},daysInMonth:[31,28,31,30,31,30,31,31,30,31,30,31],firstDayOfWeek:0,ordinal:function(e){var t=e%100;if(t>3&&t<21)return"th";switch(t%10){case 1:return"st";case 2:return"nd";case 3:return"rd";default:return"th"}},rangeSeparator:" to ",weekAbbreviation:"Wk",scrollTitle:"Scroll to increment",toggleTitle:"Click to toggle",amPM:["AM","PM"],yearAriaLabel:"Year"},s=function(e){var t=e.config,n=void 0===t?p:t,a=e.l10n,i=void 0===a?d:a;return function(e,t,a){if(void 0!==n.formatDate)return n.formatDate(e,t);var o=a||i;return t.split("").map(function(t,a,i){return c[t]&&"\\"!==i[a-1]?c[t](e,o,n):"\\"!==t?t:""}).join("")}},u=function(e){var t=e.config,n=void 0===t?p:t,a=e.l10n,i=void 0===a?d:a;return function(e,t,a,o){if(0===e||e){var c,d=o||i,s=e;if(e instanceof Date)c=new Date(e.getTime());else if("string"!=typeof e&&void 0!==e.toFixed)c=new Date(e);else if("string"==typeof e){var u=t||(n||p).dateFormat,f=String(e).trim();if("today"===f)c=new Date,a=!0;else if(/Z$/.test(f)||/GMT$/.test(f))c=new Date(e);else if(n&&n.parseDate)c=n.parseDate(e,u);else{c=n&&n.noCalendar?new Date((new Date).setHours(0,0,0,0)):new Date((new Date).getFullYear(),0,1,0,0,0,0);for(var m,g=[],h=0,v=0,D="";hMath.min(t,n)&&e",noCalendar:!1,now:new Date,onChange:[],onClose:[],onDayCreate:[],onDestroy:[],onKeyDown:[],onMonthChange:[],onOpen:[],onParseConfig:[],onReady:[],onValueUpdate:[],onYearChange:[],onPreCalendarPosition:[],plugins:[],position:"auto",positionElement:void 0,prevArrow:"",shorthandCurrentMonth:!1,showMonths:1,static:!1,time_24hr:!1,weekNumbers:!1,wrap:!1};function h(e,t,n){if(!0===n)return e.classList.add(t);e.classList.remove(t)}function v(e,t,n){var a=window.document.createElement(e);return t=t||"",n=n||"",a.className=t,void 0!==n&&(a.textContent=n),a}function D(e){for(;e.firstChild;)e.removeChild(e.firstChild)}function w(e,t){var n=v("div","numInputWrapper"),a=v("input","numInput "+e),i=v("span","arrowUp"),o=v("span","arrowDown");if(a.type="text",a.pattern="\\d*",void 0!==t)for(var r in t)a.setAttribute(r,t[r]);return n.appendChild(a),n.appendChild(i),n.appendChild(o),n}"function"!=typeof Object.assign&&(Object.assign=function(e){if(!e)throw TypeError("Cannot convert undefined or null to object");for(var t=arguments.length,n=new Array(t>1?t-1:0),a=1;ar&&(u=i===c.hourElement?u-r-t(!c.amPM):o,m&&A(void 0,1,c.hourElement)),c.amPM&&f&&(1===l?u+d===23:Math.abs(u-d)>l)&&(c.amPM.textContent=c.l10n.amPM[t(c.amPM.textContent===c.l10n.amPM[0])]),i.value=e(u)}}(n);var a=c._input.value;x(),me(),c._input.value!==a&&c._debouncedChange()}}function x(){if(void 0!==c.hourElement&&void 0!==c.minuteElement){var e,n,a=(parseInt(c.hourElement.value.slice(-2),10)||0)%24,i=(parseInt(c.minuteElement.value,10)||0)%60,o=void 0!==c.secondElement?(parseInt(c.secondElement.value,10)||0)%60:0;void 0!==c.amPM&&(e=a,n=c.amPM.textContent,a=e%12+12*t(n===c.l10n.amPM[1]));var r=void 0!==c.config.minTime||c.config.minDate&&c.minDateHasTime&&c.latestSelectedDateObj&&0===f(c.latestSelectedDateObj,c.config.minDate,!0);if(void 0!==c.config.maxTime||c.config.maxDate&&c.maxDateHasTime&&c.latestSelectedDateObj&&0===f(c.latestSelectedDateObj,c.config.maxDate,!0)){var l=void 0!==c.config.maxTime?c.config.maxTime:c.config.maxDate;(a=Math.min(a,l.getHours()))===l.getHours()&&(i=Math.min(i,l.getMinutes())),i===l.getMinutes()&&(o=Math.min(o,l.getSeconds()))}if(r){var d=void 0!==c.config.minTime?c.config.minTime:c.config.minDate;(a=Math.max(a,d.getHours()))===d.getHours()&&(i=Math.max(i,d.getMinutes())),i===d.getMinutes()&&(o=Math.max(o,d.getSeconds()))}k(a,i,o)}}function E(e){var t=e||c.latestSelectedDateObj;t&&k(t.getHours(),t.getMinutes(),t.getSeconds())}function T(){var e=c.config.defaultHour,t=c.config.defaultMinute,n=c.config.defaultSeconds;if(void 0!==c.config.minDate){var a=c.config.minDate.getHours(),i=c.config.minDate.getMinutes();(e=Math.max(e,a))===a&&(t=Math.max(i,t)),e===a&&t===i&&(n=c.config.minDate.getSeconds())}if(void 0!==c.config.maxDate){var o=c.config.maxDate.getHours(),r=c.config.maxDate.getMinutes();(e=Math.min(e,o))===o&&(t=Math.min(r,t)),e===o&&t===r&&(n=c.config.maxDate.getSeconds())}k(e,t,n)}function k(n,a,i){void 0!==c.latestSelectedDateObj&&c.latestSelectedDateObj.setHours(n%24,a,i||0,0),c.hourElement&&c.minuteElement&&!c.isMobile&&(c.hourElement.value=e(c.config.time_24hr?n:(12+n)%12+12*t(n%12==0)),c.minuteElement.value=e(a),void 0!==c.amPM&&(c.amPM.textContent=c.l10n.amPM[t(n>=12)]),void 0!==c.secondElement&&(c.secondElement.value=e(i)))}function I(e){var t=parseInt(e.target.value)+(e.delta||0);(t/1e3>1||"Enter"===e.key&&!/[^\d]/.test(t.toString()))&&z(t)}function O(e,t,n,a){return t instanceof Array?t.forEach(function(t){return O(e,t,n,a)}):e instanceof Array?e.forEach(function(e){return O(e,t,n,a)}):(e.addEventListener(t,n,a),void c._handlers.push({element:e,event:t,handler:n,options:a}))}function S(e){return function(t){1===t.which&&e(t)}}function _(){de("onChange")}function N(e){var t=void 0!==e?c.parseDate(e):c.latestSelectedDateObj||(c.config.minDate&&c.config.minDate>c.now?c.config.minDate:c.config.maxDate&&c.config.maxDate=0&&f(e,c.selectedDates[1])<=0}(t)&&!ue(t)&&o.classList.add("inRange"),c.weekNumbers&&1===c.config.showMonths&&"prevMonthDay"!==e&&n%7==1&&c.weekNumbers.insertAdjacentHTML("beforeend",""+c.config.getWeek(t)+""),de("onDayCreate",o),o}function j(e){e.focus(),"range"===c.config.mode&&Q(e)}function Y(e){for(var t=e>0?0:c.config.showMonths-1,n=e>0?c.config.showMonths:-1,a=t;a!=n;a+=e)for(var i=c.daysContainer.children[a],o=e>0?0:i.children.length-1,r=e>0?i.children.length:-1,l=o;l!=r;l+=e){var d=i.children[l];if(-1===d.className.indexOf("hidden")&&G(d.dateObj))return d}}function H(e,t){var n=V(document.activeElement),a=void 0!==e?e:n?document.activeElement:void 0!==c.selectedDateElem&&V(c.selectedDateElem)?c.selectedDateElem:void 0!==c.todayDateElem&&V(c.todayDateElem)?c.todayDateElem:Y(t>0?1:-1);return void 0===a?c._input.focus():n?void function(e,t){for(var n=-1===e.className.indexOf("Month")?e.dateObj.getMonth():c.currentMonth,a=t>0?c.config.showMonths:-1,i=t>0?1:-1,o=n-c.currentMonth;o!=a;o+=i)for(var r=c.daysContainer.children[o],l=n-c.currentMonth===o?e.$i+t:t<0?r.children.length-1:0,d=r.children.length,s=l;s>=0&&s0?d:-1);s+=i){var u=r.children[s];if(-1===u.className.indexOf("hidden")&&G(u.dateObj)&&Math.abs(e.$i-s)>=Math.abs(t))return j(u)}c.changeMonth(i),H(Y(i),0)}(a,t):j(a)}function L(e,t){for(var n=(new Date(e,t,1).getDay()-c.l10n.firstDayOfWeek+7)%7,a=c.utils.getDaysInMonth((t-1+12)%12),i=c.utils.getDaysInMonth(t),o=window.document.createDocumentFragment(),r=c.config.showMonths>1,l=r?"prevMonthDay hidden":"prevMonthDay",d=r?"nextMonthDay hidden":"nextMonthDay",s=a+1-n,u=0;s<=a;s++,u++)o.appendChild(P(l,new Date(e,t-1,s),s,u));for(s=1;s<=i;s++,u++)o.appendChild(P("",new Date(e,t,s),s,u));for(var f=i+1;f<=42-n&&(1===c.config.showMonths||u%7!=0);f++,u++)o.appendChild(P(d,new Date(e,t+1,f%i),f,u));var m=v("div","dayContainer");return m.appendChild(o),m}function W(){if(void 0!==c.daysContainer){D(c.daysContainer),c.weekNumbers&&D(c.weekNumbers);for(var e=document.createDocumentFragment(),t=0;t0&&e\n "+t.join("")+"\n \n "}function U(e,t){void 0===t&&(t=!0);var n=t?e:e-c.currentMonth;n<0&&!0===c._hidePrevMonthArrow||n>0&&!0===c._hideNextMonthArrow||(c.currentMonth+=n,(c.currentMonth<0||c.currentMonth>11)&&(c.currentYear+=c.currentMonth>11?1:-1,c.currentMonth=(c.currentMonth+12)%12,de("onYearChange")),W(),de("onMonthChange"),fe())}function q(e){return!(!c.config.appendTo||!c.config.appendTo.contains(e))||c.calendarContainer.contains(e)}function $(e){if(c.isOpen&&!c.config.inline){var t=q(e.target),n=e.target===c.input||e.target===c.altInput||c.element.contains(e.target)||e.path&&e.path.indexOf&&(~e.path.indexOf(c.input)||~e.path.indexOf(c.altInput)),a="blur"===e.type?n&&e.relatedTarget&&!q(e.relatedTarget):!n&&!t,i=!c.config.ignoredFocusElements.some(function(t){return t.contains(e.target)});a&&i&&(c.close(),"range"===c.config.mode&&1===c.selectedDates.length&&(c.clear(!1),c.redraw()))}}function z(e){if(!(!e||c.config.minDate&&ec.config.maxDate.getFullYear())){var t=e,n=c.currentYear!==t;c.currentYear=t||c.currentYear,c.config.maxDate&&c.currentYear===c.config.maxDate.getFullYear()?c.currentMonth=Math.min(c.config.maxDate.getMonth(),c.currentMonth):c.config.minDate&&c.currentYear===c.config.minDate.getFullYear()&&(c.currentMonth=Math.max(c.config.minDate.getMonth(),c.currentMonth)),n&&(c.redraw(),de("onYearChange"))}}function G(e,t){void 0===t&&(t=!0);var n=c.parseDate(e,void 0,t);if(c.config.minDate&&n&&f(n,c.config.minDate,void 0!==t?t:!c.minDateHasTime)<0||c.config.maxDate&&n&&f(n,c.config.maxDate,void 0!==t?t:!c.maxDateHasTime)>0)return!1;if(0===c.config.enable.length&&0===c.config.disable.length)return!0;if(void 0===n)return!1;for(var a,i=c.config.enable.length>0,o=i?c.config.enable:c.config.disable,r=0;r=a.from.getTime()&&n.getTime()<=a.to.getTime())return i}return!i}function V(e){return void 0!==c.daysContainer&&(-1===e.className.indexOf("hidden")&&c.daysContainer.contains(e))}function Z(e){var t=e.target===c._input,n=c.config.allowInput,a=c.isOpen&&(!n||!t),i=c.config.inline&&t&&!n;if(13===e.keyCode&&t){if(n)return c.setDate(c._input.value,!0,e.target===c.altInput?c.config.altFormat:c.config.dateFormat),e.target.blur();c.open()}else if(q(e.target)||a||i){var o=!!c.timeContainer&&c.timeContainer.contains(e.target);switch(e.keyCode){case 13:o?M():oe(e);break;case 27:e.preventDefault(),ie();break;case 8:case 46:t&&!c.config.allowInput&&(e.preventDefault(),c.clear());break;case 37:case 39:if(o)c.hourElement&&c.hourElement.focus();else if(e.preventDefault(),void 0!==c.daysContainer&&(!1===n||V(document.activeElement))){var r=39===e.keyCode?1:-1;e.ctrlKey?(U(r),H(Y(1),0)):H(void 0,r)}break;case 38:case 40:e.preventDefault();var l=40===e.keyCode?1:-1;c.daysContainer?e.ctrlKey?(z(c.currentYear-l),H(Y(1),0)):o||H(void 0,7*l):c.config.enableTime&&(!o&&c.hourElement&&c.hourElement.focus(),M(e),c._debouncedChange());break;case 9:if(!o)break;var d=[c.hourElement,c.minuteElement,c.secondElement,c.amPM].filter(function(e){return e}),s=d.indexOf(e.target);if(-1!==s){var u=d[s+(e.shiftKey?-1:1)];void 0!==u&&(e.preventDefault(),u.focus())}}}if(void 0!==c.amPM&&e.target===c.amPM)switch(e.key){case c.l10n.amPM[0].charAt(0):case c.l10n.amPM[0].charAt(0).toLowerCase():c.amPM.textContent=c.l10n.amPM[0],x(),me();break;case c.l10n.amPM[1].charAt(0):case c.l10n.amPM[1].charAt(0).toLowerCase():c.amPM.textContent=c.l10n.amPM[1],x(),me()}de("onKeyDown",e)}function Q(e){if(1===c.selectedDates.length&&(!e||e.classList.contains("flatpickr-day")&&!e.classList.contains("disabled"))){for(var t=e?e.dateObj.getTime():c.days.firstElementChild.dateObj.getTime(),n=c.parseDate(c.selectedDates[0],void 0,!0).getTime(),a=Math.min(t,c.selectedDates[0].getTime()),i=Math.max(t,c.selectedDates[0].getTime()),o=c.daysContainer.lastChild.lastChild.dateObj.getTime(),r=!1,l=0,d=0,s=a;sa&&sl)?l=s:s>n&&(!d||s0&&s0&&s>d;return g?(o.classList.add("notAllowed"),["inRange","startRange","endRange"].forEach(function(e){o.classList.remove(e)}),"continue"):r&&!g?"continue":(["startRange","inRange","endRange","notAllowed"].forEach(function(e){o.classList.remove(e)}),void(void 0!==e&&(e.classList.add(t0&&p&&p.lastChild.dateObj.getTime()>=s||(nt&&s===n&&o.classList.add("endRange"),s>=l&&(0===d||s<=d)&&m(s,n,t)&&o.classList.add("inRange")))))},v=0,D=f.children.length;v0||n.getMinutes()>0||n.getSeconds()>0),c.selectedDates&&(c.selectedDates=c.selectedDates.filter(function(e){return G(e)}),c.selectedDates.length||"min"!==e||E(n),me()),c.daysContainer&&(ae(),void 0!==n?c.currentYearElement[e]=n.getFullYear().toString():c.currentYearElement.removeAttribute(e),c.currentYearElement.disabled=!!a&&void 0!==n&&a.getFullYear()===n.getFullYear())}}function te(){"object"!=typeof c.config.locale&&void 0===y.l10ns[c.config.locale]&&c.config.errorHandler(new Error("flatpickr: invalid locale "+c.config.locale)),c.l10n=Object.assign({},y.l10ns.default,"object"==typeof c.config.locale?c.config.locale:"default"!==c.config.locale?y.l10ns[c.config.locale]:void 0),l.K="("+c.l10n.amPM[0]+"|"+c.l10n.amPM[1]+"|"+c.l10n.amPM[0].toLowerCase()+"|"+c.l10n.amPM[1].toLowerCase()+")",c.formatDate=s(c),c.parseDate=u({config:c.config,l10n:c.l10n})}function ne(e){if(void 0!==c.calendarContainer){de("onPreCalendarPosition");var t=e||c._positionElement,n=Array.prototype.reduce.call(c.calendarContainer.children,function(e,t){return e+t.offsetHeight},0),a=c.calendarContainer.offsetWidth,i=c.config.position.split(" "),o=i[0],r=i.length>1?i[1]:null,l=t.getBoundingClientRect(),d=window.innerHeight-l.bottom,s="above"===o||"below"!==o&&dn,u=window.pageYOffset+l.top+(s?-n-2:t.offsetHeight+2);if(h(c.calendarContainer,"arrowTop",!s),h(c.calendarContainer,"arrowBottom",s),!c.config.inline){var f=window.pageXOffset+l.left-(null!=r&&"center"===r?(a-l.width)/2:0),m=window.document.body.offsetWidth-l.right,g=f+a>window.document.body.offsetWidth;h(c.calendarContainer,"rightMost",g),c.config.static||(c.calendarContainer.style.top=u+"px",g?(c.calendarContainer.style.left="auto",c.calendarContainer.style.right=m+"px"):(c.calendarContainer.style.left=f+"px",c.calendarContainer.style.right="auto"))}}}function ae(){c.config.noCalendar||c.isMobile||(fe(),W())}function ie(){c._input.focus(),-1!==window.navigator.userAgent.indexOf("MSIE")||void 0!==navigator.msMaxTouchPoints?setTimeout(c.close,0):c.close()}function oe(e){e.preventDefault(),e.stopPropagation();var t=function e(t,n){return n(t)?t:t.parentNode?e(t.parentNode,n):void 0}(e.target,function(e){return e.classList&&e.classList.contains("flatpickr-day")&&!e.classList.contains("disabled")&&!e.classList.contains("notAllowed")});if(void 0!==t){var n=t,a=c.latestSelectedDateObj=new Date(n.dateObj.getTime()),i=(a.getMonth()c.currentMonth+c.config.showMonths-1)&&"range"!==c.config.mode;if(c.selectedDateElem=n,"single"===c.config.mode)c.selectedDates=[a];else if("multiple"===c.config.mode){var o=ue(a);o?c.selectedDates.splice(parseInt(o),1):c.selectedDates.push(a)}else"range"===c.config.mode&&(2===c.selectedDates.length&&c.clear(!1),c.selectedDates.push(a),0!==f(a,c.selectedDates[0],!0)&&c.selectedDates.sort(function(e,t){return e.getTime()-t.getTime()}));if(x(),i){var r=c.currentYear!==a.getFullYear();c.currentYear=a.getFullYear(),c.currentMonth=a.getMonth(),r&&de("onYearChange"),de("onMonthChange")}if(fe(),W(),me(),c.config.enableTime&&setTimeout(function(){return c.showTimeInput=!0},50),i||"range"===c.config.mode||1!==c.config.showMonths?c.selectedDateElem&&c.selectedDateElem.focus():j(n),void 0!==c.hourElement&&setTimeout(function(){return void 0!==c.hourElement&&c.hourElement.select()},451),c.config.closeOnSelect){var l="single"===c.config.mode&&!c.config.enableTime,d="range"===c.config.mode&&2===c.selectedDates.length&&!c.config.enableTime;(l||d)&&ie()}_()}}c.parseDate=u({config:c.config,l10n:c.l10n}),c._handlers=[],c._bind=O,c._setHoursFromDate=E,c._positionCalendar=ne,c.changeMonth=U,c.changeYear=z,c.clear=function(e){void 0===e&&(e=!0);c.input.value="",void 0!==c.altInput&&(c.altInput.value="");void 0!==c.mobileInput&&(c.mobileInput.value="");c.selectedDates=[],c.latestSelectedDateObj=void 0,c.showTimeInput=!1,!0===c.config.enableTime&&T();c.redraw(),e&&de("onChange")},c.close=function(){c.isOpen=!1,c.isMobile||(c.calendarContainer.classList.remove("open"),c._input.classList.remove("active"));de("onClose")},c._createElement=v,c.destroy=function(){void 0!==c.config&&de("onDestroy");for(var e=c._handlers.length;e--;){var t=c._handlers[e];t.element.removeEventListener(t.event,t.handler,t.options)}if(c._handlers=[],c.mobileInput)c.mobileInput.parentNode&&c.mobileInput.parentNode.removeChild(c.mobileInput),c.mobileInput=void 0;else if(c.calendarContainer&&c.calendarContainer.parentNode)if(c.config.static&&c.calendarContainer.parentNode){var n=c.calendarContainer.parentNode;for(n.lastChild&&n.removeChild(n.lastChild);n.firstChild;)n.parentNode.insertBefore(n.firstChild,n);n.parentNode.removeChild(n)}else c.calendarContainer.parentNode.removeChild(c.calendarContainer);c.altInput&&(c.input.type="text",c.altInput.parentNode&&c.altInput.parentNode.removeChild(c.altInput),delete c.altInput);c.input&&(c.input.type=c.input._type,c.input.classList.remove("flatpickr-input"),c.input.removeAttribute("readonly"),c.input.value="");["_showTimeInput","latestSelectedDateObj","_hideNextMonthArrow","_hidePrevMonthArrow","__hideNextMonthArrow","__hidePrevMonthArrow","isMobile","isOpen","selectedDateElem","minDateHasTime","maxDateHasTime","days","daysContainer","_input","_positionElement","innerContainer","rContainer","monthNav","todayDateElem","calendarContainer","weekdayContainer","prevMonthNav","nextMonthNav","currentMonthElement","currentYearElement","navigationCurrentMonth","selectedDateElem","config"].forEach(function(e){try{delete c[e]}catch(e){}})},c.isEnabled=G,c.jumpToDate=N,c.open=function(e,t){void 0===t&&(t=c._positionElement);if(!0===c.isMobile)return e&&(e.preventDefault(),e.target&&e.target.blur()),setTimeout(function(){void 0!==c.mobileInput&&c.mobileInput.focus()},0),void de("onOpen");if(c._input.disabled||c.config.inline)return;var n=c.isOpen;c.isOpen=!0,n||(c.calendarContainer.classList.add("open"),c._input.classList.add("active"),de("onOpen"),ne(t));!0===c.config.enableTime&&!0===c.config.noCalendar&&(0===c.selectedDates.length&&(c.setDate(void 0!==c.config.minDate?new Date(c.config.minDate.getTime()):new Date,!1),T(),me()),!1!==c.config.allowInput||void 0!==e&&c.timeContainer.contains(e.relatedTarget)||setTimeout(function(){return c.hourElement.select()},50))},c.redraw=ae,c.set=function(e,t){null!==e&&"object"==typeof e?Object.assign(c.config,e):(c.config[e]=t,void 0!==re[e]&&re[e].forEach(function(e){return e()}));c.redraw(),N()},c.setDate=function(e,t,n){void 0===t&&(t=!1);void 0===n&&(n=c.config.dateFormat);if(0!==e&&!e||e instanceof Array&&0===e.length)return c.clear(t);le(e,n),c.showTimeInput=c.selectedDates.length>0,c.latestSelectedDateObj=c.selectedDates[0],c.redraw(),N(),E(),me(t),t&&de("onChange")},c.toggle=function(e){if(!0===c.isOpen)return c.close();c.open(e)};var re={locale:[te,B],showMonths:[K,C,J]};function le(e,t){var n=[];if(e instanceof Array)n=e.map(function(e){return c.parseDate(e,t)});else if(e instanceof Date||"number"==typeof e)n=[c.parseDate(e,t)];else if("string"==typeof e)switch(c.config.mode){case"single":case"time":n=[c.parseDate(e,t)];break;case"multiple":n=e.split(c.config.conjunction).map(function(e){return c.parseDate(e,t)});break;case"range":n=e.split(c.l10n.rangeSeparator).map(function(e){return c.parseDate(e,t)})}else c.config.errorHandler(new Error("Invalid date supplied: "+JSON.stringify(e)));c.selectedDates=n.filter(function(e){return e instanceof Date&&G(e,!1)}),"range"===c.config.mode&&c.selectedDates.sort(function(e,t){return e.getTime()-t.getTime()})}function ce(e){return e.slice().map(function(e){return"string"==typeof e||"number"==typeof e||e instanceof Date?c.parseDate(e,void 0,!0):e&&"object"==typeof e&&e.from&&e.to?{from:c.parseDate(e.from,void 0),to:c.parseDate(e.to,void 0)}:e}).filter(function(e){return e})}function de(e,t){var n=c.config[e];if(void 0!==n&&n.length>0)for(var a=0;n[a]&&ac.config.maxDate.getMonth():c.currentYear>c.config.maxDate.getFullYear()))}function me(e){if(void 0===e&&(e=!0),0===c.selectedDates.length)return c.clear(e);void 0!==c.mobileInput&&c.mobileFormatStr&&(c.mobileInput.value=void 0!==c.latestSelectedDateObj?c.formatDate(c.latestSelectedDateObj,c.mobileFormatStr):"");var t="range"!==c.config.mode?c.config.conjunction:c.l10n.rangeSeparator;c.input.value=c.selectedDates.map(function(e){return c.formatDate(e,c.config.dateFormat)}).join(t),void 0!==c.altInput&&(c.altInput.value=c.selectedDates.map(function(e){return c.formatDate(e,c.config.altFormat)}).join(t)),!1!==e&&de("onValueUpdate")}function ge(e){e.preventDefault();var t=c.prevMonthNav.contains(e.target),n=c.nextMonthNav.contains(e.target);t||n?U(t?-1:1):c.yearElements.indexOf(e.target)>=0?e.target.select():e.target.classList.contains("arrowUp")?c.changeYear(c.currentYear+1):e.target.classList.contains("arrowDown")&&c.changeYear(c.currentYear-1)}return function(){c.element=c.input=i,c.isOpen=!1,function(){var e=["wrap","weekNumbers","allowInput","clickOpens","time_24hr","enableTime","noCalendar","altInput","shorthandCurrentMonth","inline","static","enableSeconds","disableMobile"],t=["onChange","onClose","onDayCreate","onDestroy","onKeyDown","onMonthChange","onOpen","onParseConfig","onReady","onValueUpdate","onYearChange","onPreCalendarPosition"],n=Object.assign({},r,JSON.parse(JSON.stringify(i.dataset||{}))),o={};c.config.parseDate=n.parseDate,c.config.formatDate=n.formatDate,Object.defineProperty(c.config,"enable",{get:function(){return c.config._enable},set:function(e){c.config._enable=ce(e)}}),Object.defineProperty(c.config,"disable",{get:function(){return c.config._disable},set:function(e){c.config._disable=ce(e)}});var l="time"===n.mode;n.dateFormat||!n.enableTime&&!l||(o.dateFormat=n.noCalendar||l?"H:i"+(n.enableSeconds?":S":""):y.defaultConfig.dateFormat+" H:i"+(n.enableSeconds?":S":"")),n.altInput&&(n.enableTime||l)&&!n.altFormat&&(o.altFormat=n.noCalendar||l?"h:i"+(n.enableSeconds?":S K":" K"):y.defaultConfig.altFormat+" h:i"+(n.enableSeconds?":S":"")+" K"),Object.defineProperty(c.config,"minDate",{get:function(){return c.config._minDate},set:ee("min")}),Object.defineProperty(c.config,"maxDate",{get:function(){return c.config._maxDate},set:ee("max")});var d=function(e){return function(t){c.config["min"===e?"_minTime":"_maxTime"]=c.parseDate(t,"H:i")}};Object.defineProperty(c.config,"minTime",{get:function(){return c.config._minTime},set:d("min")}),Object.defineProperty(c.config,"maxTime",{get:function(){return c.config._maxTime},set:d("max")}),"time"===n.mode&&(c.config.noCalendar=!0,c.config.enableTime=!0),Object.assign(c.config,o,n);for(var s=0;s0?c.selectedDates[0]:c.config.minDate&&c.config.minDate.getTime()>c.now.getTime()?c.config.minDate:c.config.maxDate&&c.config.maxDate.getTime()0&&(c.latestSelectedDateObj=c.selectedDates[0]),void 0!==c.config.minTime&&(c.config.minTime=c.parseDate(c.config.minTime,"H:i")),void 0!==c.config.maxTime&&(c.config.maxTime=c.parseDate(c.config.maxTime,"H:i")),c.minDateHasTime=!!c.config.minDate&&(c.config.minDate.getHours()>0||c.config.minDate.getMinutes()>0||c.config.minDate.getSeconds()>0),c.maxDateHasTime=!!c.config.maxDate&&(c.config.maxDate.getHours()>0||c.config.maxDate.getMinutes()>0||c.config.maxDate.getSeconds()>0),Object.defineProperty(c,"showTimeInput",{get:function(){return c._showTimeInput},set:function(e){c._showTimeInput=e,c.calendarContainer&&h(c.calendarContainer,"showTimeInput",e),c.isOpen&&ne()}})}(),c.utils={getDaysInMonth:function(e,t){return void 0===e&&(e=c.currentMonth),void 0===t&&(t=c.currentYear),1===e&&(t%4==0&&t%100!=0||t%400==0)?29:c.l10n.daysInMonth[e]}},c.isMobile||function(){var n=window.document.createDocumentFragment();if(c.calendarContainer=v("div","flatpickr-calendar"),c.calendarContainer.tabIndex=-1,!c.config.noCalendar){if(n.appendChild((c.monthNav=v("div","flatpickr-months"),c.yearElements=[],c.monthElements=[],c.prevMonthNav=v("span","flatpickr-prev-month"),c.prevMonthNav.innerHTML=c.config.prevArrow,c.nextMonthNav=v("span","flatpickr-next-month"),c.nextMonthNav.innerHTML=c.config.nextArrow,K(),Object.defineProperty(c,"_hidePrevMonthArrow",{get:function(){return c.__hidePrevMonthArrow},set:function(e){c.__hidePrevMonthArrow!==e&&(h(c.prevMonthNav,"disabled",e),c.__hidePrevMonthArrow=e)}}),Object.defineProperty(c,"_hideNextMonthArrow",{get:function(){return c.__hideNextMonthArrow},set:function(e){c.__hideNextMonthArrow!==e&&(h(c.nextMonthNav,"disabled",e),c.__hideNextMonthArrow=e)}}),c.currentYearElement=c.yearElements[0],fe(),c.monthNav)),c.innerContainer=v("div","flatpickr-innerContainer"),c.config.weekNumbers){var a=function(){c.calendarContainer.classList.add("hasWeeks");var e=v("div","flatpickr-weekwrapper");e.appendChild(v("span","flatpickr-weekday",c.l10n.weekAbbreviation));var t=v("div","flatpickr-weeks");return e.appendChild(t),{weekWrapper:e,weekNumbers:t}}(),i=a.weekWrapper,o=a.weekNumbers;c.innerContainer.appendChild(i),c.weekNumbers=o,c.weekWrapper=i}c.rContainer=v("div","flatpickr-rContainer"),c.rContainer.appendChild(J()),c.daysContainer||(c.daysContainer=v("div","flatpickr-days"),c.daysContainer.tabIndex=-1),W(),c.rContainer.appendChild(c.daysContainer),c.innerContainer.appendChild(c.rContainer),n.appendChild(c.innerContainer)}c.config.enableTime&&n.appendChild(function(){c.calendarContainer.classList.add("hasTime"),c.config.noCalendar&&c.calendarContainer.classList.add("noCalendar"),c.timeContainer=v("div","flatpickr-time"),c.timeContainer.tabIndex=-1;var n=v("span","flatpickr-time-separator",":"),a=w("flatpickr-hour");c.hourElement=a.childNodes[0];var i=w("flatpickr-minute");if(c.minuteElement=i.childNodes[0],c.hourElement.tabIndex=c.minuteElement.tabIndex=-1,c.hourElement.value=e(c.latestSelectedDateObj?c.latestSelectedDateObj.getHours():c.config.time_24hr?c.config.defaultHour:function(e){switch(e%24){case 0:case 12:return 12;default:return e%12}}(c.config.defaultHour)),c.minuteElement.value=e(c.latestSelectedDateObj?c.latestSelectedDateObj.getMinutes():c.config.defaultMinute),c.hourElement.setAttribute("data-step",c.config.hourIncrement.toString()),c.minuteElement.setAttribute("data-step",c.config.minuteIncrement.toString()),c.hourElement.setAttribute("data-min",c.config.time_24hr?"0":"1"),c.hourElement.setAttribute("data-max",c.config.time_24hr?"23":"12"),c.minuteElement.setAttribute("data-min","0"),c.minuteElement.setAttribute("data-max","59"),c.timeContainer.appendChild(a),c.timeContainer.appendChild(n),c.timeContainer.appendChild(i),c.config.time_24hr&&c.timeContainer.classList.add("time24hr"),c.config.enableSeconds){c.timeContainer.classList.add("hasSeconds");var o=w("flatpickr-second");c.secondElement=o.childNodes[0],c.secondElement.value=e(c.latestSelectedDateObj?c.latestSelectedDateObj.getSeconds():c.config.defaultSeconds),c.secondElement.setAttribute("data-step",c.minuteElement.getAttribute("data-step")),c.secondElement.setAttribute("data-min",c.minuteElement.getAttribute("data-min")),c.secondElement.setAttribute("data-max",c.minuteElement.getAttribute("data-max")),c.timeContainer.appendChild(v("span","flatpickr-time-separator",":")),c.timeContainer.appendChild(o)}return c.config.time_24hr||(c.amPM=v("span","flatpickr-am-pm",c.l10n.amPM[t((c.latestSelectedDateObj?c.hourElement.value:c.config.defaultHour)>11)]),c.amPM.title=c.l10n.toggleTitle,c.amPM.tabIndex=-1,c.timeContainer.appendChild(c.amPM)),c.timeContainer}()),h(c.calendarContainer,"rangeMode","range"===c.config.mode),h(c.calendarContainer,"animate",!0===c.config.animate),h(c.calendarContainer,"multiMonth",c.config.showMonths>1),c.calendarContainer.appendChild(n);var r=void 0!==c.config.appendTo&&void 0!==c.config.appendTo.nodeType;if((c.config.inline||c.config.static)&&(c.calendarContainer.classList.add(c.config.inline?"inline":"static"),c.config.inline&&(!r&&c.element.parentNode?c.element.parentNode.insertBefore(c.calendarContainer,c._input.nextSibling):void 0!==c.config.appendTo&&c.config.appendTo.appendChild(c.calendarContainer)),c.config.static)){var l=v("div","flatpickr-wrapper");c.element.parentNode&&c.element.parentNode.insertBefore(l,c.element),l.appendChild(c.element),c.altInput&&l.appendChild(c.altInput),l.appendChild(c.calendarContainer)}c.config.static||c.config.inline||(void 0!==c.config.appendTo?c.config.appendTo:window.document.body).appendChild(c.calendarContainer)}(),function(){if(c.config.wrap&&["open","close","toggle","clear"].forEach(function(e){Array.prototype.forEach.call(c.element.querySelectorAll("[data-"+e+"]"),function(t){return O(t,"click",c[e])})}),c.isMobile)!function(){var e=c.config.enableTime?c.config.noCalendar?"time":"datetime-local":"date";c.mobileInput=v("input",c.input.className+" flatpickr-mobile"),c.mobileInput.step=c.input.getAttribute("step")||"any",c.mobileInput.tabIndex=1,c.mobileInput.type=e,c.mobileInput.disabled=c.input.disabled,c.mobileInput.required=c.input.required,c.mobileInput.placeholder=c.input.placeholder,c.mobileFormatStr="datetime-local"===e?"Y-m-d\\TH:i:S":"date"===e?"Y-m-d":"H:i:S",c.selectedDates.length>0&&(c.mobileInput.defaultValue=c.mobileInput.value=c.formatDate(c.selectedDates[0],c.mobileFormatStr)),c.config.minDate&&(c.mobileInput.min=c.formatDate(c.config.minDate,"Y-m-d")),c.config.maxDate&&(c.mobileInput.max=c.formatDate(c.config.maxDate,"Y-m-d")),c.input.type="hidden",void 0!==c.altInput&&(c.altInput.type="hidden");try{c.input.parentNode&&c.input.parentNode.insertBefore(c.mobileInput,c.input.nextSibling)}catch(e){}O(c.mobileInput,"change",function(e){c.setDate(e.target.value,!1,c.mobileFormatStr),de("onChange"),de("onClose")})}();else{var e=n(X,50);c._debouncedChange=n(_,b),c.daysContainer&&!/iPhone|iPad|iPod/i.test(navigator.userAgent)&&O(c.daysContainer,"mouseover",function(e){"range"===c.config.mode&&Q(e.target)}),O(window.document.body,"keydown",Z),c.config.static||O(c._input,"keydown",Z),c.config.inline||c.config.static||O(window,"resize",e),void 0!==window.ontouchstart?O(window.document,"click",$):O(window.document,"mousedown",S($)),O(window.document,"focus",$,{capture:!0}),!0===c.config.clickOpens&&(O(c._input,"focus",c.open),O(c._input,"mousedown",S(c.open))),void 0!==c.daysContainer&&(O(c.monthNav,"mousedown",S(ge)),O(c.monthNav,["keyup","increment"],I),O(c.daysContainer,"mousedown",S(oe))),void 0!==c.timeContainer&&void 0!==c.minuteElement&&void 0!==c.hourElement&&(O(c.timeContainer,["increment"],M),O(c.timeContainer,"blur",M,{capture:!0}),O(c.timeContainer,"mousedown",S(F)),O([c.hourElement,c.minuteElement],["focus","click"],function(e){return e.target.select()}),void 0!==c.secondElement&&O(c.secondElement,"focus",function(){return c.secondElement&&c.secondElement.select()}),void 0!==c.amPM&&O(c.amPM,"mousedown",S(function(e){M(e),_()})))}}(),(c.selectedDates.length||c.config.noCalendar)&&(c.config.enableTime&&E(c.config.noCalendar?c.latestSelectedDateObj||c.config.minDate:void 0),me(!1)),C(),c.showTimeInput=c.selectedDates.length>0||c.config.noCalendar;var o=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);!c.isMobile&&o&&ne(),de("onReady")}(),c}function M(e,t){for(var n=Array.prototype.slice.call(e),a=[],i=0;i11)]},M:function(e,t){return o(e.getMonth(),!0,t)},S:function(t){return e(t.getSeconds())},U:function(e){return e.getTime()/1e3},W:function(e,t,n){return n.getWeek(e)},Y:function(e){return e.getFullYear()},d:function(t){return e(t.getDate())},h:function(e){return e.getHours()%12?e.getHours()%12:12},i:function(t){return e(t.getMinutes())},j:function(e){return e.getDate()},l:function(e,t){return t.weekdays.longhand[e.getDay()]},m:function(t){return e(t.getMonth()+1)},n:function(e){return e.getMonth()+1},s:function(e){return e.getSeconds()},w:function(e){return e.getDay()},y:function(e){return String(e.getFullYear()).substring(2)}},d={weekdays:{shorthand:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],longhand:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},months:{shorthand:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],longhand:["January","February","March","April","May","June","July","August","September","October","November","December"]},daysInMonth:[31,28,31,30,31,30,31,31,30,31,30,31],firstDayOfWeek:0,ordinal:function(e){var t=e%100;if(t>3&&t<21)return"th";switch(t%10){case 1:return"st";case 2:return"nd";case 3:return"rd";default:return"th"}},rangeSeparator:" to ",weekAbbreviation:"Wk",scrollTitle:"Scroll to increment",toggleTitle:"Click to toggle",amPM:["AM","PM"],yearAriaLabel:"Year"},s=function(e){var t=e.config,n=void 0===t?p:t,a=e.l10n,i=void 0===a?d:a;return function(e,t,a){if(void 0!==n.formatDate)return n.formatDate(e,t);var o=a||i;return t.split("").map(function(t,a,i){return c[t]&&"\\"!==i[a-1]?c[t](e,o,n):"\\"!==t?t:""}).join("")}},u=function(e){var t=e.config,n=void 0===t?p:t,a=e.l10n,i=void 0===a?d:a;return function(e,t,a,o){if(0===e||e){var c,d=o||i,s=e;if(e instanceof Date)c=new Date(e.getTime());else if("string"!=typeof e&&void 0!==e.toFixed)c=new Date(e);else if("string"==typeof e){var u=t||(n||p).dateFormat,f=String(e).trim();if("today"===f)c=new Date,a=!0;else if(/Z$/.test(f)||/GMT$/.test(f))c=new Date(e);else if(n&&n.parseDate)c=n.parseDate(e,u);else{c=n&&n.noCalendar?new Date((new Date).setHours(0,0,0,0)):new Date((new Date).getFullYear(),0,1,0,0,0,0);for(var m,g=[],h=0,v=0,D="";hMath.min(t,n)&&e",noCalendar:!1,now:new Date,onChange:[],onClose:[],onDayCreate:[],onDestroy:[],onKeyDown:[],onMonthChange:[],onOpen:[],onParseConfig:[],onReady:[],onValueUpdate:[],onYearChange:[],onPreCalendarPosition:[],plugins:[],position:"auto",positionElement:void 0,prevArrow:"",shorthandCurrentMonth:!1,showMonths:1,static:!1,time_24hr:!1,weekNumbers:!1,wrap:!1};function h(e,t,n){if(!0===n)return e.classList.add(t);e.classList.remove(t)}function v(e,t,n){var a=window.document.createElement(e);return t=t||"",n=n||"",a.className=t,void 0!==n&&(a.textContent=n),a}function D(e){for(;e.firstChild;)e.removeChild(e.firstChild)}function w(e,t){var n=v("div","numInputWrapper"),a=v("input","numInput "+e),i=v("span","arrowUp"),o=v("span","arrowDown");if(a.type="text",a.pattern="\\d*",void 0!==t)for(var r in t)a.setAttribute(r,t[r]);return n.appendChild(a),n.appendChild(i),n.appendChild(o),n}"function"!=typeof Object.assign&&(Object.assign=function(e){if(!e)throw TypeError("Cannot convert undefined or null to object");for(var t=arguments.length,n=new Array(t>1?t-1:0),a=1;ar&&(u=i===c.hourElement?u-r-t(!c.amPM):o,m&&A(void 0,1,c.hourElement)),c.amPM&&f&&(1===l?u+d===23:Math.abs(u-d)>l)&&(c.amPM.textContent=c.l10n.amPM[t(c.amPM.textContent===c.l10n.amPM[0])]),i.value=e(u)}}(n);var a=c._input.value;x(),me(),c._input.value!==a&&c._debouncedChange()}}function x(){if(void 0!==c.hourElement&&void 0!==c.minuteElement){var e,n,a=(parseInt(c.hourElement.value.slice(-2),10)||0)%24,i=(parseInt(c.minuteElement.value,10)||0)%60,o=void 0!==c.secondElement?(parseInt(c.secondElement.value,10)||0)%60:0;void 0!==c.amPM&&(e=a,n=c.amPM.textContent,a=e%12+12*t(n===c.l10n.amPM[1]));var r=void 0!==c.config.minTime||c.config.minDate&&c.minDateHasTime&&c.latestSelectedDateObj&&0===f(c.latestSelectedDateObj,c.config.minDate,!0);if(void 0!==c.config.maxTime||c.config.maxDate&&c.maxDateHasTime&&c.latestSelectedDateObj&&0===f(c.latestSelectedDateObj,c.config.maxDate,!0)){var l=void 0!==c.config.maxTime?c.config.maxTime:c.config.maxDate;(a=Math.min(a,l.getHours()))===l.getHours()&&(i=Math.min(i,l.getMinutes())),i===l.getMinutes()&&(o=Math.min(o,l.getSeconds()))}if(r){var d=void 0!==c.config.minTime?c.config.minTime:c.config.minDate;(a=Math.max(a,d.getHours()))===d.getHours()&&(i=Math.max(i,d.getMinutes())),i===d.getMinutes()&&(o=Math.max(o,d.getSeconds()))}k(a,i,o)}}function E(e){var t=e||c.latestSelectedDateObj;t&&k(t.getHours(),t.getMinutes(),t.getSeconds())}function T(){var e=c.config.defaultHour,t=c.config.defaultMinute,n=c.config.defaultSeconds;if(void 0!==c.config.minDate){var a=c.config.minDate.getHours(),i=c.config.minDate.getMinutes();(e=Math.max(e,a))===a&&(t=Math.max(i,t)),e===a&&t===i&&(n=c.config.minDate.getSeconds())}if(void 0!==c.config.maxDate){var o=c.config.maxDate.getHours(),r=c.config.maxDate.getMinutes();(e=Math.min(e,o))===o&&(t=Math.min(r,t)),e===o&&t===r&&(n=c.config.maxDate.getSeconds())}k(e,t,n)}function k(n,a,i){void 0!==c.latestSelectedDateObj&&c.latestSelectedDateObj.setHours(n%24,a,i||0,0),c.hourElement&&c.minuteElement&&!c.isMobile&&(c.hourElement.value=e(c.config.time_24hr?n:(12+n)%12+12*t(n%12==0)),c.minuteElement.value=e(a),void 0!==c.amPM&&(c.amPM.textContent=c.l10n.amPM[t(n>=12)]),void 0!==c.secondElement&&(c.secondElement.value=e(i)))}function I(e){var t=parseInt(e.target.value)+(e.delta||0);(t/1e3>1||"Enter"===e.key&&!/[^\d]/.test(t.toString()))&&z(t)}function O(e,t,n,a){return t instanceof Array?t.forEach(function(t){return O(e,t,n,a)}):e instanceof Array?e.forEach(function(e){return O(e,t,n,a)}):(e.addEventListener(t,n,a),void c._handlers.push({element:e,event:t,handler:n,options:a}))}function S(e){return function(t){1===t.which&&e(t)}}function _(){de("onChange")}function N(e){var t=void 0!==e?c.parseDate(e):c.latestSelectedDateObj||(c.config.minDate&&c.config.minDate>c.now?c.config.minDate:c.config.maxDate&&c.config.maxDate=0&&f(e,c.selectedDates[1])<=0}(t)&&!ue(t)&&o.classList.add("inRange"),c.weekNumbers&&1===c.config.showMonths&&"prevMonthDay"!==e&&n%7==1&&c.weekNumbers.insertAdjacentHTML("beforeend",""+c.config.getWeek(t)+""),de("onDayCreate",o),o}function j(e){e.focus(),"range"===c.config.mode&&Q(e)}function Y(e){for(var t=e>0?0:c.config.showMonths-1,n=e>0?c.config.showMonths:-1,a=t;a!=n;a+=e)for(var i=c.daysContainer.children[a],o=e>0?0:i.children.length-1,r=e>0?i.children.length:-1,l=o;l!=r;l+=e){var d=i.children[l];if(-1===d.className.indexOf("hidden")&&G(d.dateObj))return d}}function H(e,t){var n=V(document.activeElement),a=void 0!==e?e:n?document.activeElement:void 0!==c.selectedDateElem&&V(c.selectedDateElem)?c.selectedDateElem:void 0!==c.todayDateElem&&V(c.todayDateElem)?c.todayDateElem:Y(t>0?1:-1);return void 0===a?c._input.focus():n?void function(e,t){for(var n=-1===e.className.indexOf("Month")?e.dateObj.getMonth():c.currentMonth,a=t>0?c.config.showMonths:-1,i=t>0?1:-1,o=n-c.currentMonth;o!=a;o+=i)for(var r=c.daysContainer.children[o],l=n-c.currentMonth===o?e.$i+t:t<0?r.children.length-1:0,d=r.children.length,s=l;s>=0&&s0?d:-1);s+=i){var u=r.children[s];if(-1===u.className.indexOf("hidden")&&G(u.dateObj)&&Math.abs(e.$i-s)>=Math.abs(t))return j(u)}c.changeMonth(i),H(Y(i),0)}(a,t):j(a)}function L(e,t){for(var n=(new Date(e,t,1).getDay()-c.l10n.firstDayOfWeek+7)%7,a=c.utils.getDaysInMonth((t-1+12)%12),i=c.utils.getDaysInMonth(t),o=window.document.createDocumentFragment(),r=c.config.showMonths>1,l=r?"prevMonthDay hidden":"prevMonthDay",d=r?"nextMonthDay hidden":"nextMonthDay",s=a+1-n,u=0;s<=a;s++,u++)o.appendChild(P(l,new Date(e,t-1,s),s,u));for(s=1;s<=i;s++,u++)o.appendChild(P("",new Date(e,t,s),s,u));for(var f=i+1;f<=42-n&&(1===c.config.showMonths||u%7!=0);f++,u++)o.appendChild(P(d,new Date(e,t+1,f%i),f,u));var m=v("div","dayContainer");return m.appendChild(o),m}function W(){if(void 0!==c.daysContainer){D(c.daysContainer),c.weekNumbers&&D(c.weekNumbers);for(var e=document.createDocumentFragment(),t=0;t0&&e\n "+t.join("")+"\n \n "}function U(e,t){void 0===t&&(t=!0);var n=t?e:e-c.currentMonth;n<0&&!0===c._hidePrevMonthArrow||n>0&&!0===c._hideNextMonthArrow||(c.currentMonth+=n,(c.currentMonth<0||c.currentMonth>11)&&(c.currentYear+=c.currentMonth>11?1:-1,c.currentMonth=(c.currentMonth+12)%12,de("onYearChange")),W(),de("onMonthChange"),fe())}function q(e){return!(!c.config.appendTo||!c.config.appendTo.contains(e))||c.calendarContainer.contains(e)}function $(e){if(c.isOpen&&!c.config.inline){var t=q(e.target),n=e.target===c.input||e.target===c.altInput||c.element.contains(e.target)||e.path&&e.path.indexOf&&(~e.path.indexOf(c.input)||~e.path.indexOf(c.altInput)),a="blur"===e.type?n&&e.relatedTarget&&!q(e.relatedTarget):!n&&!t,i=!c.config.ignoredFocusElements.some(function(t){return t.contains(e.target)});a&&i&&(c.close(),"range"===c.config.mode&&1===c.selectedDates.length&&(c.clear(!1),c.redraw()))}}function z(e){if(!(!e||c.config.minDate&&ec.config.maxDate.getFullYear())){var t=e,n=c.currentYear!==t;c.currentYear=t||c.currentYear,c.config.maxDate&&c.currentYear===c.config.maxDate.getFullYear()?c.currentMonth=Math.min(c.config.maxDate.getMonth(),c.currentMonth):c.config.minDate&&c.currentYear===c.config.minDate.getFullYear()&&(c.currentMonth=Math.max(c.config.minDate.getMonth(),c.currentMonth)),n&&(c.redraw(),de("onYearChange"))}}function G(e,t){void 0===t&&(t=!0);var n=c.parseDate(e,void 0,t);if(c.config.minDate&&n&&f(n,c.config.minDate,void 0!==t?t:!c.minDateHasTime)<0||c.config.maxDate&&n&&f(n,c.config.maxDate,void 0!==t?t:!c.maxDateHasTime)>0)return!1;if(0===c.config.enable.length&&0===c.config.disable.length)return!0;if(void 0===n)return!1;for(var a,i=c.config.enable.length>0,o=i?c.config.enable:c.config.disable,r=0;r=a.from.getTime()&&n.getTime()<=a.to.getTime())return i}return!i}function V(e){return void 0!==c.daysContainer&&(-1===e.className.indexOf("hidden")&&c.daysContainer.contains(e))}function Z(e){var t=e.target===c._input,n=c.config.allowInput,a=c.isOpen&&(!n||!t),i=c.config.inline&&t&&!n;if(13===e.keyCode&&t){if(n)return c.setDate(c._input.value,!0,e.target===c.altInput?c.config.altFormat:c.config.dateFormat),e.target.blur();c.open()}else if(q(e.target)||a||i){var o=!!c.timeContainer&&c.timeContainer.contains(e.target);switch(e.keyCode){case 13:o?M():oe(e);break;case 27:e.preventDefault(),ie();break;case 8:case 46:t&&!c.config.allowInput&&(e.preventDefault(),c.clear());break;case 37:case 39:if(o)c.hourElement&&c.hourElement.focus();else if(e.preventDefault(),void 0!==c.daysContainer&&(!1===n||V(document.activeElement))){var r=39===e.keyCode?1:-1;e.ctrlKey?(U(r),H(Y(1),0)):H(void 0,r)}break;case 38:case 40:e.preventDefault();var l=40===e.keyCode?1:-1;c.daysContainer?e.ctrlKey?(z(c.currentYear-l),H(Y(1),0)):o||H(void 0,7*l):c.config.enableTime&&(!o&&c.hourElement&&c.hourElement.focus(),M(e),c._debouncedChange());break;case 9:if(!o)break;var d=[c.hourElement,c.minuteElement,c.secondElement,c.amPM].filter(function(e){return e}),s=d.indexOf(e.target);if(-1!==s){var u=d[s+(e.shiftKey?-1:1)];void 0!==u&&(e.preventDefault(),u.focus())}}}if(void 0!==c.amPM&&e.target===c.amPM)switch(e.key){case c.l10n.amPM[0].charAt(0):case c.l10n.amPM[0].charAt(0).toLowerCase():c.amPM.textContent=c.l10n.amPM[0],x(),me();break;case c.l10n.amPM[1].charAt(0):case c.l10n.amPM[1].charAt(0).toLowerCase():c.amPM.textContent=c.l10n.amPM[1],x(),me()}de("onKeyDown",e)}function Q(e){if(1===c.selectedDates.length&&(!e||e.classList.contains("flatpickr-day")&&!e.classList.contains("disabled"))){for(var t=e?e.dateObj.getTime():c.days.firstElementChild.dateObj.getTime(),n=c.parseDate(c.selectedDates[0],void 0,!0).getTime(),a=Math.min(t,c.selectedDates[0].getTime()),i=Math.max(t,c.selectedDates[0].getTime()),o=c.daysContainer.lastChild.lastChild.dateObj.getTime(),r=!1,l=0,d=0,s=a;sa&&sl)?l=s:s>n&&(!d||s0&&s0&&s>d;return g?(o.classList.add("notAllowed"),["inRange","startRange","endRange"].forEach(function(e){o.classList.remove(e)}),"continue"):r&&!g?"continue":(["startRange","inRange","endRange","notAllowed"].forEach(function(e){o.classList.remove(e)}),void(void 0!==e&&(e.classList.add(t0&&p&&p.lastChild.dateObj.getTime()>=s||(nt&&s===n&&o.classList.add("endRange"),s>=l&&(0===d||s<=d)&&m(s,n,t)&&o.classList.add("inRange")))))},v=0,D=f.children.length;v0||n.getMinutes()>0||n.getSeconds()>0),c.selectedDates&&(c.selectedDates=c.selectedDates.filter(function(e){return G(e)}),c.selectedDates.length||"min"!==e||E(n),me()),c.daysContainer&&(ae(),void 0!==n?c.currentYearElement[e]=n.getFullYear().toString():c.currentYearElement.removeAttribute(e),c.currentYearElement.disabled=!!a&&void 0!==n&&a.getFullYear()===n.getFullYear())}}function te(){"object"!=typeof c.config.locale&&void 0===y.l10ns[c.config.locale]&&c.config.errorHandler(new Error("flatpickr: invalid locale "+c.config.locale)),c.l10n=Object.assign({},y.l10ns.default,"object"==typeof c.config.locale?c.config.locale:"default"!==c.config.locale?y.l10ns[c.config.locale]:void 0),l.K="("+c.l10n.amPM[0]+"|"+c.l10n.amPM[1]+"|"+c.l10n.amPM[0].toLowerCase()+"|"+c.l10n.amPM[1].toLowerCase()+")",c.formatDate=s(c),c.parseDate=u({config:c.config,l10n:c.l10n})}function ne(e){if(void 0!==c.calendarContainer){de("onPreCalendarPosition");var t=e||c._positionElement,n=Array.prototype.reduce.call(c.calendarContainer.children,function(e,t){return e+t.offsetHeight},0),a=c.calendarContainer.offsetWidth,i=c.config.position.split(" "),o=i[0],r=i.length>1?i[1]:null,l=t.getBoundingClientRect(),d=window.innerHeight-l.bottom,s="above"===o||"below"!==o&&dn,u=window.pageYOffset+l.top+(s?-n-2:t.offsetHeight+2);if(h(c.calendarContainer,"arrowTop",!s),h(c.calendarContainer,"arrowBottom",s),!c.config.inline){var f=window.pageXOffset+l.left-(null!=r&&"center"===r?(a-l.width)/2:0),m=window.document.body.offsetWidth-l.right,g=f+a>window.document.body.offsetWidth;h(c.calendarContainer,"rightMost",g),c.config.static||(c.calendarContainer.style.top=u+"px",g?(c.calendarContainer.style.left="auto",c.calendarContainer.style.right=m+"px"):(c.calendarContainer.style.left=f+"px",c.calendarContainer.style.right="auto"))}}}function ae(){c.config.noCalendar||c.isMobile||(fe(),W())}function ie(){c._input.focus(),-1!==window.navigator.userAgent.indexOf("MSIE")||void 0!==navigator.msMaxTouchPoints?setTimeout(c.close,0):c.close()}function oe(e){e.preventDefault(),e.stopPropagation();var t=function e(t,n){return n(t)?t:t.parentNode?e(t.parentNode,n):void 0}(e.target,function(e){return e.classList&&e.classList.contains("flatpickr-day")&&!e.classList.contains("disabled")&&!e.classList.contains("notAllowed")});if(void 0!==t){var n=t,a=c.latestSelectedDateObj=new Date(n.dateObj.getTime()),i=(a.getMonth()c.currentMonth+c.config.showMonths-1)&&"range"!==c.config.mode;if(c.selectedDateElem=n,"single"===c.config.mode)c.selectedDates=[a];else if("multiple"===c.config.mode){var o=ue(a);o?c.selectedDates.splice(parseInt(o),1):c.selectedDates.push(a)}else"range"===c.config.mode&&(2===c.selectedDates.length&&c.clear(!1),c.selectedDates.push(a),0!==f(a,c.selectedDates[0],!0)&&c.selectedDates.sort(function(e,t){return e.getTime()-t.getTime()}));if(x(),i){var r=c.currentYear!==a.getFullYear();c.currentYear=a.getFullYear(),c.currentMonth=a.getMonth(),r&&de("onYearChange"),de("onMonthChange")}if(fe(),W(),me(),c.config.enableTime&&setTimeout(function(){return c.showTimeInput=!0},50),i||"range"===c.config.mode||1!==c.config.showMonths?c.selectedDateElem&&c.selectedDateElem.focus():j(n),void 0!==c.hourElement&&setTimeout(function(){return void 0!==c.hourElement&&c.hourElement.select()},451),c.config.closeOnSelect){var l="single"===c.config.mode&&!c.config.enableTime,d="range"===c.config.mode&&2===c.selectedDates.length&&!c.config.enableTime;(l||d)&&ie()}_()}}c.parseDate=u({config:c.config,l10n:c.l10n}),c._handlers=[],c._bind=O,c._setHoursFromDate=E,c._positionCalendar=ne,c.changeMonth=U,c.changeYear=z,c.clear=function(e){void 0===e&&(e=!0);c.input.value="",void 0!==c.altInput&&(c.altInput.value="");void 0!==c.mobileInput&&(c.mobileInput.value="");c.selectedDates=[],c.latestSelectedDateObj=void 0,c.showTimeInput=!1,!0===c.config.enableTime&&T();c.redraw(),e&&de("onChange")},c.close=function(){c.isOpen=!1,c.isMobile||(c.calendarContainer.classList.remove("open"),c._input.classList.remove("active"));de("onClose")},c._createElement=v,c.destroy=function(){void 0!==c.config&&de("onDestroy");for(var e=c._handlers.length;e--;){var t=c._handlers[e];t.element.removeEventListener(t.event,t.handler,t.options)}if(c._handlers=[],c.mobileInput)c.mobileInput.parentNode&&c.mobileInput.parentNode.removeChild(c.mobileInput),c.mobileInput=void 0;else if(c.calendarContainer&&c.calendarContainer.parentNode)if(c.config.static&&c.calendarContainer.parentNode){var n=c.calendarContainer.parentNode;for(n.lastChild&&n.removeChild(n.lastChild);n.firstChild;)n.parentNode.insertBefore(n.firstChild,n);n.parentNode.removeChild(n)}else c.calendarContainer.parentNode.removeChild(c.calendarContainer);c.altInput&&(c.input.type="text",c.altInput.parentNode&&c.altInput.parentNode.removeChild(c.altInput),delete c.altInput);c.input&&(c.input.type=c.input._type,c.input.classList.remove("flatpickr-input"),c.input.removeAttribute("readonly"),c.input.value="");["_showTimeInput","latestSelectedDateObj","_hideNextMonthArrow","_hidePrevMonthArrow","__hideNextMonthArrow","__hidePrevMonthArrow","isMobile","isOpen","selectedDateElem","minDateHasTime","maxDateHasTime","days","daysContainer","_input","_positionElement","innerContainer","rContainer","monthNav","todayDateElem","calendarContainer","weekdayContainer","prevMonthNav","nextMonthNav","currentMonthElement","currentYearElement","navigationCurrentMonth","selectedDateElem","config"].forEach(function(e){try{delete c[e]}catch(e){}})},c.isEnabled=G,c.jumpToDate=N,c.open=function(e,t){void 0===t&&(t=c._positionElement);if(!0===c.isMobile)return e&&(e.preventDefault(),e.target&&e.target.blur()),setTimeout(function(){void 0!==c.mobileInput&&c.mobileInput.focus()},0),void de("onOpen");if(c._input.disabled||c.config.inline)return;var n=c.isOpen;c.isOpen=!0,n||(c.calendarContainer.classList.add("open"),c._input.classList.add("active"),de("onOpen"),ne(t));!0===c.config.enableTime&&!0===c.config.noCalendar&&(0===c.selectedDates.length&&(c.setDate(void 0!==c.config.minDate?new Date(c.config.minDate.getTime()):new Date,!1),T(),me()),!1!==c.config.allowInput||void 0!==e&&c.timeContainer.contains(e.relatedTarget)||setTimeout(function(){return c.hourElement.select()},50))},c.redraw=ae,c.set=function(e,t){null!==e&&"object"==typeof e?Object.assign(c.config,e):(c.config[e]=t,void 0!==re[e]&&re[e].forEach(function(e){return e()}));c.redraw(),N()},c.setDate=function(e,t,n){void 0===t&&(t=!1);void 0===n&&(n=c.config.dateFormat);if(0!==e&&!e||e instanceof Array&&0===e.length)return c.clear(t);le(e,n),c.showTimeInput=c.selectedDates.length>0,c.latestSelectedDateObj=c.selectedDates[0],c.redraw(),N(),E(),me(t),t&&de("onChange")},c.toggle=function(e){if(!0===c.isOpen)return c.close();c.open(e)};var re={locale:[te,B],showMonths:[K,C,J]};function le(e,t){var n=[];if(e instanceof Array)n=e.map(function(e){return c.parseDate(e,t)});else if(e instanceof Date||"number"==typeof e)n=[c.parseDate(e,t)];else if("string"==typeof e)switch(c.config.mode){case"single":case"time":n=[c.parseDate(e,t)];break;case"multiple":n=e.split(c.config.conjunction).map(function(e){return c.parseDate(e,t)});break;case"range":n=e.split(c.l10n.rangeSeparator).map(function(e){return c.parseDate(e,t)})}else c.config.errorHandler(new Error("Invalid date supplied: "+JSON.stringify(e)));c.selectedDates=n.filter(function(e){return e instanceof Date&&G(e,!1)}),"range"===c.config.mode&&c.selectedDates.sort(function(e,t){return e.getTime()-t.getTime()})}function ce(e){return e.slice().map(function(e){return"string"==typeof e||"number"==typeof e||e instanceof Date?c.parseDate(e,void 0,!0):e&&"object"==typeof e&&e.from&&e.to?{from:c.parseDate(e.from,void 0),to:c.parseDate(e.to,void 0)}:e}).filter(function(e){return e})}function de(e,t){var n=c.config[e];if(void 0!==n&&n.length>0)for(var a=0;n[a]&&ac.config.maxDate.getMonth():c.currentYear>c.config.maxDate.getFullYear()))}function me(e){if(void 0===e&&(e=!0),0===c.selectedDates.length)return c.clear(e);void 0!==c.mobileInput&&c.mobileFormatStr&&(c.mobileInput.value=void 0!==c.latestSelectedDateObj?c.formatDate(c.latestSelectedDateObj,c.mobileFormatStr):"");var t="range"!==c.config.mode?c.config.conjunction:c.l10n.rangeSeparator;c.input.value=c.selectedDates.map(function(e){return c.formatDate(e,c.config.dateFormat)}).join(t),void 0!==c.altInput&&(c.altInput.value=c.selectedDates.map(function(e){return c.formatDate(e,c.config.altFormat)}).join(t)),!1!==e&&de("onValueUpdate")}function ge(e){e.preventDefault();var t=c.prevMonthNav.contains(e.target),n=c.nextMonthNav.contains(e.target);t||n?U(t?-1:1):c.yearElements.indexOf(e.target)>=0?e.target.select():e.target.classList.contains("arrowUp")?c.changeYear(c.currentYear+1):e.target.classList.contains("arrowDown")&&c.changeYear(c.currentYear-1)}return function(){c.element=c.input=i,c.isOpen=!1,function(){var e=["wrap","weekNumbers","allowInput","clickOpens","time_24hr","enableTime","noCalendar","altInput","shorthandCurrentMonth","inline","static","enableSeconds","disableMobile"],t=["onChange","onClose","onDayCreate","onDestroy","onKeyDown","onMonthChange","onOpen","onParseConfig","onReady","onValueUpdate","onYearChange","onPreCalendarPosition"],n=Object.assign({},r,JSON.parse(JSON.stringify(i.dataset||{}))),o={};c.config.parseDate=n.parseDate,c.config.formatDate=n.formatDate,Object.defineProperty(c.config,"enable",{get:function(){return c.config._enable},set:function(e){c.config._enable=ce(e)}}),Object.defineProperty(c.config,"disable",{get:function(){return c.config._disable},set:function(e){c.config._disable=ce(e)}});var l="time"===n.mode;n.dateFormat||!n.enableTime&&!l||(o.dateFormat=n.noCalendar||l?"H:i"+(n.enableSeconds?":S":""):y.defaultConfig.dateFormat+" H:i"+(n.enableSeconds?":S":"")),n.altInput&&(n.enableTime||l)&&!n.altFormat&&(o.altFormat=n.noCalendar||l?"h:i"+(n.enableSeconds?":S K":" K"):y.defaultConfig.altFormat+" h:i"+(n.enableSeconds?":S":"")+" K"),Object.defineProperty(c.config,"minDate",{get:function(){return c.config._minDate},set:ee("min")}),Object.defineProperty(c.config,"maxDate",{get:function(){return c.config._maxDate},set:ee("max")});var d=function(e){return function(t){c.config["min"===e?"_minTime":"_maxTime"]=c.parseDate(t,"H:i")}};Object.defineProperty(c.config,"minTime",{get:function(){return c.config._minTime},set:d("min")}),Object.defineProperty(c.config,"maxTime",{get:function(){return c.config._maxTime},set:d("max")}),"time"===n.mode&&(c.config.noCalendar=!0,c.config.enableTime=!0),Object.assign(c.config,o,n);for(var s=0;s0?c.selectedDates[0]:c.config.minDate&&c.config.minDate.getTime()>c.now.getTime()?c.config.minDate:c.config.maxDate&&c.config.maxDate.getTime()0&&(c.latestSelectedDateObj=c.selectedDates[0]),void 0!==c.config.minTime&&(c.config.minTime=c.parseDate(c.config.minTime,"H:i")),void 0!==c.config.maxTime&&(c.config.maxTime=c.parseDate(c.config.maxTime,"H:i")),c.minDateHasTime=!!c.config.minDate&&(c.config.minDate.getHours()>0||c.config.minDate.getMinutes()>0||c.config.minDate.getSeconds()>0),c.maxDateHasTime=!!c.config.maxDate&&(c.config.maxDate.getHours()>0||c.config.maxDate.getMinutes()>0||c.config.maxDate.getSeconds()>0),Object.defineProperty(c,"showTimeInput",{get:function(){return c._showTimeInput},set:function(e){c._showTimeInput=e,c.calendarContainer&&h(c.calendarContainer,"showTimeInput",e),c.isOpen&&ne()}})}(),c.utils={getDaysInMonth:function(e,t){return void 0===e&&(e=c.currentMonth),void 0===t&&(t=c.currentYear),1===e&&(t%4==0&&t%100!=0||t%400==0)?29:c.l10n.daysInMonth[e]}},c.isMobile||function(){var n=window.document.createDocumentFragment();if(c.calendarContainer=v("div","flatpickr-calendar"),c.calendarContainer.tabIndex=-1,!c.config.noCalendar){if(n.appendChild((c.monthNav=v("div","flatpickr-months"),c.yearElements=[],c.monthElements=[],c.prevMonthNav=v("span","flatpickr-prev-month"),c.prevMonthNav.innerHTML=c.config.prevArrow,c.nextMonthNav=v("span","flatpickr-next-month"),c.nextMonthNav.innerHTML=c.config.nextArrow,K(),Object.defineProperty(c,"_hidePrevMonthArrow",{get:function(){return c.__hidePrevMonthArrow},set:function(e){c.__hidePrevMonthArrow!==e&&(h(c.prevMonthNav,"disabled",e),c.__hidePrevMonthArrow=e)}}),Object.defineProperty(c,"_hideNextMonthArrow",{get:function(){return c.__hideNextMonthArrow},set:function(e){c.__hideNextMonthArrow!==e&&(h(c.nextMonthNav,"disabled",e),c.__hideNextMonthArrow=e)}}),c.currentYearElement=c.yearElements[0],fe(),c.monthNav)),c.innerContainer=v("div","flatpickr-innerContainer"),c.config.weekNumbers){var a=function(){c.calendarContainer.classList.add("hasWeeks");var e=v("div","flatpickr-weekwrapper");e.appendChild(v("span","flatpickr-weekday",c.l10n.weekAbbreviation));var t=v("div","flatpickr-weeks");return e.appendChild(t),{weekWrapper:e,weekNumbers:t}}(),i=a.weekWrapper,o=a.weekNumbers;c.innerContainer.appendChild(i),c.weekNumbers=o,c.weekWrapper=i}c.rContainer=v("div","flatpickr-rContainer"),c.rContainer.appendChild(J()),c.daysContainer||(c.daysContainer=v("div","flatpickr-days"),c.daysContainer.tabIndex=-1),W(),c.rContainer.appendChild(c.daysContainer),c.innerContainer.appendChild(c.rContainer),n.appendChild(c.innerContainer)}c.config.enableTime&&n.appendChild(function(){c.calendarContainer.classList.add("hasTime"),c.config.noCalendar&&c.calendarContainer.classList.add("noCalendar"),c.timeContainer=v("div","flatpickr-time"),c.timeContainer.tabIndex=-1;var n=v("span","flatpickr-time-separator",":"),a=w("flatpickr-hour");c.hourElement=a.childNodes[0];var i=w("flatpickr-minute");if(c.minuteElement=i.childNodes[0],c.hourElement.tabIndex=c.minuteElement.tabIndex=-1,c.hourElement.value=e(c.latestSelectedDateObj?c.latestSelectedDateObj.getHours():c.config.time_24hr?c.config.defaultHour:function(e){switch(e%24){case 0:case 12:return 12;default:return e%12}}(c.config.defaultHour)),c.minuteElement.value=e(c.latestSelectedDateObj?c.latestSelectedDateObj.getMinutes():c.config.defaultMinute),c.hourElement.setAttribute("data-step",c.config.hourIncrement.toString()),c.minuteElement.setAttribute("data-step",c.config.minuteIncrement.toString()),c.hourElement.setAttribute("data-min",c.config.time_24hr?"0":"1"),c.hourElement.setAttribute("data-max",c.config.time_24hr?"23":"12"),c.minuteElement.setAttribute("data-min","0"),c.minuteElement.setAttribute("data-max","59"),c.timeContainer.appendChild(a),c.timeContainer.appendChild(n),c.timeContainer.appendChild(i),c.config.time_24hr&&c.timeContainer.classList.add("time24hr"),c.config.enableSeconds){c.timeContainer.classList.add("hasSeconds");var o=w("flatpickr-second");c.secondElement=o.childNodes[0],c.secondElement.value=e(c.latestSelectedDateObj?c.latestSelectedDateObj.getSeconds():c.config.defaultSeconds),c.secondElement.setAttribute("data-step",c.minuteElement.getAttribute("data-step")),c.secondElement.setAttribute("data-min",c.minuteElement.getAttribute("data-min")),c.secondElement.setAttribute("data-max",c.minuteElement.getAttribute("data-max")),c.timeContainer.appendChild(v("span","flatpickr-time-separator",":")),c.timeContainer.appendChild(o)}return c.config.time_24hr||(c.amPM=v("span","flatpickr-am-pm",c.l10n.amPM[t((c.latestSelectedDateObj?c.hourElement.value:c.config.defaultHour)>11)]),c.amPM.title=c.l10n.toggleTitle,c.amPM.tabIndex=-1,c.timeContainer.appendChild(c.amPM)),c.timeContainer}()),h(c.calendarContainer,"rangeMode","range"===c.config.mode),h(c.calendarContainer,"animate",!0===c.config.animate),h(c.calendarContainer,"multiMonth",c.config.showMonths>1),c.calendarContainer.appendChild(n);var r=void 0!==c.config.appendTo&&void 0!==c.config.appendTo.nodeType;if((c.config.inline||c.config.static)&&(c.calendarContainer.classList.add(c.config.inline?"inline":"static"),c.config.inline&&(!r&&c.element.parentNode?c.element.parentNode.insertBefore(c.calendarContainer,c._input.nextSibling):void 0!==c.config.appendTo&&c.config.appendTo.appendChild(c.calendarContainer)),c.config.static)){var l=v("div","flatpickr-wrapper");c.element.parentNode&&c.element.parentNode.insertBefore(l,c.element),l.appendChild(c.element),c.altInput&&l.appendChild(c.altInput),l.appendChild(c.calendarContainer)}c.config.static||c.config.inline||(void 0!==c.config.appendTo?c.config.appendTo:window.document.body).appendChild(c.calendarContainer)}(),function(){if(c.config.wrap&&["open","close","toggle","clear"].forEach(function(e){Array.prototype.forEach.call(c.element.querySelectorAll("[data-"+e+"]"),function(t){return O(t,"click",c[e])})}),c.isMobile)!function(){var e=c.config.enableTime?c.config.noCalendar?"time":"datetime-local":"date";c.mobileInput=v("input",c.input.className+" flatpickr-mobile"),c.mobileInput.step=c.input.getAttribute("step")||"any",c.mobileInput.tabIndex=1,c.mobileInput.type=e,c.mobileInput.disabled=c.input.disabled,c.mobileInput.required=c.input.required,c.mobileInput.placeholder=c.input.placeholder,c.mobileFormatStr="datetime-local"===e?"Y-m-d\\TH:i:S":"date"===e?"Y-m-d":"H:i:S",c.selectedDates.length>0&&(c.mobileInput.defaultValue=c.mobileInput.value=c.formatDate(c.selectedDates[0],c.mobileFormatStr)),c.config.minDate&&(c.mobileInput.min=c.formatDate(c.config.minDate,"Y-m-d")),c.config.maxDate&&(c.mobileInput.max=c.formatDate(c.config.maxDate,"Y-m-d")),c.input.type="hidden",void 0!==c.altInput&&(c.altInput.type="hidden");try{c.input.parentNode&&c.input.parentNode.insertBefore(c.mobileInput,c.input.nextSibling)}catch(e){}O(c.mobileInput,"change",function(e){c.setDate(e.target.value,!1,c.mobileFormatStr),de("onChange"),de("onClose")})}();else{var e=n(X,50);c._debouncedChange=n(_,b),c.daysContainer&&!/iPhone|iPad|iPod/i.test(navigator.userAgent)&&O(c.daysContainer,"mouseover",function(e){"range"===c.config.mode&&Q(e.target)}),O(window.document.body,"keydown",Z),c.config.static||O(c._input,"keydown",Z),c.config.inline||c.config.static||O(window,"resize",e),void 0!==window.ontouchstart?O(window.document,"click",$):O(window.document,"mousedown",S($)),O(window.document,"focus",$,{capture:!0}),!0===c.config.clickOpens&&(O(c._input,"focus",c.open),O(c._input,"mousedown",S(c.open))),void 0!==c.daysContainer&&(O(c.monthNav,"mousedown",S(ge)),O(c.monthNav,["keyup","increment"],I),O(c.daysContainer,"mousedown",S(oe))),void 0!==c.timeContainer&&void 0!==c.minuteElement&&void 0!==c.hourElement&&(O(c.timeContainer,["increment"],M),O(c.timeContainer,"blur",M,{capture:!0}),O(c.timeContainer,"mousedown",S(F)),O([c.hourElement,c.minuteElement],["focus","click"],function(e){return e.target.select()}),void 0!==c.secondElement&&O(c.secondElement,"focus",function(){return c.secondElement&&c.secondElement.select()}),void 0!==c.amPM&&O(c.amPM,"mousedown",S(function(e){M(e),_()})))}}(),(c.selectedDates.length||c.config.noCalendar)&&(c.config.enableTime&&E(c.config.noCalendar?c.latestSelectedDateObj||c.config.minDate:void 0),me(!1)),C(),c.showTimeInput=c.selectedDates.length>0||c.config.noCalendar;var o=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);!c.isMobile&&o&&ne(),de("onReady")}(),c}function M(e,t){for(var n=Array.prototype.slice.call(e),a=[],i=0;ie.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),f=e=>e instanceof Array?e:[e],l=e=>Object.assign({},e);exports.default={name:"flat-pickr",props:{value:{default:null,required:!0,validator:function(e){return null===e||e instanceof Date||"string"==typeof e||e instanceof String||e instanceof Array||"number"==typeof e}},config:{type:Object,default:()=>({wrap:!1,defaultDate:null})},events:{type:Array,default:()=>o}},data:function(){return{fp:null}},mounted:function(){if(this.fp)return;let e=l(this.config);this.events.forEach(t=>{e[t]=f(e[t]||[]).concat((...e)=>{this.$emit(s(t),...e)})}),e.defaultDate=this.value||e.defaultDate,this.fp=new t.default(this.getElem(),e)},methods:{getElem:function(){return this.config.wrap?this.$el.parentNode:this.$el},onInput:function(e){this.$emit("input",e.target.value)},onBlur:function(e){this.$emit("blur",e.target.value)}},watch:{config:{deep:!0,handler:function(e){let t=l(e);i.forEach(e=>{delete t[e]}),this.fp.set(t),r.forEach(e=>{void 0!==t[e]&&this.fp.set(e,t[e])})}},value:function(e){e!==this.$el.value&&this.fp&&this.fp.setDate(e,!0)}},beforeDestroy:function(){this.fp&&(this.fp.destroy(),this.fp=null)}};
-(function(){var t=exports.default||module.exports;"function"==typeof t&&(t=t.options),Object.assign(t,{render:function(){var t=this.$createElement;return(this._self._c||t)("input",{attrs:{type:"text","data-input":""},on:{input:this.onInput,blur:this.onBlur}})},staticRenderFns:[],_compiled:!0,_scopeId:null,functional:void 0});})();
+"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("flatpickr"),e=n(t);function n(t){return t&&t.__esModule?t:{default:t}}const o=["onChange","onClose","onDestroy","onKeyDown","onMonthChange","onOpen","onYearChange"],a=["onValueUpdate","onDayCreate","onParseConfig","onReady","onPreCalendarPosition"],i=o.concat(a),r=["locale","showMonths"],u=t=>t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),s=t=>t instanceof Array?t:[t],f=t=>Object.assign({},t);exports.default={name:"flat-pickr",props:{value:{default:null,required:!0,validator:function(t){return null===t||t instanceof Date||"string"==typeof t||t instanceof String||t instanceof Array||"number"==typeof t}},config:{type:Object,default:()=>({wrap:!1,defaultDate:null})},events:{type:Array,default:()=>o}},data:function(){return{fp:null}},mounted:function(){if(this.fp)return;let t=f(this.config);this.events.forEach(e=>{t[e]=s(t[e]||[]).concat((...t)=>{this.$emit(u(e),...t)})}),t.defaultDate=this.value||t.defaultDate,this.fp=new e.default(this.getElem(),t),this.fpInput().addEventListener("blur",this.onBlur)},methods:{getElem:function(){return this.config.wrap?this.$el.parentNode:this.$el},onInput:function(t){this.$emit("input",t.target.value)},fpInput:function(){return this.fp.altInput||this.fp.input},onBlur:function(t){this.$emit("blur",t.target.value)}},watch:{config:{deep:!0,handler:function(t){let e=f(t);i.forEach(t=>{delete e[t]}),this.fp.set(e),r.forEach(t=>{void 0!==e[t]&&this.fp.set(t,e[t])})}},value:function(t){t!==this.$el.value&&this.fp&&this.fp.setDate(t,!0)}},beforeDestroy:function(){this.fp&&(this.fpInput().removeEventListener("blur",this.onBlur),this.fp.destroy(),this.fp=null)}};
+(function(){var t=exports.default||module.exports;"function"==typeof t&&(t=t.options),Object.assign(t,{render:function(){var t=this.$createElement;return(this._self._c||t)("input",{attrs:{type:"text","data-input":""},on:{input:this.onInput}})},staticRenderFns:[],_compiled:!0,_scopeId:null,functional:void 0});})();
},{"flatpickr":"cdPm"}]},{},["XPxJ"], "__DirectusExtension__")
\ No newline at end of file
diff --git a/public/extensions/core/interfaces/checkboxes/display.js b/public/extensions/core/interfaces/checkboxes/display.js
index 272cd8fb96..036a9804f2 100644
--- a/public/extensions/core/interfaces/checkboxes/display.js
+++ b/public/extensions/core/interfaces/checkboxes/display.js
@@ -1,5 +1,5 @@
parcelRequire=function(e,r,n,t){var i="function"==typeof parcelRequire&&parcelRequire,o="function"==typeof require&&require;function u(n,t){if(!r[n]){if(!e[n]){var f="function"==typeof parcelRequire&&parcelRequire;if(!t&&f)return f(n,!0);if(i)return i(n,!0);if(o&&"string"==typeof n)return o(n);var c=new Error("Cannot find module '"+n+"'");throw c.code="MODULE_NOT_FOUND",c}p.resolve=function(r){return e[n][1][r]||r};var l=r[n]=new u.Module(n);e[n][0].call(l.exports,p,l,l.exports,this)}return r[n].exports;function p(e){return u(p.resolve(e))}}u.isParcelRequire=!0,u.Module=function(e){this.id=e,this.bundle=u,this.exports={}},u.modules=e,u.cache=r,u.parent=i,u.register=function(r,n){e[r]=[function(e,r){r.exports=n},{}]};for(var f=0;f2&&(e.pop(),e.shift()),e}},methods:{updateValue:function(e){var t=[].concat(r(this.selection));t.includes(e)?t.splice(t.indexOf(e),1):t.push(e),t.sort(),t=t.join(","),this.options.wrap&&t.length>0&&(t=","+t+","),"CSV"===this.type&&(t=t.split(",")),this.$emit("input",t)}}};
+"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../mixins/interface"),t=i(e);function i(e){return e&&e.__esModule?e:{default:e}}function r(e){if(Array.isArray(e)){for(var t=0,i=Array(e.length);t2&&(e.pop(),e.shift()),e}},methods:{updateValue:function(e){var t=[].concat(r(this.selection));t.includes(e)?t.splice(t.indexOf(e),1):t.push(e),t.sort(),t=t.join(","),this.options.wrap&&t.length>0&&(t=","+t+","),"ARRAY"===this.type&&(t=t.split(",")),this.$emit("input",t)}}};
(function(){var e=exports.default||module.exports;"function"==typeof e&&(e=e.options),Object.assign(e,{render:function(){var e=this,t=e.$createElement,c=e._self._c||t;return c("div",{staticClass:"interface-checkboxes"},e._l(e.options.choices,function(t,n){return c("v-checkbox",{key:t,attrs:{id:t,value:n,disabled:e.readonly,label:t,checked:e.selection.includes(n)},on:{change:function(t){e.updateValue(n,t)}}})}))},staticRenderFns:[],_compiled:!0,_scopeId:"data-v-24a61c",functional:void 0});})();
},{"../../../mixins/interface":"QdEO"}]},{},["mD6a"], "__DirectusExtension__")
\ No newline at end of file
diff --git a/public/extensions/core/interfaces/checkboxes/meta.json b/public/extensions/core/interfaces/checkboxes/meta.json
index 1152beb440..206b34a528 100644
--- a/public/extensions/core/interfaces/checkboxes/meta.json
+++ b/public/extensions/core/interfaces/checkboxes/meta.json
@@ -1 +1 @@
-{"name":"$t:checkboxes","version":"1.0.0","datatypes":{"CSV":null,"VARCHAR":255},"fieldset":true,"options":{"choices":{"name":"$t:choices","comment":"$t:choices_comment","interface":"json","type":"JSON","default":{"value1":"$t:option 1","value2":"$t:option 2","value3":"$t:option 3","value4":"$t:option 4","value5":"$t:option 5","value6":"$t:option 6","value7":"$t:option 7","value8":"$t:option 8"}},"wrap":{"name":"$t:wrap","comment":"$t:wrap_comment","interface":"toggle","type":"BOOLEAN","default":true},"formatting":{"name":"$t:formatting","comment":"$t:formatting_comment","interface":"toggle","type":"BOOLEAN","default":true}},"translation":{"en-US":{"checkboxes":"Checkboxes","choices":"choices","choices_comment":"Enter JSON key value pairs with the saved value and text displayed.","wrap":"Wrap with Delimiter","wrap_comment":"Wrap the saved value in a delimiter (improves searchability).","formatting":"Show display text","formatting_comment":"Render the values as the display values","display_text":"Display Text","value":"Value","option":"Option"}}}
\ No newline at end of file
+{"name":"$t:checkboxes","version":"1.0.0","datatypes":{"ARRAY":null,"VARCHAR":255},"fieldset":true,"options":{"choices":{"name":"$t:choices","comment":"$t:choices_comment","interface":"json","type":"JSON","default":{"value1":"$t:option 1","value2":"$t:option 2","value3":"$t:option 3","value4":"$t:option 4","value5":"$t:option 5","value6":"$t:option 6","value7":"$t:option 7","value8":"$t:option 8"}},"wrap":{"name":"$t:wrap","comment":"$t:wrap_comment","interface":"toggle","type":"BOOLEAN","default":true},"formatting":{"name":"$t:formatting","comment":"$t:formatting_comment","interface":"toggle","type":"BOOLEAN","default":true}},"translation":{"en-US":{"checkboxes":"Checkboxes","choices":"choices","choices_comment":"Enter JSON key value pairs with the saved value and text displayed.","wrap":"Wrap with Delimiter","wrap_comment":"Wrap the saved value in a delimiter (improves searchability).","formatting":"Show display text","formatting_comment":"Render the values as the display values","display_text":"Display Text","value":"Value","option":"Option"}}}
\ No newline at end of file
diff --git a/public/extensions/core/interfaces/code/display.js b/public/extensions/core/interfaces/code/display.js
index 5ab8e1a2d7..d00faf4a8d 100644
--- a/public/extensions/core/interfaces/code/display.js
+++ b/public/extensions/core/interfaces/code/display.js
@@ -1,5 +1,5 @@
parcelRequire=function(e,r,n,t){var i="function"==typeof parcelRequire&&parcelRequire,o="function"==typeof require&&require;function u(n,t){if(!r[n]){if(!e[n]){var f="function"==typeof parcelRequire&&parcelRequire;if(!t&&f)return f(n,!0);if(i)return i(n,!0);if(o&&"string"==typeof n)return o(n);var c=new Error("Cannot find module '"+n+"'");throw c.code="MODULE_NOT_FOUND",c}p.resolve=function(r){return e[n][1][r]||r};var l=r[n]=new u.Module(n);e[n][0].call(l.exports,p,l,l.exports,this)}return r[n].exports;function p(e){return u(p.resolve(e))}}u.isParcelRequire=!0,u.Module=function(e){this.id=e,this.bundle=u,this.exports={}},u.modules=e,u.cache=r,u.parent=i,u.register=function(r,n){e[r]=[function(e,r){r.exports=n},{}]};for(var f=0;f=15&&(h=!1,a=!0);var C=y&&(u||h&&(null==x||x<12.11)),S=r||l&&s>=9;function L(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var k,T=function(e,t){var r=e.className,n=L(t).exec(r);if(n){var i=r.slice(n.index+n[0].length);e.className=r.slice(0,n.index)+(i?n[1]+i:"")}};function M(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function N(e,t){return M(e).appendChild(t)}function O(e,t,r,n){var i=document.createElement(e);if(r&&(i.className=r),n&&(i.style.cssText=n),"string"==typeof t)i.appendChild(document.createTextNode(t));else if(t)for(var o=0;o=t)return l+(t-o);l+=s-o,l+=r-l%r,o=s+1}}g?P=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:l&&(P=function(e){try{e.select()}catch(e){}});var R=function(){this.id=null};function B(e,t){for(var r=0;r=t)return n+Math.min(l,t-i);if(i+=o-n,n=o+1,(i+=r-i%r)>=t)return n}}var Y=[""];function _(e){for(;Y.length<=e;)Y.push($(Y)+" ");return Y[e]}function $(e){return e[e.length-1]}function q(e,t){for(var r=[],n=0;n""&&(e.toUpperCase()!=e.toLowerCase()||J.test(e))}function te(e,t){return t?!!(t.source.indexOf("\\w")>-1&&ee(e))||t.test(e):ee(e)}function re(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var ne=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function ie(e){return e.charCodeAt(0)>=768&&ne.test(e)}function oe(e,t,r){for(;(r<0?t>0:tr?-1:1;;){if(t==r)return t;var i=(t+r)/2,o=n<0?Math.ceil(i):Math.floor(i);if(o==t)return e(o)?t:r;e(o)?r=o:t=o+n}}function se(e,t,n){var i=this;this.input=n,i.scrollbarFiller=O("div",null,"CodeMirror-scrollbar-filler"),i.scrollbarFiller.setAttribute("cm-not-content","true"),i.gutterFiller=O("div",null,"CodeMirror-gutter-filler"),i.gutterFiller.setAttribute("cm-not-content","true"),i.lineDiv=A("div",null,"CodeMirror-code"),i.selectionDiv=O("div",null,null,"position: relative; z-index: 1"),i.cursorDiv=O("div",null,"CodeMirror-cursors"),i.measure=O("div",null,"CodeMirror-measure"),i.lineMeasure=O("div",null,"CodeMirror-measure"),i.lineSpace=A("div",[i.measure,i.lineMeasure,i.selectionDiv,i.cursorDiv,i.lineDiv],null,"position: relative; outline: none");var o=A("div",[i.lineSpace],"CodeMirror-lines");i.mover=O("div",[o],null,"position: relative"),i.sizer=O("div",[i.mover],"CodeMirror-sizer"),i.sizerWidth=null,i.heightForcer=O("div",null,null,"position: absolute; height: "+G+"px; width: 1px;"),i.gutters=O("div",null,"CodeMirror-gutters"),i.lineGutter=null,i.scroller=O("div",[i.sizer,i.heightForcer,i.gutters],"CodeMirror-scroll"),i.scroller.setAttribute("tabIndex","-1"),i.wrapper=O("div",[i.scrollbarFiller,i.gutterFiller,i.scroller],"CodeMirror"),l&&s<8&&(i.gutters.style.zIndex=-1,i.scroller.style.paddingRight=0),a||r&&m||(i.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(i.wrapper):e(i.wrapper)),i.viewFrom=i.viewTo=t.first,i.reportedViewFrom=i.reportedViewTo=t.first,i.view=[],i.renderedView=null,i.externalMeasured=null,i.viewOffset=0,i.lastWrapHeight=i.lastWrapWidth=0,i.updateLineNumbers=null,i.nativeBarWidth=i.barHeight=i.barWidth=0,i.scrollbarsClipped=!1,i.lineNumWidth=i.lineNumInnerWidth=i.lineNumChars=null,i.alignWidgets=!1,i.cachedCharWidth=i.cachedTextHeight=i.cachedPaddingH=null,i.maxLine=null,i.maxLineLength=0,i.maxLineChanged=!1,i.wheelDX=i.wheelDY=i.wheelStartX=i.wheelStartY=null,i.shift=!1,i.selForContextMenu=null,i.activeTouch=null,n.init(i)}function ae(e,t){if((t-=e.first)<0||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var r=e;!r.lines;)for(var n=0;;++n){var i=r.children[n],o=i.chunkSize();if(t=e.first&&tr?ve(r,ae(e,r).text.length):function(e,t){var r=e.ch;return null==r||r>t?ve(e.line,t):r<0?ve(e.line,0):e}(t,ae(e,t.line).text.length)}function Le(e,t){for(var r=[],n=0;n=t:o.to>t);(n||(n=[])).push(new Me(l,o.from,s?null:o.to))}}return n}(r,i,l),a=function(e,t,r){var n;if(e)for(var i=0;i=t:o.to>t)||o.from==t&&"bookmark"==l.type&&(!r||o.marker.insertLeft)){var s=null==o.from||(l.inclusiveLeft?o.from<=t:o.from0&&s)for(var b=0;bt)&&(!r||Ee(r,o.marker)<0)&&(r=o.marker)}return r}function Ge(e,t,r,n,i){var o=ae(e,t),l=Te&&o.markedSpans;if(l)for(var s=0;s=0&&h<=0||c<=0&&h>=0)&&(c<=0&&(a.marker.inclusiveRight&&i.inclusiveLeft?me(u.to,r)>=0:me(u.to,r)>0)||c>=0&&(a.marker.inclusiveRight&&i.inclusiveLeft?me(u.from,n)<=0:me(u.from,n)<0)))return!0}}}function Ue(e){for(var t;t=ze(e);)e=t.find(-1,!0).line;return e}function Ve(e,t){var r=ae(e,t),n=Ue(r);return r==n?t:fe(n)}function Ke(e,t){if(t>e.lastLine())return t;var r,n=ae(e,t);if(!je(e,n))return t;for(;r=Re(n);)n=r.find(1,!0).line;return fe(n)+1}function je(e,t){var r=Te&&t.markedSpans;if(r)for(var n=void 0,i=0;it.maxLineLength&&(t.maxLineLength=r,t.maxLine=e)})}var qe=null;function Ze(e,t,r){var n;qe=null;for(var i=0;it)return i;o.to==t&&(o.from!=o.to&&"before"==r?n=i:qe=i),o.from==t&&(o.from!=o.to&&"before"!=r?n=i:qe=i)}return null!=n?n:qe}var Qe=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",t="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";var r=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,n=/[stwN]/,i=/[LRr]/,o=/[Lb1n]/,l=/[1n]/;function s(e,t,r){this.level=e,this.from=t,this.to=r}return function(a,u){var c="ltr"==u?"L":"R";if(0==a.length||"ltr"==u&&!r.test(a))return!1;for(var h,f=a.length,d=[],p=0;p-1&&(n[t]=i.slice(0,o).concat(i.slice(o+1)))}}}function it(e,t){var r=rt(e,t);if(r.length)for(var n=Array.prototype.slice.call(arguments,2),i=0;i0}function at(e){e.prototype.on=function(e,t){tt(this,e,t)},e.prototype.off=function(e,t){nt(this,e,t)}}function ut(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function ct(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function ht(e){return null!=e.defaultPrevented?e.defaultPrevented:0==e.returnValue}function ft(e){ut(e),ct(e)}function dt(e){return e.target||e.srcElement}function pt(e){var t=e.which;return null==t&&(1&e.button?t=1:2&e.button?t=3:4&e.button&&(t=2)),y&&e.ctrlKey&&1==t&&(t=3),t}var gt,vt,mt=function(){if(l&&s<9)return!1;var e=O("div");return"draggable"in e||"dragDrop"in e}();function yt(e){if(null==gt){var t=O("span","");N(e,O("span",[t,document.createTextNode("x")])),0!=e.firstChild.offsetHeight&&(gt=t.offsetWidth<=1&&t.offsetHeight>2&&!(l&&s<8))}var r=gt?O("span",""):O("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return r.setAttribute("cm-text",""),r}function bt(e){if(null!=vt)return vt;var t=N(e,document.createTextNode("AخA")),r=k(t,0,1).getBoundingClientRect(),n=k(t,1,2).getBoundingClientRect();return M(e),!(!r||r.left==r.right)&&(vt=n.right-r.right<3)}var wt,xt=3!="\n\nb".split(/\n/).length?function(e){for(var t=0,r=[],n=e.length;t<=n;){var i=e.indexOf("\n",t);-1==i&&(i=e.length);var o=e.slice(t,"\r"==e.charAt(i-1)?i-1:i),l=o.indexOf("\r");-1!=l?(r.push(o.slice(0,l)),t+=l+1):(r.push(o),t=i+1)}return r}:function(e){return e.split(/\r\n?|\n/)},Ct=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(e){return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch(e){}return!(!t||t.parentElement()!=e)&&0!=t.compareEndPoints("StartToEnd",t)},St="oncopy"in(wt=O("div"))||(wt.setAttribute("oncopy","return;"),"function"==typeof wt.oncopy),Lt=null;var kt={},Tt={};function Mt(e){if("string"==typeof e&&Tt.hasOwnProperty(e))e=Tt[e];else if(e&&"string"==typeof e.name&&Tt.hasOwnProperty(e.name)){var t=Tt[e.name];"string"==typeof t&&(t={name:t}),(e=Q(t,e)).name=t.name}else{if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return Mt("application/xml");if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return Mt("application/json")}return"string"==typeof e?{name:e}:e||{name:"null"}}function Nt(e,t){t=Mt(t);var r=kt[t.name];if(!r)return Nt(e,"text/plain");var n=r(e,t);if(Ot.hasOwnProperty(t.name)){var i=Ot[t.name];for(var o in i)i.hasOwnProperty(o)&&(n.hasOwnProperty(o)&&(n["_"+o]=n[o]),n[o]=i[o])}if(n.name=t.name,t.helperType&&(n.helperType=t.helperType),t.modeProps)for(var l in t.modeProps)n[l]=t.modeProps[l];return n}var Ot={};function At(e,t){I(t,Ot.hasOwnProperty(e)?Ot[e]:Ot[e]={})}function Dt(e,t){if(!0===t)return t;if(e.copyState)return e.copyState(t);var r={};for(var n in t){var i=t[n];i instanceof Array&&(i=i.concat([])),r[n]=i}return r}function Wt(e,t){for(var r;e.innerMode&&(r=e.innerMode(t))&&r.mode!=e;)t=r.state,e=r.mode;return r||{mode:e,state:t}}function Ht(e,t,r){return!e.startState||e.startState(t,r)}var Ft=function(e,t,r){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=r};Ft.prototype.eol=function(){return this.pos>=this.string.length},Ft.prototype.sol=function(){return this.pos==this.lineStart},Ft.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Ft.prototype.next=function(){if(this.post},Ft.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},Ft.prototype.skipToEnd=function(){this.pos=this.string.length},Ft.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},Ft.prototype.backUp=function(e){this.pos-=e},Ft.prototype.column=function(){return this.lastColumnPos0?null:(n&&!1!==t&&(this.pos+=n[0].length),n)}var i=function(e){return r?e.toLowerCase():e};if(i(this.string.substr(this.pos,e.length))==i(e))return!1!==t&&(this.pos+=e.length),!0},Ft.prototype.current=function(){return this.string.slice(this.start,this.pos)},Ft.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},Ft.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},Ft.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};var Pt=function(e,t){this.state=e,this.lookAhead=t},Et=function(e,t,r,n){this.state=t,this.doc=e,this.line=r,this.maxLookAhead=n||0,this.baseTokens=null,this.baseTokenPos=1};function It(e,t,r,n){var i=[e.state.modeGen],o={};Xt(e,t.text,e.doc.mode,r,function(e,t){return i.push(e,t)},o,n);for(var l=r.state,s=function(n){r.baseTokens=i;var s=e.state.overlays[n],a=1,u=0;r.state=!0,Xt(e,t.text,s.mode,r,function(e,t){for(var r=a;ue&&i.splice(a,1,e,i[a+1],n),a+=2,u=Math.min(e,n)}if(t)if(s.opaque)i.splice(r,a-r,e,"overlay "+t),a=r+2;else for(;re.options.maxHighlightLength&&Dt(e.doc.mode,n.state),o=It(e,t,n);i&&(n.state=i),t.stateAfter=n.save(!i),t.styles=o.styles,o.classes?t.styleClasses=o.classes:t.styleClasses&&(t.styleClasses=null),r===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function Rt(e,t,r){var n=e.doc,i=e.display;if(!n.mode.startState)return new Et(n,!0,t);var o=function(e,t,r){for(var n,i,o=e.doc,l=r?-1:t-(e.doc.mode.innerMode?1e3:100),s=t;s>l;--s){if(s<=o.first)return o.first;var a=ae(o,s-1),u=a.stateAfter;if(u&&(!r||s+(u instanceof Pt?u.lookAhead:0)<=o.modeFrontier))return s;var c=z(a.text,null,e.options.tabSize);(null==i||n>c)&&(i=s-1,n=c)}return i}(e,t,r),l=o>n.first&&ae(n,o-1).stateAfter,s=l?Et.fromSaved(n,l,o):new Et(n,Ht(n.mode),o);return n.iter(o,t,function(r){Bt(e,r.text,s);var n=s.line;r.stateAfter=n==t-1||n%5==0||n>=i.viewFrom&&nt.start)return o}throw new Error("Mode "+e.name+" failed to advance stream.")}Et.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return null!=t&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},Et.prototype.baseToken=function(e){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)this.baseTokenPos+=2;var t=this.baseTokens[this.baseTokenPos+1];return{type:t&&t.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},Et.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},Et.fromSaved=function(e,t,r){return t instanceof Pt?new Et(e,Dt(e.mode,t.state),r,t.lookAhead):new Et(e,Dt(e.mode,t),r)},Et.prototype.save=function(e){var t=!1!==e?Dt(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new Pt(t,this.maxLookAhead):t};var Vt=function(e,t,r){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=r};function Kt(e,t,r,n){var i,o,l=e.doc,s=l.mode,a=ae(l,(t=Se(l,t)).line),u=Rt(e,t.line,r),c=new Ft(a.text,e.options.tabSize,u);for(n&&(o=[]);(n||c.pose.options.maxHighlightLength?(s=!1,l&&Bt(e,t,n,h.pos),h.pos=t.length,a=null):a=jt(Ut(r,h,n.state,f),o),f){var d=f[0].name;d&&(a="m-"+(a?d+" "+a:d))}if(!s||c!=a){for(;u1&&!/ /.test(e))return e;for(var r=t,n="",i=0;iu&&h.from<=u);f++);if(h.to>=c)return e(r,n,i,o,l,s,a);e(r,n.slice(0,h.to-u),i,o,null,s,a),o=null,n=n.slice(h.to-u),u=h.to}}}function rr(e,t,r,n){var i=!n&&r.widgetNode;i&&e.map.push(e.pos,e.pos+t,i),!n&&e.cm.display.input.needsContentAttribute&&(i||(i=e.content.appendChild(document.createElement("span"))),i.setAttribute("cm-marker",r.id)),i&&(e.cm.display.input.setUneditable(i),e.content.appendChild(i)),e.pos+=t,e.trailingSpace=!1}function nr(e,t,r){var n=e.markedSpans,i=e.text,o=0;if(n)for(var l,s,a,u,c,h,f,d=i.length,p=0,g=1,v="",m=0;;){if(m==p){a=u=c=h=s="",f=null,m=1/0;for(var y=[],b=void 0,w=0;wp||C.collapsed&&x.to==p&&x.from==p)?(null!=x.to&&x.to!=p&&m>x.to&&(m=x.to,u=""),C.className&&(a+=" "+C.className),C.css&&(s=(s?s+";":"")+C.css),C.startStyle&&x.from==p&&(c+=" "+C.startStyle),C.endStyle&&x.to==m&&(b||(b=[])).push(C.endStyle,x.to),C.title&&!h&&(h=C.title),C.collapsed&&(!f||Ee(f.marker,C)<0)&&(f=x)):x.from>p&&m>x.from&&(m=x.from)}if(b)for(var S=0;S=d)break;for(var k=Math.min(d,m);;){if(v){var T=p+v.length;if(!f){var M=T>k?v.slice(0,k-p):v;t.addToken(t,M,l?l+a:a,c,p+M.length==m?u:"",h,s)}if(T>=k){v=v.slice(k-p),p=k;break}p=T,c=""}v=i.slice(o,o=r[g++]),l=Zt(r[g++],t.cm.options)}}else for(var N=1;Nr)return{map:e.measure.maps[i],cache:e.measure.caches[i],before:!0}}function Ar(e,t,r,n){return Hr(e,Wr(e,t),r,n)}function Dr(e,t){if(t>=e.display.viewFrom&&t=r.lineN&&t2&&o.push((a.bottom+u.top)/2-r.top)}}o.push(r.bottom-r.top)}}(e,t.view,t.rect),t.hasHeights=!0),(o=function(e,t,r,n){var i,o=Er(t.map,r,n),a=o.node,u=o.start,c=o.end,h=o.collapse;if(3==a.nodeType){for(var f=0;f<4;f++){for(;u&&ie(t.line.text.charAt(o.coverStart+u));)--u;for(;o.coverStart+c1}(e))return t;var r=screen.logicalXDPI/screen.deviceXDPI,n=screen.logicalYDPI/screen.deviceYDPI;return{left:t.left*r,right:t.right*r,top:t.top*n,bottom:t.bottom*n}}(e.display.measure,i))}else{var d;u>0&&(h=n="right"),i=e.options.lineWrapping&&(d=a.getClientRects()).length>1?d["right"==n?d.length-1:0]:a.getBoundingClientRect()}if(l&&s<9&&!u&&(!i||!i.left&&!i.right)){var p=a.parentNode.getClientRects()[0];i=p?{left:p.left,right:p.left+rn(e.display),top:p.top,bottom:p.bottom}:Pr}for(var g=i.top-t.rect.top,v=i.bottom-t.rect.top,m=(g+v)/2,y=t.view.measure.heights,b=0;bt)&&(i=(o=a-s)-1,t>=a&&(l="right")),null!=i){if(n=e[u+2],s==a&&r==(n.insertLeft?"left":"right")&&(l=r),"left"==r&&0==i)for(;u&&e[u-2]==e[u-3]&&e[u-1].insertLeft;)n=e[2+(u-=3)],l="left";if("right"==r&&i==a-s)for(;u=0&&(r=e[i]).left==r.right;i--);return r}function zr(e){if(e.measure&&(e.measure.cache={},e.measure.heights=null,e.rest))for(var t=0;t=n.text.length?(a=n.text.length,u="before"):a<=0&&(a=0,u="after"),!s)return l("before"==u?a-1:a,"before"==u);function c(e,t,r){return l(r?e-1:e,1==s[t].level!=r)}var h=Ze(s,a,u),f=qe,d=c(a,h,"before"==u);return null!=f&&(d.other=c(a,f,"before"!=u)),d}function _r(e,t){var r=0;t=Se(e.doc,t),e.options.lineWrapping||(r=rn(e.display)*t.ch);var n=ae(e.doc,t.line),i=Ye(n)+Sr(e.display);return{left:r,right:r,top:i,bottom:i+n.height}}function $r(e,t,r,n,i){var o=ve(e,t,r);return o.xRel=i,n&&(o.outside=!0),o}function qr(e,t,r){var n=e.doc;if((r+=e.display.viewOffset)<0)return $r(n.first,0,null,!0,-1);var i=de(n,r),o=n.first+n.size-1;if(i>o)return $r(n.first+n.size-1,ae(n,o).text.length,null,!0,1);t<0&&(t=0);for(var l=ae(n,i);;){var s=en(e,l,i,t,r),a=Be(l,s.ch+(s.xRel>0?1:0));if(!a)return s;var u=a.find(1);if(u.line==i)return u;l=ae(n,i=u.line)}}function Zr(e,t,r,n){n-=Vr(t);var i=t.text.length,o=le(function(t){return Hr(e,r,t-1).bottom<=n},i,0);return{begin:o,end:i=le(function(t){return Hr(e,r,t).top>n},o,i)}}function Qr(e,t,r,n){return r||(r=Wr(e,t)),Zr(e,t,r,Kr(e,t,Hr(e,r,n),"line").top)}function Jr(e,t,r,n){return!(e.bottom<=r)&&(e.top>r||(n?e.left:e.right)>t)}function en(e,t,r,n,i){i-=Ye(t);var o=Wr(e,t),l=Vr(t),s=0,a=t.text.length,u=!0,c=Je(t,e.doc.direction);if(c){var h=(e.options.lineWrapping?function(e,t,r,n,i,o,l){var s=Zr(e,t,n,l),a=s.begin,u=s.end;/\s/.test(t.text.charAt(u-1))&&u--;for(var c=null,h=null,f=0;f=u||d.to<=a)){var p=1!=d.level,g=Hr(e,n,p?Math.min(u,d.to)-1:Math.max(a,d.from)).right,v=gv)&&(c=d,h=v)}}c||(c=i[i.length-1]);c.fromu&&(c={from:c.from,to:u,level:c.level});return c}:function(e,t,r,n,i,o,l){var s=le(function(s){var a=i[s],u=1!=a.level;return Jr(Yr(e,ve(r,u?a.to:a.from,u?"before":"after"),"line",t,n),o,l,!0)},0,i.length-1),a=i[s];if(s>0){var u=1!=a.level,c=Yr(e,ve(r,u?a.from:a.to,u?"after":"before"),"line",t,n);Jr(c,o,l,!0)&&c.top>l&&(a=i[s-1])}return a})(e,t,r,o,c,n,i);s=(u=1!=h.level)?h.from:h.to-1,a=u?h.to:h.from-1}var f,d,p=null,g=null,v=le(function(t){var r=Hr(e,o,t);return r.top+=l,r.bottom+=l,!!Jr(r,n,i,!1)&&(r.top<=i&&r.left<=n&&(p=t,g=r),!0)},s,a),m=!1;if(g){var y=n-g.left=w.bottom}return $r(r,v=oe(t.text,v,1),d,m,n-f)}function tn(e){if(null!=e.cachedTextHeight)return e.cachedTextHeight;if(null==Fr){Fr=O("pre");for(var t=0;t<49;++t)Fr.appendChild(document.createTextNode("x")),Fr.appendChild(O("br"));Fr.appendChild(document.createTextNode("x"))}N(e.measure,Fr);var r=Fr.offsetHeight/50;return r>3&&(e.cachedTextHeight=r),M(e.measure),r||1}function rn(e){if(null!=e.cachedCharWidth)return e.cachedCharWidth;var t=O("span","xxxxxxxxxx"),r=O("pre",[t]);N(e.measure,r);var n=t.getBoundingClientRect(),i=(n.right-n.left)/10;return i>2&&(e.cachedCharWidth=i),i||10}function nn(e){for(var t=e.display,r={},n={},i=t.gutters.clientLeft,o=t.gutters.firstChild,l=0;o;o=o.nextSibling,++l)r[e.options.gutters[l]]=o.offsetLeft+o.clientLeft+i,n[e.options.gutters[l]]=o.clientWidth;return{fixedPos:on(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:r,gutterWidth:n,wrapperWidth:t.wrapper.clientWidth}}function on(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function ln(e){var t=tn(e.display),r=e.options.lineWrapping,n=r&&Math.max(5,e.display.scroller.clientWidth/rn(e.display)-3);return function(i){if(je(e.doc,i))return 0;var o=0;if(i.widgets)for(var l=0;l=e.display.viewTo)return null;if((t-=e.display.viewFrom)<0)return null;for(var r=e.display.view,n=0;n=e.display.viewTo||s.to().linet||t==r&&l.to==t)&&(n(Math.max(l.from,t),Math.min(l.to,r),1==l.level?"rtl":"ltr",o),i=!0)}i||n(t,r,"ltr")}(g,r||0,null==n?f:n,function(e,t,i,h){var v="ltr"==i,m=d(e,v?"left":"right"),y=d(t-1,v?"right":"left"),b=null==r&&0==e,w=null==n&&t==f,x=0==h,C=!g||h==g.length-1;if(y.top-m.top<=3){var S=(u?w:b)&&C,L=(u?b:w)&&x?s:(v?m:y).left,k=S?a:(v?y:m).right;c(L,m.top,k-L,m.bottom)}else{var T,M,N,O;v?(T=u&&b&&x?s:m.left,M=u?a:p(e,i,"before"),N=u?s:p(t,i,"after"),O=u&&w&&C?a:y.right):(T=u?p(e,i,"before"):s,M=!u&&b&&x?a:m.right,N=!u&&w&&C?s:y.left,O=u?p(t,i,"after"):a),c(T,m.top,M-T,m.bottom),m.bottom0?t.blinker=setInterval(function(){return t.cursorDiv.style.visibility=(r=!r)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function vn(e){e.state.focused||(e.display.input.focus(),yn(e))}function mn(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,bn(e))},100)}function yn(e,t){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),"nocursor"!=e.options.readOnly&&(e.state.focused||(it(e,"focus",e,t),e.state.focused=!0,H(e.display.wrapper,"CodeMirror-focused"),e.curOp||e.display.selForContextMenu==e.doc.sel||(e.display.input.reset(),a&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),gn(e))}function bn(e,t){e.state.delayingBlurEvent||(e.state.focused&&(it(e,"blur",e,t),e.state.focused=!1,T(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150))}function wn(e){for(var t=e.display,r=t.lineDiv.offsetTop,n=0;n.005||c<-.005)&&(he(i.line,o),xn(i.line),i.rest))for(var h=0;h=l&&(o=de(t,Ye(ae(t,a))-e.wrapper.clientHeight),l=a)}return{from:o,to:Math.max(l,o+1)}}function Sn(e){var t=e.display,r=t.view;if(t.alignWidgets||t.gutters.firstChild&&e.options.fixedGutter){for(var n=on(t)-t.scroller.scrollLeft+e.doc.scrollLeft,i=t.gutters.offsetWidth,o=n+"px",l=0;lo&&(t.bottom=t.top+o);var s=e.doc.height+Lr(r),a=t.tops-n;if(t.topi+o){var c=Math.min(t.top,(u?s:t.bottom)-o);c!=i&&(l.scrollTop=c)}var h=e.curOp&&null!=e.curOp.scrollLeft?e.curOp.scrollLeft:r.scroller.scrollLeft,f=Mr(e)-(e.options.fixedGutter?r.gutters.offsetWidth:0),d=t.right-t.left>f;return d&&(t.right=t.left+f),t.left<10?l.scrollLeft=0:t.leftf+h-3&&(l.scrollLeft=t.right+(d?0:10)-f),l}function Tn(e,t){null!=t&&(On(e),e.curOp.scrollTop=(null==e.curOp.scrollTop?e.doc.scrollTop:e.curOp.scrollTop)+t)}function Mn(e){On(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function Nn(e,t,r){null==t&&null==r||On(e),null!=t&&(e.curOp.scrollLeft=t),null!=r&&(e.curOp.scrollTop=r)}function On(e){var t=e.curOp.scrollToPos;t&&(e.curOp.scrollToPos=null,An(e,_r(e,t.from),_r(e,t.to),t.margin))}function An(e,t,r,n){var i=kn(e,{left:Math.min(t.left,r.left),top:Math.min(t.top,r.top)-n,right:Math.max(t.right,r.right),bottom:Math.max(t.bottom,r.bottom)+n});Nn(e,i.scrollLeft,i.scrollTop)}function Dn(e,t){Math.abs(e.doc.scrollTop-t)<2||(r||ai(e,{top:t}),Wn(e,t,!0),r&&ai(e),ni(e,100))}function Wn(e,t,r){t=Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t),(e.display.scroller.scrollTop!=t||r)&&(e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t))}function Hn(e,t,r,n){t=Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth),(r?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!n||(e.doc.scrollLeft=t,Sn(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function Fn(e){var t=e.display,r=t.gutters.offsetWidth,n=Math.round(e.doc.height+Lr(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?r:0,docHeight:n,scrollHeight:n+Tr(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:r}}var Pn=function(e,t,r){this.cm=r;var n=this.vert=O("div",[O("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),i=this.horiz=O("div",[O("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");n.tabIndex=i.tabIndex=-1,e(n),e(i),tt(n,"scroll",function(){n.clientHeight&&t(n.scrollTop,"vertical")}),tt(i,"scroll",function(){i.clientWidth&&t(i.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,l&&s<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Pn.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,r=e.scrollHeight>e.clientHeight+1,n=e.nativeBarWidth;if(r){this.vert.style.display="block",this.vert.style.bottom=t?n+"px":"0";var i=e.viewHeight-(t?n:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+i)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=r?n+"px":"0",this.horiz.style.left=e.barLeft+"px";var o=e.viewWidth-e.barLeft-(r?n:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+o)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(0==n&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:r?n:0,bottom:t?n:0}},Pn.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Pn.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},Pn.prototype.zeroWidthHack=function(){var e=y&&!d?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new R,this.disableVert=new R},Pn.prototype.enableZeroWidthBar=function(e,t,r){e.style.pointerEvents="auto",t.set(1e3,function n(){var i=e.getBoundingClientRect();("vert"==r?document.elementFromPoint(i.right-1,(i.top+i.bottom)/2):document.elementFromPoint((i.right+i.left)/2,i.bottom-1))!=e?e.style.pointerEvents="none":t.set(1e3,n)})},Pn.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var En=function(){};function In(e,t){t||(t=Fn(e));var r=e.display.barWidth,n=e.display.barHeight;zn(e,t);for(var i=0;i<4&&r!=e.display.barWidth||n!=e.display.barHeight;i++)r!=e.display.barWidth&&e.options.lineWrapping&&wn(e),zn(e,Fn(e)),r=e.display.barWidth,n=e.display.barHeight}function zn(e,t){var r=e.display,n=r.scrollbars.update(t);r.sizer.style.paddingRight=(r.barWidth=n.right)+"px",r.sizer.style.paddingBottom=(r.barHeight=n.bottom)+"px",r.heightForcer.style.borderBottom=n.bottom+"px solid transparent",n.right&&n.bottom?(r.scrollbarFiller.style.display="block",r.scrollbarFiller.style.height=n.bottom+"px",r.scrollbarFiller.style.width=n.right+"px"):r.scrollbarFiller.style.display="",n.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(r.gutterFiller.style.display="block",r.gutterFiller.style.height=n.bottom+"px",r.gutterFiller.style.width=t.gutterWidth+"px"):r.gutterFiller.style.display=""}En.prototype.update=function(){return{bottom:0,right:0}},En.prototype.setScrollLeft=function(){},En.prototype.setScrollTop=function(){},En.prototype.clear=function(){};var Rn={native:Pn,null:En};function Bn(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&T(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new Rn[e.options.scrollbarStyle](function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),tt(t,"mousedown",function(){e.state.focused&&setTimeout(function(){return e.display.input.focus()},0)}),t.setAttribute("cm-not-content","true")},function(t,r){"horizontal"==r?Hn(e,t):Dn(e,t)},e),e.display.scrollbars.addClass&&H(e.display.wrapper,e.display.scrollbars.addClass)}var Gn=0;function Un(e){var t;e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:null,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++Gn},t=e.curOp,lr?lr.ops.push(t):t.ownsGroup=lr={ops:[t],delayedCallbacks:[]}}function Vn(e){!function(e,t){var r=e.ownsGroup;if(r)try{!function(e){var t=e.delayedCallbacks,r=0;do{for(;r=r.viewTo)||r.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new oi(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function jn(e){var t=e.cm,r=t.display;e.updatedDisplay&&wn(t),e.barMeasure=Fn(t),r.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=Ar(t,r.maxLine,r.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(r.scroller.clientWidth,r.sizer.offsetLeft+e.adjustWidthTo+Tr(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,r.sizer.offsetLeft+e.adjustWidthTo-Mr(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=r.input.prepareSelection())}function Xn(e){var t=e.cm;null!=e.adjustWidthTo&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft(window.innerHeight||document.documentElement.clientHeight)&&(i=!1),null!=i&&!p){var o=O("div","",null,"position: absolute;\n top: "+(t.top-r.viewOffset-Sr(e.display))+"px;\n height: "+(t.bottom-t.top+Tr(e)+r.barHeight)+"px;\n left: "+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(o),o.scrollIntoView(i),e.display.lineSpace.removeChild(o)}}}(t,function(e,t,r,n){var i;null==n&&(n=0),e.options.lineWrapping||t!=r||(r="before"==(t=t.ch?ve(t.line,"before"==t.sticky?t.ch-1:t.ch,"after"):t).sticky?ve(t.line,t.ch+1,"before"):t);for(var o=0;o<5;o++){var l=!1,s=Yr(e,t),a=r&&r!=t?Yr(e,r):s,u=kn(e,i={left:Math.min(s.left,a.left),top:Math.min(s.top,a.top)-n,right:Math.max(s.left,a.left),bottom:Math.max(s.bottom,a.bottom)+n}),c=e.doc.scrollTop,h=e.doc.scrollLeft;if(null!=u.scrollTop&&(Dn(e,u.scrollTop),Math.abs(e.doc.scrollTop-c)>1&&(l=!0)),null!=u.scrollLeft&&(Hn(e,u.scrollLeft),Math.abs(e.doc.scrollLeft-h)>1&&(l=!0)),!l)break}return i}(t,Se(n,e.scrollToPos.from),Se(n,e.scrollToPos.to),e.scrollToPos.margin));var i=e.maybeHiddenMarkers,o=e.maybeUnhiddenMarkers;if(i)for(var l=0;lt)&&(i.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=i.viewTo)Te&&Ve(e.doc,t)i.viewFrom?ei(e):(i.viewFrom+=n,i.viewTo+=n);else if(t<=i.viewFrom&&r>=i.viewTo)ei(e);else if(t<=i.viewFrom){var o=ti(e,r,r+n,1);o?(i.view=i.view.slice(o.index),i.viewFrom=o.lineN,i.viewTo+=n):ei(e)}else if(r>=i.viewTo){var l=ti(e,t,t,-1);l?(i.view=i.view.slice(0,l.index),i.viewTo=l.lineN):ei(e)}else{var s=ti(e,t,t,-1),a=ti(e,r,r+n,1);s&&a?(i.view=i.view.slice(0,s.index).concat(or(e,s.lineN,a.lineN)).concat(i.view.slice(a.index)),i.viewTo+=n):ei(e)}var u=i.externalMeasured;u&&(r=i.lineN&&t=n.viewTo)){var o=n.view[un(e,t)];if(null!=o.node){var l=o.changes||(o.changes=[]);-1==B(l,r)&&l.push(r)}}}function ei(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function ti(e,t,r,n){var i,o=un(e,t),l=e.display.view;if(!Te||r==e.doc.first+e.doc.size)return{index:o,lineN:r};for(var s=e.display.viewFrom,a=0;a0){if(o==l.length-1)return null;i=s+l[o].size-t,o++}else i=s-t;t+=i,r+=i}for(;Ve(e.doc,r)!=r;){if(o==(n<0?0:l.length-1))return null;r+=n*l[o-(n<0?1:0)].size,o+=n}return{index:o,lineN:r}}function ri(e){for(var t=e.display.view,r=0,n=0;n=e.display.viewTo)){var r=+new Date+e.options.workTime,n=Rt(e,t.highlightFrontier),i=[];t.iter(n.line,Math.min(t.first+t.size,e.display.viewTo+500),function(o){if(n.line>=e.display.viewFrom){var l=o.styles,s=o.text.length>e.options.maxHighlightLength?Dt(t.mode,n.state):null,a=It(e,o,n,!0);s&&(n.state=s),o.styles=a.styles;var u=o.styleClasses,c=a.classes;c?o.styleClasses=c:u&&(o.styleClasses=null);for(var h=!l||l.length!=o.styles.length||u!=c&&(!u||!c||u.bgClass!=c.bgClass||u.textClass!=c.textClass),f=0;!h&&fr)return ni(e,e.options.workDelay),!0}),t.highlightFrontier=n.line,t.modeFrontier=Math.max(t.modeFrontier,n.line),i.length&&_n(e,function(){for(var t=0;t=r.viewFrom&&t.visible.to<=r.viewTo&&(null==r.updateLineNumbers||r.updateLineNumbers>=r.viewTo)&&r.renderedView==r.view&&0==ri(e))return!1;Ln(e)&&(ei(e),t.dims=nn(e));var i=n.first+n.size,o=Math.max(t.visible.from-e.options.viewportMargin,n.first),l=Math.min(i,t.visible.to+e.options.viewportMargin);r.viewFroml&&r.viewTo-l<20&&(l=Math.min(i,r.viewTo)),Te&&(o=Ve(e.doc,o),l=Ke(e.doc,l));var s=o!=r.viewFrom||l!=r.viewTo||r.lastWrapHeight!=t.wrapperHeight||r.lastWrapWidth!=t.wrapperWidth;!function(e,t,r){var n=e.display;0==n.view.length||t>=n.viewTo||r<=n.viewFrom?(n.view=or(e,t,r),n.viewFrom=t):(n.viewFrom>t?n.view=or(e,t,n.viewFrom).concat(n.view):n.viewFromr&&(n.view=n.view.slice(0,un(e,r)))),n.viewTo=r}(e,o,l),r.viewOffset=Ye(ae(e.doc,r.viewFrom)),e.display.mover.style.top=r.viewOffset+"px";var u=ri(e);if(!s&&0==u&&!t.force&&r.renderedView==r.view&&(null==r.updateLineNumbers||r.updateLineNumbers>=r.viewTo))return!1;var c=function(e){if(e.hasFocus())return null;var t=W();if(!t||!D(e.display.lineDiv,t))return null;var r={activeElt:t};if(window.getSelection){var n=window.getSelection();n.anchorNode&&n.extend&&D(e.display.lineDiv,n.anchorNode)&&(r.anchorNode=n.anchorNode,r.anchorOffset=n.anchorOffset,r.focusNode=n.focusNode,r.focusOffset=n.focusOffset)}return r}(e);return u>4&&(r.lineDiv.style.display="none"),function(e,t,r){var n=e.display,i=e.options.lineNumbers,o=n.lineDiv,l=o.firstChild;function s(t){var r=t.nextSibling;return a&&y&&e.display.currentWheelTarget==t?t.style.display="none":t.parentNode.removeChild(t),r}for(var u=n.view,c=n.viewFrom,h=0;h-1&&(d=!1),cr(e,f,c,r)),d&&(M(f.lineNumber),f.lineNumber.appendChild(document.createTextNode(ge(e.options,c)))),l=f.node.nextSibling}else{var p=mr(e,f,c,r);o.insertBefore(p,l)}c+=f.size}for(;l;)l=s(l)}(e,r.updateLineNumbers,t.dims),u>4&&(r.lineDiv.style.display=""),r.renderedView=r.view,function(e){if(e&&e.activeElt&&e.activeElt!=W()&&(e.activeElt.focus(),e.anchorNode&&D(document.body,e.anchorNode)&&D(document.body,e.focusNode))){var t=window.getSelection(),r=document.createRange();r.setEnd(e.anchorNode,e.anchorOffset),r.collapse(!1),t.removeAllRanges(),t.addRange(r),t.extend(e.focusNode,e.focusOffset)}}(c),M(r.cursorDiv),M(r.selectionDiv),r.gutters.style.height=r.sizer.style.minHeight=0,s&&(r.lastWrapHeight=t.wrapperHeight,r.lastWrapWidth=t.wrapperWidth,ni(e,400)),r.updateLineNumbers=null,!0}function si(e,t){for(var r=t.viewport,n=!0;(n&&e.options.lineWrapping&&t.oldDisplayWidth!=Mr(e)||(r&&null!=r.top&&(r={top:Math.min(e.doc.height+Lr(e.display)-Nr(e),r.top)}),t.visible=Cn(e.display,e.doc,r),!(t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)))&&li(e,t);n=!1){wn(e);var i=Fn(e);cn(e),In(e,i),ci(e,i),t.force=!1}t.signal(e,"update",e),e.display.viewFrom==e.display.reportedViewFrom&&e.display.viewTo==e.display.reportedViewTo||(t.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function ai(e,t){var r=new oi(e,t);if(li(e,r)){wn(e),si(e,r);var n=Fn(e);cn(e),In(e,n),ci(e,n),r.finish()}}function ui(e){var t=e.display.gutters.offsetWidth;e.display.sizer.style.marginLeft=t+"px"}function ci(e,t){e.display.sizer.style.minHeight=t.docHeight+"px",e.display.heightForcer.style.top=t.docHeight+"px",e.display.gutters.style.height=t.docHeight+e.display.barHeight+Tr(e)+"px"}function hi(e){var t=e.display.gutters,r=e.options.gutters;M(t);for(var n=0;n-1&&!e.lineNumbers&&(e.gutters=e.gutters.slice(0),e.gutters.splice(t,1))}oi.prototype.signal=function(e,t){st(e,t)&&this.events.push(arguments)},oi.prototype.finish=function(){for(var e=0;es.clientWidth,c=s.scrollHeight>s.clientHeight;if(i&&u||o&&c){if(o&&y&&a)e:for(var f=t.target,d=l.view;f!=s;f=f.parentNode)for(var p=0;p=0&&me(e,n.to())<=0)return r}return-1};var bi=function(e,t){this.anchor=e,this.head=t};function wi(e,t){var r=e[t];e.sort(function(e,t){return me(e.from(),t.from())}),t=B(e,r);for(var n=1;n=0){var l=xe(o.from(),i.from()),s=we(o.to(),i.to()),a=o.empty()?i.from()==i.head:o.from()==o.head;n<=t&&--t,e.splice(--n,2,new bi(a?s:l,a?l:s))}}return new yi(e,t)}function xi(e,t){return new yi([new bi(e,t||e)],0)}function Ci(e){return e.text?ve(e.from.line+e.text.length-1,$(e.text).length+(1==e.text.length?e.from.ch:0)):e.to}function Si(e,t){if(me(e,t.from)<0)return e;if(me(e,t.to)<=0)return Ci(t);var r=e.line+t.text.length-(t.to.line-t.from.line)-1,n=e.ch;return e.line==t.to.line&&(n+=Ci(t).ch-t.to.ch),ve(r,n)}function Li(e,t){for(var r=[],n=0;n1&&e.remove(s.line+1,p-1),e.insert(s.line+1,m)}ar(e,"change",e,t)}function Ai(e,t,r){!function e(n,i,o){if(n.linked)for(var l=0;ls-(e.cm?e.cm.options.historyEventDelay:500)||"*"==t.origin.charAt(0)))&&(o=function(e,t){return t?(Pi(e.done),$(e.done)):e.done.length&&!$(e.done).ranges?$(e.done):e.done.length>1&&!e.done[e.done.length-2].ranges?(e.done.pop(),$(e.done)):void 0}(i,i.lastOp==n)))l=$(o.changes),0==me(t.from,t.to)&&0==me(t.from,l.to)?l.to=Ci(t):o.changes.push(Fi(e,t));else{var a=$(i.done);for(a&&a.ranges||zi(e.sel,i.done),o={changes:[Fi(e,t)],generation:i.generation},i.done.push(o);i.done.length>i.undoDepth;)i.done.shift(),i.done[0].ranges||i.done.shift()}i.done.push(r),i.generation=++i.maxGeneration,i.lastModTime=i.lastSelTime=s,i.lastOp=i.lastSelOp=n,i.lastOrigin=i.lastSelOrigin=t.origin,l||it(e,"historyAdded")}function Ii(e,t,r,n){var i=e.history,o=n&&n.origin;r==i.lastSelOp||o&&i.lastSelOrigin==o&&(i.lastModTime==i.lastSelTime&&i.lastOrigin==o||function(e,t,r,n){var i=t.charAt(0);return"*"==i||"+"==i&&r.ranges.length==n.ranges.length&&r.somethingSelected()==n.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}(e,o,$(i.done),t))?i.done[i.done.length-1]=t:zi(t,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=o,i.lastSelOp=r,n&&!1!==n.clearRedo&&Pi(i.undone)}function zi(e,t){var r=$(t);r&&r.ranges&&r.equals(e)||t.push(e)}function Ri(e,t,r,n){var i=t["spans_"+e.id],o=0;e.iter(Math.max(e.first,r),Math.min(e.first+e.size,n),function(r){r.markedSpans&&((i||(i=t["spans_"+e.id]={}))[o]=r.markedSpans),++o})}function Bi(e){if(!e)return null;for(var t,r=0;r-1&&($(s)[h]=u[h],delete u[h])}}}return n}function Vi(e,t,r,n){if(n){var i=e.anchor;if(r){var o=me(t,i)<0;o!=me(r,i)<0?(i=t,t=r):o!=me(t,r)<0&&(t=r)}return new bi(i,t)}return new bi(r||t,t)}function Ki(e,t,r,n,i){null==i&&(i=e.cm&&(e.cm.display.shift||e.extend)),$i(e,new yi([Vi(e.sel.primary(),t,r,i)],0),n)}function ji(e,t,r){for(var n=[],i=e.cm&&(e.cm.display.shift||e.extend),o=0;o=t.ch:s.to>t.ch))){if(i&&(it(a,"beforeCursorEnter"),a.explicitlyCleared)){if(o.markedSpans){--l;continue}break}if(!a.atomic)continue;if(r){var u=a.find(n<0?1:-1),c=void 0;if((n<0?a.inclusiveRight:a.inclusiveLeft)&&(u=ro(e,u,-n,u&&u.line==t.line?o:null)),u&&u.line==t.line&&(c=me(u,r))&&(n<0?c<0:c>0))return eo(e,u,t,n,i)}var h=a.find(n<0?-1:1);return(n<0?a.inclusiveLeft:a.inclusiveRight)&&(h=ro(e,h,n,h.line==t.line?o:null)),h?eo(e,h,t,n,i):null}}return t}function to(e,t,r,n,i){var o=n||1,l=eo(e,t,r,o,i)||!i&&eo(e,t,r,o,!0)||eo(e,t,r,-o,i)||!i&&eo(e,t,r,-o,!0);return l||(e.cantEdit=!0,ve(e.first,0))}function ro(e,t,r,n){return r<0&&0==t.ch?t.line>e.first?Se(e,ve(t.line-1)):null:r>0&&t.ch==(n||ae(e,t.line)).text.length?t.line0)){var c=[a,1],h=me(u.from,s.from),f=me(u.to,s.to);(h<0||!l.inclusiveLeft&&!h)&&c.push({from:u.from,to:s.from}),(f>0||!l.inclusiveRight&&!f)&&c.push({from:s.to,to:u.to}),i.splice.apply(i,c),a+=c.length-3}}return i}(e,t.from,t.to);if(n)for(var i=n.length-1;i>=0;--i)lo(e,{from:n[i].from,to:n[i].to,text:i?[""]:t.text,origin:t.origin});else lo(e,t)}}function lo(e,t){if(1!=t.text.length||""!=t.text[0]||0!=me(t.from,t.to)){var r=Li(e,t);Ei(e,t,r,e.cm?e.cm.curOp.id:NaN),uo(e,t,r,Ae(e,t));var n=[];Ai(e,function(e,r){r||-1!=B(n,e.history)||(po(e.history,t),n.push(e.history)),uo(e,t,null,Ae(e,t))})}}function so(e,t,r){var n=e.cm&&e.cm.state.suppressEdits;if(!n||r){for(var i,o=e.history,l=e.sel,s="undo"==t?o.done:o.undone,a="undo"==t?o.undone:o.done,u=0;u=0;--d){var p=f(d);if(p)return p.v}}}}function ao(e,t){if(0!=t&&(e.first+=t,e.sel=new yi(q(e.sel.ranges,function(e){return new bi(ve(e.anchor.line+t,e.anchor.ch),ve(e.head.line+t,e.head.ch))}),e.sel.primIndex),e.cm)){Qn(e.cm,e.first,e.first-t,t);for(var r=e.cm.display,n=r.viewFrom;ne.lastLine())){if(t.from.lineo&&(t={from:t.from,to:ve(o,ae(e,o).text.length),text:[t.text[0]],origin:t.origin}),t.removed=ue(e,t.from,t.to),r||(r=Li(e,t)),e.cm?function(e,t,r){var n=e.doc,i=e.display,o=t.from,l=t.to,s=!1,a=o.line;e.options.lineWrapping||(a=fe(Ue(ae(n,o.line))),n.iter(a,l.line+1,function(e){if(e==i.maxLine)return s=!0,!0}));n.sel.contains(t.from,t.to)>-1&<(e);Oi(n,t,r,ln(e)),e.options.lineWrapping||(n.iter(a,o.line+t.text.length,function(e){var t=_e(e);t>i.maxLineLength&&(i.maxLine=e,i.maxLineLength=t,i.maxLineChanged=!0,s=!1)}),s&&(e.curOp.updateMaxLine=!0));(function(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),!(e.highlightFrontierr;n--){var i=ae(e,n).stateAfter;if(i&&(!(i instanceof Pt)||n+i.lookAhead1||!(this.children[0]instanceof vo))){var s=[];this.collapse(s),this.children=[new vo(s)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t50){for(var l=i.lines.length%25+25,s=l;s10);e.parent.maybeSpill()}},iterN:function(e,t,r){for(var n=0;n0||0==l&&!1!==o.clearWhenEmpty)return o;if(o.replacedWith&&(o.collapsed=!0,o.widgetNode=A("span",[o.replacedWith],"CodeMirror-widget"),n.handleMouseEvents||o.widgetNode.setAttribute("cm-ignore-events","true"),n.insertLeft&&(o.widgetNode.insertLeft=!0)),o.collapsed){if(Ge(e,t.line,t,r,o)||t.line!=r.line&&Ge(e,r.line,t,r,o))throw new Error("Inserting collapsed marker partially overlapping an existing one");Te=!0}o.addToHistory&&Ei(e,{from:t,to:r,origin:"markText"},e.sel,NaN);var s,a=t.line,u=e.cm;if(e.iter(a,r.line+1,function(e){u&&o.collapsed&&!u.options.lineWrapping&&Ue(e)==u.display.maxLine&&(s=!0),o.collapsed&&a!=t.line&&he(e,0),function(e,t){e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t],t.marker.attachLine(e)}(e,new Me(o,a==t.line?t.ch:null,a==r.line?r.ch:null)),++a}),o.collapsed&&e.iter(t.line,r.line+1,function(t){je(e,t)&&he(t,0)}),o.clearOnEnter&&tt(o,"beforeCursorEnter",function(){return o.clear()}),o.readOnly&&(ke=!0,(e.history.done.length||e.history.undone.length)&&e.clearHistory()),o.collapsed&&(o.id=++wo,o.atomic=!0),u){if(s&&(u.curOp.updateMaxLine=!0),o.collapsed)Qn(u,t.line,r.line+1);else if(o.className||o.title||o.startStyle||o.endStyle||o.css)for(var c=t.line;c<=r.line;c++)Jn(u,c,"text");o.atomic&&Qi(u.doc),ar(u,"markerAdded",u,o)}return o}xo.prototype.clear=function(){if(!this.explicitlyCleared){var e=this.doc.cm,t=e&&!e.curOp;if(t&&Un(e),st(this,"clear")){var r=this.find();r&&ar(this,"clear",r.from,r.to)}for(var n=null,i=null,o=0;oe.display.maxLineLength&&(e.display.maxLine=u,e.display.maxLineLength=c,e.display.maxLineChanged=!0)}null!=n&&e&&this.collapsed&&Qn(e,n,i+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&Qi(e.doc)),e&&ar(e,"markerCleared",e,this,n,i),t&&Vn(e),this.parent&&this.parent.clear()}},xo.prototype.find=function(e,t){var r,n;null==e&&"bookmark"==this.type&&(e=1);for(var i=0;i=0;a--)oo(this,n[a]);s?_i(this,s):this.cm&&Mn(this.cm)}),undo:Zn(function(){so(this,"undo")}),redo:Zn(function(){so(this,"redo")}),undoSelection:Zn(function(){so(this,"undo",!0)}),redoSelection:Zn(function(){so(this,"redo",!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,r=0,n=0;n=e.ch)&&t.push(i.marker.parent||i.marker)}return t},findMarks:function(e,t,r){e=Se(this,e),t=Se(this,t);var n=[],i=e.line;return this.iter(e.line,t.line+1,function(o){var l=o.markedSpans;if(l)for(var s=0;s=a.to||null==a.from&&i!=e.line||null!=a.from&&i==t.line&&a.from>=t.ch||r&&!r(a.marker)||n.push(a.marker.parent||a.marker)}++i}),n},getAllMarks:function(){var e=[];return this.iter(function(t){var r=t.markedSpans;if(r)for(var n=0;ne)return t=e,!0;e-=o,++r}),Se(this,ve(r,t))},indexFromPos:function(e){var t=(e=Se(this,e)).ch;if(e.linet&&(t=e.from),null!=e.to&&e.to-1)return t.state.draggingText(e),void setTimeout(function(){return t.display.input.focus()},20);try{var c=e.dataTransfer.getData("Text");if(c){var h;if(t.state.draggingText&&!t.state.draggingText.copy&&(h=t.listSelections()),qi(t.doc,xi(r,r)),h)for(var f=0;f=0;t--)co(e.doc,"",n[t].from,n[t].to,"+delete");Mn(e)})}function _o(e,t,r){var n=oe(e.text,t+r,r);return n<0||n>e.text.length?null:n}function $o(e,t,r){var n=_o(e,t.ch,r);return null==n?null:new ve(t.line,n,r<0?"after":"before")}function qo(e,t,r,n,i){if(e){var o=Je(r,t.doc.direction);if(o){var l,s=i<0?$(o):o[0],a=i<0==(1==s.level)?"after":"before";if(s.level>0||"rtl"==t.doc.direction){var u=Wr(t,r);l=i<0?r.text.length-1:0;var c=Hr(t,u,l).top;l=le(function(e){return Hr(t,u,e).top==c},i<0==(1==s.level)?s.from:s.to-1,l),"before"==a&&(l=_o(r,l,1))}else l=i<0?s.to:s.from;return new ve(n,l,a)}}return new ve(n,i<0?r.text.length:0,i<0?"before":"after")}Ro.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},Ro.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},Ro.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Alt-F":"goWordRight","Alt-B":"goWordLeft","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-D":"delWordAfter","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},Ro.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},Ro.default=y?Ro.macDefault:Ro.pcDefault;var Zo={selectAll:no,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),V)},killLine:function(e){return Yo(e,function(t){if(t.empty()){var r=ae(e.doc,t.head.line).text.length;return t.head.ch==r&&t.head.line0)i=new ve(i.line,i.ch+1),e.replaceRange(o.charAt(i.ch-1)+o.charAt(i.ch-2),ve(i.line,i.ch-2),i,"+transpose");else if(i.line>e.doc.first){var l=ae(e.doc,i.line-1).text;l&&(i=new ve(i.line,1),e.replaceRange(o.charAt(0)+e.doc.lineSeparator()+l.charAt(l.length-1),ve(i.line-1,l.length-1),i,"+transpose"))}r.push(new bi(i,i))}e.setSelections(r)})},newlineAndIndent:function(e){return _n(e,function(){for(var t=e.listSelections(),r=t.length-1;r>=0;r--)e.replaceRange(e.doc.lineSeparator(),t[r].anchor,t[r].head,"+input");t=e.listSelections();for(var n=0;n-1&&(me((i=u.ranges[i]).from(),t)<0||t.xRel>0)&&(me(i.to(),t)>0||t.xRel<0)?function(e,t,r,n){var i=e.display,o=!1,u=$n(e,function(t){a&&(i.scroller.draggable=!1),e.state.draggingText=!1,nt(i.wrapper.ownerDocument,"mouseup",u),nt(i.wrapper.ownerDocument,"mousemove",c),nt(i.scroller,"dragstart",h),nt(i.scroller,"drop",u),o||(ut(t),n.addNew||Ki(e.doc,r,null,null,n.extend),a||l&&9==s?setTimeout(function(){i.wrapper.ownerDocument.body.focus(),i.input.focus()},20):i.input.focus())}),c=function(e){o=o||Math.abs(t.clientX-e.clientX)+Math.abs(t.clientY-e.clientY)>=10},h=function(){return o=!0};a&&(i.scroller.draggable=!0);e.state.draggingText=u,u.copy=!n.moveOnDrag,i.scroller.dragDrop&&i.scroller.dragDrop();tt(i.wrapper.ownerDocument,"mouseup",u),tt(i.wrapper.ownerDocument,"mousemove",c),tt(i.scroller,"dragstart",h),tt(i.scroller,"drop",u),mn(e),setTimeout(function(){return i.input.focus()},20)}(e,n,t,o):function(e,t,r,n){var i=e.display,o=e.doc;ut(t);var l,s,a=o.sel,u=a.ranges;n.addNew&&!n.extend?(s=o.sel.contains(r),l=s>-1?u[s]:new bi(r,r)):(l=o.sel.primary(),s=o.sel.primIndex);if("rectangle"==n.unit)n.addNew||(l=new bi(r,r)),r=an(e,t,!0,!0),s=-1;else{var c=dl(e,r,n.unit);l=n.extend?Vi(l,c.anchor,c.head,n.extend):c}n.addNew?-1==s?(s=u.length,$i(o,wi(u.concat([l]),s),{scroll:!1,origin:"*mouse"})):u.length>1&&u[s].empty()&&"char"==n.unit&&!n.extend?($i(o,wi(u.slice(0,s).concat(u.slice(s+1)),0),{scroll:!1,origin:"*mouse"}),a=o.sel):Xi(o,s,l,K):(s=0,$i(o,new yi([l],0),K),a=o.sel);var h=r;function f(t){if(0!=me(h,t))if(h=t,"rectangle"==n.unit){for(var i=[],u=e.options.tabSize,c=z(ae(o,r.line).text,r.ch,u),f=z(ae(o,t.line).text,t.ch,u),d=Math.min(c,f),p=Math.max(c,f),g=Math.min(r.line,t.line),v=Math.min(e.lastLine(),Math.max(r.line,t.line));g<=v;g++){var m=ae(o,g).text,y=X(m,d,u);d==p?i.push(new bi(ve(g,y),ve(g,y))):m.length>y&&i.push(new bi(ve(g,y),ve(g,X(m,p,u))))}i.length||i.push(new bi(r,r)),$i(o,wi(a.ranges.slice(0,s).concat(i),s),{origin:"*mouse",scroll:!1}),e.scrollIntoView(t)}else{var b,w=l,x=dl(e,t,n.unit),C=w.anchor;me(x.anchor,C)>0?(b=x.head,C=xe(w.from(),x.anchor)):(b=x.anchor,C=we(w.to(),x.head));var S=a.ranges.slice(0);S[s]=function(e,t){var r=t.anchor,n=t.head,i=ae(e.doc,r.line);if(0==me(r,n)&&r.sticky==n.sticky)return t;var o=Je(i);if(!o)return t;var l=Ze(o,r.ch,r.sticky),s=o[l];if(s.from!=r.ch&&s.to!=r.ch)return t;var a,u=l+(s.from==r.ch==(1!=s.level)?0:1);if(0==u||u==o.length)return t;if(n.line!=r.line)a=(n.line-r.line)*("ltr"==e.doc.direction?1:-1)>0;else{var c=Ze(o,n.ch,n.sticky),h=c-l||(n.ch-r.ch)*(1==s.level?-1:1);a=c==u-1||c==u?h<0:h>0}var f=o[u+(a?-1:0)],d=a==(1==f.level),p=d?f.from:f.to,g=d?"after":"before";return r.ch==p&&r.sticky==g?t:new bi(new ve(r.line,p,g),n)}(e,new bi(Se(o,C),b)),$i(o,wi(S,s),K)}}var d=i.wrapper.getBoundingClientRect(),p=0;function g(t){e.state.selectingText=!1,p=1/0,ut(t),i.input.focus(),nt(i.wrapper.ownerDocument,"mousemove",v),nt(i.wrapper.ownerDocument,"mouseup",m),o.history.lastSelOrigin=null}var v=$n(e,function(t){0!==t.buttons&&pt(t)?function t(r){var l=++p;var s=an(e,r,!0,"rectangle"==n.unit);if(!s)return;if(0!=me(s,h)){e.curOp.focus=W(),f(s);var a=Cn(i,o);(s.line>=a.to||s.lined.bottom?20:0;u&&setTimeout($n(e,function(){p==l&&(i.scroller.scrollTop+=u,t(r))}),50)}}(t):g(t)}),m=$n(e,g);e.state.selectingText=m,tt(i.wrapper.ownerDocument,"mousemove",v),tt(i.wrapper.ownerDocument,"mouseup",m)}(e,n,t,o)}(t,n,o,e):dt(e)==r.scroller&&ut(e):2==i?(n&&Ki(t.doc,n),setTimeout(function(){return r.input.focus()},20)):3==i&&(S?vl(t,e):mn(t)))}}function dl(e,t,r){if("char"==r)return new bi(t,t);if("word"==r)return e.findWordAt(t);if("line"==r)return new bi(ve(t.line,0),Se(e.doc,ve(t.line+1,0)));var n=r(e,t);return new bi(n.from,n.to)}function pl(e,t,r,n){var i,o;if(t.touches)i=t.touches[0].clientX,o=t.touches[0].clientY;else try{i=t.clientX,o=t.clientY}catch(t){return!1}if(i>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;n&&ut(t);var l=e.display,s=l.lineDiv.getBoundingClientRect();if(o>s.bottom||!st(e,r))return ht(t);o-=s.top-l.viewOffset;for(var a=0;a=i)return it(e,r,e,de(e.doc,o),e.options.gutters[a],t),ht(t)}}function gl(e,t){return pl(e,t,"gutterClick",!0)}function vl(e,t){Cr(e.display,t)||function(e,t){if(!st(e,"gutterContextMenu"))return!1;return pl(e,t,"gutterContextMenu",!1)}(e,t)||ot(e,t,"contextmenu")||e.display.input.onContextMenu(t)}function ml(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),Br(e)}hl.prototype.compare=function(e,t,r){return this.time+400>e&&0==me(t,this.pos)&&r==this.button};var yl={toString:function(){return"CodeMirror.Init"}},bl={},wl={};function xl(e){hi(e),Qn(e),Sn(e)}function Cl(e,t,r){if(!t!=!(r&&r!=yl)){var n=e.display.dragFunctions,i=t?tt:nt;i(e.display.scroller,"dragstart",n.start),i(e.display.scroller,"dragenter",n.enter),i(e.display.scroller,"dragover",n.over),i(e.display.scroller,"dragleave",n.leave),i(e.display.scroller,"drop",n.drop)}}function Sl(e){e.options.lineWrapping?(H(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(T(e.display.wrapper,"CodeMirror-wrap"),$e(e)),sn(e),Qn(e),Br(e),setTimeout(function(){return In(e)},100)}function Ll(e,t){var r=this;if(!(this instanceof Ll))return new Ll(e,t);this.options=t=t?I(t):{},I(bl,t,!1),fi(t);var n=t.value;"string"==typeof n?n=new Mo(n,t.mode,null,t.lineSeparator,t.direction):t.mode&&(n.modeOption=t.mode),this.doc=n;var i=new Ll.inputStyles[t.inputStyle](this),o=this.display=new se(e,n,i);for(var u in o.wrapper.CodeMirror=this,hi(this),ml(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Bn(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:!1,cutIncoming:!1,selectingText:!1,draggingText:!1,highlight:new R,keySeq:null,specialChars:null},t.autofocus&&!m&&o.input.focus(),l&&s<11&&setTimeout(function(){return r.display.input.reset(!0)},20),function(e){var t=e.display;tt(t.scroller,"mousedown",$n(e,fl)),tt(t.scroller,"dblclick",l&&s<11?$n(e,function(t){if(!ot(e,t)){var r=an(e,t);if(r&&!gl(e,t)&&!Cr(e.display,t)){ut(t);var n=e.findWordAt(r);Ki(e.doc,n.anchor,n.head)}}}):function(t){return ot(e,t)||ut(t)});S||tt(t.scroller,"contextmenu",function(t){return vl(e,t)});var r,n={end:0};function i(){t.activeTouch&&(r=setTimeout(function(){return t.activeTouch=null},1e3),(n=t.activeTouch).end=+new Date)}function o(e,t){if(null==t.left)return!0;var r=t.left-e.left,n=t.top-e.top;return r*r+n*n>400}tt(t.scroller,"touchstart",function(i){if(!ot(e,i)&&!function(e){if(1!=e.touches.length)return!1;var t=e.touches[0];return t.radiusX<=1&&t.radiusY<=1}(i)&&!gl(e,i)){t.input.ensurePolled(),clearTimeout(r);var o=+new Date;t.activeTouch={start:o,moved:!1,prev:o-n.end<=300?n:null},1==i.touches.length&&(t.activeTouch.left=i.touches[0].pageX,t.activeTouch.top=i.touches[0].pageY)}}),tt(t.scroller,"touchmove",function(){t.activeTouch&&(t.activeTouch.moved=!0)}),tt(t.scroller,"touchend",function(r){var n=t.activeTouch;if(n&&!Cr(t,r)&&null!=n.left&&!n.moved&&new Date-n.start<300){var l,s=e.coordsChar(t.activeTouch,"page");l=!n.prev||o(n,n.prev)?new bi(s,s):!n.prev.prev||o(n,n.prev.prev)?e.findWordAt(s):new bi(ve(s.line,0),Se(e.doc,ve(s.line+1,0))),e.setSelection(l.anchor,l.head),e.focus(),ut(r)}i()}),tt(t.scroller,"touchcancel",i),tt(t.scroller,"scroll",function(){t.scroller.clientHeight&&(Dn(e,t.scroller.scrollTop),Hn(e,t.scroller.scrollLeft,!0),it(e,"scroll",e))}),tt(t.scroller,"mousewheel",function(t){return mi(e,t)}),tt(t.scroller,"DOMMouseScroll",function(t){return mi(e,t)}),tt(t.wrapper,"scroll",function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0}),t.dragFunctions={enter:function(t){ot(e,t)||ft(t)},over:function(t){ot(e,t)||(!function(e,t){var r=an(e,t);if(r){var n=document.createDocumentFragment();fn(e,r,n),e.display.dragCursor||(e.display.dragCursor=O("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),N(e.display.dragCursor,n)}}(e,t),ft(t))},start:function(t){return function(e,t){if(l&&(!e.state.draggingText||+new Date-No<100))ft(t);else if(!ot(e,t)&&!Cr(e.display,t)&&(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!f)){var r=O("img",null,null,"position: fixed; left: 0; top: 0;");r.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",h&&(r.width=r.height=1,e.display.wrapper.appendChild(r),r._top=r.offsetTop),t.dataTransfer.setDragImage(r,0,0),h&&r.parentNode.removeChild(r)}}(e,t)},drop:$n(e,Oo),leave:function(t){ot(e,t)||Ao(e)}};var a=t.input.getField();tt(a,"keyup",function(t){return sl.call(e,t)}),tt(a,"keydown",$n(e,ll)),tt(a,"keypress",$n(e,al)),tt(a,"focus",function(t){return yn(e,t)}),tt(a,"blur",function(t){return bn(e,t)})}(this),Ho(),Un(this),this.curOp.forceUpdate=!0,Di(this,n),t.autofocus&&!m||this.hasFocus()?setTimeout(E(yn,this),20):bn(this),wl)wl.hasOwnProperty(u)&&wl[u](r,t[u],yl);Ln(this),t.finishInit&&t.finishInit(this);for(var c=0;c150)){if(!n)return;r="prev"}}else u=0,r="not";"prev"==r?u=t>o.first?z(ae(o,t-1).text,null,l):0:"add"==r?u=a+e.options.indentUnit:"subtract"==r?u=a-e.options.indentUnit:"number"==typeof r&&(u=a+r),u=Math.max(0,u);var h="",f=0;if(e.options.indentWithTabs)for(var d=Math.floor(u/l);d;--d)f+=l,h+="\t";if(f1)if(Ml&&Ml.text.join("\n")==t){if(n.ranges.length%Ml.text.length==0){u=[];for(var c=0;c=0;h--){var f=n.ranges[h],d=f.from(),p=f.to();f.empty()&&(r&&r>0?d=ve(d.line,d.ch-r):e.state.overwrite&&!s?p=ve(p.line,Math.min(ae(o,p.line).text.length,p.ch+$(a).length)):Ml&&Ml.lineWise&&Ml.text.join("\n")==t&&(d=p=ve(d.line,0))),l=e.curOp.updateInput;var g={from:d,to:p,text:u?u[h%u.length]:a,origin:i||(s?"paste":e.state.cutIncoming?"cut":"+input")};oo(e.doc,g),ar(e,"inputRead",e,g)}t&&!s&&Dl(e,t),Mn(e),e.curOp.updateInput=l,e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=!1}function Al(e,t){var r=e.clipboardData&&e.clipboardData.getData("Text");if(r)return e.preventDefault(),t.isReadOnly()||t.options.disableInput||_n(t,function(){return Ol(t,r,0,null,"paste")}),!0}function Dl(e,t){if(e.options.electricChars&&e.options.smartIndent)for(var r=e.doc.sel,n=r.ranges.length-1;n>=0;n--){var i=r.ranges[n];if(!(i.head.ch>100||n&&r.ranges[n-1].head.line==i.head.line)){var o=e.getModeAt(i.head),l=!1;if(o.electricChars){for(var s=0;s-1){l=Tl(e,i.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(ae(e.doc,i.head.line).text.slice(0,i.head.ch))&&(l=Tl(e,i.head.line,"smart"));l&&ar(e,"electricInput",e,i.head.line)}}}function Wl(e){for(var t=[],r=[],n=0;n=t.text.length?(r.ch=t.text.length,r.sticky="before"):r.ch<=0&&(r.ch=0,r.sticky="after");var o=Ze(i,r.ch,r.sticky),l=i[o];if("ltr"==e.doc.direction&&l.level%2==0&&(n>0?l.to>r.ch:l.from=l.from&&f>=c.begin)){var d=h?"before":"after";return new ve(r.line,f,d)}}var p=function(e,t,n){for(var o=function(e,t){return t?new ve(r.line,a(e,1),"before"):new ve(r.line,e,"after")};e>=0&&e0==(1!=l.level),u=s?n.begin:a(n.end,-1);if(l.from<=u&&u0?c.end:a(c.begin,-1);return null==v||n>0&&v==t.text.length||!(g=p(n>0?0:i.length-1,n,u(v)))?null:g}(e.cm,s,t,r):$o(s,t,r))){if(n||(l=t.line+r)=e.first+e.size||(t=new ve(l,t.ch,t.sticky),!(s=ae(e,l))))return!1;t=qo(i,e.cm,s,t.line,r)}else t=o;return!0}if("char"==n)a();else if("column"==n)a(!0);else if("word"==n||"group"==n)for(var u=null,c="group"==n,h=e.cm&&e.cm.getHelper(t,"wordChars"),f=!0;!(r<0)||a(!f);f=!1){var d=s.text.charAt(t.ch)||"\n",p=te(d,h)?"w":c&&"\n"==d?"n":!c||/\s/.test(d)?null:"p";if(!c||f||p||(p="s"),u&&u!=p){r<0&&(r=1,a(),t.sticky="after");break}if(p&&(u=p),r>0&&!a(!f))break}var g=to(e,t,o,l,!0);return ye(o,g)&&(g.hitSide=!0),g}function El(e,t,r,n){var i,o,l=e.doc,s=t.left;if("page"==n){var a=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),u=Math.max(a-.5*tn(e.display),3);i=(r>0?t.bottom:t.top)+r*u}else"line"==n&&(i=r>0?t.bottom+3:t.top-3);for(;(o=qr(e,s,i)).outside;){if(r<0?i<=0:i>=l.height){o.hitSide=!0;break}i+=5*r}return o}var Il=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new R,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};function zl(e,t){var r=Dr(e,t.line);if(!r||r.hidden)return null;var n=ae(e.doc,t.line),i=Or(r,n,t.line),o=Je(n,e.doc.direction),l="left";o&&(l=Ze(o,t.ch)%2?"right":"left");var s=Er(i.map,t.ch,l);return s.offset="right"==s.collapse?s.end:s.start,s}function Rl(e,t){return t&&(e.bad=!0),e}function Bl(e,t,r){var n;if(t==e.display.lineDiv){if(!(n=e.display.lineDiv.childNodes[r]))return Rl(e.clipPos(ve(e.display.viewTo-1)),!0);t=null,r=0}else for(n=t;;n=n.parentNode){if(!n||n==e.display.lineDiv)return null;if(n.parentNode&&n.parentNode==e.display.lineDiv)break}for(var i=0;i=t.display.viewTo||o.line=t.display.viewFrom&&zl(t,i)||{node:a[0].measure.map[2],offset:0},c=o.linen.firstLine()&&(l=ve(l.line-1,ae(n.doc,l.line-1).length)),s.ch==ae(n.doc,s.line).text.length&&s.linei.viewTo-1)return!1;l.line==i.viewFrom||0==(e=un(n,l.line))?(t=fe(i.view[0].line),r=i.view[0].node):(t=fe(i.view[e].line),r=i.view[e-1].node.nextSibling);var a,u,c=un(n,s.line);if(c==i.view.length-1?(a=i.viewTo-1,u=i.lineDiv.lastChild):(a=fe(i.view[c+1].line)-1,u=i.view[c+1].node.previousSibling),!r)return!1;for(var h=n.doc.splitLines(function(e,t,r,n,i){var o="",l=!1,s=e.doc.lineSeparator(),a=!1;function u(){l&&(o+=s,a&&(o+=s),l=a=!1)}function c(e){e&&(u(),o+=e)}function h(t){if(1==t.nodeType){var r=t.getAttribute("cm-text");if(r)return void c(r);var o,f=t.getAttribute("cm-marker");if(f){var d=e.findMarks(ve(n,0),ve(i+1,0),(v=+f,function(e){return e.id==v}));return void(d.length&&(o=d[0].find(0))&&c(ue(e.doc,o.from,o.to).join(s)))}if("false"==t.getAttribute("contenteditable"))return;var p=/^(pre|div|p|li|table|br)$/i.test(t.nodeName);if(!/^br$/i.test(t.nodeName)&&0==t.textContent.length)return;p&&u();for(var g=0;g1&&f.length>1;)if($(h)==$(f))h.pop(),f.pop(),a--;else{if(h[0]!=f[0])break;h.shift(),f.shift(),t++}for(var d=0,p=0,g=h[0],v=f[0],m=Math.min(g.length,v.length);dl.ch&&y.charCodeAt(y.length-p-1)==b.charCodeAt(b.length-p-1);)d--,p++;h[h.length-1]=y.slice(0,y.length-p).replace(/^\u200b+/,""),h[0]=h[0].slice(d).replace(/\u200b+$/,"");var x=ve(t,d),C=ve(a,f.length?$(f).length-p:0);return h.length>1||h[0]||me(x,C)?(co(n.doc,h,x,C,"+input"),!0):void 0},Il.prototype.ensurePolled=function(){this.forceCompositionEnd()},Il.prototype.reset=function(){this.forceCompositionEnd()},Il.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Il.prototype.readFromDOMSoon=function(){var e=this;null==this.readDOMTimeout&&(this.readDOMTimeout=setTimeout(function(){if(e.readDOMTimeout=null,e.composing){if(!e.composing.done)return;e.composing=null}e.updateFromDOM()},80))},Il.prototype.updateFromDOM=function(){var e=this;!this.cm.isReadOnly()&&this.pollContent()||_n(this.cm,function(){return Qn(e.cm)})},Il.prototype.setUneditable=function(e){e.contentEditable="false"},Il.prototype.onKeyPress=function(e){0==e.charCode||this.composing||(e.preventDefault(),this.cm.isReadOnly()||$n(this.cm,Ol)(this.cm,String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),0))},Il.prototype.readOnlyChanged=function(e){this.div.contentEditable=String("nocursor"!=e)},Il.prototype.onContextMenu=function(){},Il.prototype.resetPosition=function(){},Il.prototype.needsContentAttribute=!0;var Ul=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new R,this.hasSelection=!1,this.composing=null};Ul.prototype.init=function(e){var t=this,r=this,n=this.cm;this.createField(e);var i=this.textarea;function o(e){if(!ot(n,e)){if(n.somethingSelected())Nl({lineWise:!1,text:n.getSelections()});else{if(!n.options.lineWiseCopyCut)return;var t=Wl(n);Nl({lineWise:!0,text:t.text}),"cut"==e.type?n.setSelections(t.ranges,null,V):(r.prevInput="",i.value=t.text.join("\n"),P(i))}"cut"==e.type&&(n.state.cutIncoming=!0)}}e.wrapper.insertBefore(this.wrapper,e.wrapper.firstChild),g&&(i.style.width="0px"),tt(i,"input",function(){l&&s>=9&&t.hasSelection&&(t.hasSelection=null),r.poll()}),tt(i,"paste",function(e){ot(n,e)||Al(e,n)||(n.state.pasteIncoming=!0,r.fastPoll())}),tt(i,"cut",o),tt(i,"copy",o),tt(e.scroller,"paste",function(t){Cr(e,t)||ot(n,t)||(n.state.pasteIncoming=!0,r.focus())}),tt(e.lineSpace,"selectstart",function(t){Cr(e,t)||ut(t)}),tt(i,"compositionstart",function(){var e=n.getCursor("from");r.composing&&r.composing.range.clear(),r.composing={start:e,range:n.markText(e,n.getCursor("to"),{className:"CodeMirror-composing"})}}),tt(i,"compositionend",function(){r.composing&&(r.poll(),r.composing.range.clear(),r.composing=null)})},Ul.prototype.createField=function(e){this.wrapper=Fl(),this.textarea=this.wrapper.firstChild},Ul.prototype.prepareSelection=function(){var e=this.cm,t=e.display,r=e.doc,n=hn(e);if(e.options.moveInputWithCursor){var i=Yr(e,r.sel.primary().head,"div"),o=t.wrapper.getBoundingClientRect(),l=t.lineDiv.getBoundingClientRect();n.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,i.top+l.top-o.top)),n.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,i.left+l.left-o.left))}return n},Ul.prototype.showSelection=function(e){var t=this.cm.display;N(t.cursorDiv,e.cursors),N(t.selectionDiv,e.selection),null!=e.teTop&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},Ul.prototype.reset=function(e){if(!this.contextMenuPending&&!this.composing){var t=this.cm;if(t.somethingSelected()){this.prevInput="";var r=t.getSelection();this.textarea.value=r,t.state.focused&&P(this.textarea),l&&s>=9&&(this.hasSelection=r)}else e||(this.prevInput=this.textarea.value="",l&&s>=9&&(this.hasSelection=null))}},Ul.prototype.getField=function(){return this.textarea},Ul.prototype.supportsTouch=function(){return!1},Ul.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!m||W()!=this.textarea))try{this.textarea.focus()}catch(e){}},Ul.prototype.blur=function(){this.textarea.blur()},Ul.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Ul.prototype.receivedFocus=function(){this.slowPoll()},Ul.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){e.poll(),e.cm.state.focused&&e.slowPoll()})},Ul.prototype.fastPoll=function(){var e=!1,t=this;t.pollingFast=!0,t.polling.set(20,function r(){t.poll()||e?(t.pollingFast=!1,t.slowPoll()):(e=!0,t.polling.set(60,r))})},Ul.prototype.poll=function(){var e=this,t=this.cm,r=this.textarea,n=this.prevInput;if(this.contextMenuPending||!t.state.focused||Ct(r)&&!n&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var i=r.value;if(i==n&&!t.somethingSelected())return!1;if(l&&s>=9&&this.hasSelection===i||y&&/[\uf700-\uf7ff]/.test(i))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var o=i.charCodeAt(0);if(8203!=o||n||(n=""),8666==o)return this.reset(),this.cm.execCommand("undo")}for(var a=0,u=Math.min(n.length,i.length);a1e3||i.indexOf("\n")>-1?r.value=e.prevInput="":e.prevInput=i,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},Ul.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Ul.prototype.onKeyPress=function(){l&&s>=9&&(this.hasSelection=null),this.fastPoll()},Ul.prototype.onContextMenu=function(e){var t=this,r=t.cm,n=r.display,i=t.textarea,o=an(r,e),u=n.scroller.scrollTop;if(o&&!h){r.options.resetSelectionOnContextMenu&&-1==r.doc.sel.contains(o)&&$n(r,$i)(r.doc,xi(o),V);var c=i.style.cssText,f=t.wrapper.style.cssText;t.wrapper.style.cssText="position: absolute";var d,p=t.wrapper.getBoundingClientRect();if(i.style.cssText="position: absolute; width: 30px; height: 30px;\n top: "+(e.clientY-p.top-5)+"px; left: "+(e.clientX-p.left-5)+"px;\n z-index: 1000; background: "+(l?"rgba(255, 255, 255, .05)":"transparent")+";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);",a&&(d=window.scrollY),n.input.focus(),a&&window.scrollTo(null,d),n.input.reset(),r.somethingSelected()||(i.value=t.prevInput=" "),t.contextMenuPending=!0,n.selForContextMenu=r.doc.sel,clearTimeout(n.detectingSelectAll),l&&s>=9&&v(),S){ft(e);var g=function(){nt(window,"mouseup",g),setTimeout(m,20)};tt(window,"mouseup",g)}else setTimeout(m,50)}function v(){if(null!=i.selectionStart){var e=r.somethingSelected(),o=""+(e?i.value:"");i.value="⇚",i.value=o,t.prevInput=e?"":"",i.selectionStart=1,i.selectionEnd=o.length,n.selForContextMenu=r.doc.sel}}function m(){if(t.contextMenuPending=!1,t.wrapper.style.cssText=f,i.style.cssText=c,l&&s<9&&n.scrollbars.setScrollTop(n.scroller.scrollTop=u),null!=i.selectionStart){(!l||l&&s<9)&&v();var e=0,o=function(){n.selForContextMenu==r.doc.sel&&0==i.selectionStart&&i.selectionEnd>0&&""==t.prevInput?$n(r,no)(r):e++<10?n.detectingSelectAll=setTimeout(o,500):(n.selForContextMenu=null,n.input.reset())};n.detectingSelectAll=setTimeout(o,200)}}},Ul.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled="nocursor"==e},Ul.prototype.setUneditable=function(){},Ul.prototype.needsContentAttribute=!1,function(e){var t=e.optionHandlers;function r(r,n,i,o){e.defaults[r]=n,i&&(t[r]=o?function(e,t,r){r!=yl&&i(e,t,r)}:i)}e.defineOption=r,e.Init=yl,r("value","",function(e,t){return e.setValue(t)},!0),r("mode",null,function(e,t){e.doc.modeOption=t,Ti(e)},!0),r("indentUnit",2,Ti,!0),r("indentWithTabs",!1),r("smartIndent",!0),r("tabSize",4,function(e){Mi(e),Br(e),Qn(e)},!0),r("lineSeparator",null,function(e,t){if(e.doc.lineSep=t,t){var r=[],n=e.doc.first;e.doc.iter(function(e){for(var i=0;;){var o=e.text.indexOf(t,i);if(-1==o)break;i=o+t.length,r.push(ve(n,o))}n++});for(var i=r.length-1;i>=0;i--)co(e.doc,t,r[i],ve(r[i].line,r[i].ch+t.length))}}),r("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200f\u2028\u2029\ufeff]/g,function(e,t,r){e.state.specialChars=new RegExp(t.source+(t.test("\t")?"":"|\t"),"g"),r!=yl&&e.refresh()}),r("specialCharPlaceholder",Jt,function(e){return e.refresh()},!0),r("electricChars",!0),r("inputStyle",m?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),r("spellcheck",!1,function(e,t){return e.getInputField().spellcheck=t},!0),r("rtlMoveVisually",!w),r("wholeLineUpdateBefore",!0),r("theme","default",function(e){ml(e),xl(e)},!0),r("keyMap","default",function(e,t,r){var n=Xo(t),i=r!=yl&&Xo(r);i&&i.detach&&i.detach(e,n),n.attach&&n.attach(e,i||null)}),r("extraKeys",null),r("configureMouse",null),r("lineWrapping",!1,Sl,!0),r("gutters",[],function(e){fi(e.options),xl(e)},!0),r("fixedGutter",!0,function(e,t){e.display.gutters.style.left=t?on(e.display)+"px":"0",e.refresh()},!0),r("coverGutterNextToScrollbar",!1,function(e){return In(e)},!0),r("scrollbarStyle","native",function(e){Bn(e),In(e),e.display.scrollbars.setScrollTop(e.doc.scrollTop),e.display.scrollbars.setScrollLeft(e.doc.scrollLeft)},!0),r("lineNumbers",!1,function(e){fi(e.options),xl(e)},!0),r("firstLineNumber",1,xl,!0),r("lineNumberFormatter",function(e){return e},xl,!0),r("showCursorWhenSelecting",!1,cn,!0),r("resetSelectionOnContextMenu",!0),r("lineWiseCopyCut",!0),r("pasteLinesPerSelection",!0),r("readOnly",!1,function(e,t){"nocursor"==t&&(bn(e),e.display.input.blur()),e.display.input.readOnlyChanged(t)}),r("disableInput",!1,function(e,t){t||e.display.input.reset()},!0),r("dragDrop",!0,Cl),r("allowDropFileTypes",null),r("cursorBlinkRate",530),r("cursorScrollMargin",0),r("cursorHeight",1,cn,!0),r("singleCursorHeightPerLine",!0,cn,!0),r("workTime",100),r("workDelay",100),r("flattenSpans",!0,Mi,!0),r("addModeClass",!1,Mi,!0),r("pollInterval",100),r("undoDepth",200,function(e,t){return e.doc.history.undoDepth=t}),r("historyEventDelay",1250),r("viewportMargin",10,function(e){return e.refresh()},!0),r("maxHighlightLength",1e4,Mi,!0),r("moveInputWithCursor",!0,function(e,t){t||e.display.input.resetPosition()}),r("tabindex",null,function(e,t){return e.display.input.getField().tabIndex=t||""}),r("autofocus",null),r("direction","ltr",function(e,t){return e.doc.setDirection(t)},!0)}(Ll),function(e){var t=e.optionHandlers,r=e.helpers={};e.prototype={constructor:e,focus:function(){window.focus(),this.display.input.focus()},setOption:function(e,r){var n=this.options,i=n[e];n[e]==r&&"mode"!=e||(n[e]=r,t.hasOwnProperty(e)&&$n(this,t[e])(this,r,i),it(this,"optionChange",this,e))},getOption:function(e){return this.options[e]},getDoc:function(){return this.doc},addKeyMap:function(e,t){this.state.keyMaps[t?"push":"unshift"](Xo(e))},removeKeyMap:function(e){for(var t=this.state.keyMaps,r=0;rr&&(Tl(this,i.head.line,e,!0),r=i.head.line,n==this.doc.sel.primIndex&&Mn(this));else{var o=i.from(),l=i.to(),s=Math.max(r,o.line);r=Math.min(this.lastLine(),l.line-(l.ch?0:1))+1;for(var a=s;a0&&Xi(this.doc,n,new bi(o,u[n].to()),V)}}}),getTokenAt:function(e,t){return Kt(this,e,t)},getLineTokens:function(e,t){return Kt(this,ve(e),t,!0)},getTokenTypeAt:function(e){e=Se(this.doc,e);var t,r=zt(this,ae(this.doc,e.line)),n=0,i=(r.length-1)/2,o=e.ch;if(0==o)t=r[2];else for(;;){var l=n+i>>1;if((l?r[2*l-1]:0)>=o)i=l;else{if(!(r[2*l+1]o&&(e=o,i=!0),n=ae(this.doc,e)}else n=e;return Kr(this,n,{top:0,left:0},t||"page",r||i).top+(i?this.doc.height-Ye(n):0)},defaultTextHeight:function(){return tn(this.display)},defaultCharWidth:function(){return rn(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(e,t,r,n,i){var o,l,s,a=this.display,u=(e=Yr(this,Se(this.doc,e))).bottom,c=e.left;if(t.style.position="absolute",t.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(t),a.sizer.appendChild(t),"over"==n)u=e.top;else if("above"==n||"near"==n){var h=Math.max(a.wrapper.clientHeight,this.doc.height),f=Math.max(a.sizer.clientWidth,a.lineSpace.clientWidth);("above"==n||e.bottom+t.offsetHeight>h)&&e.top>t.offsetHeight?u=e.top-t.offsetHeight:e.bottom+t.offsetHeight<=h&&(u=e.bottom),c+t.offsetWidth>f&&(c=f-t.offsetWidth)}t.style.top=u+"px",t.style.left=t.style.right="","right"==i?(c=a.sizer.clientWidth-t.offsetWidth,t.style.right="0px"):("left"==i?c=0:"middle"==i&&(c=(a.sizer.clientWidth-t.offsetWidth)/2),t.style.left=c+"px"),r&&(o=this,l={left:c,top:u,right:c+t.offsetWidth,bottom:u+t.offsetHeight},null!=(s=kn(o,l)).scrollTop&&Dn(o,s.scrollTop),null!=s.scrollLeft&&Hn(o,s.scrollLeft))},triggerOnKeyDown:qn(ll),triggerOnKeyPress:qn(al),triggerOnKeyUp:sl,triggerOnMouseDown:qn(fl),execCommand:function(e){if(Zo.hasOwnProperty(e))return Zo[e].call(null,this)},triggerElectric:qn(function(e){Dl(this,e)}),findPosH:function(e,t,r,n){var i=1;t<0&&(i=-1,t=-t);for(var o=Se(this.doc,e),l=0;l0&&l(t.charAt(r-1));)--r;for(;n.5)&&sn(this),it(this,"refresh",this)}),swapDoc:qn(function(e){var t=this.doc;return t.cm=null,Di(this,e),Br(this),this.display.input.reset(),Nn(this,e.scrollLeft,e.scrollTop),this.curOp.forceScroll=!0,ar(this,"swapDoc",this,t),t}),getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},at(e),e.registerHelper=function(t,n,i){r.hasOwnProperty(t)||(r[t]=e[t]={_global:[]}),r[t][n]=i},e.registerGlobalHelper=function(t,n,i,o){e.registerHelper(t,n,o),r[t]._global.push({pred:i,val:o})}}(Ll);var Vl,Kl="iter insert remove copy getEditor constructor".split(" ");for(var jl in Mo.prototype)Mo.prototype.hasOwnProperty(jl)&&B(Kl,jl)<0&&(Ll.prototype[jl]=function(e){return function(){return e.apply(this.doc,arguments)}}(Mo.prototype[jl]));return at(Mo),Ll.inputStyles={textarea:Ul,contenteditable:Il},Ll.defineMode=function(e){Ll.defaults.mode||"null"==e||(Ll.defaults.mode=e),function(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),kt[e]=t}.apply(this,arguments)},Ll.defineMIME=function(e,t){Tt[e]=t},Ll.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),Ll.defineMIME("text/plain","null"),Ll.defineExtension=function(e,t){Ll.prototype[e]=t},Ll.defineDocExtension=function(e,t){Mo.prototype[e]=t},Ll.fromTextArea=function(e,t){if((t=t?I(t):{}).value=e.value,!t.tabindex&&e.tabIndex&&(t.tabindex=e.tabIndex),!t.placeholder&&e.placeholder&&(t.placeholder=e.placeholder),null==t.autofocus){var r=W();t.autofocus=r==e||null!=e.getAttribute("autofocus")&&r==document.body}function n(){e.value=s.getValue()}var i;if(e.form&&(tt(e.form,"submit",n),!t.leaveSubmitMethodAlone)){var o=e.form;i=o.submit;try{var l=o.submit=function(){n(),o.submit=i,o.submit(),o.submit=l}}catch(e){}}t.finishInit=function(t){t.save=n,t.getTextArea=function(){return e},t.toTextArea=function(){t.toTextArea=isNaN,n(),e.parentNode.removeChild(t.getWrapperElement()),e.style.display="",e.form&&(nt(e.form,"submit",n),"function"==typeof e.form.submit&&(e.form.submit=i))}},e.style.display="none";var s=Ll(function(t){return e.parentNode.insertBefore(t,e.nextSibling)},t);return s},(Vl=Ll).off=nt,Vl.on=tt,Vl.wheelEventPixels=vi,Vl.Doc=Mo,Vl.splitLines=xt,Vl.countColumn=z,Vl.findColumn=X,Vl.isWordChar=ee,Vl.Pass=U,Vl.signal=it,Vl.Line=Yt,Vl.changeEnd=Ci,Vl.scrollbarModel=Rn,Vl.Pos=ve,Vl.cmpPos=me,Vl.modes=kt,Vl.mimeModes=Tt,Vl.resolveMode=Mt,Vl.getMode=Nt,Vl.modeExtensions=Ot,Vl.extendMode=At,Vl.copyState=Dt,Vl.startState=Ht,Vl.innerMode=Wt,Vl.commands=Zo,Vl.keyMap=Ro,Vl.keyName=jo,Vl.isModifierKey=Vo,Vl.lookupKey=Uo,Vl.normalizeKeyMap=Go,Vl.StringStream=Ft,Vl.SharedTextMarker=So,Vl.TextMarker=xo,Vl.LineWidget=yo,Vl.e_preventDefault=ut,Vl.e_stopPropagation=ct,Vl.e_stop=ft,Vl.addClass=H,Vl.contains=D,Vl.rmClass=T,Vl.keyNames=Po,Ll.version="5.39.2",Ll});
},{}],"mEzW":[function(require,module,exports) {
var define;
var e,t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};!function(n,r){"object"==("undefined"==typeof exports?"undefined":t(exports))&&"object"==("undefined"==typeof module?"undefined":t(module))?module.exports=r(require("codemirror")):"function"==typeof e&&e.amd?e(["codemirror"],r):"object"==("undefined"==typeof exports?"undefined":t(exports))?exports.VueCodemirror=r(require("codemirror")):n.VueCodemirror=r(n.codemirror)}(this,function(e){return function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};return t.m=e,t.c=n,t.i=function(e){return e},t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="/",t(t.s=2)}([function(t,n){t.exports=e},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),o=n.n(r),i=n(5),s=n(4)(o.a,i.a,!1,null,null,null);t.default=s.exports},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.install=t.codemirror=t.CodeMirror=void 0;var o=r(n(0)),i=r(n(1)),s=window.CodeMirror||o.default,c=function(e,t){t&&(t.options&&(i.default.props.globalOptions.default=function(){return t.options}),t.events&&(i.default.props.globalEvents.default=function(){return t.events})),e.component(i.default.name,i.default)},a={CodeMirror:s,codemirror:i.default,install:c};t.default=a,t.CodeMirror=s,t.codemirror=i.default,t.install=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e){return e&&e.__esModule?e:{default:e}}(n(0)),o=window.CodeMirror||r.default;"function"!=typeof Object.assign&&Object.defineProperty(Object,"assign",{value:function(e,t){if(null==e)throw new TypeError("Cannot convert undefined or null to object");for(var n=Object(e),r=1;r")):null:t.match("--")?n(m("comment","--\x3e")):t.match("DOCTYPE",!0,!0)?(t.eatWhile(/[\w\._\-]/),n(function t(e){return function(n,r){for(var o;null!=(o=n.next());){if("<"==o)return r.tokenize=t(e+1),r.tokenize(n,r);if(">"==o){if(1==e){r.tokenize=s;break}return r.tokenize=t(e-1),r.tokenize(n,r)}}return"meta"}}(1))):null:t.eat("?")?(t.eatWhile(/[\w\._\-]/),e.tokenize=m("meta","?>"),"meta"):(a=t.eat("/")?"closeTag":"openTag",e.tokenize=f,"tag bracket"):"&"==r?(t.eat("#")?t.eat("x")?t.eatWhile(/[a-fA-F\d]/)&&t.eat(";"):t.eatWhile(/[\d]/)&&t.eat(";"):t.eatWhile(/[\w\.\-:]/)&&t.eat(";"))?"atom":"error":(t.eatWhile(/[^&<]/),null)}function f(t,e){var n,r,o=t.next();if(">"==o||"/"==o&&t.eat(">"))return e.tokenize=s,a=">"==o?"endTag":"selfcloseTag","tag bracket";if("="==o)return a="equals",null;if("<"==o){e.tokenize=s,e.state=x,e.tagName=e.tagStart=null;var i=e.tokenize(t,e);return i?i+" tag error":"tag error"}return/[\'\"]/.test(o)?(e.tokenize=(n=o,(r=function(t,e){for(;!t.eol();)if(t.next()==n){e.tokenize=f;break}return"string"}).isInAttribute=!0,r),e.stringStartCol=t.column(),e.tokenize(t,e)):(t.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function m(t,e){return function(n,r){for(;!n.eol();){if(n.match(e)){r.tokenize=s;break}n.next()}return t}}function g(t,e,n){this.prev=t.context,this.tagName=e,this.indent=t.indented,this.startOfLine=n,(u.doNotIndent.hasOwnProperty(e)||t.context&&t.context.noIndent)&&(this.noIndent=!0)}function p(t){t.context&&(t.context=t.context.prev)}function h(t,e){for(var n;;){if(!t.context)return;if(n=t.context.tagName,!u.contextGrabbers.hasOwnProperty(n)||!u.contextGrabbers[n].hasOwnProperty(e))return;p(t)}}function x(t,e,n){return"openTag"==t?(n.tagStart=e.column(),b):"closeTag"==t?k:x}function b(t,e,n){return"word"==t?(n.tagName=e.current(),i="tag",T):u.allowMissingTagName&&"endTag"==t?(i="tag bracket",T(t,e,n)):(i="error",b)}function k(t,e,n){if("word"==t){var r=e.current();return n.context&&n.context.tagName!=r&&u.implicitlyClosed.hasOwnProperty(n.context.tagName)&&p(n),n.context&&n.context.tagName==r||!1===u.matchClosing?(i="tag",w):(i="tag error",v)}return u.allowMissingTagName&&"endTag"==t?(i="tag bracket",w(t,e,n)):(i="error",v)}function w(t,e,n){return"endTag"!=t?(i="error",w):(p(n),x)}function v(t,e,n){return i="error",w(t,0,n)}function T(t,e,n){if("word"==t)return i="attribute",y;if("endTag"==t||"selfcloseTag"==t){var r=n.tagName,o=n.tagStart;return n.tagName=n.tagStart=null,"selfcloseTag"==t||u.autoSelfClosers.hasOwnProperty(r)?h(n,r):(h(n,r),n.context=new g(n,r,o==n.indented)),x}return i="error",T}function y(t,e,n){return"equals"==t?N:(u.allowMissing||(i="error"),T(t,0,n))}function N(t,e,n){return"string"==t?z:"word"==t&&u.allowUnquoted?(i="string",T):(i="error",T(t,0,n))}function z(t,e,n){return"string"==t?z:T(t,0,n)}return s.isInText=!0,{startState:function(t){var e={tokenize:s,state:x,indented:t||0,tagName:null,tagStart:null,context:null};return null!=t&&(e.baseIndent=t),e},token:function(t,e){if(!e.tagName&&t.sol()&&(e.indented=t.indentation()),t.eatSpace())return null;a=null;var n=e.tokenize(t,e);return(n||a)&&"comment"!=n&&(i=null,e.state=e.state(a||n,t,e),i&&(n="error"==i?n+" error":i)),n},indent:function(e,n,r){var o=e.context;if(e.tokenize.isInAttribute)return e.tagStart==e.indented?e.stringStartCol+1:e.indented+l;if(o&&o.noIndent)return t.Pass;if(e.tokenize!=f&&e.tokenize!=s)return r?r.match(/^(\s*)/)[0].length:0;if(e.tagName)return!1!==u.multilineTagIndentPastTag?e.tagStart+e.tagName.length+2:e.tagStart+l*(u.multilineTagIndentFactor||1);if(u.alignCDATA&&/$/,blockCommentStart:"\x3c!--",blockCommentEnd:"--\x3e",configuration:u.htmlMode?"html":"xml",helperType:u.htmlMode?"html":"xml",skipAttribute:function(t){t.state==N&&(t.state=T)}}}),t.defineMIME("text/xml","xml"),t.defineMIME("application/xml","xml"),t.mimeModes.hasOwnProperty("text/html")||t.defineMIME("text/html",{name:"xml",htmlMode:!0})});
-},{"../../lib/codemirror":"kyCI"}],"3pNU":[function(require,module,exports) {
+},{"../../lib/codemirror":"mts4"}],"3pNU":[function(require,module,exports) {
var define;
var e;!function(t){"object"==typeof exports&&"object"==typeof module?t(require("../../lib/codemirror")):"function"==typeof e&&e.amd?e(["../../lib/codemirror"],t):t(CodeMirror)}(function(e){"use strict";e.defineMode("javascript",function(t,r){var n,a,i=t.indentUnit,o=r.statementIndent,c=r.jsonld,s=r.json||c,u=r.typescript,l=r.wordCharacters||/[\w$\xa1-\uffff]/,f=function(){function e(e){return{type:e,style:"keyword"}}var t=e("keyword a"),r=e("keyword b"),n=e("keyword c"),a=e("keyword d"),i=e("operator"),o={type:"atom",style:"atom"};return{if:e("if"),while:t,with:t,else:r,do:r,try:r,finally:r,return:a,break:a,continue:a,new:e("new"),delete:n,void:n,throw:n,debugger:e("debugger"),var:e("var"),const:e("var"),let:e("var"),function:e("function"),catch:e("catch"),for:e("for"),switch:e("switch"),case:e("case"),default:e("default"),in:i,typeof:i,instanceof:i,true:o,false:o,null:o,undefined:o,NaN:o,Infinity:o,this:e("this"),class:e("class"),super:e("atom"),yield:n,export:e("export"),import:e("import"),extends:n,await:n}}(),d=/[+\-*&%=<>!?|~^@]/,p=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;function m(e,t,r){return n=e,a=r,t}function v(e,t){var r,n=e.next();if('"'==n||"'"==n)return t.tokenize=(r=n,function(e,t){var n,a=!1;if(c&&"@"==e.peek()&&e.match(p))return t.tokenize=v,m("jsonld-keyword","meta");for(;null!=(n=e.next())&&(n!=r||a);)a=!a&&"\\"==n;return a||(t.tokenize=v),m("string","string")}),t.tokenize(e,t);if("."==n&&e.match(/^\d+(?:[eE][+\-]?\d+)?/))return m("number","number");if("."==n&&e.match(".."))return m("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(n))return m(n);if("="==n&&e.eat(">"))return m("=>","operator");if("0"==n&&e.match(/^(?:x[\da-f]+|o[0-7]+|b[01]+)n?/i))return m("number","number");if(/\d/.test(n))return e.match(/^\d*(?:n|(?:\.\d*)?(?:[eE][+\-]?\d+)?)?/),m("number","number");if("/"==n)return e.eat("*")?(t.tokenize=k,k(e,t)):e.eat("/")?(e.skipToEnd(),m("comment","comment")):Ke(e,t,1)?(function(e){for(var t,r=!1,n=!1;null!=(t=e.next());){if(!r){if("/"==t&&!n)return;"["==t?n=!0:n&&"]"==t&&(n=!1)}r=!r&&"\\"==t}}(e),e.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/),m("regexp","string-2")):(e.eat("="),m("operator","operator",e.current()));if("`"==n)return t.tokenize=y,y(e,t);if("#"==n)return e.skipToEnd(),m("error","error");if(d.test(n))return">"==n&&t.lexical&&">"==t.lexical.type||(e.eat("=")?"!"!=n&&"="!=n||e.eat("="):/[<>*+\-]/.test(n)&&(e.eat(n),">"==n&&e.eat(n))),m("operator","operator",e.current());if(l.test(n)){e.eatWhile(l);var a=e.current();if("."!=t.lastType){if(f.propertyIsEnumerable(a)){var i=f[a];return m(i.type,i.style,a)}if("async"==a&&e.match(/^(\s|\/\*.*?\*\/)*[\[\(\w]/,!1))return m("async","keyword",a)}return m("variable","variable",a)}}function k(e,t){for(var r,n=!1;r=e.next();){if("/"==r&&n){t.tokenize=v;break}n="*"==r}return m("comment","comment")}function y(e,t){for(var r,n=!1;null!=(r=e.next());){if(!n&&("`"==r||"$"==r&&e.eat("{"))){t.tokenize=v;break}n=!n&&"\\"==r}return m("quasi","string-2",e.current())}var w="([{}])";function b(e,t){t.fatArrowAt&&(t.fatArrowAt=null);var r=e.string.indexOf("=>",e.start);if(!(r<0)){if(u){var n=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(e.string.slice(e.start,r));n&&(r=n.index)}for(var a=0,i=!1,o=r-1;o>=0;--o){var c=e.string.charAt(o),s=w.indexOf(c);if(s>=0&&s<3){if(!a){++o;break}if(0==--a){"("==c&&(i=!0);break}}else if(s>=3&&s<6)++a;else if(l.test(c))i=!0;else{if(/["'\/]/.test(c))return;if(i&&!a){++o;break}}}i&&!a&&(t.fatArrowAt=o)}}var x={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,"jsonld-keyword":!0};function h(e,t,r,n,a,i){this.indented=e,this.column=t,this.type=r,this.prev=a,this.info=i,null!=n&&(this.align=n)}function g(e,t){for(var r=e.localVars;r;r=r.next)if(r.name==t)return!0;for(var n=e.context;n;n=n.prev)for(r=n.vars;r;r=r.next)if(r.name==t)return!0}var j={state:null,column:null,marked:null,cc:null};function M(){for(var e=arguments.length-1;e>=0;e--)j.cc.push(arguments[e])}function V(){return M.apply(null,arguments),!0}function A(e,t){for(var r=t;r;r=r.next)if(r.name==e)return!0;return!1}function E(e){var t=j.state;if(j.marked="def",t.context)if("var"==t.lexical.info&&t.context&&t.context.block){var n=function e(t,r){if(r){if(r.block){var n=e(t,r.prev);return n?n==r.prev?r:new I(n,r.vars,!0):null}return A(t,r.vars)?r:new I(r.prev,new T(t,r.vars),!1)}return null}(e,t.context);if(null!=n)return void(t.context=n)}else if(!A(e,t.localVars))return void(t.localVars=new T(e,t.localVars));r.globalVars&&!A(e,t.globalVars)&&(t.globalVars=new T(e,t.globalVars))}function z(e){return"public"==e||"private"==e||"protected"==e||"abstract"==e||"readonly"==e}function I(e,t,r){this.prev=e,this.vars=t,this.block=r}function T(e,t){this.name=e,this.next=t}var $=new T("this",new T("arguments",null));function C(){j.state.context=new I(j.state.context,j.state.localVars,!1),j.state.localVars=$}function q(){j.state.context=new I(j.state.context,j.state.localVars,!0),j.state.localVars=null}function O(){j.state.localVars=j.state.context.vars,j.state.context=j.state.context.prev}function P(e,t){var r=function(){var r=j.state,n=r.indented;if("stat"==r.lexical.type)n=r.lexical.indented;else for(var a=r.lexical;a&&")"==a.type&&a.align;a=a.prev)n=a.indented;r.lexical=new h(n,j.stream.column(),e,null,r.lexical,t)};return r.lex=!0,r}function S(){var e=j.state;e.lexical.prev&&(")"==e.lexical.type&&(e.indented=e.lexical.indented),e.lexical=e.lexical.prev)}function N(e){return function t(r){return r==e?V():";"==e||"}"==r||")"==r||"]"==r?M():V(t)}}function U(e,t){return"var"==e?V(P("vardef",t),we,N(";"),S):"keyword a"==e?V(P("form"),D,U,S):"keyword b"==e?V(P("form"),U,S):"keyword d"==e?j.stream.match(/^\s*$/,!1)?V():V(P("stat"),G,N(";"),S):"debugger"==e?V(N(";")):"{"==e?V(P("}"),q,oe,S,O):";"==e?V():"if"==e?("else"==j.state.lexical.info&&j.state.cc[j.state.cc.length-1]==S&&j.state.cc.pop()(),V(P("form"),D,U,S,je)):"function"==e?V(Ie):"for"==e?V(P("form"),Me,U,S):"class"==e||u&&"interface"==t?(j.marked="keyword",V(P("form"),Ce,S)):"variable"==e?u&&"declare"==t?(j.marked="keyword",V(U)):u&&("module"==t||"enum"==t||"type"==t)&&j.stream.match(/^\s*\w/,!1)?(j.marked="keyword","enum"==t?V(Ge):"type"==t?V(le,N("operator"),le,N(";")):V(P("form"),be,N("{"),P("}"),oe,S,S)):u&&"namespace"==t?(j.marked="keyword",V(P("form"),H,oe,S)):u&&"abstract"==t?(j.marked="keyword",V(U)):V(P("stat"),_):"switch"==e?V(P("form"),D,N("{"),P("}","switch"),q,oe,S,S,O):"case"==e?V(H,N(":")):"default"==e?V(N(":")):"catch"==e?V(P("form"),C,B,U,S,O):"export"==e?V(P("stat"),Se,S):"import"==e?V(P("stat"),Ue,S):"async"==e?V(U):"@"==t?V(H,U):M(P("stat"),H,N(";"),S)}function B(e){if("("==e)return V(Te,N(")"))}function H(e,t){return F(e,t,!1)}function W(e,t){return F(e,t,!0)}function D(e){return"("!=e?M():V(P(")"),H,N(")"),S)}function F(e,t,r){if(j.state.fatArrowAt==j.stream.start){var n=r?X:R;if("("==e)return V(C,P(")"),ae(Te,")"),S,N("=>"),n,O);if("variable"==e)return M(C,be,N("=>"),n,O)}var a=r?K:J;return x.hasOwnProperty(e)?V(a):"function"==e?V(Ie,a):"class"==e||u&&"interface"==t?(j.marked="keyword",V(P("form"),$e,S)):"keyword c"==e||"async"==e?V(r?W:H):"("==e?V(P(")"),G,N(")"),S,a):"operator"==e||"spread"==e?V(r?W:H):"["==e?V(P("]"),Fe,S,a):"{"==e?ie(te,"}",null,a):"quasi"==e?M(L,a):"new"==e?V(function(e){return function(t){return"."==t?V(e?Z:Y):"variable"==t&&u?V(ve,e?K:J):M(e?W:H)}}(r)):"import"==e?V(H):V()}function G(e){return e.match(/[;\}\)\],]/)?M():M(H)}function J(e,t){return","==e?V(H):K(e,t,!1)}function K(e,t,r){var n=0==r?J:K,a=0==r?H:W;return"=>"==e?V(C,r?X:R,O):"operator"==e?/\+\+|--/.test(t)||u&&"!"==t?V(n):u&&"<"==t&&j.stream.match(/^([^>]|<.*?>)*>\s*\(/,!1)?V(P(">"),ae(le,">"),S,n):"?"==t?V(H,N(":"),a):V(a):"quasi"==e?M(L,n):";"!=e?"("==e?ie(W,")","call",n):"."==e?V(ee,n):"["==e?V(P("]"),G,N("]"),S,n):u&&"as"==t?(j.marked="keyword",V(le,n)):"regexp"==e?(j.state.lastType=j.marked="operator",j.stream.backUp(j.stream.pos-j.stream.start-1),V(a)):void 0:void 0}function L(e,t){return"quasi"!=e?M():"${"!=t.slice(t.length-2)?V(L):V(H,Q)}function Q(e){if("}"==e)return j.marked="string-2",j.state.tokenize=y,V(L)}function R(e){return b(j.stream,j.state),M("{"==e?U:H)}function X(e){return b(j.stream,j.state),M("{"==e?U:W)}function Y(e,t){if("target"==t)return j.marked="keyword",V(J)}function Z(e,t){if("target"==t)return j.marked="keyword",V(K)}function _(e){return":"==e?V(S,U):M(J,N(";"),S)}function ee(e){if("variable"==e)return j.marked="property",V()}function te(e,t){return"async"==e?(j.marked="property",V(te)):"variable"==e||"keyword"==j.style?(j.marked="property","get"==t||"set"==t?V(re):(u&&j.state.fatArrowAt==j.stream.start&&(r=j.stream.match(/^\s*:\s*/,!1))&&(j.state.fatArrowAt=j.stream.pos+r[0].length),V(ne))):"number"==e||"string"==e?(j.marked=c?"property":j.style+" property",V(ne)):"jsonld-keyword"==e?V(ne):u&&z(t)?(j.marked="keyword",V(te)):"["==e?V(H,ce,N("]"),ne):"spread"==e?V(W,ne):"*"==t?(j.marked="keyword",V(te)):":"==e?M(ne):void 0;var r}function re(e){return"variable"!=e?M(ne):(j.marked="property",V(Ie))}function ne(e){return":"==e?V(W):"("==e?M(Ie):void 0}function ae(e,t,r){function n(a,i){if(r?r.indexOf(a)>-1:","==a){var o=j.state.lexical;return"call"==o.info&&(o.pos=(o.pos||0)+1),V(function(r,n){return r==t||n==t?M():M(e)},n)}return a==t||i==t?V():V(N(t))}return function(r,a){return r==t||a==t?V():M(e,n)}}function ie(e,t,r){for(var n=3;n"),le):void 0}function fe(e){if("=>"==e)return V(le)}function de(e,t){return"variable"==e||"keyword"==j.style?(j.marked="property",V(de)):"?"==t?V(de):":"==e?V(le):"["==e?V(H,ce,N("]"),de):void 0}function pe(e,t){return"variable"==e&&j.stream.match(/^\s*[?:]/,!1)||"?"==t?V(pe):":"==e?V(le):M(le)}function me(e,t){return"<"==t?V(P(">"),ae(le,">"),S,me):"|"==t||"."==e||"&"==t?V(le):"["==e?V(N("]"),me):"extends"==t||"implements"==t?(j.marked="keyword",V(le)):void 0}function ve(e,t){if("<"==t)return V(P(">"),ae(le,">"),S,me)}function ke(){return M(le,ye)}function ye(e,t){if("="==t)return V(le)}function we(e,t){return"enum"==t?(j.marked="keyword",V(Ge)):M(be,ce,he,ge)}function be(e,t){return u&&z(t)?(j.marked="keyword",V(be)):"variable"==e?(E(t),V()):"spread"==e?V(be):"["==e?ie(be,"]"):"{"==e?ie(xe,"}"):void 0}function xe(e,t){return"variable"!=e||j.stream.match(/^\s*:/,!1)?("variable"==e&&(j.marked="property"),"spread"==e?V(be):"}"==e?M():V(N(":"),be,he)):(E(t),V(he))}function he(e,t){if("="==t)return V(W)}function ge(e){if(","==e)return V(we)}function je(e,t){if("keyword b"==e&&"else"==t)return V(P("form","else"),U,S)}function Me(e,t){return"await"==t?V(Me):"("==e?V(P(")"),Ve,N(")"),S):void 0}function Ve(e){return"var"==e?V(we,N(";"),Ee):";"==e?V(Ee):"variable"==e?V(Ae):M(H,N(";"),Ee)}function Ae(e,t){return"in"==t||"of"==t?(j.marked="keyword",V(H)):V(J,Ee)}function Ee(e,t){return";"==e?V(ze):"in"==t||"of"==t?(j.marked="keyword",V(H)):M(H,N(";"),ze)}function ze(e){")"!=e&&V(H)}function Ie(e,t){return"*"==t?(j.marked="keyword",V(Ie)):"variable"==e?(E(t),V(Ie)):"("==e?V(C,P(")"),ae(Te,")"),S,se,U,O):u&&"<"==t?V(P(">"),ae(ke,">"),S,Ie):void 0}function Te(e,t){return"@"==t&&V(H,Te),"spread"==e?V(Te):u&&z(t)?(j.marked="keyword",V(Te)):M(be,ce,he)}function $e(e,t){return"variable"==e?Ce(e,t):qe(e,t)}function Ce(e,t){if("variable"==e)return E(t),V(qe)}function qe(e,t){return"<"==t?V(P(">"),ae(ke,">"),S,qe):"extends"==t||"implements"==t||u&&","==e?("implements"==t&&(j.marked="keyword"),V(u?le:H,qe)):"{"==e?V(P("}"),Oe,S):void 0}function Oe(e,t){return"async"==e||"variable"==e&&("static"==t||"get"==t||"set"==t||u&&z(t))&&j.stream.match(/^\s+[\w$\xa1-\uffff]/,!1)?(j.marked="keyword",V(Oe)):"variable"==e||"keyword"==j.style?(j.marked="property",V(u?Pe:Ie,Oe)):"["==e?V(H,ce,N("]"),u?Pe:Ie,Oe):"*"==t?(j.marked="keyword",V(Oe)):";"==e?V(Oe):"}"==e?V():"@"==t?V(H,Oe):void 0}function Pe(e,t){return"?"==t?V(Pe):":"==e?V(le,he):"="==t?V(W):M(Ie)}function Se(e,t){return"*"==t?(j.marked="keyword",V(De,N(";"))):"default"==t?(j.marked="keyword",V(H,N(";"))):"{"==e?V(ae(Ne,"}"),De,N(";")):M(U)}function Ne(e,t){return"as"==t?(j.marked="keyword",V(N("variable"))):"variable"==e?M(W,Ne):void 0}function Ue(e){return"string"==e?V():"("==e?M(H):M(Be,He,De)}function Be(e,t){return"{"==e?ie(Be,"}"):("variable"==e&&E(t),"*"==t&&(j.marked="keyword"),V(We))}function He(e){if(","==e)return V(Be,He)}function We(e,t){if("as"==t)return j.marked="keyword",V(Be)}function De(e,t){if("from"==t)return j.marked="keyword",V(H)}function Fe(e){return"]"==e?V():M(ae(W,"]"))}function Ge(){return M(P("form"),be,N("{"),P("}"),ae(Je,"}"),S,S)}function Je(){return M(be,he)}function Ke(e,t,r){return t.tokenize==v&&/^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(t.lastType)||"quasi"==t.lastType&&/\{\s*$/.test(e.string.slice(0,e.pos-(r||0)))}return O.lex=!0,S.lex=!0,{startState:function(e){var t={tokenize:v,lastType:"sof",cc:[],lexical:new h((e||0)-i,0,"block",!1),localVars:r.localVars,context:r.localVars&&new I(null,null,!1),indented:e||0};return r.globalVars&&"object"==typeof r.globalVars&&(t.globalVars=r.globalVars),t},token:function(e,t){if(e.sol()&&(t.lexical.hasOwnProperty("align")||(t.lexical.align=!1),t.indented=e.indentation(),b(e,t)),t.tokenize!=k&&e.eatSpace())return null;var r=t.tokenize(e,t);return"comment"==n?r:(t.lastType="operator"!=n||"++"!=a&&"--"!=a?n:"incdec",function(e,t,r,n,a){var i=e.cc;for(j.state=e,j.stream=a,j.marked=null,j.cc=i,j.style=t,e.lexical.hasOwnProperty("align")||(e.lexical.align=!0);;)if((i.length?i.pop():s?H:U)(r,n)){for(;i.length&&i[i.length-1].lex;)i.pop()();return j.marked?j.marked:"variable"==r&&g(e,n)?"variable-2":t}}(t,r,n,a,e))},indent:function(t,n){if(t.tokenize==k)return e.Pass;if(t.tokenize!=v)return 0;var a,c=n&&n.charAt(0),s=t.lexical;if(!/^\s*else\b/.test(n))for(var u=t.cc.length-1;u>=0;--u){var l=t.cc[u];if(l==S)s=s.prev;else if(l!=je)break}for(;("stat"==s.type||"form"==s.type)&&("}"==c||(a=t.cc[t.cc.length-1])&&(a==J||a==K)&&!/^[,\.=+\-*:?[\(]/.test(n));)s=s.prev;o&&")"==s.type&&"stat"==s.prev.type&&(s=s.prev);var f=s.type,p=c==f;return"vardef"==f?s.indented+("operator"==t.lastType||","==t.lastType?s.info.length+1:0):"form"==f&&"{"==c?s.indented:"form"==f?s.indented+i:"stat"==f?s.indented+(function(e,t){return"operator"==e.lastType||","==e.lastType||d.test(t.charAt(0))||/[,.]/.test(t.charAt(0))}(t,n)?o||i:0):"switch"!=s.info||p||0==r.doubleIndentSwitch?s.align?s.column+(p?0:1):s.indented+(p?0:i):s.indented+(/^(?:case|default)\b/.test(n)?i:2*i)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:s?null:"/*",blockCommentEnd:s?null:"*/",blockCommentContinue:s?null:" * ",lineComment:s?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:s?"json":"javascript",jsonldMode:c,jsonMode:s,expressionAllowed:Ke,skipExpression:function(e){var t=e.cc[e.cc.length-1];t!=H&&t!=W||e.cc.pop()}}}),e.registerHelper("wordChars","javascript",/[\w$]/),e.defineMIME("text/javascript","javascript"),e.defineMIME("text/ecmascript","javascript"),e.defineMIME("application/javascript","javascript"),e.defineMIME("application/x-javascript","javascript"),e.defineMIME("application/ecmascript","javascript"),e.defineMIME("application/json",{name:"javascript",json:!0}),e.defineMIME("application/x-json",{name:"javascript",json:!0}),e.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),e.defineMIME("text/typescript",{name:"javascript",typescript:!0}),e.defineMIME("application/typescript",{name:"javascript",typescript:!0})});
-},{"../../lib/codemirror":"kyCI"}],"n+lc":[function(require,module,exports) {
+},{"../../lib/codemirror":"mts4"}],"n+lc":[function(require,module,exports) {
var define;
var e;!function(t){"object"==typeof exports&&"object"==typeof module?t(require("../../lib/codemirror")):"function"==typeof e&&e.amd?e(["../../lib/codemirror"],t):t(CodeMirror)}(function(e){"use strict";e.defineMode("coffeescript",function(e,t){var n="error";function r(e){return new RegExp("^(("+e.join(")|(")+"))\\b")}var o=/^(?:->|=>|\+[+=]?|-[\-=]?|\*[\*=]?|\/[\/=]?|[=!]=|<[><]?=?|>>?=?|%=?|&=?|\|=?|\^=?|\~|!|\?|(or|and|\|\||&&|\?)=)/,i=/^(?:[()\[\]{},:`=;]|\.\.?\.?)/,c=/^[_A-Za-z$][_A-Za-z$0-9]*/,f=/^@[_A-Za-z$][_A-Za-z$0-9]*/,a=r(["and","or","not","is","isnt","in","instanceof","typeof"]),p=["for","while","loop","if","unless","else","switch","try","catch","finally","class"],s=r(p.concat(["break","by","continue","debugger","delete","do","in","of","new","return","then","this","@","throw","when","until","extends"]));p=r(p);var u=/^('{3}|\"{3}|['\"])/,l=/^(\/{3}|\/)/,d=r(["Infinity","NaN","undefined","null","true","false","on","off","yes","no"]);function m(e,t){if(e.sol()){null===t.scope.align&&(t.scope.align=!1);var r=t.scope.offset;if(e.eatSpace()){var p=e.indentation();return p>r&&"coffee"==t.scope.type?"indent":p0&&y(e,t)}if(e.eatSpace())return null;var m=e.peek();if(e.match("####"))return e.skipToEnd(),"comment";if(e.match("###"))return t.tokenize=v,t.tokenize(e,t);if("#"===m)return e.skipToEnd(),"comment";if(e.match(/^-?[0-9\.]/,!1)){var k=!1;if(e.match(/^-?\d*\.\d+(e[\+\-]?\d+)?/i)&&(k=!0),e.match(/^-?\d+\.\d*/)&&(k=!0),e.match(/^-?\.\d+/)&&(k=!0),k)return"."==e.peek()&&e.backUp(1),"number";var g=!1;if(e.match(/^-?0x[0-9a-f]+/i)&&(g=!0),e.match(/^-?[1-9]\d*(e[\+\-]?\d+)?/)&&(g=!0),e.match(/^-?0(?![\dx])/i)&&(g=!0),g)return"number"}if(e.match(u))return t.tokenize=h(e.current(),!1,"string"),t.tokenize(e,t);if(e.match(l)){if("/"!=e.current()||e.match(/^.*\//,!1))return t.tokenize=h(e.current(),!0,"string-2"),t.tokenize(e,t);e.backUp(1)}return e.match(o)||e.match(a)?"operator":e.match(i)?"punctuation":e.match(d)?"atom":e.match(f)||t.prop&&e.match(c)?"property":e.match(s)?"keyword":e.match(c)?"variable":(e.next(),n)}function h(e,r,o){return function(i,c){for(;!i.eol();)if(i.eatWhile(/[^'"\/\\]/),i.eat("\\")){if(i.next(),r&&i.eol())return o}else{if(i.match(e))return c.tokenize=m,o;i.eat(/['"\/]/)}return r&&(t.singleLineStringErrors?o=n:c.tokenize=m),o}}function v(e,t){for(;!e.eol();){if(e.eatWhile(/[^#]/),e.match("###")){t.tokenize=m;break}e.eatWhile("#")}return"comment"}function k(t,n,r){r=r||"coffee";for(var o=0,i=!1,c=null,f=n.scope;f;f=f.prev)if("coffee"===f.type||"}"==f.type){o=f.offset+e.indentUnit;break}"coffee"!==r?(i=null,c=t.column()+t.current().length):n.scope.align&&(n.scope.align=!1),n.scope={offset:o,type:r,prev:n.scope,align:i,alignOffset:c}}function y(e,t){if(t.scope.prev){if("coffee"===t.scope.type){for(var n=e.indentation(),r=!1,o=t.scope;o;o=o.prev)if(n===o.offset){r=!0;break}if(!r)return!0;for(;t.scope.prev&&t.scope.offset!==n;)t.scope=t.scope.prev;return!1}return t.scope=t.scope.prev,!1}}return{startState:function(e){return{tokenize:m,scope:{offset:e||0,type:"coffee",prev:null,align:!1},prop:!1,dedent:0}},token:function(e,t){var r=null===t.scope.align&&t.scope;r&&e.sol()&&(r.align=!1);var o=function(e,t){var r=t.tokenize(e,t),o=e.current();"return"===o&&(t.dedent=!0),(("->"===o||"=>"===o)&&e.eol()||"indent"===r)&&k(e,t);var i="[({".indexOf(o);if(-1!==i&&k(e,t,"])}".slice(i,i+1)),p.exec(o)&&k(e,t),"then"==o&&y(e,t),"dedent"===r&&y(e,t))return n;if(-1!==(i="])}".indexOf(o))){for(;"coffee"==t.scope.type&&t.scope.prev;)t.scope=t.scope.prev;t.scope.type==o&&(t.scope=t.scope.prev)}return t.dedent&&e.eol()&&("coffee"==t.scope.type&&t.scope.prev&&(t.scope=t.scope.prev),t.dedent=!1),r}(e,t);return o&&"comment"!=o&&(r&&(r.align=!0),t.prop="punctuation"==o&&"."==e.current()),o},indent:function(e,t){if(e.tokenize!=m)return 0;var n=e.scope,r=t&&"])}".indexOf(t.charAt(0))>-1;if(r)for(;"coffee"==n.type&&n.prev;)n=n.prev;var o=r&&n.type===t.charAt(0);return n.align?n.alignOffset-(o?1:0):(o?n.prev:n).offset},lineComment:"#",fold:"indent"}}),e.defineMIME("application/vnd.coffeescript","coffeescript"),e.defineMIME("text/x-coffeescript","coffeescript"),e.defineMIME("text/coffeescript","coffeescript")});
-},{"../../lib/codemirror":"kyCI"}],"4slD":[function(require,module,exports) {
+},{"../../lib/codemirror":"mts4"}],"4slD":[function(require,module,exports) {
var define;
var e;!function(t){"object"==typeof exports&&"object"==typeof module?t(require("../../lib/codemirror")):"function"==typeof e&&e.amd?e(["../../lib/codemirror"],t):t(CodeMirror)}(function(e){"use strict";function t(e){for(var t={},r=0;r0;a--)r.context=r.context.prev;return K(e,t,r)}function B(e){var t=e.current().toLowerCase();i=f.hasOwnProperty(t)?"atom":b.hasOwnProperty(t)?"keyword":"variable"}var T={top:function(e,t,r){if("{"==e)return q(r,t,"block");if("}"==e&&r.context.prev)return P(r);if(k&&/@component/i.test(e))return q(r,t,"atComponentBlock");if(/^@(-moz-)?document$/i.test(e))return q(r,t,"documentTypes");if(/^@(media|supports|(-moz-)?document|import)$/i.test(e))return q(r,t,"atBlock");if(/^@(font-face|counter-style)/i.test(e))return r.stateArg=e,"restricted_atBlock_before";if(/^@(-(moz|ms|o|webkit)-)?keyframes$/i.test(e))return"keyframes";if(e&&"@"==e.charAt(0))return q(r,t,"at");if("hash"==e)i="builtin";else if("word"==e)i="tag";else{if("variable-definition"==e)return"maybeprop";if("interpolation"==e)return q(r,t,"interpolation");if(":"==e)return"pseudo";if(y&&"("==e)return q(r,t,"parens")}return r.context.type},block:function(e,t,r){if("word"==e){var o=t.current().toLowerCase();return u.hasOwnProperty(o)?(i="property","maybeprop"):m.hasOwnProperty(o)?(i="string-2","maybeprop"):y?(i=t.match(/^\s*:(?:\s|$)/,!1)?"property":"tag","block"):(i+=" error","maybeprop")}return"meta"==e?"block":y||"hash"!=e&&"qualifier"!=e?T.top(e,t,r):(i="error","block")},maybeprop:function(e,t,r){return":"==e?q(r,t,"prop"):K(e,t,r)},prop:function(e,t,r){if(";"==e)return P(r);if("{"==e&&y)return q(r,t,"propBlock");if("}"==e||"{"==e)return C(e,t,r);if("("==e)return q(r,t,"parens");if("hash"!=e||/^#([0-9a-fA-f]{3,4}|[0-9a-fA-f]{6}|[0-9a-fA-f]{8})$/.test(t.current())){if("word"==e)B(t);else if("interpolation"==e)return q(r,t,"interpolation")}else i+=" error";return"prop"},propBlock:function(e,t,r){return"}"==e?P(r):"word"==e?(i="property","maybeprop"):r.context.type},parens:function(e,t,r){return"{"==e||"}"==e?C(e,t,r):")"==e?P(r):"("==e?q(r,t,"parens"):"interpolation"==e?q(r,t,"interpolation"):("word"==e&&B(t),"parens")},pseudo:function(e,t,r){return"meta"==e?"pseudo":"word"==e?(i="variable-3",r.context.type):K(e,t,r)},documentTypes:function(e,t,r){return"word"==e&&s.hasOwnProperty(t.current())?(i="tag",r.context.type):T.atBlock(e,t,r)},atBlock:function(e,t,r){if("("==e)return q(r,t,"atBlock_parens");if("}"==e||";"==e)return C(e,t,r);if("{"==e)return P(r)&&q(r,t,y?"block":"top");if("interpolation"==e)return q(r,t,"interpolation");if("word"==e){var o=t.current().toLowerCase();i="only"==o||"not"==o||"and"==o||"or"==o?"keyword":c.hasOwnProperty(o)?"attribute":d.hasOwnProperty(o)?"property":p.hasOwnProperty(o)?"keyword":u.hasOwnProperty(o)?"property":m.hasOwnProperty(o)?"string-2":f.hasOwnProperty(o)?"atom":b.hasOwnProperty(o)?"keyword":"error"}return r.context.type},atComponentBlock:function(e,t,r){return"}"==e?C(e,t,r):"{"==e?P(r)&&q(r,t,y?"block":"top",!1):("word"==e&&(i="error"),r.context.type)},atBlock_parens:function(e,t,r){return")"==e?P(r):"{"==e||"}"==e?C(e,t,r,2):T.atBlock(e,t,r)},restricted_atBlock_before:function(e,t,r){return"{"==e?q(r,t,"restricted_atBlock"):"word"==e&&"@counter-style"==r.stateArg?(i="variable","restricted_atBlock_before"):K(e,t,r)},restricted_atBlock:function(e,t,r){return"}"==e?(r.stateArg=null,P(r)):"word"==e?(i="@font-face"==r.stateArg&&!h.hasOwnProperty(t.current().toLowerCase())||"@counter-style"==r.stateArg&&!g.hasOwnProperty(t.current().toLowerCase())?"error":"property","maybeprop"):"restricted_atBlock"},keyframes:function(e,t,r){return"word"==e?(i="variable","keyframes"):"{"==e?q(r,t,"top"):K(e,t,r)},at:function(e,t,r){return";"==e?P(r):"{"==e||"}"==e?C(e,t,r):("word"==e?i="tag":"hash"==e&&(i="builtin"),"at")},interpolation:function(e,t,r){return"}"==e?P(r):"{"==e||";"==e?C(e,t,r):("word"==e?i="variable":"variable"!=e&&"("!=e&&")"!=e&&(i="error"),"interpolation")}};return{startState:function(e){return{tokenize:null,state:o?"block":"top",stateArg:null,context:new j(o?"block":"top",e||0,null)}},token:function(e,t){if(!t.tokenize&&e.eatSpace())return null;var r=(t.tokenize||function(e,t){var r=e.next();if(l[r]){var o=l[r](e,t);if(!1!==o)return o}return"@"==r?(e.eatWhile(/[\w\\\-]/),v("def",e.current())):"="==r||("~"==r||"|"==r)&&e.eat("=")?v(null,"compare"):'"'==r||"'"==r?(t.tokenize=x(r),t.tokenize(e,t)):"#"==r?(e.eatWhile(/[\w\\\-]/),v("atom","hash")):"!"==r?(e.match(/^\s*\w*/),v("keyword","important")):/\d/.test(r)||"."==r&&e.eat(/\d/)?(e.eatWhile(/[\w.%]/),v("number","unit")):"-"!==r?/[,+>*\/]/.test(r)?v(null,"select-op"):"."==r&&e.match(/^-?[_a-z][_a-z0-9-]*/i)?v("qualifier","qualifier"):/[:;{}\[\]\(\)]/.test(r)?v(null,r):("u"==r||"U"==r)&&e.match(/rl(-prefix)?\(/i)||("d"==r||"D"==r)&&e.match("omain(",!0,!0)||("r"==r||"R"==r)&&e.match("egexp(",!0,!0)?(e.backUp(1),t.tokenize=z,v("property","word")):/[\w\\\-]/.test(r)?(e.eatWhile(/[\w\\\-]/),v("property","word")):v(null,null):/[\d.]/.test(e.peek())?(e.eatWhile(/[\w.%]/),v("number","unit")):e.match(/^-[\w\\\-]+/)?(e.eatWhile(/[\w\\\-]/),e.match(/^\s*:/,!1)?v("variable-2","variable-definition"):v("variable-2","variable")):e.match(/^\w+-/)?v("meta","meta"):void 0})(e,t);return r&&"object"==typeof r&&(a=r[1],r=r[0]),i=r,"comment"!=a&&(t.state=T[t.state](a,e,t)),i},indent:function(e,t){var r=e.context,o=t&&t.charAt(0),a=r.indent;return"prop"!=r.type||"}"!=o&&")"!=o||(r=r.prev),r.prev&&("}"!=o||"block"!=r.type&&"top"!=r.type&&"interpolation"!=r.type&&"restricted_atBlock"!=r.type?(")"!=o||"parens"!=r.type&&"atBlock_parens"!=r.type)&&("{"!=o||"at"!=r.type&&"atBlock"!=r.type)||(a=Math.max(0,r.indent-n)):a=(r=r.prev).indent),a},electricChars:"}",blockCommentStart:"/*",blockCommentEnd:"*/",blockCommentContinue:" * ",lineComment:w,fold:"brace"}});var r=["domain","regexp","url","url-prefix"],o=t(r),a=["all","aural","braille","handheld","print","projection","screen","tty","tv","embossed"],i=t(a),n=["width","min-width","max-width","height","min-height","max-height","device-width","min-device-width","max-device-width","device-height","min-device-height","max-device-height","aspect-ratio","min-aspect-ratio","max-aspect-ratio","device-aspect-ratio","min-device-aspect-ratio","max-device-aspect-ratio","color","min-color","max-color","color-index","min-color-index","max-color-index","monochrome","min-monochrome","max-monochrome","resolution","min-resolution","max-resolution","scan","grid","orientation","device-pixel-ratio","min-device-pixel-ratio","max-device-pixel-ratio","pointer","any-pointer","hover","any-hover"],l=t(n),s=["landscape","portrait","none","coarse","fine","on-demand","hover","interlace","progressive"],c=t(s),d=["align-content","align-items","align-self","alignment-adjust","alignment-baseline","anchor-point","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","appearance","azimuth","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-repeat","background-size","baseline-shift","binding","bleed","bookmark-label","bookmark-level","bookmark-state","bookmark-target","border","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","color","color-profile","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","content","counter-increment","counter-reset","crop","cue","cue-after","cue-before","cursor","direction","display","dominant-baseline","drop-initial-after-adjust","drop-initial-after-align","drop-initial-before-adjust","drop-initial-before-align","drop-initial-size","drop-initial-value","elevation","empty-cells","fit","fit-position","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","float-offset","flow-from","flow-into","font","font-feature-settings","font-family","font-kerning","font-language-override","font-size","font-size-adjust","font-stretch","font-style","font-synthesis","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-ligatures","font-variant-numeric","font-variant-position","font-weight","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-gap","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-gap","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphens","icon","image-orientation","image-rendering","image-resolution","inline-box-align","justify-content","justify-items","justify-self","left","letter-spacing","line-break","line-height","line-stacking","line-stacking-ruby","line-stacking-shift","line-stacking-strategy","list-style","list-style-image","list-style-position","list-style-type","margin","margin-bottom","margin-left","margin-right","margin-top","marks","marquee-direction","marquee-loop","marquee-play-count","marquee-speed","marquee-style","max-height","max-width","min-height","min-width","move-to","nav-down","nav-index","nav-left","nav-right","nav-up","object-fit","object-position","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-style","overflow-wrap","overflow-x","overflow-y","padding","padding-bottom","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","page-policy","pause","pause-after","pause-before","perspective","perspective-origin","pitch","pitch-range","place-content","place-items","place-self","play-during","position","presentation-level","punctuation-trim","quotes","region-break-after","region-break-before","region-break-inside","region-fragment","rendering-intent","resize","rest","rest-after","rest-before","richness","right","rotation","rotation-point","ruby-align","ruby-overhang","ruby-position","ruby-span","shape-image-threshold","shape-inside","shape-margin","shape-outside","size","speak","speak-as","speak-header","speak-numeral","speak-punctuation","speech-rate","stress","string-set","tab-size","table-layout","target","target-name","target-new","target-position","text-align","text-align-last","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-style","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-height","text-indent","text-justify","text-outline","text-overflow","text-shadow","text-size-adjust","text-space-collapse","text-transform","text-underline-position","text-wrap","top","transform","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","unicode-bidi","user-select","vertical-align","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","volume","white-space","widows","width","will-change","word-break","word-spacing","word-wrap","z-index","clip-path","clip-rule","mask","enable-background","filter","flood-color","flood-opacity","lighting-color","stop-color","stop-opacity","pointer-events","color-interpolation","color-interpolation-filters","color-rendering","fill","fill-opacity","fill-rule","image-rendering","marker","marker-end","marker-mid","marker-start","shape-rendering","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-rendering","baseline-shift","dominant-baseline","glyph-orientation-horizontal","glyph-orientation-vertical","text-anchor","writing-mode"],p=t(d),u=["scrollbar-arrow-color","scrollbar-base-color","scrollbar-dark-shadow-color","scrollbar-face-color","scrollbar-highlight-color","scrollbar-shadow-color","scrollbar-3d-light-color","scrollbar-track-color","shape-inside","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","zoom"],m=t(u),h=t(["font-family","src","unicode-range","font-variant","font-feature-settings","font-stretch","font-weight","font-style"]),g=t(["additive-symbols","fallback","negative","pad","prefix","range","speak-as","suffix","symbols","system"]),b=["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"],f=t(b),y=["above","absolute","activeborder","additive","activecaption","afar","after-white-space","ahead","alias","all","all-scroll","alphabetic","alternate","always","amharic","amharic-abegede","antialiased","appworkspace","arabic-indic","armenian","asterisks","attr","auto","auto-flow","avoid","avoid-column","avoid-page","avoid-region","background","backwards","baseline","below","bidi-override","binary","bengali","blink","block","block-axis","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","bullets","button","button-bevel","buttonface","buttonhighlight","buttonshadow","buttontext","calc","cambodian","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-decimal","cjk-earthly-branch","cjk-heavenly-stem","cjk-ideographic","clear","clip","close-quote","col-resize","collapse","color","color-burn","color-dodge","column","column-reverse","compact","condensed","contain","content","contents","content-box","context-menu","continuous","copy","counter","counters","cover","crop","cross","crosshair","currentcolor","cursive","cyclic","darken","dashed","decimal","decimal-leading-zero","default","default-button","dense","destination-atop","destination-in","destination-out","destination-over","devanagari","difference","disc","discard","disclosure-closed","disclosure-open","document","dot-dash","dot-dot-dash","dotted","double","down","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic","ethiopic-abegede","ethiopic-abegede-am-et","ethiopic-abegede-gez","ethiopic-abegede-ti-er","ethiopic-abegede-ti-et","ethiopic-halehame-aa-er","ethiopic-halehame-aa-et","ethiopic-halehame-am-et","ethiopic-halehame-gez","ethiopic-halehame-om-et","ethiopic-halehame-sid-et","ethiopic-halehame-so-et","ethiopic-halehame-ti-er","ethiopic-halehame-ti-et","ethiopic-halehame-tig","ethiopic-numeric","ew-resize","exclusion","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fixed","flat","flex","flex-end","flex-start","footnotes","forwards","from","geometricPrecision","georgian","graytext","grid","groove","gujarati","gurmukhi","hand","hangul","hangul-consonant","hard-light","hebrew","help","hidden","hide","higher","highlight","highlighttext","hiragana","hiragana-iroha","horizontal","hsl","hsla","hue","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-grid","inline-table","inset","inside","intrinsic","invert","italic","japanese-formal","japanese-informal","justify","kannada","katakana","katakana-iroha","keep-all","khmer","korean-hangul-formal","korean-hanja-formal","korean-hanja-informal","landscape","lao","large","larger","left","level","lighter","lighten","line-through","linear","linear-gradient","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-alpha","lower-armenian","lower-greek","lower-hexadecimal","lower-latin","lower-norwegian","lower-roman","lowercase","ltr","luminosity","malayalam","match","matrix","matrix3d","media-controls-background","media-current-time-display","media-fullscreen-button","media-mute-button","media-play-button","media-return-to-realtime-button","media-rewind-button","media-seek-back-button","media-seek-forward-button","media-slider","media-sliderthumb","media-time-remaining-display","media-volume-slider","media-volume-slider-container","media-volume-sliderthumb","medium","menu","menulist","menulist-button","menulist-text","menulist-textfield","menutext","message-box","middle","min-intrinsic","mix","mongolian","monospace","move","multiple","multiply","myanmar","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","numbers","numeric","nw-resize","nwse-resize","oblique","octal","opacity","open-quote","optimizeLegibility","optimizeSpeed","oriya","oromo","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","persian","perspective","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radial-gradient","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeating-linear-gradient","repeating-radial-gradient","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","rotate","rotate3d","rotateX","rotateY","rotateZ","round","row","row-resize","row-reverse","rtl","run-in","running","s-resize","sans-serif","saturation","scale","scale3d","scaleX","scaleY","scaleZ","screen","scroll","scrollbar","scroll-position","se-resize","searchfield","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","self-start","self-end","semi-condensed","semi-expanded","separate","serif","show","sidama","simp-chinese-formal","simp-chinese-informal","single","skew","skewX","skewY","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","soft-light","solid","somali","source-atop","source-in","source-out","source-over","space","space-around","space-between","space-evenly","spell-out","square","square-button","start","static","status-bar","stretch","stroke","sub","subpixel-antialiased","super","sw-resize","symbolic","symbols","system-ui","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","tamil","telugu","text","text-bottom","text-top","textarea","textfield","thai","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","tibetan","tigre","tigrinya-er","tigrinya-er-abegede","tigrinya-et","tigrinya-et-abegede","to","top","trad-chinese-formal","trad-chinese-informal","transform","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","unset","up","upper-alpha","upper-armenian","upper-greek","upper-hexadecimal","upper-latin","upper-norwegian","upper-roman","uppercase","urdu","url","var","vertical","vertical-text","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","words","wrap","wrap-reverse","x-large","x-small","xor","xx-large","xx-small"],w=t(y),k=r.concat(a).concat(n).concat(s).concat(d).concat(u).concat(b).concat(y);function v(e,t){for(var r,o=!1;null!=(r=e.next());){if(o&&"/"==r){t.tokenize=null;break}o="*"==r}return["comment","comment"]}e.registerHelper("hintWords","css",k),e.defineMIME("text/css",{documentTypes:o,mediaTypes:i,mediaFeatures:l,mediaValueKeywords:c,propertyKeywords:p,nonStandardPropertyKeywords:m,fontProperties:h,counterDescriptors:g,colorKeywords:f,valueKeywords:w,tokenHooks:{"/":function(e,t){return!!e.eat("*")&&(t.tokenize=v,v(e,t))}},name:"css"}),e.defineMIME("text/x-scss",{mediaTypes:i,mediaFeatures:l,mediaValueKeywords:c,propertyKeywords:p,nonStandardPropertyKeywords:m,colorKeywords:f,valueKeywords:w,fontProperties:h,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(e,t){return e.eat("/")?(e.skipToEnd(),["comment","comment"]):e.eat("*")?(t.tokenize=v,v(e,t)):["operator","operator"]},":":function(e){return!!e.match(/\s*\{/,!1)&&[null,null]},$:function(e){return e.match(/^[\w-]+/),e.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"]},"#":function(e){return!!e.eat("{")&&[null,"interpolation"]}},name:"css",helperType:"scss"}),e.defineMIME("text/x-less",{mediaTypes:i,mediaFeatures:l,mediaValueKeywords:c,propertyKeywords:p,nonStandardPropertyKeywords:m,colorKeywords:f,valueKeywords:w,fontProperties:h,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(e,t){return e.eat("/")?(e.skipToEnd(),["comment","comment"]):e.eat("*")?(t.tokenize=v,v(e,t)):["operator","operator"]},"@":function(e){return e.eat("{")?[null,"interpolation"]:!e.match(/^(charset|document|font-face|import|(-(moz|ms|o|webkit)-)?keyframes|media|namespace|page|supports)\b/i,!1)&&(e.eatWhile(/[\w\\\-]/),e.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"])},"&":function(){return["atom","atom"]}},name:"css",helperType:"less"}),e.defineMIME("text/x-gss",{documentTypes:o,mediaTypes:i,mediaFeatures:l,propertyKeywords:p,nonStandardPropertyKeywords:m,fontProperties:h,counterDescriptors:g,colorKeywords:f,valueKeywords:w,supportsAtComponent:!0,tokenHooks:{"/":function(e,t){return!!e.eat("*")&&(t.tokenize=v,v(e,t))}},name:"css",helperType:"gss"})});
-},{"../../lib/codemirror":"kyCI"}],"TqQL":[function(require,module,exports) {
+},{"../../lib/codemirror":"mts4"}],"TqQL":[function(require,module,exports) {
var define;
var e;!function(r){"object"==typeof exports&&"object"==typeof module?r(require("../../lib/codemirror"),require("../css/css")):"function"==typeof e&&e.amd?e(["../../lib/codemirror","../css/css"],r):r(CodeMirror)}(function(e){"use strict";e.defineMode("sass",function(r){var t=e.mimeModes["text/css"],n=t.propertyKeywords||{},o=t.colorKeywords||{},i=t.valueKeywords||{},a=t.fontProperties||{};var u,s=new RegExp("^"+["true","false","null","auto"].join("|")),f=new RegExp("^"+["\\(","\\)","=",">","<","==",">=","<=","\\+","-","\\!=","/","\\*","%","and","or","not",";","\\{","\\}",":"].join("|")),c=/^::?[a-zA-Z_][\w\-]*/;function p(e){return!e.peek()||e.match(/\s+$/,!1)}function l(e,r){var t=e.peek();return")"===t?(e.next(),r.tokenizer=x,"operator"):"("===t?(e.next(),e.eatSpace(),"operator"):"'"===t||'"'===t?(r.tokenizer=m(e.next()),"string"):(r.tokenizer=m(")",!1),"string")}function h(e,r){return function(t,n){return t.sol()&&t.indentation()<=e?(n.tokenizer=x,x(t,n)):(r&&t.skipTo("*/")?(t.next(),t.next(),n.tokenizer=x):t.skipToEnd(),"comment")}}function m(e,r){return null==r&&(r=!0),function t(n,o){var i=n.next(),a=n.peek(),u=n.string.charAt(n.pos-2);return"\\"!==i&&a===e||i===e&&"\\"!==u?(i!==e&&r&&n.next(),p(n)&&(o.cursorHalf=0),o.tokenizer=x,"string"):"#"===i&&"{"===a?(o.tokenizer=d(t),n.next(),"operator"):"string"}}function d(e){return function(r,t){return"}"===r.peek()?(r.next(),t.tokenizer=e,"operator"):x(r,t)}}function k(e){if(0==e.indentCount){e.indentCount++;var t=e.scopes[0].offset+r.indentUnit;e.scopes.unshift({offset:t})}}function w(e){1!=e.scopes.length&&e.scopes.shift()}function x(e,r){var t=e.peek();if(e.match("/*"))return r.tokenizer=h(e.indentation(),!0),r.tokenizer(e,r);if(e.match("//"))return r.tokenizer=h(e.indentation(),!1),r.tokenizer(e,r);if(e.match("#{"))return r.tokenizer=d(x),"operator";if('"'===t||"'"===t)return e.next(),r.tokenizer=m(t),"string";if(r.cursorHalf){if("#"===t&&(e.next(),e.match(/[0-9a-fA-F]{6}|[0-9a-fA-F]{3}/)))return p(e)&&(r.cursorHalf=0),"number";if(e.match(/^-?[0-9\.]+/))return p(e)&&(r.cursorHalf=0),"number";if(e.match(/^(px|em|in)\b/))return p(e)&&(r.cursorHalf=0),"unit";if(e.match(s))return p(e)&&(r.cursorHalf=0),"keyword";if(e.match(/^url/)&&"("===e.peek())return r.tokenizer=l,p(e)&&(r.cursorHalf=0),"atom";if("$"===t)return e.next(),e.eatWhile(/[\w-]/),p(e)&&(r.cursorHalf=0),"variable-2";if("!"===t)return e.next(),r.cursorHalf=0,e.match(/^[\w]+/)?"keyword":"operator";if(e.match(f))return p(e)&&(r.cursorHalf=0),"operator";if(e.eatWhile(/[\w-]/))return p(e)&&(r.cursorHalf=0),u=e.current().toLowerCase(),i.hasOwnProperty(u)?"atom":o.hasOwnProperty(u)?"keyword":n.hasOwnProperty(u)?(r.prevProp=e.current().toLowerCase(),"property"):"tag";if(p(e))return r.cursorHalf=0,null}else{if("-"===t&&e.match(/^-\w+-/))return"meta";if("."===t){if(e.next(),e.match(/^[\w-]+/))return k(r),"qualifier";if("#"===e.peek())return k(r),"tag"}if("#"===t){if(e.next(),e.match(/^[\w-]+/))return k(r),"builtin";if("#"===e.peek())return k(r),"tag"}if("$"===t)return e.next(),e.eatWhile(/[\w-]/),"variable-2";if(e.match(/^-?[0-9\.]+/))return"number";if(e.match(/^(px|em|in)\b/))return"unit";if(e.match(s))return"keyword";if(e.match(/^url/)&&"("===e.peek())return r.tokenizer=l,"atom";if("="===t&&e.match(/^=[\w-]+/))return k(r),"meta";if("+"===t&&e.match(/^\+[\w-]+/))return"variable-3";if("@"===t&&e.match(/@extend/)&&(e.match(/\s*[\w]/)||w(r)),e.match(/^@(else if|if|media|else|for|each|while|mixin|function)/))return k(r),"def";if("@"===t)return e.next(),e.eatWhile(/[\w-]/),"def";if(e.eatWhile(/[\w-]/)){if(e.match(/ *: *[\w-\+\$#!\("']/,!1)){u=e.current().toLowerCase();var y=r.prevProp+"-"+u;return n.hasOwnProperty(y)?"property":n.hasOwnProperty(u)?(r.prevProp=u,"property"):a.hasOwnProperty(u)?"property":"tag"}return e.match(/ *:/,!1)?(k(r),r.cursorHalf=1,r.prevProp=e.current().toLowerCase(),"property"):e.match(/ *,/,!1)?"tag":(k(r),"tag")}if(":"===t)return e.match(c)?"variable-3":(e.next(),r.cursorHalf=1,"operator")}return e.match(f)?"operator":(e.next(),null)}return{startState:function(){return{tokenizer:x,scopes:[{offset:0,type:"sass"}],indentCount:0,cursorHalf:0,definedVars:[],definedMixins:[]}},token:function(e,t){var n=function(e,t){e.sol()&&(t.indentCount=0);var n=t.tokenizer(e,t),o=e.current();if("@return"!==o&&"}"!==o||w(t),null!==n){for(var i=e.pos-o.length+r.indentUnit*t.indentCount,a=[],u=0;u]=?|\?:|\~)/,N=h(d),W=b(u),U=new RegExp(/^\-(moz|ms|o|webkit)-/i),A=b(m),M="",O={};y.length=0?i:w,e.context=new Y(r,t.indentation()+i,e.context),r}function F(e,t){var r=e.context.indent-w;return t=t||!1,e.context=e.context.prev,t&&(e.context.indent=r),e.context.type}function H(e,t,r,i){for(var a=i||1;a>0;a--)r.context=r.context.prev;return function(e,t,r){return O[r.context.type](e,t,r)}(e,t,r)}function I(e){return e.toLowerCase()in v}function T(e){return(e=e.toLowerCase())in z||e in _}function D(e){return e.toLowerCase()in W}function G(e){return e.toLowerCase().match(U)}function J(e){var t=e.toLowerCase(),r="variable-2";return I(e)?r="tag":D(e)?r="block-keyword":T(e)?r="property":t in j||t in A?r="atom":"return"==t||t in $?r="keyword":e.match(/^[A-Z]/)&&(r="string"),r}function K(e,t){return te(t)&&("{"==e||"]"==e||"hash"==e||"qualifier"==e)||"block-mixin"==e}function Q(e,t){return"{"==e&&t.match(/^\s*\$?[\w-]+/i,!1)}function V(e,t){return":"==e&&t.match(/^[a-z-]+/,!1)}function ee(e){return e.sol()||e.string.match(new RegExp("^\\s*"+e.current().replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")))}function te(e){return e.eol()||e.match(/^\s*$/,!1)}function re(e){var t=/^\s*[-_]*[a-z0-9]+[\w-]*/i,r="string"==typeof e?e.match(t):e.string.match(t);return r?r[0].replace(/^\s*/,""):""}return O.block=function(e,t,r){if("comment"==e&&ee(t)||","==e&&te(t)||"mixin"==e)return Z(r,t,"block",0);if(Q(e,t))return Z(r,t,"interpolation");if(te(t)&&"]"==e&&!/^\s*(\.|#|:|\[|\*|&)/.test(t.string)&&!I(re(t)))return Z(r,t,"block",0);if(K(e,t))return Z(r,t,"block");if("}"==e&&te(t))return Z(r,t,"block",0);if("variable-name"==e)return t.string.match(/^\s?\$[\w-\.\[\]\'\"]+$/)||D(re(t))?Z(r,t,"variableName"):Z(r,t,"variableName",0);if("="==e)return te(t)||D(re(t))?Z(r,t,"block"):Z(r,t,"block",0);if("*"==e&&(te(t)||t.match(/\s*(,|\.|#|\[|:|{)/,!1)))return k="tag",Z(r,t,"block");if(V(e,t))return Z(r,t,"pseudo");if(/@(font-face|media|supports|(-moz-)?document)/.test(e))return Z(r,t,te(t)?"block":"atBlock");if(/@(-(moz|ms|o|webkit)-)?keyframes$/.test(e))return Z(r,t,"keyframes");if(/@extends?/.test(e))return Z(r,t,"extend",0);if(e&&"@"==e.charAt(0))return t.indentation()>0&&T(t.current().slice(1))?(k="variable-2","block"):/(@import|@require|@charset)/.test(e)?Z(r,t,"block",0):Z(r,t,"block");if("reference"==e&&te(t))return Z(r,t,"block");if("("==e)return Z(r,t,"parens");if("vendor-prefixes"==e)return Z(r,t,"vendorPrefixes");if("word"==e){var i=t.current();if("property"==(k=J(i)))return ee(t)?Z(r,t,"block",0):(k="atom","block");if("tag"==k){if(/embed|menu|pre|progress|sub|table/.test(i)&&T(re(t)))return k="atom","block";if(t.string.match(new RegExp("\\[\\s*"+i+"|"+i+"\\s*\\]")))return k="atom","block";if(x.test(i)&&(ee(t)&&t.string.match(/=/)||!ee(t)&&!t.string.match(/^(\s*\.|#|\&|\[|\/|>|\*)/)&&!I(re(t))))return k="variable-2",D(re(t))?"block":Z(r,t,"block",0);if(te(t))return Z(r,t,"block")}if("block-keyword"==k)return k="keyword",t.current(/(if|unless)/)&&!ee(t)?"block":Z(r,t,"block");if("return"==i)return Z(r,t,"block",0);if("variable-2"==k&&t.string.match(/^\s?\$[\w-\.\[\]\'\"]+$/))return Z(r,t,"block")}return r.context.type},O.parens=function(e,t,r){if("("==e)return Z(r,t,"parens");if(")"==e)return"parens"==r.context.prev.type?F(r):t.string.match(/^[a-z][\w-]*\(/i)&&te(t)||D(re(t))||/(\.|#|:|\[|\*|&|>|~|\+|\/)/.test(re(t))||!t.string.match(/^-?[a-z][\w-\.\[\]\'\"]*\s*=/)&&I(re(t))?Z(r,t,"block"):t.string.match(/^[\$-]?[a-z][\w-\.\[\]\'\"]*\s*=/)||t.string.match(/^\s*(\(|\)|[0-9])/)||t.string.match(/^\s+[a-z][\w-]*\(/i)||t.string.match(/^\s+[\$-]?[a-z]/i)?Z(r,t,"block",0):te(t)?Z(r,t,"block"):Z(r,t,"block",0);if(e&&"@"==e.charAt(0)&&T(t.current().slice(1))&&(k="variable-2"),"word"==e){var i=t.current();"tag"==(k=J(i))&&x.test(i)&&(k="variable-2"),"property"!=k&&"to"!=i||(k="atom")}return"variable-name"==e?Z(r,t,"variableName"):V(e,t)?Z(r,t,"pseudo"):r.context.type},O.vendorPrefixes=function(e,t,r){return"word"==e?(k="property",Z(r,t,"block",0)):F(r)},O.pseudo=function(e,t,r){return T(re(t.string))?H(e,t,r):(t.match(/^[a-z-]+/),k="variable-3",te(t)?Z(r,t,"block"):F(r))},O.atBlock=function(e,t,r){if("("==e)return Z(r,t,"atBlock_parens");if(K(e,t))return Z(r,t,"block");if(Q(e,t))return Z(r,t,"interpolation");if("word"==e){var i=t.current().toLowerCase();if("tag"==(k=/^(only|not|and|or)$/.test(i)?"keyword":C.hasOwnProperty(i)?"tag":P.hasOwnProperty(i)?"attribute":L.hasOwnProperty(i)?"property":q.hasOwnProperty(i)?"string-2":J(t.current()))&&te(t))return Z(r,t,"block")}return"operator"==e&&/^(not|and|or)$/.test(t.current())&&(k="keyword"),r.context.type},O.atBlock_parens=function(e,t,r){if("{"==e||"}"==e)return r.context.type;if(")"==e)return te(t)?Z(r,t,"block"):Z(r,t,"atBlock");if("word"==e){var i=t.current().toLowerCase();return k=J(i),/^(max|min)/.test(i)&&(k="property"),"tag"==k&&(k=x.test(i)?"variable-2":"atom"),r.context.type}return O.atBlock(e,t,r)},O.keyframes=function(e,t,r){return"0"==t.indentation()&&("}"==e&&ee(t)||"]"==e||"hash"==e||"qualifier"==e||I(t.current()))?H(e,t,r):"{"==e?Z(r,t,"keyframes"):"}"==e?ee(t)?F(r,!0):Z(r,t,"keyframes"):"unit"==e&&/^[0-9]+\%$/.test(t.current())?Z(r,t,"keyframes"):"word"==e&&"block-keyword"==(k=J(t.current()))?(k="keyword",Z(r,t,"keyframes")):/@(font-face|media|supports|(-moz-)?document)/.test(e)?Z(r,t,te(t)?"block":"atBlock"):"mixin"==e?Z(r,t,"block",0):r.context.type},O.interpolation=function(e,t,r){return"{"==e&&F(r)&&Z(r,t,"block"),"}"==e?t.string.match(/^\s*(\.|#|:|\[|\*|&|>|~|\+|\/)/i)||t.string.match(/^\s*[a-z]/i)&&I(re(t))?Z(r,t,"block"):!t.string.match(/^(\{|\s*\&)/)||t.match(/\s*[\w-]/,!1)?Z(r,t,"block",0):Z(r,t,"block"):"variable-name"==e?Z(r,t,"variableName",0):("word"==e&&"tag"==(k=J(t.current()))&&(k="atom"),r.context.type)},O.extend=function(e,t,r){return"["==e||"="==e?"extend":"]"==e?F(r):"word"==e?(k=J(t.current()),"extend"):F(r)},O.variableName=function(e,t,r){return"string"==e||"["==e||"]"==e||t.current().match(/^(\.|\$)/)?(t.current().match(/^\.[\w-]+/i)&&(k="variable-2"),"variableName"):H(e,t,r)},{startState:function(e){return{tokenize:null,state:"block",context:new Y("block",e||0,null)}},token:function(e,t){return!t.tokenize&&e.eatSpace()?null:((g=(t.tokenize||function(e,t){if(M=e.string.match(/(^[\w-]+\s*=\s*$)|(^\s*[\w-]+\s*=\s*[\w-])|(^\s*(\.|#|@|\$|\&|\[|\d|\+|::?|\{|\>|~|\/)?\s*[\w-]*([a-z0-9-]|\*|\/\*)(\(|,)?)/),t.context.line.firstWord=M?M[0].replace(/^\s*/,""):"",t.context.line.indent=e.indentation(),p=e.peek(),e.match("//"))return e.skipToEnd(),["comment","comment"];if(e.match("/*"))return t.tokenize=R,R(e,t);if('"'==p||"'"==p)return e.next(),t.tokenize=S(p),t.tokenize(e,t);if("@"==p)return e.next(),e.eatWhile(/[\w\\-]/),["def",e.current()];if("#"==p){if(e.next(),e.match(/^[0-9a-f]{3}([0-9a-f]([0-9a-f]{2}){0,2})?\b/i))return["atom","atom"];if(e.match(/^[a-z][\w-]*/i))return["builtin","hash"]}return e.match(U)?["meta","vendor-prefixes"]:e.match(/^-?[0-9]?\.?[0-9]/)?(e.eatWhile(/[a-z%]/i),["number","unit"]):"!"==p?(e.next(),[e.match(/^(important|optional)/i)?"keyword":"operator","important"]):"."==p&&e.match(/^\.[a-z][\w-]*/i)?["qualifier","qualifier"]:e.match(B)?("("==e.peek()&&(t.tokenize=X),["property","word"]):e.match(/^[a-z][\w-]*\(/i)?(e.backUp(1),["keyword","mixin"]):e.match(/^(\+|-)[a-z][\w-]*\(/i)?(e.backUp(1),["keyword","block-mixin"]):e.string.match(/^\s*&/)&&e.match(/^[-_]+[a-z][\w-]*/)?["qualifier","qualifier"]:e.match(/^(\/|&)(-|_|:|\.|#|[a-z])/)?(e.backUp(1),["variable-3","reference"]):e.match(/^&{1}\s*$/)?["variable-3","reference"]:e.match(N)?["operator","operator"]:e.match(/^\$?[-_]*[a-z0-9]+[\w-]*/i)?e.match(/^(\.|\[)[\w-\'\"\]]+/i,!1)&&!I(e.current())?(e.match(/\./),["variable-2","variable-name"]):["variable-2","word"]:e.match(E)?["operator",e.current()]:/[:;,{}\[\]\(\)]/.test(p)?(e.next(),[null,p]):(e.next(),[null,null])})(e,t))&&"object"==typeof g&&(f=g[1],g=g[0]),k=g,t.state=O[t.state](f,e,t),k)},indent:function(e,t,r){var i=e.context,a=t&&t.charAt(0),o=i.indent,n=re(t),l=r.match(/^\s*/)[0].replace(/\t/g,y).length,s=e.context.prev?e.context.prev.line.firstWord:"",c=e.context.prev?e.context.prev.line.indent:l;return i.prev&&("}"==a&&("block"==i.type||"atBlock"==i.type||"keyframes"==i.type)||")"==a&&("parens"==i.type||"atBlock_parens"==i.type)||"{"==a&&"at"==i.type)?o=i.indent-w:/(\})/.test(a)||(/@|\$|\d/.test(a)||/^\{/.test(t)||/^\s*\/(\/|\*)/.test(t)||/^\s*\/\*/.test(s)||/^\s*[\w-\.\[\]\'\"]+\s*(\?|:|\+)?=/i.test(t)||/^(\+|-)?[a-z][\w-]*\(/i.test(t)||/^return/.test(t)||D(n)?o=l:/(\.|#|:|\[|\*|&|>|~|\+|\/)/.test(a)||I(n)?o=/\,\s*$/.test(s)?c:/^\s+/.test(r)&&(/(\.|#|:|\[|\*|&|>|~|\+|\/)/.test(s)||I(s))?l<=c?c:c+w:l:/,\s*$/.test(r)||!G(n)&&!T(n)||(o=D(s)?l<=c?c:c+w:/^\{/.test(s)?l<=c?l:c+w:G(s)||T(s)?l>=c?c:l:/^(\.|#|:|\[|\*|&|@|\+|\-|>|~|\/)/.test(s)||/=\s*$/.test(s)||I(s)||/^\$[\w-\.\[\]\'\"]/.test(s)?c+w:l)),o},electricChars:"}",lineComment:"//",fold:"indent"}});var t=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","bgsound","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","nobr","noframes","noscript","object","ol","optgroup","option","output","p","param","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","track","u","ul","var","video"],r=["domain","regexp","url","url-prefix"],i=["all","aural","braille","handheld","print","projection","screen","tty","tv","embossed"],a=["width","min-width","max-width","height","min-height","max-height","device-width","min-device-width","max-device-width","device-height","min-device-height","max-device-height","aspect-ratio","min-aspect-ratio","max-aspect-ratio","device-aspect-ratio","min-device-aspect-ratio","max-device-aspect-ratio","color","min-color","max-color","color-index","min-color-index","max-color-index","monochrome","min-monochrome","max-monochrome","resolution","min-resolution","max-resolution","scan","grid"],o=["align-content","align-items","align-self","alignment-adjust","alignment-baseline","anchor-point","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","appearance","azimuth","backface-visibility","background","background-attachment","background-clip","background-color","background-image","background-origin","background-position","background-repeat","background-size","baseline-shift","binding","bleed","bookmark-label","bookmark-level","bookmark-state","bookmark-target","border","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","clear","clip","color","color-profile","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","content","counter-increment","counter-reset","crop","cue","cue-after","cue-before","cursor","direction","display","dominant-baseline","drop-initial-after-adjust","drop-initial-after-align","drop-initial-before-adjust","drop-initial-before-align","drop-initial-size","drop-initial-value","elevation","empty-cells","fit","fit-position","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","float-offset","flow-from","flow-into","font","font-feature-settings","font-family","font-kerning","font-language-override","font-size","font-size-adjust","font-stretch","font-style","font-synthesis","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-ligatures","font-variant-numeric","font-variant-position","font-weight","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-position","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphens","icon","image-orientation","image-rendering","image-resolution","inline-box-align","justify-content","left","letter-spacing","line-break","line-height","line-stacking","line-stacking-ruby","line-stacking-shift","line-stacking-strategy","list-style","list-style-image","list-style-position","list-style-type","margin","margin-bottom","margin-left","margin-right","margin-top","marker-offset","marks","marquee-direction","marquee-loop","marquee-play-count","marquee-speed","marquee-style","max-height","max-width","min-height","min-width","move-to","nav-down","nav-index","nav-left","nav-right","nav-up","object-fit","object-position","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-style","overflow-wrap","overflow-x","overflow-y","padding","padding-bottom","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","page-policy","pause","pause-after","pause-before","perspective","perspective-origin","pitch","pitch-range","play-during","position","presentation-level","punctuation-trim","quotes","region-break-after","region-break-before","region-break-inside","region-fragment","rendering-intent","resize","rest","rest-after","rest-before","richness","right","rotation","rotation-point","ruby-align","ruby-overhang","ruby-position","ruby-span","shape-image-threshold","shape-inside","shape-margin","shape-outside","size","speak","speak-as","speak-header","speak-numeral","speak-punctuation","speech-rate","stress","string-set","tab-size","table-layout","target","target-name","target-new","target-position","text-align","text-align-last","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-style","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-height","text-indent","text-justify","text-outline","text-overflow","text-shadow","text-size-adjust","text-space-collapse","text-transform","text-underline-position","text-wrap","top","transform","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","unicode-bidi","vertical-align","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","volume","white-space","widows","width","will-change","word-break","word-spacing","word-wrap","z-index","clip-path","clip-rule","mask","enable-background","filter","flood-color","flood-opacity","lighting-color","stop-color","stop-opacity","pointer-events","color-interpolation","color-interpolation-filters","color-rendering","fill","fill-opacity","fill-rule","image-rendering","marker","marker-end","marker-mid","marker-start","shape-rendering","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-rendering","baseline-shift","dominant-baseline","glyph-orientation-horizontal","glyph-orientation-vertical","text-anchor","writing-mode","font-smoothing","osx-font-smoothing"],n=["scrollbar-arrow-color","scrollbar-base-color","scrollbar-dark-shadow-color","scrollbar-face-color","scrollbar-highlight-color","scrollbar-shadow-color","scrollbar-3d-light-color","scrollbar-track-color","shape-inside","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","zoom"],l=["font-family","src","unicode-range","font-variant","font-feature-settings","font-stretch","font-weight","font-style"],s=["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"],c=["above","absolute","activeborder","additive","activecaption","afar","after-white-space","ahead","alias","all","all-scroll","alphabetic","alternate","always","amharic","amharic-abegede","antialiased","appworkspace","arabic-indic","armenian","asterisks","attr","auto","avoid","avoid-column","avoid-page","avoid-region","background","backwards","baseline","below","bidi-override","binary","bengali","blink","block","block-axis","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","bullets","button","button-bevel","buttonface","buttonhighlight","buttonshadow","buttontext","calc","cambodian","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-decimal","cjk-earthly-branch","cjk-heavenly-stem","cjk-ideographic","clear","clip","close-quote","col-resize","collapse","column","compact","condensed","contain","content","contents","content-box","context-menu","continuous","copy","counter","counters","cover","crop","cross","crosshair","currentcolor","cursive","cyclic","dashed","decimal","decimal-leading-zero","default","default-button","destination-atop","destination-in","destination-out","destination-over","devanagari","disc","discard","disclosure-closed","disclosure-open","document","dot-dash","dot-dot-dash","dotted","double","down","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic","ethiopic-abegede","ethiopic-abegede-am-et","ethiopic-abegede-gez","ethiopic-abegede-ti-er","ethiopic-abegede-ti-et","ethiopic-halehame-aa-er","ethiopic-halehame-aa-et","ethiopic-halehame-am-et","ethiopic-halehame-gez","ethiopic-halehame-om-et","ethiopic-halehame-sid-et","ethiopic-halehame-so-et","ethiopic-halehame-ti-er","ethiopic-halehame-ti-et","ethiopic-halehame-tig","ethiopic-numeric","ew-resize","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fixed","flat","flex","footnotes","forwards","from","geometricPrecision","georgian","graytext","groove","gujarati","gurmukhi","hand","hangul","hangul-consonant","hebrew","help","hidden","hide","higher","highlight","highlighttext","hiragana","hiragana-iroha","horizontal","hsl","hsla","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-table","inset","inside","intrinsic","invert","italic","japanese-formal","japanese-informal","justify","kannada","katakana","katakana-iroha","keep-all","khmer","korean-hangul-formal","korean-hanja-formal","korean-hanja-informal","landscape","lao","large","larger","left","level","lighter","line-through","linear","linear-gradient","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-alpha","lower-armenian","lower-greek","lower-hexadecimal","lower-latin","lower-norwegian","lower-roman","lowercase","ltr","malayalam","match","matrix","matrix3d","media-controls-background","media-current-time-display","media-fullscreen-button","media-mute-button","media-play-button","media-return-to-realtime-button","media-rewind-button","media-seek-back-button","media-seek-forward-button","media-slider","media-sliderthumb","media-time-remaining-display","media-volume-slider","media-volume-slider-container","media-volume-sliderthumb","medium","menu","menulist","menulist-button","menulist-text","menulist-textfield","menutext","message-box","middle","min-intrinsic","mix","mongolian","monospace","move","multiple","myanmar","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","numbers","numeric","nw-resize","nwse-resize","oblique","octal","open-quote","optimizeLegibility","optimizeSpeed","oriya","oromo","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","persian","perspective","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radial-gradient","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeating-linear-gradient","repeating-radial-gradient","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","rotate","rotate3d","rotateX","rotateY","rotateZ","round","row-resize","rtl","run-in","running","s-resize","sans-serif","scale","scale3d","scaleX","scaleY","scaleZ","scroll","scrollbar","scroll-position","se-resize","searchfield","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","semi-condensed","semi-expanded","separate","serif","show","sidama","simp-chinese-formal","simp-chinese-informal","single","skew","skewX","skewY","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","solid","somali","source-atop","source-in","source-out","source-over","space","spell-out","square","square-button","start","static","status-bar","stretch","stroke","sub","subpixel-antialiased","super","sw-resize","symbolic","symbols","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","tamil","telugu","text","text-bottom","text-top","textarea","textfield","thai","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","tibetan","tigre","tigrinya-er","tigrinya-er-abegede","tigrinya-et","tigrinya-et-abegede","to","top","trad-chinese-formal","trad-chinese-informal","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","up","upper-alpha","upper-armenian","upper-greek","upper-hexadecimal","upper-latin","upper-norwegian","upper-roman","uppercase","urdu","url","var","vertical","vertical-text","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","words","x-large","x-small","xor","xx-large","xx-small","bicubic","optimizespeed","grayscale","row","row-reverse","wrap","wrap-reverse","column-reverse","flex-start","flex-end","space-between","space-around","unset"],d=["in","and","or","not","is not","is a","is","isnt","defined","if unless"],u=["for","if","else","unless","from","to"],m=["null","true","false","href","title","type","not-allowed","readonly","disabled"],p=t.concat(r,i,a,o,n,s,c,l,d,u,m,["@font-face","@keyframes","@media","@viewport","@page","@host","@supports","@block","@css"]);function h(e){return e=e.sort(function(e,t){return t>e}),new RegExp("^(("+e.join(")|(")+"))\\b")}function b(e){for(var t={},r=0;r","i")}function r(t,e){for(var a in t)for(var n=e[a]||(e[a]=[]),l=t[a],r=l.length-1;r>=0;r--)n.unshift(l[r])}t.defineMode("htmlmixed",function(a,o){var c=t.getMode(a,{name:"xml",htmlMode:!0,multilineTagIndentFactor:o.multilineTagIndentFactor,multilineTagIndentPastTag:o.multilineTagIndentPastTag}),i={},s=o&&o.tags,u=o&&o.scriptTypes;if(r(e,i),s&&r(s,i),u)for(var m=u.length-1;m>=0;m--)i.script.unshift(["type",u[m].matches,u[m].mode]);function d(e,r){var o,s=c.token(e,r.htmlState),u=/\btag\b/.test(s);if(u&&!/[<>\s\/]/.test(e.current())&&(o=r.htmlState.tagName&&r.htmlState.tagName.toLowerCase())&&i.hasOwnProperty(o))r.inTag=o+" ";else if(r.inTag&&u&&/>$/.test(e.current())){var m=/^([\S]+) (.*)/.exec(r.inTag);r.inTag=null;var p=">"==e.current()&&function(t,e){for(var a=0;a-1?t.backUp(n.length-l):n.match(/<\/?$/)&&(t.backUp(n.length),t.match(e,!1)||t.match(n)),a}(t,h,e.localMode.token(t,e.localState))},r.localMode=f,r.localState=t.startState(f,c.indent(r.htmlState,""))}else r.inTag&&(r.inTag+=e.current(),e.eol()&&(r.inTag+=" "));return s}return{startState:function(){return{token:d,inTag:null,localMode:null,localState:null,htmlState:t.startState(c)}},copyState:function(e){var a;return e.localState&&(a=t.copyState(e.localMode,e.localState)),{token:e.token,inTag:e.inTag,localMode:e.localMode,localState:a,htmlState:t.copyState(c,e.htmlState)}},token:function(t,e){return e.token(t,e)},indent:function(e,a,n){return!e.localMode||/^\s*<\//.test(a)?c.indent(e.htmlState,a):e.localMode.indent?e.localMode.indent(e.localState,a,n):t.Pass},innerMode:function(t){return{state:t.localState||t.htmlState,mode:t.localMode||c}}}},"xml","javascript","css"),t.defineMIME("text/html","htmlmixed")});
-},{"../../lib/codemirror":"kyCI","../xml/xml":"fCVU","../javascript/javascript":"3pNU","../css/css":"4slD"}],"XPuS":[function(require,module,exports) {
+},{"../../lib/codemirror":"mts4","../xml/xml":"fCVU","../javascript/javascript":"3pNU","../css/css":"4slD"}],"XPuS":[function(require,module,exports) {
var define;
var t;!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),require("../javascript/javascript"),require("../css/css"),require("../htmlmixed/htmlmixed")):"function"==typeof t&&t.amd?t(["../../lib/codemirror","../javascript/javascript","../css/css","../htmlmixed/htmlmixed"],e):e(CodeMirror)}(function(t){"use strict";t.defineMode("pug",function(e){var n="keyword",i="meta",r="builtin",a="qualifier",s={"{":"}","(":")","[":"]"},c=t.getMode(e,"javascript");function u(){this.javaScriptLine=!1,this.javaScriptLineExcludesColon=!1,this.javaScriptArguments=!1,this.javaScriptArgumentsDepth=0,this.isInterpolating=!1,this.interpolationNesting=0,this.jsState=t.startState(c),this.restOfLine="",this.isIncludeFiltered=!1,this.isEach=!1,this.lastTag="",this.scriptType="",this.isAttrs=!1,this.attrsNest=[],this.inAttributeName=!0,this.attributeIsType=!1,this.attrValue="",this.indentOf=1/0,this.indentToken="",this.innerMode=null,this.innerState=null,this.innerModeForLine=!1}function o(t,e){if(t.match("#{"))return e.isInterpolating=!0,e.interpolationNesting=0,"punctuation"}function p(n,i){var r;if(n.match(/^:([\w\-]+)/))return e&&e.innerModes&&(r=e.innerModes(n.current().substring(1))),r||(r=n.current().substring(1)),"string"==typeof r&&(r=t.getMode(e,r)),f(n,i,r),"atom"}function f(n,i,r){r=t.mimeModes[r]||r,r=e.innerModes&&e.innerModes(r)||r,r=t.mimeModes[r]||r,r=t.getMode(e,r),i.indentOf=n.indentation(),r&&"null"!==r.name?i.innerMode=r:i.indentToken="string"}function l(e,n,i){if(e.indentation()>n.indentOf||n.innerModeForLine&&!e.sol()||i)return n.innerMode?(n.innerState||(n.innerState=n.innerMode.startState?t.startState(n.innerMode,e.indentation()):{}),e.hideFirstChars(n.indentOf+2,function(){return n.innerMode.token(e,n.innerState)||!0})):(e.skipToEnd(),n.indentToken);e.sol()&&(n.indentOf=1/0,n.indentToken=null,n.innerMode=null,n.innerState=null)}return u.prototype.copy=function(){var e=new u;return e.javaScriptLine=this.javaScriptLine,e.javaScriptLineExcludesColon=this.javaScriptLineExcludesColon,e.javaScriptArguments=this.javaScriptArguments,e.javaScriptArgumentsDepth=this.javaScriptArgumentsDepth,e.isInterpolating=this.isInterpolating,e.interpolationNesting=this.interpolationNesting,e.jsState=t.copyState(c,this.jsState),e.innerMode=this.innerMode,this.innerMode&&this.innerState&&(e.innerState=t.copyState(this.innerMode,this.innerState)),e.restOfLine=this.restOfLine,e.isIncludeFiltered=this.isIncludeFiltered,e.isEach=this.isEach,e.lastTag=this.lastTag,e.scriptType=this.scriptType,e.isAttrs=this.isAttrs,e.attrsNest=this.attrsNest.slice(),e.inAttributeName=this.inAttributeName,e.attributeIsType=this.attributeIsType,e.attrValue=this.attrValue,e.indentOf=this.indentOf,e.indentToken=this.indentToken,e.innerModeForLine=this.innerModeForLine,e},{startState:function(){return new u},copyState:function(t){return t.copy()},token:function(e,u){var h=l(e,u)||function(t,e){if(t.sol()&&(e.restOfLine=""),e.restOfLine){t.skipToEnd();var n=e.restOfLine;return e.restOfLine="",n}}(e,u)||function(t,e){if(e.isInterpolating){if("}"===t.peek()){if(e.interpolationNesting--,e.interpolationNesting<0)return t.next(),e.isInterpolating=!1,"punctuation"}else"{"===t.peek()&&e.interpolationNesting++;return c.token(t,e.jsState)||!0}}(e,u)||function(t,e){if(e.isIncludeFiltered){var n=p(t,e);return e.isIncludeFiltered=!1,e.restOfLine="string",n}}(e,u)||function(t,e){if(e.isEach){if(t.match(/^ in\b/))return e.javaScriptLine=!0,e.isEach=!1,n;if(t.sol()||t.eol())e.isEach=!1;else if(t.next()){for(;!t.match(/^ in\b/,!1)&&t.next(););return"variable"}}}(e,u)||function e(n,i){if(i.isAttrs){if(s[n.peek()]&&i.attrsNest.push(s[n.peek()]),i.attrsNest[i.attrsNest.length-1]===n.peek())i.attrsNest.pop();else if(n.eat(")"))return i.isAttrs=!1,"punctuation";if(i.inAttributeName&&n.match(/^[^=,\)!]+/))return"="!==n.peek()&&"!"!==n.peek()||(i.inAttributeName=!1,i.jsState=t.startState(c),"script"===i.lastTag&&"type"===n.current().trim().toLowerCase()?i.attributeIsType=!0:i.attributeIsType=!1),"attribute";var r=c.token(n,i.jsState);if(i.attributeIsType&&"string"===r&&(i.scriptType=n.current().toString()),0===i.attrsNest.length&&("string"===r||"variable"===r||"keyword"===r))try{return Function("","var x "+i.attrValue.replace(/,\s*$/,"").replace(/^!/,"")),i.inAttributeName=!0,i.attrValue="",n.backUp(n.current().length),e(n,i)}catch(t){}return i.attrValue+=n.current(),r||!0}}(e,u)||function(t,e){if(t.sol()&&(e.javaScriptLine=!1,e.javaScriptLineExcludesColon=!1),e.javaScriptLine){if(e.javaScriptLineExcludesColon&&":"===t.peek())return e.javaScriptLine=!1,void(e.javaScriptLineExcludesColon=!1);var n=c.token(t,e.jsState);return t.eol()&&(e.javaScriptLine=!1),n||!0}}(e,u)||function(t,e){if(e.javaScriptArguments)return 0===e.javaScriptArgumentsDepth&&"("!==t.peek()?void(e.javaScriptArguments=!1):("("===t.peek()?e.javaScriptArgumentsDepth++:")"===t.peek()&&e.javaScriptArgumentsDepth--,0===e.javaScriptArgumentsDepth?void(e.javaScriptArguments=!1):c.token(t,e.jsState)||!0)}(e,u)||function(t,e){if(e.mixinCallAfter)return e.mixinCallAfter=!1,t.match(/^\( *[-\w]+ *=/,!1)||(e.javaScriptArguments=!0,e.javaScriptArgumentsDepth=0),!0}(e,u)||function(t){if(t.match(/^yield\b/))return"keyword"}(e)||function(t){if(t.match(/^(?:doctype) *([^\n]+)?/))return i}(e)||o(e,u)||function(t,e){if(t.match(/^case\b/))return e.javaScriptLine=!0,n}(e,u)||function(t,e){if(t.match(/^when\b/))return e.javaScriptLine=!0,e.javaScriptLineExcludesColon=!0,n}(e,u)||function(t){if(t.match(/^default\b/))return n}(e)||function(t,e){if(t.match(/^extends?\b/))return e.restOfLine="string",n}(e,u)||function(t,e){if(t.match(/^append\b/))return e.restOfLine="variable",n}(e,u)||function(t,e){if(t.match(/^prepend\b/))return e.restOfLine="variable",n}(e,u)||function(t,e){if(t.match(/^block\b *(?:(prepend|append)\b)?/))return e.restOfLine="variable",n}(e,u)||function(t,e){if(t.match(/^include\b/))return e.restOfLine="string",n}(e,u)||function(t,e){if(t.match(/^include:([a-zA-Z0-9\-]+)/,!1)&&t.match("include"))return e.isIncludeFiltered=!0,n}(e,u)||function(t,e){if(t.match(/^mixin\b/))return e.javaScriptLine=!0,n}(e,u)||function(t,e){return t.match(/^\+([-\w]+)/)?(t.match(/^\( *[-\w]+ *=/,!1)||(e.javaScriptArguments=!0,e.javaScriptArgumentsDepth=0),"variable"):t.match(/^\+#{/,!1)?(t.next(),e.mixinCallAfter=!0,o(t,e)):void 0}(e,u)||function(t,e){if(t.match(/^(if|unless|else if|else)\b/))return e.javaScriptLine=!0,n}(e,u)||function(t,e){if(t.match(/^(- *)?(each|for)\b/))return e.isEach=!0,n}(e,u)||function(t,e){if(t.match(/^while\b/))return e.javaScriptLine=!0,n}(e,u)||function(t,e){var n;if(n=t.match(/^(\w(?:[-:\w]*\w)?)\/?/))return e.lastTag=n[1].toLowerCase(),"script"===e.lastTag&&(e.scriptType="application/javascript"),"tag"}(e,u)||p(e,u)||function(t,e){if(t.match(/^(!?=|-)/))return e.javaScriptLine=!0,"punctuation"}(e,u)||function(t){if(t.match(/^#([\w-]+)/))return r}(e)||function(t){if(t.match(/^\.([\w-]+)/))return a}(e)||function(t,e){if("("==t.peek())return t.next(),e.isAttrs=!0,e.attrsNest=[],e.inAttributeName=!0,e.attrValue="",e.attributeIsType=!1,"punctuation"}(e,u)||function(t,e){if(t.match(/^&attributes\b/))return e.javaScriptArguments=!0,e.javaScriptArgumentsDepth=0,"keyword"}(e,u)||function(t){if(t.sol()&&t.eatSpace())return"indent"}(e)||function(t,e){return t.match(/^(?:\| ?| )([^\n]+)/)?"string":t.match(/^(<[^\n]*)/,!1)?(f(t,e,"htmlmixed"),e.innerModeForLine=!0,l(t,e,!0)):void 0}(e,u)||function(t,e){if(t.match(/^ *\/\/(-)?([^\n]*)/))return e.indentOf=t.indentation(),e.indentToken="comment","comment"}(e,u)||function(t){if(t.match(/^: */))return"colon"}(e)||function(t,e){if(t.eat(".")){var n=null;return"script"===e.lastTag&&-1!=e.scriptType.toLowerCase().indexOf("javascript")?n=e.scriptType.toLowerCase().replace(/"|'/g,""):"style"===e.lastTag&&(n="css"),f(t,e,n),"dot"}}(e,u)||function(t){return t.next(),null}(e);return!0===h?null:h}}},"javascript","css","htmlmixed"),t.defineMIME("text/x-pug","pug"),t.defineMIME("text/x-jade","pug")});
-},{"../../lib/codemirror":"kyCI","../javascript/javascript":"3pNU","../css/css":"4slD","../htmlmixed/htmlmixed":"b+cg"}],"W0qQ":[function(require,module,exports) {
+},{"../../lib/codemirror":"mts4","../javascript/javascript":"3pNU","../css/css":"4slD","../htmlmixed/htmlmixed":"b+cg"}],"W0qQ":[function(require,module,exports) {
var define;
var t;!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof t&&t.amd?t(["../../lib/codemirror"],e):e(CodeMirror)}(function(t){"use strict";function e(t,e){if(!t.hasOwnProperty(e))throw new Error("Undefined state "+e+" in simple mode")}function n(t,e){if(!t)return/(?:)/;var n="";return t instanceof RegExp?(t.ignoreCase&&(n="i"),t=t.source):t=String(t),new RegExp((!1===e?"":"^")+"(?:"+t+")",n)}function a(t,a){(t.next||t.push)&&e(a,t.next||t.push),this.regex=n(t.regex),this.token=function(t){if(!t)return null;if(t.apply)return t;if("string"==typeof t)return t.replace(/\./g," ");for(var e=[],n=0;n2&&c.token&&"string"!=typeof c.token){a.pending=[];for(var f=2;f-1)return t.Pass;var i=a.indent.length-1,l=e[a.state];t:for(;;){for(var s=0;s-1?r+n.length:r}var o=n.exec(t?e.slice(t):e);return o?o.index+t+(i?o[0].length:0):-1}return{startState:function(){return{outer:e.startState(n),innerActive:null,inner:null}},copyState:function(t){return{outer:e.copyState(n,t.outer),innerActive:t.innerActive,inner:t.innerActive&&e.copyState(t.innerActive.mode,t.inner)}},token:function(r,o){if(o.innerActive){var c=o.innerActive;a=r.string;if(!c.close&&r.sol())return o.innerActive=o.inner=null,this.token(r,o);if((v=c.close?i(a,c.close,r.pos,c.parseDelimiters):-1)==r.pos&&!c.parseDelimiters)return r.match(c.close),o.innerActive=o.inner=null,c.delimStyle&&c.delimStyle+" "+c.delimStyle+"-close";v>-1&&(r.string=a.slice(0,v));var l=c.mode.token(r,o.inner);return v>-1&&(r.string=a),v==r.pos&&c.parseDelimiters&&(o.innerActive=o.inner=null),c.innerStyle&&(l=l?l+" "+c.innerStyle:c.innerStyle),l}for(var s=1/0,a=r.string,u=0;u|[#\/]([A-Za-z_]\w*)/,token:"keyword"},{regex:/(?:else|this)\b/,token:"keyword"},{regex:/\d+/i,token:"number"},{regex:/=|~|@|true|false/,token:"atom"},{regex:/(?:\.\.\/)*(?:[A-Za-z_][\w\.]*)+/,token:"variable-2"}],dash_comment:[{regex:/--\}\}/,pop:!0,token:"comment"},{regex:/./,token:"comment"}],comment:[{regex:/\}\}/,pop:!0,token:"comment"},{regex:/./,token:"comment"}],meta:{blockCommentStart:"{{--",blockCommentEnd:"--}}"}}),e.defineMode("handlebars",function(o,t){var n=e.getMode(o,"handlebars-tags");return t&&t.base?e.multiplexingMode(e.getMode(o,t.base),{open:"{{",close:"}}",mode:n,parseDelimiters:!0}):n}),e.defineMIME("text/x-handlebars-template","handlebars")});
-},{"../../lib/codemirror":"kyCI","../../addon/mode/simple":"W0qQ","../../addon/mode/multiplex":"JOcm"}],"+c2d":[function(require,module,exports) {
+},{"../../lib/codemirror":"mts4","../../addon/mode/simple":"W0qQ","../../addon/mode/multiplex":"JOcm"}],"+c2d":[function(require,module,exports) {
var define;
var e;!function(s){"use strict";"object"==typeof exports&&"object"==typeof module?s(require("../../lib/codemirror"),require("../../addon/mode/overlay"),require("../xml/xml"),require("../javascript/javascript"),require("../coffeescript/coffeescript"),require("../css/css"),require("../sass/sass"),require("../stylus/stylus"),require("../pug/pug"),require("../handlebars/handlebars")):"function"==typeof e&&e.amd?e(["../../lib/codemirror","../../addon/mode/overlay","../xml/xml","../javascript/javascript","../coffeescript/coffeescript","../css/css","../sass/sass","../stylus/stylus","../pug/pug","../handlebars/handlebars"],s):s(CodeMirror)}(function(e){var s={script:[["lang",/coffee(script)?/,"coffeescript"],["type",/^(?:text|application)\/(?:x-)?coffee(?:script)?$/,"coffeescript"],["lang",/^babel$/,"javascript"],["type",/^text\/babel$/,"javascript"],["type",/^text\/ecmascript-\d+$/,"javascript"]],style:[["lang",/^stylus$/i,"stylus"],["lang",/^sass$/i,"sass"],["lang",/^less$/i,"text/x-less"],["lang",/^scss$/i,"text/x-scss"],["type",/^(text\/)?(x-)?styl(us)?$/i,"stylus"],["type",/^text\/sass/i,"sass"],["type",/^(text\/)?(x-)?scss$/i,"text/x-scss"],["type",/^(text\/)?(x-)?less$/i,"text/x-less"]],template:[["lang",/^vue-template$/i,"vue"],["lang",/^pug$/i,"pug"],["lang",/^handlebars$/i,"handlebars"],["type",/^(text\/)?(x-)?pug$/i,"pug"],["type",/^text\/x-handlebars-template$/i,"handlebars"],[null,null,"vue-template"]]};e.defineMode("vue-template",function(s,t){return e.overlayMode(e.getMode(s,t.backdrop||"text/html"),{token:function(e){if(e.match(/^\{\{.*?\}\}/))return"meta mustache";for(;e.next()&&!e.match("{{",!1););return null}})}),e.defineMode("vue",function(t){return e.getMode(t,{name:"htmlmixed",tags:s})},"htmlmixed","xml","javascript","coffeescript","css","sass","stylus","pug","handlebars"),e.defineMIME("script/x-vue","vue"),e.defineMIME("text/x-vue","vue")});
-},{"../../lib/codemirror":"kyCI","../../addon/mode/overlay":"PYif","../xml/xml":"fCVU","../javascript/javascript":"3pNU","../coffeescript/coffeescript":"n+lc","../css/css":"4slD","../sass/sass":"TqQL","../stylus/stylus":"pErc","../pug/pug":"XPuS","../handlebars/handlebars":"gb2A"}],"Z7EF":[function(require,module,exports) {
+},{"../../lib/codemirror":"mts4","../../addon/mode/overlay":"PYif","../xml/xml":"fCVU","../javascript/javascript":"3pNU","../coffeescript/coffeescript":"n+lc","../css/css":"4slD","../sass/sass":"TqQL","../stylus/stylus":"pErc","../pug/pug":"XPuS","../handlebars/handlebars":"gb2A"}],"Z7EF":[function(require,module,exports) {
var define;
var e;!function(t){"object"==typeof exports&&"object"==typeof module?t(require("../../lib/codemirror")):"function"==typeof e&&e.amd?e(["../../lib/codemirror"],t):t(CodeMirror)}(function(e){"use strict";function t(e,t,n,r,o,a){this.indented=e,this.column=t,this.type=n,this.info=r,this.align=o,this.prev=a}function n(e,n,r,o){var a=e.indented;return e.context&&"statement"==e.context.type&&"statement"!=r&&(a=e.context.indented),e.context=new t(a,n,r,o,null,e.context)}function r(e){var t=e.context.type;return")"!=t&&"]"!=t&&"}"!=t||(e.indented=e.context.indented),e.context=e.context.prev}function o(e,t,n){return"variable"==t.prevToken||"type"==t.prevToken||(!!/\S(?:[^- ]>|[*\]])\s*$|\*$/.test(e.string.slice(0,n))||(!(!t.typeAtEndOfLine||e.column()!=e.indentation())||void 0))}function a(e){for(;;){if(!e||"top"==e.type)return!0;if("}"==e.type&&"namespace"!=e.prev.info)return!1;e=e.prev}}function i(e){for(var t={},n=e.split(" "),r=0;r!?|\/]/,L=s.isIdentifierChar||/[\w\$_\xa1-\uffff]/;function D(e,t){var n,r=e.next();if(b[r]){var o=b[r](e,t);if(!1!==o)return o}if('"'==r||"'"==r)return t.tokenize=(n=r,function(e,t){for(var r,o=!1,a=!1;null!=(r=e.next());){if(r==n&&!o){a=!0;break}o=!o&&"\\"==r}return(a||!o&&!w)&&(t.tokenize=null),"string"}),t.tokenize(e,t);if(C.test(r))return c=r,null;if(T.test(r)){if(e.backUp(1),e.match(M))return"number";e.next()}if("/"==r){if(e.eat("*"))return t.tokenize=z,z(e,t);if(e.eat("/"))return e.skipToEnd(),"comment"}if(P.test(r)){for(;!e.match(/^\/[\/*]/,!1)&&e.eat(P););return"operator"}if(e.eatWhile(L),S)for(;e.match(S);)e.eatWhile(L);var a=e.current();return l(m,a)?(l(g,a)&&(c="newstatement"),l(x,a)&&(u=!0),"keyword"):l(h,a)?"type":l(y,a)?(l(g,a)&&(c="newstatement"),"builtin"):l(k,a)?"atom":"variable"}function z(e,t){for(var n,r=!1;n=e.next();){if("/"==n&&r){t.tokenize=null;break}r="*"==n}return"comment"}function I(e,t){s.typeFirstDefinitions&&e.eol()&&a(t.context)&&(t.typeAtEndOfLine=o(e,t,e.pos))}return{startState:function(e){return{tokenize:null,context:new t((e||0)-d,0,"top",null,!1),indented:0,startOfLine:!0,prevToken:null}},token:function(e,t){var i=t.context;if(e.sol()&&(null==i.align&&(i.align=!1),t.indented=e.indentation(),t.startOfLine=!0),e.eatSpace())return I(e,t),null;c=u=null;var l=(t.tokenize||D)(e,t);if("comment"==l||"meta"==l)return l;if(null==i.align&&(i.align=!0),";"==c||":"==c||","==c&&e.match(/^\s*(?:\/\/.*)?$/,!1))for(;"statement"==t.context.type;)r(t);else if("{"==c)n(t,e.column(),"}");else if("["==c)n(t,e.column(),"]");else if("("==c)n(t,e.column(),")");else if("}"==c){for(;"statement"==i.type;)i=r(t);for("}"==i.type&&(i=r(t));"statement"==i.type;)i=r(t)}else c==i.type?r(t):v&&(("}"==i.type||"top"==i.type)&&";"!=c||"statement"==i.type&&"newstatement"==c)&&n(t,e.column(),"statement",e.current());if("variable"==l&&("def"==t.prevToken||s.typeFirstDefinitions&&o(e,t,e.start)&&a(t.context)&&e.match(/^\s*\(/,!1))&&(l="def"),b.token){var d=b.token(e,t,l);void 0!==d&&(l=d)}return"def"==l&&!1===s.styleDefs&&(l="variable"),t.startOfLine=!1,t.prevToken=u?"def":l||c,I(e,t),l},indent:function(t,n){if(t.tokenize!=D&&null!=t.tokenize||t.typeAtEndOfLine)return e.Pass;var r=t.context,o=n&&n.charAt(0),a=o==r.type;if("statement"==r.type&&"}"==o&&(r=r.prev),s.dontIndentStatements)for(;"statement"==r.type&&s.dontIndentStatements.test(r.info);)r=r.prev;if(b.indent){var i=b.indent(t,r,n,d);if("number"==typeof i)return i}var l=r.prev&&"switch"==r.prev.info;if(s.allmanIndentation&&/[{(]/.test(o)){for(;"top"!=r.type&&"}"!=r.type;)r=r.prev;return r.indented}return"statement"==r.type?r.indented+("{"==o?0:f):!r.align||p&&")"==r.type?")"!=r.type||a?r.indented+(a?0:d)+(a||!l||/^(?:case|default)\b/.test(n)?0:d):r.indented+f:r.column+(a?0:1)},electricInput:_?/^\s*(?:case .*?:|default:|\{\}?|\})$/:/^\s*[{}]$/,blockCommentStart:"/*",blockCommentEnd:"*/",blockCommentContinue:" * ",lineComment:"//",fold:"brace"}});var s="auto if break case register continue return default do sizeof static else struct switch extern typedef union for goto while enum const volatile",c="int long char short double float unsigned signed void size_t ptrdiff_t";function u(e,t){if(!t.startOfLine)return!1;for(var n,r=null;n=e.peek();){if("\\"==n&&e.match(/^.$/)){r=u;break}if("/"==n&&e.match(/^\/[\/\*]/,!1))break;e.next()}return t.tokenize=r,"meta"}function d(e,t){return"type"==t.prevToken&&"type"}function f(e){return e.eatWhile(/[\w\.']/),"number"}function p(e,t){if(e.backUp(1),e.match(/(R|u8R|uR|UR|LR)/)){var n=e.match(/"([^\s\\()]{0,16})\(/);return!!n&&(t.cpp11RawStringDelim=n[1],t.tokenize=h,h(e,t))}return e.match(/(u8|u|U|L)/)?!!e.match(/["']/,!1)&&"string":(e.next(),!1)}function m(e,t){for(var n;null!=(n=e.next());)if('"'==n&&!e.eat('"')){t.tokenize=null;break}return"string"}function h(e,t){var n=t.cpp11RawStringDelim.replace(/[^\w\s]/g,"\\$&");return e.match(new RegExp(".*?\\)"+n+'"'))?t.tokenize=null:e.skipToEnd(),"string"}function y(t,n){"string"==typeof t&&(t=[t]);var r=[];function o(e){if(e)for(var t in e)e.hasOwnProperty(t)&&r.push(t)}o(n.keywords),o(n.types),o(n.builtin),o(n.atoms),r.length&&(n.helperType=t[0],e.registerHelper("hintWords",t[0],r));for(var a=0;a!?|\/#:@]/,hooks:{"@":function(e){return e.eatWhile(/[\w\$_]/),"meta"},'"':function(e,t){return!!e.match('""')&&(t.tokenize=g,t.tokenize(e,t))},"'":function(e){return e.eatWhile(/[\w\$_\xa1-\uffff]/),"atom"},"=":function(e,n){var r=n.context;return!("}"!=r.type||!r.align||!e.eat(">"))&&(n.context=new t(r.indented,r.column,r.type,r.info,null,r.prev),"operator")},"/":function(e,t){return!!e.eat("*")&&(t.tokenize=function e(t){return function(n,r){for(var o;o=n.next();){if("*"==o&&n.eat("/")){if(1==t){r.tokenize=null;break}return r.tokenize=e(t-1),r.tokenize(n,r)}if("/"==o&&n.eat("*"))return r.tokenize=e(t+1),r.tokenize(n,r)}return"comment"}}(1),t.tokenize(e,t))}},modeProps:{closeBrackets:{triples:'"'}}}),y("text/x-kotlin",{name:"clike",keywords:i("package as typealias class interface this super val operator var fun for is in This throw return annotation break continue object if else while do try when !in !is as? file import where by get set abstract enum open inner override private public internal protected catch finally out final vararg reified dynamic companion constructor init sealed field property receiver param sparam lateinit data inline noinline tailrec external annotation crossinline const operator infix suspend actual expect setparam"),types:i("Boolean Byte Character CharSequence Class ClassLoader Cloneable Comparable Compiler Double Exception Float Integer Long Math Number Object Package Pair Process Runtime Runnable SecurityManager Short StackTraceElement StrictMath String StringBuffer System Thread ThreadGroup ThreadLocal Throwable Triple Void Annotation Any BooleanArray ByteArray Char CharArray DeprecationLevel DoubleArray Enum FloatArray Function Int IntArray Lazy LazyThreadSafetyMode LongArray Nothing ShortArray Unit"),intendSwitch:!1,indentStatements:!1,multiLineStrings:!0,number:/^(?:0x[a-f\d_]+|0b[01_]+|(?:[\d_]+(\.\d+)?|\.\d+)(?:e[-+]?[\d_]+)?)(u|ll?|l|f)?/i,blockKeywords:i("catch class do else finally for if where try while enum"),defKeywords:i("class val var object interface fun"),atoms:i("true false null this"),hooks:{"@":function(e){return e.eatWhile(/[\w\$_]/),"meta"},'"':function(e,t){var n;return t.tokenize=(n=e.match('""'),function(e,t){for(var r,o=!1,a=!1;!e.eol();){if(!n&&!o&&e.match('"')){a=!0;break}if(n&&e.match('"""')){a=!0;break}r=e.next(),!o&&"$"==r&&e.match("{")&&e.skipTo("}"),o=!o&&"\\"==r&&!n}return!a&&n||(t.tokenize=null),"string"}),t.tokenize(e,t)},indent:function(e,t,n,r){var o=n&&n.charAt(0);return"}"!=e.prevToken&&")"!=e.prevToken||""!=n?"operator"==e.prevToken&&"}"!=n||"variable"==e.prevToken&&"."==o||("}"==e.prevToken||")"==e.prevToken)&&"."==o?2*r+t.indented:t.align&&"}"==t.type?t.indented+(e.context.type==(n||"").charAt(0)?0:r):void 0:e.indented}},modeProps:{closeBrackets:{triples:'"'}}}),y(["x-shader/x-vertex","x-shader/x-fragment"],{name:"clike",keywords:i("sampler1D sampler2D sampler3D samplerCube sampler1DShadow sampler2DShadow const attribute uniform varying break continue discard return for while do if else struct in out inout"),types:i("float int bool void vec2 vec3 vec4 ivec2 ivec3 ivec4 bvec2 bvec3 bvec4 mat2 mat3 mat4"),blockKeywords:i("for while do if else struct"),builtin:i("radians degrees sin cos tan asin acos atan pow exp log exp2 sqrt inversesqrt abs sign floor ceil fract mod min max clamp mix step smoothstep length distance dot cross normalize ftransform faceforward reflect refract matrixCompMult lessThan lessThanEqual greaterThan greaterThanEqual equal notEqual any all not texture1D texture1DProj texture1DLod texture1DProjLod texture2D texture2DProj texture2DLod texture2DProjLod texture3D texture3DProj texture3DLod texture3DProjLod textureCube textureCubeLod shadow1D shadow2D shadow1DProj shadow2DProj shadow1DLod shadow2DLod shadow1DProjLod shadow2DProjLod dFdx dFdy fwidth noise1 noise2 noise3 noise4"),atoms:i("true false gl_FragColor gl_SecondaryColor gl_Normal gl_Vertex gl_MultiTexCoord0 gl_MultiTexCoord1 gl_MultiTexCoord2 gl_MultiTexCoord3 gl_MultiTexCoord4 gl_MultiTexCoord5 gl_MultiTexCoord6 gl_MultiTexCoord7 gl_FogCoord gl_PointCoord gl_Position gl_PointSize gl_ClipVertex gl_FrontColor gl_BackColor gl_FrontSecondaryColor gl_BackSecondaryColor gl_TexCoord gl_FogFragCoord gl_FragCoord gl_FrontFacing gl_FragData gl_FragDepth gl_ModelViewMatrix gl_ProjectionMatrix gl_ModelViewProjectionMatrix gl_TextureMatrix gl_NormalMatrix gl_ModelViewMatrixInverse gl_ProjectionMatrixInverse gl_ModelViewProjectionMatrixInverse gl_TexureMatrixTranspose gl_ModelViewMatrixInverseTranspose gl_ProjectionMatrixInverseTranspose gl_ModelViewProjectionMatrixInverseTranspose gl_TextureMatrixInverseTranspose gl_NormalScale gl_DepthRange gl_ClipPlane gl_Point gl_FrontMaterial gl_BackMaterial gl_LightSource gl_LightModel gl_FrontLightModelProduct gl_BackLightModelProduct gl_TextureColor gl_EyePlaneS gl_EyePlaneT gl_EyePlaneR gl_EyePlaneQ gl_FogParameters gl_MaxLights gl_MaxClipPlanes gl_MaxTextureUnits gl_MaxTextureCoords gl_MaxVertexAttribs gl_MaxVertexUniformComponents gl_MaxVaryingFloats gl_MaxVertexTextureImageUnits gl_MaxTextureImageUnits gl_MaxFragmentUniformComponents gl_MaxCombineTextureImageUnits gl_MaxDrawBuffers"),indentSwitch:!1,hooks:{"#":u},modeProps:{fold:["brace","include"]}}),y("text/x-nesc",{name:"clike",keywords:i(s+"as atomic async call command component components configuration event generic implementation includes interface module new norace nx_struct nx_union post provides signal task uses abstract extends"),types:i(c),blockKeywords:i("case do else for if switch while struct"),atoms:i("null true false"),hooks:{"#":u},modeProps:{fold:["brace","include"]}}),y("text/x-objectivec",{name:"clike",keywords:i(s+"inline restrict _Bool _Complex _Imaginary BOOL Class bycopy byref id IMP in inout nil oneway out Protocol SEL self super atomic nonatomic retain copy readwrite readonly"),types:i(c),atoms:i("YES NO NULL NILL ON OFF true false"),hooks:{"@":function(e){return e.eatWhile(/[\w\$]/),"keyword"},"#":u,indent:function(e,t,n){if("statement"==t.type&&/^@\w/.test(n))return t.indented}},modeProps:{fold:"brace"}}),y("text/x-squirrel",{name:"clike",keywords:i("base break clone continue const default delete enum extends function in class foreach local resume return this throw typeof yield constructor instanceof static"),types:i(c),blockKeywords:i("case catch class else for foreach if switch try while"),defKeywords:i("function local class"),typeFirstDefinitions:!0,atoms:i("true false null"),hooks:{"#":u},modeProps:{fold:["brace","include"]}});var x=null;y("text/x-ceylon",{name:"clike",keywords:i("abstracts alias assembly assert assign break case catch class continue dynamic else exists extends finally for function given if import in interface is let module new nonempty object of out outer package return satisfies super switch then this throw try value void while"),types:function(e){var t=e.charAt(0);return t===t.toUpperCase()&&t!==t.toLowerCase()},blockKeywords:i("case catch class dynamic else finally for function if interface module new object switch try while"),defKeywords:i("class dynamic function interface module object package value"),builtin:i("abstract actual aliased annotation by default deprecated doc final formal late license native optional sealed see serializable shared suppressWarnings tagged throws variable"),isPunctuationChar:/[\[\]{}\(\),;\:\.`]/,isOperatorChar:/[+\-*&%=<>!?|^~:\/]/,numberStart:/[\d#$]/,number:/^(?:#[\da-fA-F_]+|\$[01_]+|[\d_]+[kMGTPmunpf]?|[\d_]+\.[\d_]+(?:[eE][-+]?\d+|[kMGTPmunpf]|)|)/i,multiLineStrings:!0,typeFirstDefinitions:!0,atoms:i("true false null larger smaller equal empty finished"),indentSwitch:!1,styleDefs:!1,hooks:{"@":function(e){return e.eatWhile(/[\w\$_]/),"meta"},'"':function(e,t){return t.tokenize=function e(t){return function(n,r){for(var o,a=!1,i=!1;!n.eol();){if(!a&&n.match('"')&&("single"==t||n.match('""'))){i=!0;break}if(!a&&n.match("``")){x=e(t),i=!0;break}o=n.next(),a="single"==t&&!a&&"\\"==o}return i&&(r.tokenize=null),"string"}}(e.match('""')?"triple":"single"),t.tokenize(e,t)},"`":function(e,t){return!(!x||!e.match("`"))&&(t.tokenize=x,x=null,t.tokenize(e,t))},"'":function(e){return e.eatWhile(/[\w\$_\xa1-\uffff]/),"atom"},token:function(e,t,n){if(("variable"==n||"type"==n)&&"."==t.prevToken)return"variable-2"}},modeProps:{fold:["brace","import"],closeBrackets:{triples:'"'}}})});
-},{"../../lib/codemirror":"kyCI"}],"HRrC":[function(require,module,exports) {
+},{"../../lib/codemirror":"mts4"}],"HRrC":[function(require,module,exports) {
var define;
var e;!function(t){"object"==typeof exports&&"object"==typeof module?t(require("../../lib/codemirror"),require("../htmlmixed/htmlmixed"),require("../clike/clike")):"function"==typeof e&&e.amd?e(["../../lib/codemirror","../htmlmixed/htmlmixed","../clike/clike"],t):t(CodeMirror)}(function(e){"use strict";function t(e){for(var t={},_=e.split(" "),r=0;r<_.length;++r)t[_[r]]=!0;return t}function _(e,t,s){return 0==e.length?r(t):function(i,l){for(var n=e[0],a=0;a\w/,!1)&&(t.tokenize=_([[["->",null]],[[/[\w]+/,"variable"]]],r,s)),"variable-2";var i=!1;for(;!e.eol()&&(i||!1===s||!e.match("{$",!1)&&!e.match(/^(\$[a-zA-Z_][a-zA-Z0-9_]*|\$\{)/,!1));){if(!i&&e.match(r)){t.tokenize=null,t.tokStack.pop(),t.tokStack.pop();break}i="\\"==e.next()&&!i}return"string"}(r,s,e,t)}}var s="abstract and array as break case catch class clone const continue declare default do else elseif enddeclare endfor endforeach endif endswitch endwhile extends final for foreach function global goto if implements interface instanceof namespace new or private protected public static switch throw trait try use var while xor die echo empty exit eval include include_once isset list require require_once return print unset __halt_compiler self static parent yield insteadof finally",i="true false null TRUE FALSE NULL __CLASS__ __DIR__ __FILE__ __LINE__ __METHOD__ __FUNCTION__ __NAMESPACE__ __TRAIT__",l="func_num_args func_get_arg func_get_args strlen strcmp strncmp strcasecmp strncasecmp each error_reporting define defined trigger_error user_error set_error_handler restore_error_handler get_declared_classes get_loaded_extensions extension_loaded get_extension_funcs debug_backtrace constant bin2hex hex2bin sleep usleep time mktime gmmktime strftime gmstrftime strtotime date gmdate getdate localtime checkdate flush wordwrap htmlspecialchars htmlentities html_entity_decode md5 md5_file crc32 getimagesize image_type_to_mime_type phpinfo phpversion phpcredits strnatcmp strnatcasecmp substr_count strspn strcspn strtok strtoupper strtolower strpos strrpos strrev hebrev hebrevc nl2br basename dirname pathinfo stripslashes stripcslashes strstr stristr strrchr str_shuffle str_word_count strcoll substr substr_replace quotemeta ucfirst ucwords strtr addslashes addcslashes rtrim str_replace str_repeat count_chars chunk_split trim ltrim strip_tags similar_text explode implode setlocale localeconv parse_str str_pad chop strchr sprintf printf vprintf vsprintf sscanf fscanf parse_url urlencode urldecode rawurlencode rawurldecode readlink linkinfo link unlink exec system escapeshellcmd escapeshellarg passthru shell_exec proc_open proc_close rand srand getrandmax mt_rand mt_srand mt_getrandmax base64_decode base64_encode abs ceil floor round is_finite is_nan is_infinite bindec hexdec octdec decbin decoct dechex base_convert number_format fmod ip2long long2ip getenv putenv getopt microtime gettimeofday getrusage uniqid quoted_printable_decode set_time_limit get_cfg_var magic_quotes_runtime set_magic_quotes_runtime get_magic_quotes_gpc get_magic_quotes_runtime import_request_variables error_log serialize unserialize memory_get_usage var_dump var_export debug_zval_dump print_r highlight_file show_source highlight_string ini_get ini_get_all ini_set ini_alter ini_restore get_include_path set_include_path restore_include_path setcookie header headers_sent connection_aborted connection_status ignore_user_abort parse_ini_file is_uploaded_file move_uploaded_file intval floatval doubleval strval gettype settype is_null is_resource is_bool is_long is_float is_int is_integer is_double is_real is_numeric is_string is_array is_object is_scalar ereg ereg_replace eregi eregi_replace split spliti join sql_regcase dl pclose popen readfile rewind rmdir umask fclose feof fgetc fgets fgetss fread fopen fpassthru ftruncate fstat fseek ftell fflush fwrite fputs mkdir rename copy tempnam tmpfile file file_get_contents file_put_contents stream_select stream_context_create stream_context_set_params stream_context_set_option stream_context_get_options stream_filter_prepend stream_filter_append fgetcsv flock get_meta_tags stream_set_write_buffer set_file_buffer set_socket_blocking stream_set_blocking socket_set_blocking stream_get_meta_data stream_register_wrapper stream_wrapper_register stream_set_timeout socket_set_timeout socket_get_status realpath fnmatch fsockopen pfsockopen pack unpack get_browser crypt opendir closedir chdir getcwd rewinddir readdir dir glob fileatime filectime filegroup fileinode filemtime fileowner fileperms filesize filetype file_exists is_writable is_writeable is_readable is_executable is_file is_dir is_link stat lstat chown touch clearstatcache mail ob_start ob_flush ob_clean ob_end_flush ob_end_clean ob_get_flush ob_get_clean ob_get_length ob_get_level ob_get_status ob_get_contents ob_implicit_flush ob_list_handlers ksort krsort natsort natcasesort asort arsort sort rsort usort uasort uksort shuffle array_walk count end prev next reset current key min max in_array array_search extract compact array_fill range array_multisort array_push array_pop array_shift array_unshift array_splice array_slice array_merge array_merge_recursive array_keys array_values array_count_values array_reverse array_reduce array_pad array_flip array_change_key_case array_rand array_unique array_intersect array_intersect_assoc array_diff array_diff_assoc array_sum array_filter array_map array_chunk array_key_exists array_intersect_key array_combine array_column pos sizeof key_exists assert assert_options version_compare ftok str_rot13 aggregate session_name session_module_name session_save_path session_id session_regenerate_id session_decode session_register session_unregister session_is_registered session_encode session_start session_destroy session_unset session_set_save_handler session_cache_limiter session_cache_expire session_set_cookie_params session_get_cookie_params session_write_close preg_match preg_match_all preg_replace preg_replace_callback preg_split preg_quote preg_grep overload ctype_alnum ctype_alpha ctype_cntrl ctype_digit ctype_lower ctype_graph ctype_print ctype_punct ctype_space ctype_upper ctype_xdigit virtual apache_request_headers apache_note apache_lookup_uri apache_child_terminate apache_setenv apache_response_headers apache_get_version getallheaders mysql_connect mysql_pconnect mysql_close mysql_select_db mysql_create_db mysql_drop_db mysql_query mysql_unbuffered_query mysql_db_query mysql_list_dbs mysql_list_tables mysql_list_fields mysql_list_processes mysql_error mysql_errno mysql_affected_rows mysql_insert_id mysql_result mysql_num_rows mysql_num_fields mysql_fetch_row mysql_fetch_array mysql_fetch_assoc mysql_fetch_object mysql_data_seek mysql_fetch_lengths mysql_fetch_field mysql_field_seek mysql_free_result mysql_field_name mysql_field_table mysql_field_len mysql_field_type mysql_field_flags mysql_escape_string mysql_real_escape_string mysql_stat mysql_thread_id mysql_client_encoding mysql_get_client_info mysql_get_host_info mysql_get_proto_info mysql_get_server_info mysql_info mysql mysql_fieldname mysql_fieldtable mysql_fieldlen mysql_fieldtype mysql_fieldflags mysql_selectdb mysql_createdb mysql_dropdb mysql_freeresult mysql_numfields mysql_numrows mysql_listdbs mysql_listtables mysql_listfields mysql_db_name mysql_dbname mysql_tablename mysql_table_name pg_connect pg_pconnect pg_close pg_connection_status pg_connection_busy pg_connection_reset pg_host pg_dbname pg_port pg_tty pg_options pg_ping pg_query pg_send_query pg_cancel_query pg_fetch_result pg_fetch_row pg_fetch_assoc pg_fetch_array pg_fetch_object pg_fetch_all pg_affected_rows pg_get_result pg_result_seek pg_result_status pg_free_result pg_last_oid pg_num_rows pg_num_fields pg_field_name pg_field_num pg_field_size pg_field_type pg_field_prtlen pg_field_is_null pg_get_notify pg_get_pid pg_result_error pg_last_error pg_last_notice pg_put_line pg_end_copy pg_copy_to pg_copy_from pg_trace pg_untrace pg_lo_create pg_lo_unlink pg_lo_open pg_lo_close pg_lo_read pg_lo_write pg_lo_read_all pg_lo_import pg_lo_export pg_lo_seek pg_lo_tell pg_escape_string pg_escape_bytea pg_unescape_bytea pg_client_encoding pg_set_client_encoding pg_meta_data pg_convert pg_insert pg_update pg_delete pg_select pg_exec pg_getlastoid pg_cmdtuples pg_errormessage pg_numrows pg_numfields pg_fieldname pg_fieldsize pg_fieldtype pg_fieldnum pg_fieldprtlen pg_fieldisnull pg_freeresult pg_result pg_loreadall pg_locreate pg_lounlink pg_loopen pg_loclose pg_loread pg_lowrite pg_loimport pg_loexport http_response_code get_declared_traits getimagesizefromstring socket_import_stream stream_set_chunk_size trait_exists header_register_callback class_uses session_status session_register_shutdown echo print global static exit array empty eval isset unset die include require include_once require_once json_decode json_encode json_last_error json_last_error_msg curl_close curl_copy_handle curl_errno curl_error curl_escape curl_exec curl_file_create curl_getinfo curl_init curl_multi_add_handle curl_multi_close curl_multi_exec curl_multi_getcontent curl_multi_info_read curl_multi_init curl_multi_remove_handle curl_multi_select curl_multi_setopt curl_multi_strerror curl_pause curl_reset curl_setopt_array curl_setopt curl_share_close curl_share_init curl_share_setopt curl_strerror curl_unescape curl_version mysqli_affected_rows mysqli_autocommit mysqli_change_user mysqli_character_set_name mysqli_close mysqli_commit mysqli_connect_errno mysqli_connect_error mysqli_connect mysqli_data_seek mysqli_debug mysqli_dump_debug_info mysqli_errno mysqli_error_list mysqli_error mysqli_fetch_all mysqli_fetch_array mysqli_fetch_assoc mysqli_fetch_field_direct mysqli_fetch_field mysqli_fetch_fields mysqli_fetch_lengths mysqli_fetch_object mysqli_fetch_row mysqli_field_count mysqli_field_seek mysqli_field_tell mysqli_free_result mysqli_get_charset mysqli_get_client_info mysqli_get_client_stats mysqli_get_client_version mysqli_get_connection_stats mysqli_get_host_info mysqli_get_proto_info mysqli_get_server_info mysqli_get_server_version mysqli_info mysqli_init mysqli_insert_id mysqli_kill mysqli_more_results mysqli_multi_query mysqli_next_result mysqli_num_fields mysqli_num_rows mysqli_options mysqli_ping mysqli_prepare mysqli_query mysqli_real_connect mysqli_real_escape_string mysqli_real_query mysqli_reap_async_query mysqli_refresh mysqli_rollback mysqli_select_db mysqli_set_charset mysqli_set_local_infile_default mysqli_set_local_infile_handler mysqli_sqlstate mysqli_ssl_set mysqli_stat mysqli_stmt_init mysqli_store_result mysqli_thread_id mysqli_thread_safe mysqli_use_result mysqli_warning_count";e.registerHelper("hintWords","php",[s,i,l].join(" ").split(" ")),e.registerHelper("wordChars","php",/[\w$]/);var n={name:"clike",helperType:"php",keywords:t(s),blockKeywords:t("catch do else elseif for foreach if switch try while finally"),defKeywords:t("class function interface namespace trait"),atoms:t(i),builtin:t(l),multiLineStrings:!0,hooks:{$:function(e){return e.eatWhile(/[\w\$_]/),"variable-2"},"<":function(e,t){var _;if(_=e.match(/<<\s*/)){var s=e.eat(/['"]/);e.eatWhile(/[\w\.]/);var i=e.current().slice(_[0].length+(s?2:1));if(s&&e.eat(s),i)return(t.tokStack||(t.tokStack=[])).push(i,0),t.tokenize=r(i,"'"!=s),"string"}return!1},"#":function(e){for(;!e.eol()&&!e.match("?>",!1);)e.next();return"comment"},"/":function(e){if(e.eat("/")){for(;!e.eol()&&!e.match("?>",!1);)e.next();return"comment"}return!1},'"':function(e,t){return(t.tokStack||(t.tokStack=[])).push('"',0),t.tokenize=r('"'),"string"},"{":function(e,t){return t.tokStack&&t.tokStack.length&&t.tokStack[t.tokStack.length-1]++,!1},"}":function(e,t){return t.tokStack&&t.tokStack.length>0&&!--t.tokStack[t.tokStack.length-1]&&(t.tokenize=r(t.tokStack[t.tokStack.length-2])),!1}}};e.defineMode("php",function(t,_){var r=e.getMode(t,_&&_.htmlMode||"text/html"),s=e.getMode(t,n);return{startState:function(){var t=e.startState(r),i=_.startOpen?e.startState(s):null;return{html:t,php:i,curMode:_.startOpen?s:r,curState:_.startOpen?i:t,pending:null}},copyState:function(t){var _,i=t.html,l=e.copyState(r,i),n=t.php,a=n&&e.copyState(s,n);return _=t.curMode==r?l:a,{html:l,php:a,curMode:t.curMode,curState:_,pending:t.pending}},token:function(t,_){var i=_.curMode==s;if(t.sol()&&_.pending&&'"'!=_.pending&&"'"!=_.pending&&(_.pending=null),i)return i&&null==_.php.tokenize&&t.match("?>")?(_.curMode=r,_.curState=_.html,_.php.context.prev||(_.php=null),"meta"):s.token(t,_.curState);if(t.match(/^<\?\w*/))return _.curMode=s,_.php||(_.php=e.startState(s,r.indent(_.html,""))),_.curState=_.php,"meta";if('"'==_.pending||"'"==_.pending){for(;!t.eol()&&t.next()!=_.pending;);var l="string"}else _.pending&&t.pos<_.pending.end?(t.pos=_.pending.end,l=_.pending.style):l=r.token(t,_.curState);_.pending&&(_.pending=null);var n,a=t.current(),o=a.search(/<\?/);return-1!=o&&("string"==l&&(n=a.match(/[\'\"]$/))&&!/\?>/.test(a)?_.pending=n[0]:_.pending={end:t.pos,style:l},t.backUp(a.length-o)),l},indent:function(e,t){return e.curMode!=s&&/^\s*<\//.test(t)||e.curMode==s&&/^\?>/.test(t)?r.indent(e.html,t):e.curMode.indent(e.curState,t)},blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:"//",innerMode:function(e){return{state:e.curState,mode:e.curMode}}}},"htmlmixed","clike"),e.defineMIME("application/x-httpd-php","php"),e.defineMIME("application/x-httpd-php-open",{name:"php",startOpen:!0}),e.defineMIME("text/x-php",n)});
-},{"../../lib/codemirror":"kyCI","../htmlmixed/htmlmixed":"b+cg","../clike/clike":"Z7EF"}],"F9rH":[function(require,module,exports) {
+},{"../../lib/codemirror":"mts4","../htmlmixed/htmlmixed":"b+cg","../clike/clike":"Z7EF"}],"F9rH":[function(require,module,exports) {
var define;
var e;!function(t){"object"==typeof exports&&"object"==typeof module?t(require("../../lib/codemirror")):"function"==typeof e&&e.amd?e(["../../lib/codemirror"],t):t(CodeMirror)}(function(e){"use strict";var t="CodeMirror-activeline",n="CodeMirror-activeline-background",i="CodeMirror-activeline-gutter";function r(e){for(var r=0;r1)return a(e);var t=e.getCursor("start"),o=e.getCursor("end"),r=e.state.markedSelection;if(!r.length)return l(e,t,o);var f=r[0].find(),s=r[r.length-1].find();if(!f||!s||o.line-t.line<=n||i(t,s.to)>=0||i(o,f.from)<=0)return a(e);for(;i(t,f.from)>0;)r.shift().clear(),f=r[0].find();i(t,f.from)<0&&(f.to.line-t.line0&&(o.line-s.from.line=o.line,u=m?o:r(d,0),S=e.markText(s,u,{className:a});if(null==l?c.push(S):c.splice(l++,0,S),m)break;f=d}}function c(e){for(var t=e.state.markedSelection,o=0;o>1,h=r(t.slice(0,l)).length;if(h==e)return l;h>e?o=l:i=l+1}}function s(t,s,c,f){var u;this.atOccurrence=!1,this.doc=t,c=c?t.clipPos(c):r(0,0),this.pos={from:c,to:c},"object"==typeof f?u=f.caseFold:(u=f,f=null),"string"==typeof s?(null==u&&(u=!1),this.matches=function(i,o){return(i?function(t,i,o,l){if(!i.length)return null;var s=l?n:e,c=s(i).split(/\r|\n\r?/);t:for(var f=o.line,u=o.ch,a=t.firstLine()-1+c.length;f>=a;f--,u=-1){var g=t.getLine(f);u>-1&&(g=g.slice(0,u));var m=s(g);if(1==c.length){var v=m.lastIndexOf(c[0]);if(-1==v)continue t;return{from:r(f,h(g,m,v,s)),to:r(f,h(g,m,v+c[0].length,s))}}var d=c[c.length-1];if(m.slice(0,d.length)==d){var p=1;for(o=f-c.length+1;p=s;o--,h=-1){var c=t.getLine(o);h>-1&&(c=c.slice(0,h));var f=l(c,n);if(f)return{from:r(o,f.index),to:r(o,f.index+f[0].length),match:f}}}:o)(t,s,e)}:this.matches=function(n,e){return(n?function(t,n,e){n=i(n,"gm");for(var o,h=1,s=e.line,c=t.firstLine();s>=c;){for(var f=0;fc);f++){var u=t.getLine(s++);l=null==l?u:l+"\n"+u}h*=2,n.lastIndex=e.ch;var a=n.exec(l);if(a){var g=l.slice(0,a.index).split("\n"),m=a[0].split("\n"),v=e.line+g.length-1,d=g[g.length-1].length;return{from:r(v,d),to:r(v+m.length-1,1==m.length?d+m[0].length:m[m.length-1].length),match:a}}}})(t,s,e)})}String.prototype.normalize?(n=function(t){return t.normalize("NFD").toLowerCase()},e=function(t){return t.normalize("NFD")}):(n=function(t){return t.toLowerCase()},e=function(t){return t}),s.prototype={findNext:function(){return this.find(!1)},findPrevious:function(){return this.find(!0)},find:function(n){for(var e=this.matches(n,this.doc.clipPos(n?this.pos.from:this.pos.to));e&&0==t.cmpPos(e.from,e.to);)n?e.from.ch?e.from=r(e.from.line,e.from.ch-1):e=e.from.line==this.doc.firstLine()?null:this.matches(n,this.doc.clipPos(r(e.from.line-1))):e.to.ch0);)r.push({anchor:i.from(),head:i.to()});r.length&&this.setSelections(r,0)})});
-},{"../../lib/codemirror":"kyCI"}],"u+lD":[function(require,module,exports) {
+},{"../../lib/codemirror":"mts4"}],"u+lD":[function(require,module,exports) {
var define;
var t;!function(i){"object"==typeof exports&&"object"==typeof module?i(require("../../lib/codemirror")):"function"==typeof t&&t.amd?t(["../../lib/codemirror"],i):i(CodeMirror)}(function(t){"use strict";var i="CodeMirror-hint",e="CodeMirror-hint-active";function n(t,i){this.cm=t,this.options=i,this.widget=null,this.debounce=0,this.tick=0,this.startPos=this.cm.getCursor("start"),this.startLen=this.cm.getLine(this.startPos.line).length-this.cm.getSelection().length;var e=this;t.on("cursorActivity",this.activityFunc=function(){e.cursorActivity()})}t.showHint=function(t,i,e){if(!i)return t.showHint(e);e&&e.async&&(i.async=!0);var n={hint:i};if(e)for(var o in e)n[o]=e[o];return t.showHint(n)},t.defineExtension("showHint",function(i){i=function(t,i,e){var n=t.options.hintOptions,o={};for(var s in a)o[s]=a[s];if(n)for(var s in n)void 0!==n[s]&&(o[s]=n[s]);if(e)for(var s in e)void 0!==e[s]&&(o[s]=e[s]);o.hint.resolve&&(o.hint=o.hint.resolve(t,i));return o}(this,this.getCursor("start"),i);var e=this.listSelections();if(!(e.length>1)){if(this.somethingSelected()){if(!i.hint.supportsSelection)return;for(var o=0;ol.clientHeight+1,A=h.getScrollInfo();if(b>0){var S=C.bottom-C.top;if(g.top-(g.bottom-C.top)-S>0)l.style.top=(y=g.top-S)+"px",w=!1;else if(S>k){l.style.height=k-5+"px",l.style.top=(y=g.bottom-C.top)+"px";var T=h.getCursor();o.from.ch!=T.ch&&(g=h.cursorCoords(T),l.style.left=(v=g.left)+"px",C=l.getBoundingClientRect())}}var M,N=C.right-H;if(N>0&&(C.right-C.left>H&&(l.style.width=H-5+"px",N-=C.right-C.left-H),l.style.left=(v=g.left-N)+"px"),x)for(var F=l.firstChild;F;F=F.nextSibling)F.style.paddingRight=h.display.nativeBarWidth+"px";(h.addKeyMap(this.keyMap=function(t,i){var e={Up:function(){i.moveFocus(-1)},Down:function(){i.moveFocus(1)},PageUp:function(){i.moveFocus(1-i.menuSize(),!0)},PageDown:function(){i.moveFocus(i.menuSize()-1,!0)},Home:function(){i.setFocus(0)},End:function(){i.setFocus(i.length-1)},Enter:i.pick,Tab:i.pick,Esc:i.close},n=t.options.customKeys,o=n?{}:e;function s(t,n){var s;s="string"!=typeof n?function(t){return n(t,i)}:e.hasOwnProperty(n)?e[n]:n,o[t]=s}if(n)for(var c in n)n.hasOwnProperty(c)&&s(c,n[c]);var r=t.options.extraKeys;if(r)for(var c in r)r.hasOwnProperty(c)&&s(c,r[c]);return o}(n,{moveFocus:function(t,i){s.changeActive(s.selectedHint+t,i)},setFocus:function(t){s.changeActive(t)},menuSize:function(){return s.screenAmount()},length:u.length,close:function(){n.close()},pick:function(){s.pick()},data:o})),n.options.closeOnUnfocus)&&(h.on("blur",this.onBlur=function(){M=setTimeout(function(){n.close()},100)}),h.on("focus",this.onFocus=function(){clearTimeout(M)}));return h.on("scroll",this.onScroll=function(){var t=h.getScrollInfo(),i=h.getWrapperElement().getBoundingClientRect(),e=y+A.top-t.top,o=e-(window.pageYOffset||(document.documentElement||document.body).scrollTop);if(w||(o+=l.offsetHeight),o<=i.top||o>=i.bottom)return n.close();l.style.top=e+"px",l.style.left=v+A.left-t.left+"px"}),t.on(l,"dblclick",function(t){var i=r(l,t.target||t.srcElement);i&&null!=i.hintId&&(s.changeActive(i.hintId),s.pick())}),t.on(l,"click",function(t){var i=r(l,t.target||t.srcElement);i&&null!=i.hintId&&(s.changeActive(i.hintId),n.options.completeOnSingleClick&&s.pick())}),t.on(l,"mousedown",function(){setTimeout(function(){h.focus()},20)}),t.signal(o,"select",u[this.selectedHint],l.childNodes[this.selectedHint]),!0}function l(t,i,e,n){if(t.async)t(i,n,e);else{var o=t(i,e);o&&o.then?o.then(n):n(o)}}n.prototype={close:function(){this.active()&&(this.cm.state.completionActive=null,this.tick=null,this.cm.off("cursorActivity",this.activityFunc),this.widget&&this.data&&t.signal(this.data,"close"),this.widget&&this.widget.close(),t.signal(this.cm,"endCompletion",this.cm))},active:function(){return this.cm.state.completionActive==this},pick:function(i,e){var n=i.list[e];n.hint?n.hint(this.cm,i,n):this.cm.replaceRange(c(n),n.from||i.from,n.to||i.to,"complete"),t.signal(i,"pick",n),this.close()},cursorActivity:function(){this.debounce&&(s(this.debounce),this.debounce=0);var t=this.cm.getCursor(),i=this.cm.getLine(t.line);if(t.line!=this.startPos.line||i.length-t.ch!=this.startLen-this.startPos.ch||t.ch=this.data.list.length?i=n?this.data.list.length-1:0:i<0&&(i=n?0:this.data.list.length-1),this.selectedHint!=i){var o=this.hints.childNodes[this.selectedHint];o&&(o.className=o.className.replace(" "+e,"")),(o=this.hints.childNodes[this.selectedHint=i]).className+=" "+e,o.offsetTopthis.hints.scrollTop+this.hints.clientHeight&&(this.hints.scrollTop=o.offsetTop+o.offsetHeight-this.hints.clientHeight+3),t.signal(this.data,"select",this.data.list[this.selectedHint],o)}},screenAmount:function(){return Math.floor(this.hints.clientHeight/this.hints.firstChild.offsetHeight)||1}},t.registerHelper("hint","auto",{resolve:function(i,e){var n,o=i.getHelpers(e,"hint");if(o.length){var s=function(t,i,e){var n=function(t,i){if(!t.somethingSelected())return i;for(var e=[],n=0;n0?i(t):o(s+1)})}(0)};return s.async=!0,s.supportsSelection=!0,s}return(n=i.getHelper(i.getCursor(),"hintWords"))?function(i){return t.hint.fromList(i,{words:n})}:t.hint.anyword?function(i,e){return t.hint.anyword(i,e)}:function(){}}}),t.registerHelper("hint","fromList",function(i,e){var n,o=i.getCursor(),s=i.getTokenAt(o),c=t.Pos(o.line,s.start),r=o;s.start,]/,closeOnUnfocus:!0,completeOnSingleClick:!0,container:null,customKeys:null,extraKeys:null};t.defineOption("hintOptions",null)});
-},{"../../lib/codemirror":"kyCI"}],"GCym":[function(require,module,exports) {
+},{"../../lib/codemirror":"mts4"}],"GCym":[function(require,module,exports) {
var define;
var global = arguments[3];
var t,e=arguments[3];!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof t&&t.amd?t(["../../lib/codemirror"],e):e(CodeMirror)}(function(t){var e=t.Pos;function r(t,e){for(var r=0,n=t.length;rf.ch&&(p.end=f.ch,p.string=p.string.slice(0,f.ch-p.start)):p={start:f.ch,end:f.ch,string:"",state:p.state,type:"."==p.string?"property":null};for(var g=p;"property"==g.type;){if("."!=(g=l(n,e(f.line,g.start))).string)return;if(g=l(n,e(f.line,g.start)),!y)var y=[];y.push(g)}return{list:function(t,e,n,i){var l=[],c=t.string,f=i&&i.globalScope||window;function p(t){0!=t.lastIndexOf(c,0)||function(t,e){if(!Array.prototype.indexOf){for(var r=t.length;r--;)if(t[r]===e)return!0;return!1}return-1!=t.indexOf(e)}(l,t)||l.push(t)}function u(t){"string"==typeof t?r(o,p):t instanceof Array?r(s,p):t instanceof Function&&r(a,p),function(t,e){if(Object.getOwnPropertyNames&&Object.getPrototypeOf)for(var r=t;r;r=Object.getPrototypeOf(r))Object.getOwnPropertyNames(r).forEach(e);else for(var n in t)e(n)}(t,p)}if(e&&e.length){var g,y=e.pop();for(y.type&&0===y.type.indexOf("variable")?(i&&i.additionalContext&&(g=i.additionalContext[y.string]),i&&!1===i.useGlobalScope||(g=g||f[y.string])):"string"==y.type?g="":"atom"==y.type?g=1:"function"==y.type&&(null==f.jQuery||"$"!=y.string&&"jQuery"!=y.string||"function"!=typeof f.jQuery?null!=f._&&"_"==y.string&&"function"==typeof f._&&(g=f._()):g=f.jQuery());null!=g&&e.length;)g=g[e.pop().string];null!=g&&u(g)}else{for(var d=t.state.localVars;d;d=d.next)p(d.name);for(var d=t.state.globalVars;d;d=d.next)p(d.name);i&&!1===i.useGlobalScope||u(f),r(n,p)}return l}(p,y,i,c),from:e(f.line,p.start),to:e(f.line,p.end)}}}}function i(t,e){var r=t.getTokenAt(e);return e.ch==r.start+1&&"."==r.string.charAt(0)?(r.end=r.start,r.string=".",r.type="property"):/^\.[\w$_]*$/.test(r.string)&&(r.type="property",r.start++,r.string=r.string.replace(/\./,"")),r}t.registerHelper("hint","javascript",function(t,e){return n(t,l,function(t,e){return t.getTokenAt(e)},e)}),t.registerHelper("hint","coffeescript",function(t,e){return n(t,c,i,e)});var o="charAt charCodeAt indexOf lastIndexOf substring substr slice trim trimLeft trimRight toUpperCase toLowerCase split concat match replace search".split(" "),s="length concat join splice push pop shift unshift slice reverse sort indexOf lastIndexOf every some filter forEach map reduce reduceRight ".split(" "),a="prototype apply call bind".split(" "),l="break case catch class const continue debugger default delete do else export extends false finally for function if in import instanceof new null return super switch this throw true try typeof var void while with yield".split(" "),c="and break catch class continue delete do else extends false finally for if in instanceof isnt new no not null of off on or return switch then throw true try typeof until void while with yes".split(" ")});
-},{"../../lib/codemirror":"kyCI"}],"UK68":[function(require,module,exports) {
+},{"../../lib/codemirror":"mts4"}],"UK68":[function(require,module,exports) {
var define;
var t;!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof t&&t.amd?t(["../../lib/codemirror"],e):e(CodeMirror)}(function(t){"use strict";function e(t,e){function i(t){clearTimeout(n.doRedraw),n.doRedraw=setTimeout(function(){n.redraw()},t)}this.cm=t,this.options=e,this.buttonHeight=e.scrollButtonHeight||t.getOption("scrollButtonHeight"),this.annotations=[],this.doRedraw=this.doUpdate=null,this.div=t.getWrapperElement().appendChild(document.createElement("div")),this.div.style.cssText="position: absolute; right: 0; top: 0; z-index: 7; pointer-events: none",this.computeScale();var n=this;t.on("refresh",this.resizeHandler=function(){clearTimeout(n.doUpdate),n.doUpdate=setTimeout(function(){n.computeScale()&&i(20)},100)}),t.on("markerAdded",this.resizeHandler),t.on("markerCleared",this.resizeHandler),!1!==e.listenForChanges&&t.on("change",this.changeHandler=function(){i(250)})}t.defineExtension("annotateScrollbar",function(t){return"string"==typeof t&&(t={className:t}),new e(this,t)}),t.defineOption("scrollButtonHeight",0),e.prototype.computeScale=function(){var t=this.cm,e=(t.getWrapperElement().clientHeight-t.display.barHeight-2*this.buttonHeight)/t.getScrollerElement().scrollHeight;if(e!=this.hScale)return this.hScale=e,!0},e.prototype.update=function(t){this.annotations=t,this.redraw()},e.prototype.redraw=function(t){!1!==t&&this.computeScale();var e=this.cm,i=this.hScale,n=document.createDocumentFragment(),o=this.annotations,r=e.getOption("lineWrapping"),a=r&&1.5*e.defaultTextHeight(),s=null,h=null;function l(t,i){return s!=t.line&&(s=t.line,h=e.getLineHandle(s)),h.widgets&&h.widgets.length||r&&h.height>a?e.charCoords(t,"local")[i?"top":"bottom"]:e.heightAtLine(h,"local")+(i?0:h.height)}var d=e.lastLine();if(e.display.barWidth)for(var c,p=0;pd)){for(var m=c||l(u.from,!0)*i,f=l(u.to,!1)*i;pd)&&!((c=l(o[p+1].from,!0)*i)>f+.9);)f=l((u=o[++p]).to,!1)*i;if(f!=m){var g=Math.max(f-m,3),H=n.appendChild(document.createElement("div"));H.style.cssText="position: absolute; right: 0px; width: "+Math.max(e.display.barWidth-1,2)+"px; top: "+(m+this.buttonHeight)+"px; height: "+g+"px",H.className=this.options.className,u.id&&H.setAttribute("annotation-id",u.id)}}}this.div.textContent="",this.div.appendChild(n)},e.prototype.clear=function(){this.cm.off("refresh",this.resizeHandler),this.cm.off("markerAdded",this.resizeHandler),this.cm.off("markerCleared",this.resizeHandler),this.changeHandler&&this.cm.off("change",this.changeHandler),this.div.parentNode.removeChild(this.div)}});
-},{"../../lib/codemirror":"kyCI"}],"LpEv":[function(require,module,exports) {
+},{"../../lib/codemirror":"mts4"}],"LpEv":[function(require,module,exports) {
var define;
var t;!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),require("./searchcursor"),require("../scroll/annotatescrollbar")):"function"==typeof t&&t.amd?t(["../../lib/codemirror","./searchcursor","../scroll/annotatescrollbar"],e):e(CodeMirror)}(function(t){"use strict";function e(t,e,o,i){this.cm=t,this.options=i;var a={listenForChanges:!1};for(var s in i)a[s]=i[s];a.className||(a.className="CodeMirror-search-match"),this.annotation=t.annotateScrollbar(a),this.query=e,this.caseFold=o,this.gap={from:t.firstLine(),to:t.lastLine()+1},this.matches=[],this.update=null,this.findMatches(),this.annotation.update(this.matches);var r=this;t.on("change",this.changeHandler=function(t,e){r.onChange(e)})}t.defineExtension("showMatchesOnScrollbar",function(t,o,i){return"string"==typeof i&&(i={className:i}),i||(i={}),new e(this,t,o,i)});function o(t,e,o){return t<=e?t:Math.max(e,t+o)}e.prototype.findMatches=function(){if(this.gap){for(var e=0;e=this.gap.to)break;a.to.line>=this.gap.from&&this.matches.splice(e--,1)}for(var o=this.cm.getSearchCursor(this.query,t.Pos(this.gap.from,0),this.caseFold),i=this.options&&this.options.maxMatches||1e3;o.findNext();){var a;if((a={from:o.from(),to:o.to()}).from.line>=this.gap.to)break;if(this.matches.splice(e++,0,a),this.matches.length>i)break}this.gap=null}},e.prototype.onChange=function(e){var i=e.from.line,a=t.changeEnd(e).line,s=a-e.to.line;if(this.gap?(this.gap.from=Math.min(o(this.gap.from,i,s),e.from.line),this.gap.to=Math.max(o(this.gap.to,i,s),e.from.line)):this.gap={from:e.from.line,to:a+1},s)for(var r=0;r0){var i={line:e.line,ch:e.ch-1},r=t.getRange(i,e);if(null===r.match(/\W/))return!1}if(o.ch=e.options.minChars&&a(t,r,!1,e.options.style)}}else{for(var n=!0===e.options.showToken?/[\w$]/:e.options.showToken,c=t.getCursor(),l=t.getLine(c.line),h=c.ch,u=h;h&&n.test(l.charAt(h-1));)--h;for(;u",")":"(<","[":"]>","]":"[<","{":"}>","}":"{<"};function i(t,e,i){var c=t.getLineHandle(e.line),o=e.ch-1,l=i&&i.afterCursor;null==l&&(l=/(^| )cm-fat-cursor($| )/.test(t.getWrapperElement().className));var h=!l&&o>=0&&r[c.text.charAt(o)]||r[c.text.charAt(++o)];if(!h)return null;var s=">"==h.charAt(1)?1:-1;if(i&&i.strict&&s>0!=(o==e.ch))return null;var u=t.getTokenTypeAt(n(e.line,o+1)),f=a(t,n(e.line,o+(s>0?1:0)),s,u||null,i);return null==f?null:{from:n(e.line,o),to:f&&f.pos,match:f&&f.ch==h.charAt(0),forward:s>0}}function a(t,e,i,a,c){for(var o=c&&c.maxScanLineLength||1e4,l=c&&c.maxScanLines||1e3,h=[],s=c&&c.bracketRegex?c.bracketRegex:/[(){}[\]]/,u=i>0?Math.min(e.line+l,t.lastLine()+1):Math.max(t.firstLine()-1,e.line-l),f=e.line;f!=u;f+=i){var m=t.getLine(f);if(m){var g=i>0?0:m.length-1,d=i>0?m.length:-1;if(!(m.length>o))for(f==e.line&&(g=e.ch-(i<0?1:0));g!=d;g+=i){var k=m.charAt(g);if(s.test(k)&&(void 0===a||t.getTokenTypeAt(n(f,g+1))==a))if(">"==r[k].charAt(1)==i>0)h.push(k);else{if(!h.length)return{pos:n(f,g),ch:k};h.pop()}}}}return f-i!=(i>0?t.lastLine():t.firstLine())&&null}function c(t,r,a){for(var c=t.state.matchBrackets.maxHighlightLineLength||1e3,o=[],l=t.listSelections(),h=0;h=0;r--){var a=l[r].from(),m=l[r].to();a.line>=t||(m.line>=t&&(m=i(t,0)),t=a.line,null==o?this.uncomment(a,m,e)?o="un":(this.lineComment(a,m,e),o="line"):"un"==o?this.uncomment(a,m,e):this.lineComment(a,m,e))}}),e.defineExtension("lineComment",function(e,r,a){a||(a=n);var m=this,c=o(m,e),g=m.getLine(e.line);if(null!=g&&(s=e,f=g,!/\bstring\b/.test(m.getTokenTypeAt(i(s.line,0)))||/^[\'\"\`]/.test(f))){var s,f,u=a.lineComment||c.lineComment;if(u){var d=Math.min(0!=r.ch||r.line==e.line?r.line+1:r.line,m.lastLine()+1),h=null==a.padding?" ":a.padding,v=a.commentBlankLines||e.line==r.line;m.operation(function(){if(a.indent){for(var n=null,o=e.line;or.length)&&(n=r)}for(o=e.line;os||a.operation(function(){if(0!=r.fullLines){var n=t.test(a.getLine(s));a.replaceRange(f+g,i(s)),a.replaceRange(c+f,i(e.line,0));var o=r.blockCommentLead||m.blockCommentLead;if(null!=o)for(var u=e.line+1;u<=s;++u)(u!=s||n)&&a.replaceRange(o+f,i(u,0))}else a.replaceRange(g,l),a.replaceRange(c,e)})}}else(r.lineComment||m.lineComment)&&0!=r.fullLines&&a.lineComment(e,l,r)}),e.defineExtension("uncomment",function(e,l,r){r||(r=n);var a,m=this,c=o(m,e),g=Math.min(0!=l.ch||l.line==e.line?l.line:l.line-1,m.lastLine()),s=Math.min(e.line,g),f=r.lineComment||c.lineComment,u=[],d=null==r.padding?" ":r.padding;e:if(f){for(var h=s;h<=g;++h){var v=m.getLine(h),p=v.indexOf(f);if(p>-1&&!/comment/.test(m.getTokenTypeAt(i(h,p+1)))&&(p=-1),-1==p&&t.test(v))break e;if(p>-1&&t.test(v.slice(0,p)))break e;u.push(v)}if(m.operation(function(){for(var e=s;e<=g;++e){var n=u[e-s],t=n.indexOf(f),l=t+f.length;t<0||(n.slice(l,l+d.length)==d&&(l+=d.length),a=!0,m.replaceRange("",i(e,t),i(e,l)))}}),a)return!0}var C=r.blockCommentStart||c.blockCommentStart,b=r.blockCommentEnd||c.blockCommentEnd;if(!C||!b)return!1;var k=r.blockCommentLead||c.blockCommentLead,L=m.getLine(s),x=L.indexOf(C);if(-1==x)return!1;var R=g==s?L:m.getLine(g),O=R.indexOf(b,g==s?x+C.length:0),T=i(s,x+1),y=i(g,O+1);if(-1==O||!/comment/.test(m.getTokenTypeAt(T))||!/comment/.test(m.getTokenTypeAt(y))||m.getRange(T,y,"\n").indexOf(b)>-1)return!1;var E=L.lastIndexOf(C,e.ch),M=-1==E?-1:L.slice(0,e.ch).indexOf(b,E+C.length);if(-1!=E&&-1!=M&&M+b.length!=e.ch)return!1;M=R.indexOf(b,l.ch);var S=R.slice(l.ch).lastIndexOf(C,M-l.ch);return E=-1==M||-1==S?-1:l.ch+S,(-1==M||-1==E||E==l.ch)&&(m.operation(function(){m.replaceRange("",i(g,O-(d&&R.slice(O-d.length,O)==d?d.length:0)),i(g,O+b.length));var e=x+C.length;if(d&&L.slice(e,e+d.length)==d&&(e+=d.length),m.replaceRange("",i(s,x),i(s,e)),k)for(var n=s+1;n<=g;++n){var l=m.getLine(n),o=l.indexOf(k);if(-1!=o&&!t.test(l.slice(0,o))){var r=o+k.length;d&&l.slice(r,r+d.length)==d&&(r+=d.length),m.replaceRange("",i(n,o),i(n,r))}}}),!0)})});
-},{"../../lib/codemirror":"kyCI"}],"a+JB":[function(require,module,exports) {
+},{"../../lib/codemirror":"mts4"}],"a+JB":[function(require,module,exports) {
var define;
var e;!function(o){"object"==typeof exports&&"object"==typeof module?o(require("../../lib/codemirror")):"function"==typeof e&&e.amd?e(["../../lib/codemirror"],o):o(CodeMirror)}(function(e){function o(o,n,t){var i,r=o.getWrapperElement();return(i=r.appendChild(document.createElement("div"))).className=t?"CodeMirror-dialog CodeMirror-dialog-bottom":"CodeMirror-dialog CodeMirror-dialog-top","string"==typeof n?i.innerHTML=n:i.appendChild(n),e.addClass(r,"dialog-opened"),i}function n(e,o){e.state.currentNotificationClose&&e.state.currentNotificationClose(),e.state.currentNotificationClose=o}e.defineExtension("openDialog",function(t,i,r){r||(r={}),n(this,null);var u=o(this,t,r.bottom),l=!1,a=this;function c(o){if("string"==typeof o)d.value=o;else{if(l)return;l=!0,e.rmClass(u.parentNode,"dialog-opened"),u.parentNode.removeChild(u),a.focus(),r.onClose&&r.onClose(u)}}var s,d=u.getElementsByTagName("input")[0];return d?(d.focus(),r.value&&(d.value=r.value,!1!==r.selectValueOnOpen&&d.select()),r.onInput&&e.on(d,"input",function(e){r.onInput(e,d.value,c)}),r.onKeyUp&&e.on(d,"keyup",function(e){r.onKeyUp(e,d.value,c)}),e.on(d,"keydown",function(o){r&&r.onKeyDown&&r.onKeyDown(o,d.value,c)||((27==o.keyCode||!1!==r.closeOnEnter&&13==o.keyCode)&&(d.blur(),e.e_stop(o),c()),13==o.keyCode&&i(d.value,o))}),!1!==r.closeOnBlur&&e.on(d,"blur",c)):(s=u.getElementsByTagName("button")[0])&&(e.on(s,"click",function(){c(),a.focus()}),!1!==r.closeOnBlur&&e.on(s,"blur",c),s.focus()),c}),e.defineExtension("openConfirm",function(t,i,r){n(this,null);var u=o(this,t,r&&r.bottom),l=u.getElementsByTagName("button"),a=!1,c=this,s=1;function d(){a||(a=!0,e.rmClass(u.parentNode,"dialog-opened"),u.parentNode.removeChild(u),c.focus())}l[0].focus();for(var f=0;fo.cursorCoords(n,"window").top&&((d=r).style.opacity=.4)}))};!function(e,o,n,r,t){e.openDialog(o,r,{value:n,selectValueOnOpen:!0,closeOnEnter:!1,onClose:function(){p(e)},onKeyDown:t})}(o,c,u,y,function(r,t){var i=e.keyName(r),a=o.getOption("extraKeys"),s=a&&a[i]||e.keyMap[o.getOption("keyMap")][i];"findNext"==s||"findPrev"==s||"findPersistentNext"==s||"findPersistentPrev"==s?(e.e_stop(r),l(o,n(o),t),o.execCommand(s)):"find"!=s&&"findPersistent"!=s||(e.e_stop(r),y(t,r))}),a&&u&&(l(o,s,u),f(o,r))}else i(o,c,"Search for:",u,function(e){e&&!s.query&&o.operation(function(){l(o,s,e),s.posFrom=s.posTo=o.getCursor(),f(o,r)})})}function f(o,r,i){o.operation(function(){var a=n(o),s=t(o,a.query,r?a.posFrom:a.posTo);(s.find(r)||(s=t(o,a.query,r?e.Pos(o.lastLine()):e.Pos(o.firstLine(),0))).find(r))&&(o.setSelection(s.from(),s.to()),o.scrollIntoView({from:s.from(),to:s.to()},20),a.posFrom=s.from(),a.posTo=s.to(),i&&i(s.from(),s.to()))})}function p(e){e.operation(function(){var o=n(e);o.lastQuery=o.query,o.query&&(o.query=o.queryText=null,e.removeOverlay(o.overlay),o.annotate&&(o.annotate.clear(),o.annotate=null))})}var d=' (Use /re/ syntax for regexp search)',y='With: ',m='Replace? ';function g(e,o,n){e.operation(function(){for(var r=t(e,o);r.findNext();)if("string"!=typeof o){var i=e.getRange(r.from(),r.to()).match(o);r.replace(n.replace(/\$(\d)/g,function(e,o){return i[o]}))}else r.replace(n)})}function h(e,o){if(!e.getOption("readOnly")){var r=e.getSelection()||n(e).lastQuery,c=''+(o?"Replace all:":"Replace:")+"";i(e,c+d,c,r,function(n){n&&(n=s(n),i(e,y,"Replace with:","",function(r){if(r=a(r),o)g(e,n,r);else{p(e);var i=t(e,n,e.getCursor("from")),s=function(){var o,a=i.from();!(o=i.findNext())&&(i=t(e,n),!(o=i.findNext())||a&&i.from().line==a.line&&i.from().ch==a.ch)||(e.setSelection(i.from(),i.to()),e.scrollIntoView({from:i.from(),to:i.to()}),function(e,o,n,r){e.openConfirm?e.openConfirm(o,r):confirm(n)&&r[0]()}(e,m,"Replace?",[function(){c(o)},s,function(){g(e,n,r)}]))},c=function(e){i.replace("string"==typeof n?r:r.replace(/\$(\d)/g,function(o,n){return e[n]})),s()};s()}}))})}}e.commands.find=function(e){p(e),u(e)},e.commands.findPersistent=function(e){p(e),u(e,!1,!0)},e.commands.findPersistentNext=function(e){u(e,!1,!0,!0)},e.commands.findPersistentPrev=function(e){u(e,!0,!0,!0)},e.commands.findNext=u,e.commands.findPrev=function(e){u(e,!0)},e.commands.clearSearch=p,e.commands.replace=h,e.commands.replaceAll=function(e){h(e,!0)}});
-},{"../../lib/codemirror":"kyCI","./searchcursor":"VnAw","../dialog/dialog":"a+JB"}],"EDpt":[function(require,module,exports) {
+},{"../../lib/codemirror":"mts4","./searchcursor":"VnAw","../dialog/dialog":"a+JB"}],"EDpt":[function(require,module,exports) {
var define;
var e;!function(t){"object"==typeof exports&&"object"==typeof module?t(require("../lib/codemirror"),require("../addon/search/searchcursor"),require("../addon/edit/matchbrackets")):"function"==typeof e&&e.amd?e(["../lib/codemirror","../addon/search/searchcursor","../addon/edit/matchbrackets"],t):t(CodeMirror)}(function(e){"use strict";var t=e.commands,n=e.Pos;function r(t,r){t.extendSelectionsBy(function(o){return t.display.shift||t.doc.extend||o.empty()?function(t,r,o){if(o<0&&0==r.ch)return t.clipPos(n(r.line-1));var i=t.getLine(r.line);if(o>0&&r.ch>=i.length)return t.clipPos(n(r.line+1,0));for(var l,a="start",s=r.ch,c=o<0?0:i.length,f=0;s!=c;s+=o,f++){var u=i.charAt(o<0?s-1:s),d="_"!=u&&e.isWordChar(u)?"w":"o";if("w"==d&&u.toUpperCase()==u&&(d="W"),"start"==a)"o"!=d&&(a="in",l=d);else if("in"==a&&l!=d){if("w"==l&&"W"==d&&o<0&&s--,"W"==l&&"w"==d&&o>0){l="w";continue}break}}return n(r.line,s)}(t.doc,o.head,r):r<0?o.from():o.to()})}function o(t,r){if(t.isReadOnly())return e.Pass;t.operation(function(){for(var e=t.listSelections().length,o=[],i=-1,l=0;l=n&&e.execCommand("goLineUp")}e.scrollTo(null,t.top-e.defaultTextHeight())},t.scrollLineDown=function(e){var t=e.getScrollInfo();if(!e.somethingSelected()){var n=e.lineAtHeight(t.top,"local")+1;e.getCursor().line<=n&&e.execCommand("goLineDown")}e.scrollTo(null,t.top+e.defaultTextHeight())},t.splitSelectionByLine=function(e){for(var t=e.listSelections(),r=[],o=0;oi.line&&a==l.line&&0==l.ch||r.push({anchor:a==i.line?i:n(a,0),head:a==l.line?l:n(a)});e.setSelections(r,0)},t.singleSelectionTop=function(e){var t=e.listSelections()[0];e.setSelection(t.anchor,t.head,{scroll:!1})},t.selectLine=function(e){for(var t=e.listSelections(),r=[],o=0;o=0;a--){var c=r[o[a]];if(!(s&&e.cmpPos(c.head,s)>0)){var f=i(t,c.head);s=f.from,t.replaceRange(n(f.word),f.from,f.to)}}})}function u(t){var n=t.getCursor("from"),r=t.getCursor("to");if(0==e.cmpPos(n,r)){var o=i(t,n);if(!o.word)return;n=o.from,r=o.to}return{from:n,to:r,query:t.getRange(n,r),word:o}}function d(e,t){var r=u(e);if(r){var o=r.query,i=e.getSearchCursor(o,t?r.to:r.from);(t?i.findNext():i.findPrevious())?e.setSelection(i.from(),i.to()):(i=e.getSearchCursor(o,t?n(e.firstLine(),0):e.clipPos(n(e.lastLine()))),(t?i.findNext():i.findPrevious())?e.setSelection(i.from(),i.to()):r.word&&e.setSelection(r.from,r.to))}}t.selectScope=function(e){s(e)||e.execCommand("selectAll")},t.selectBetweenBrackets=function(t){if(!s(t))return e.Pass},t.goToBracket=function(t){t.extendSelectionsBy(function(r){var o=t.scanForBracket(r.head,1);if(o&&0!=e.cmpPos(o.pos,r.head))return o.pos;var i=t.scanForBracket(r.head,-1);return i&&n(i.pos.line,i.pos.ch+1)||r.head})},t.swapLineUp=function(t){if(t.isReadOnly())return e.Pass;for(var r=t.listSelections(),o=[],i=t.firstLine()-1,l=[],a=0;ai?o.push(c,f):o.length&&(o[o.length-1]=f),i=f}t.operation(function(){for(var e=0;et.lastLine()?t.replaceRange("\n"+a,n(t.lastLine()),null,"+swapLine"):t.replaceRange(a+"\n",n(i,0),null,"+swapLine")}t.setSelections(l),t.scrollIntoView()})},t.swapLineDown=function(t){if(t.isReadOnly())return e.Pass;for(var r=t.listSelections(),o=[],i=t.lastLine()+1,l=r.length-1;l>=0;l--){var a=r[l],s=a.to().line+1,c=a.from().line;0!=a.to().ch||a.empty()||s--,s=0;e-=2){var r=o[e],i=o[e+1],l=t.getLine(r);r==t.lastLine()?t.replaceRange("",n(r-1),n(r),"+swapLine"):t.replaceRange("",n(r,0),n(r+1,0),"+swapLine"),t.replaceRange(l+"\n",n(i,0),null,"+swapLine")}t.scrollIntoView()})},t.toggleCommentIndented=function(e){e.toggleComment({indent:!0})},t.joinLines=function(e){for(var t=e.listSelections(),r=[],o=0;o=0;i--){var l=r[i].head,a=t.getRange({line:l.line,ch:0},l),s=e.countColumn(a,null,t.getOption("tabSize")),c=t.findPosH(l,-1,"char",!1);if(a&&!/\S/.test(a)&&s%o==0){var f=new n(l.line,e.findColumn(a,s-o,o));f.ch!=l.ch&&(c=f)}t.replaceRange("",c,l,"+delete")}})},t.delLineRight=function(e){e.operation(function(){for(var t=e.listSelections(),r=t.length-1;r>=0;r--)e.replaceRange("",t[r].anchor,n(t[r].to().line),"+delete");e.scrollIntoView()})},t.upcaseAtCursor=function(e){f(e,function(e){return e.toUpperCase()})},t.downcaseAtCursor=function(e){f(e,function(e){return e.toLowerCase()})},t.setSublimeMark=function(e){e.state.sublimeMark&&e.state.sublimeMark.clear(),e.state.sublimeMark=e.setBookmark(e.getCursor())},t.selectToSublimeMark=function(e){var t=e.state.sublimeMark&&e.state.sublimeMark.find();t&&e.setSelection(e.getCursor(),t)},t.deleteToSublimeMark=function(t){var n=t.state.sublimeMark&&t.state.sublimeMark.find();if(n){var r=t.getCursor(),o=n;if(e.cmpPos(r,o)>0){var i=o;o=r,r=i}t.state.sublimeKilled=t.getRange(r,o),t.replaceRange("",r,o)}},t.swapWithSublimeMark=function(e){var t=e.state.sublimeMark&&e.state.sublimeMark.find();t&&(e.state.sublimeMark.clear(),e.state.sublimeMark=e.setBookmark(e.getCursor()),e.setCursor(t))},t.sublimeYank=function(e){null!=e.state.sublimeKilled&&e.replaceSelection(e.state.sublimeKilled,null,"paste")},t.showInCenter=function(e){var t=e.cursorCoords(null,"local");e.scrollTo(null,(t.top+t.bottom)/2-e.getScrollInfo().clientHeight/2)},t.findUnder=function(e){d(e,!0)},t.findUnderPrevious=function(e){d(e,!1)},t.findAllUnder=function(e){var t=u(e);if(t){for(var n=e.getSearchCursor(t.query),r=[],o=-1;n.findNext();)r.push({anchor:n.from(),head:n.to()}),n.from().line<=t.from.line&&n.from().ch<=t.from.ch&&o++;e.setSelections(r,o)}};var m=e.keyMap;m.macSublime={"Cmd-Left":"goLineStartSmart","Shift-Tab":"indentLess","Shift-Ctrl-K":"deleteLine","Alt-Q":"wrapLines","Ctrl-Left":"goSubwordLeft","Ctrl-Right":"goSubwordRight","Ctrl-Alt-Up":"scrollLineUp","Ctrl-Alt-Down":"scrollLineDown","Cmd-L":"selectLine","Shift-Cmd-L":"splitSelectionByLine",Esc:"singleSelectionTop","Cmd-Enter":"insertLineAfter","Shift-Cmd-Enter":"insertLineBefore","Cmd-D":"selectNextOccurrence","Shift-Cmd-Space":"selectScope","Shift-Cmd-M":"selectBetweenBrackets","Cmd-M":"goToBracket","Cmd-Ctrl-Up":"swapLineUp","Cmd-Ctrl-Down":"swapLineDown","Cmd-/":"toggleCommentIndented","Cmd-J":"joinLines","Shift-Cmd-D":"duplicateLine",F9:"sortLines","Cmd-F9":"sortLinesInsensitive",F2:"nextBookmark","Shift-F2":"prevBookmark","Cmd-F2":"toggleBookmark","Shift-Cmd-F2":"clearBookmarks","Alt-F2":"selectBookmarks",Backspace:"smartBackspace","Cmd-K Cmd-K":"delLineRight","Cmd-K Cmd-U":"upcaseAtCursor","Cmd-K Cmd-L":"downcaseAtCursor","Cmd-K Cmd-Space":"setSublimeMark","Cmd-K Cmd-A":"selectToSublimeMark","Cmd-K Cmd-W":"deleteToSublimeMark","Cmd-K Cmd-X":"swapWithSublimeMark","Cmd-K Cmd-Y":"sublimeYank","Cmd-K Cmd-C":"showInCenter","Cmd-K Cmd-G":"clearBookmarks","Cmd-K Cmd-Backspace":"delLineLeft","Cmd-K Cmd-0":"unfoldAll","Cmd-K Cmd-J":"unfoldAll","Ctrl-Shift-Up":"addCursorToPrevLine","Ctrl-Shift-Down":"addCursorToNextLine","Cmd-F3":"findUnder","Shift-Cmd-F3":"findUnderPrevious","Alt-F3":"findAllUnder","Shift-Cmd-[":"fold","Shift-Cmd-]":"unfold","Cmd-I":"findIncremental","Shift-Cmd-I":"findIncrementalReverse","Cmd-H":"replace",F3:"findNext","Shift-F3":"findPrev",fallthrough:"macDefault"},e.normalizeKeyMap(m.macSublime),m.pcSublime={"Shift-Tab":"indentLess","Shift-Ctrl-K":"deleteLine","Alt-Q":"wrapLines","Ctrl-T":"transposeChars","Alt-Left":"goSubwordLeft","Alt-Right":"goSubwordRight","Ctrl-Up":"scrollLineUp","Ctrl-Down":"scrollLineDown","Ctrl-L":"selectLine","Shift-Ctrl-L":"splitSelectionByLine",Esc:"singleSelectionTop","Ctrl-Enter":"insertLineAfter","Shift-Ctrl-Enter":"insertLineBefore","Ctrl-D":"selectNextOccurrence","Shift-Ctrl-Space":"selectScope","Shift-Ctrl-M":"selectBetweenBrackets","Ctrl-M":"goToBracket","Shift-Ctrl-Up":"swapLineUp","Shift-Ctrl-Down":"swapLineDown","Ctrl-/":"toggleCommentIndented","Ctrl-J":"joinLines","Shift-Ctrl-D":"duplicateLine",F9:"sortLines","Ctrl-F9":"sortLinesInsensitive",F2:"nextBookmark","Shift-F2":"prevBookmark","Ctrl-F2":"toggleBookmark","Shift-Ctrl-F2":"clearBookmarks","Alt-F2":"selectBookmarks",Backspace:"smartBackspace","Ctrl-K Ctrl-K":"delLineRight","Ctrl-K Ctrl-U":"upcaseAtCursor","Ctrl-K Ctrl-L":"downcaseAtCursor","Ctrl-K Ctrl-Space":"setSublimeMark","Ctrl-K Ctrl-A":"selectToSublimeMark","Ctrl-K Ctrl-W":"deleteToSublimeMark","Ctrl-K Ctrl-X":"swapWithSublimeMark","Ctrl-K Ctrl-Y":"sublimeYank","Ctrl-K Ctrl-C":"showInCenter","Ctrl-K Ctrl-G":"clearBookmarks","Ctrl-K Ctrl-Backspace":"delLineLeft","Ctrl-K Ctrl-0":"unfoldAll","Ctrl-K Ctrl-J":"unfoldAll","Ctrl-Alt-Up":"addCursorToPrevLine","Ctrl-Alt-Down":"addCursorToNextLine","Ctrl-F3":"findUnder","Shift-Ctrl-F3":"findUnderPrevious","Alt-F3":"findAllUnder","Shift-Ctrl-[":"fold","Shift-Ctrl-]":"unfold","Ctrl-I":"findIncremental","Shift-Ctrl-I":"findIncrementalReverse","Ctrl-H":"replace",F3:"findNext","Shift-F3":"findPrev",fallthrough:"pcDefault"},e.normalizeKeyMap(m.pcSublime);var h=m.default==m.macDefault;m.sublime=h?m.macSublime:m.pcSublime});
-},{"../lib/codemirror":"kyCI","../addon/search/searchcursor":"VnAw","../addon/edit/matchbrackets":"Bl/E"}],"QdEO":[function(require,module,exports) {
-module.exports={props:{name:{type:String,required:!0},value:{type:null,default:null},type:{type:String,required:!0},length:{type:[String,Number],default:null},readonly:{type:Boolean,default:!1},required:{type:Boolean,default:!1},options:{type:Object,default:function(){return{}}},newItem:{type:Boolean,default:!1},relationship:{type:Object,default:null},fields:{type:Object,default:null},values:{type:Object,default:null}}};
-},{}],"CSru":[function(require,module,exports) {
-var t=null;function r(){return t||(t=e()),t}function e(){try{throw new Error}catch(r){var t=(""+r.stack).match(/(https?|file|ftp):\/\/[^)\n]+/g);if(t)return n(t[0])}return"/"}function n(t){return(""+t).replace(/^((?:https?|file|ftp):\/\/.+)\/[^\/]+$/,"$1")+"/"}exports.getBundleURL=r,exports.getBaseURL=n;
-},{}],"Cm3W":[function(require,module,exports) {
-var r=require("./bundle-url").getBundleURL;function e(r){Array.isArray(r)||(r=[r]);var e=r[r.length-1];try{return Promise.resolve(require(e))}catch(n){if("MODULE_NOT_FOUND"===n.code)return new u(function(n,i){t(r.slice(0,-1)).then(function(){return require(e)}).then(n,i)});throw n}}function t(r){return Promise.all(r.map(s))}var n={};function i(r,e){n[r]=e}module.exports=exports=e,exports.load=t,exports.register=i;var o={};function s(e){var t;if(Array.isArray(e)&&(t=e[1],e=e[0]),o[e])return o[e];var i=(e.substring(e.lastIndexOf(".")+1,e.length)||e).toLowerCase(),s=n[i];return s?o[e]=s(r()+e).then(function(r){return r&&module.bundle.register(t,r),r}):void 0}function u(r){this.executor=r,this.promise=null}u.prototype.then=function(r,e){return null===this.promise&&(this.promise=new Promise(this.executor)),this.promise.then(r,e)},u.prototype.catch=function(r){return null===this.promise&&(this.promise=new Promise(this.executor)),this.promise.catch(r)};
-},{"./bundle-url":"CSru"}],"6M6Z":[function(require,module,exports) {
-"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r=require("vue-codemirror");require("codemirror/lib/codemirror.css"),require("codemirror/mode/vue/vue.js"),require("codemirror/mode/javascript/javascript.js"),require("codemirror/mode/php/php.js"),require("codemirror/addon/selection/active-line.js"),require("codemirror/addon/selection/mark-selection.js"),require("codemirror/addon/search/searchcursor.js"),require("codemirror/addon/hint/show-hint.js"),require("codemirror/addon/hint/show-hint.css"),require("codemirror/addon/hint/javascript-hint.js"),require("codemirror/addon/scroll/annotatescrollbar.js"),require("codemirror/addon/search/matchesonscrollbar.js"),require("codemirror/addon/search/match-highlighter.js"),require("codemirror/addon/edit/matchbrackets.js"),require("codemirror/addon/comment/comment.js"),require("codemirror/addon/dialog/dialog.js"),require("codemirror/addon/dialog/dialog.css"),require("codemirror/addon/search/search.js"),require("codemirror/keymap/sublime.js"),require("./code.css");var o=require("../../../mixins/interface"),i=t(o);function t(e){return e&&e.__esModule?e:{default:e}}require("_bundle_loader")(require.resolve("codemirror/mode/markdown/markdown.js")).then(function(){return console.log("done")}).catch(console.error),exports.default={name:"interface-code",mixins:[i.default],components:{codemirror:r.codemirror},data:function(){return{lineCount:0,cmOptions:{tabSize:4,indentUnit:4,styleActiveLine:!0,lineNumbers:this.options.lineNumber,readOnly:!!this.readonly&&"nocursor",styleSelectedText:!0,line:!0,highlightSelectionMatches:{showToken:/\w/,annotateScrollbar:!0},mode:this.options.language,hintOptions:{completeSingle:!0},keyMap:"sublime",matchBrackets:!0,showCursorWhenSelecting:!0,theme:"default",extraKeys:{Ctrl:"autocomplete"}}}},mounted:function(){var e=this.$refs.codemirrorEl.codemirror;this.lineCount=e.lineCount()},watch:{options:function(e,r){e.language!==r.language&&this.$set(this.cmOptions,"mode",e.language),e.lineNumber!==r.lineNumber&&this.$set(this.cmOptions,"lineNumbers",e.lineNumber)}},computed:{availableTypes:function(){return{"text/plain":"Plain Text","text/javascript":"JavaScript","application/json":"JSON","text/x-vue":"Vue","application/x-httpd-php":"PHP"}},language:function(){return this.availableTypes[this.options.language]},stringValue:function(){return"object"===e(this.value)?JSON.stringify(this.value,null,4):this.value}},methods:{onInput:function(e){var r=this.$refs.codemirrorEl.codemirror;this.lineCount!==r.lineCount()&&(this.lineCount=r.lineCount()),this.$emit("input",e)},fillTemplate:function(){if(this.$lodash.isObject(this.options.template))return this.$emit("input",JSON.stringify(this.options.template,null,4));this.$emit("input",this.options.template)}}};
-(function(){var e=exports.default||module.exports;"function"==typeof e&&(e=e.options),Object.assign(e,{render:function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"interface-code",class:{inactive:e.readonly}},[i("codemirror",{ref:"codemirrorEl",attrs:{options:e.cmOptions,value:e.stringValue},on:{input:e.onInput}},[e.options.template?i("button",{directives:[{name:"tooltip",rawName:"v-tooltip",value:e.$t("interfaces-code-fill_template"),expression:"$t('interfaces-code-fill_template')"}],on:{click:e.fillTemplate}},[i("i",{staticClass:"material-icons"},[e._v("playlist_add")])]):e._e(),e._v(" "),i("small",{staticClass:"line-count"},[e._v(" "+e._s(e.$tc("interfaces-code-loc",e.lineCount,{count:e.lineCount,lang:e.language}))+" ")])])],1)},staticRenderFns:[],_compiled:!0,_scopeId:"data-v-32df13",functional:void 0});})();
-},{"vue-codemirror":"mEzW","codemirror/lib/codemirror.css":"yTfC","codemirror/mode/vue/vue.js":"+c2d","codemirror/mode/javascript/javascript.js":"3pNU","codemirror/mode/php/php.js":"HRrC","codemirror/addon/selection/active-line.js":"F9rH","codemirror/addon/selection/mark-selection.js":"BwTv","codemirror/addon/search/searchcursor.js":"VnAw","codemirror/addon/hint/show-hint.js":"u+lD","codemirror/addon/hint/show-hint.css":"yTfC","codemirror/addon/hint/javascript-hint.js":"GCym","codemirror/addon/scroll/annotatescrollbar.js":"UK68","codemirror/addon/search/matchesonscrollbar.js":"LpEv","codemirror/addon/search/match-highlighter.js":"ZMuI","codemirror/addon/edit/matchbrackets.js":"Bl/E","codemirror/addon/comment/comment.js":"gl/8","codemirror/addon/dialog/dialog.js":"a+JB","codemirror/addon/dialog/dialog.css":"yTfC","codemirror/addon/search/search.js":"1IGx","codemirror/keymap/sublime.js":"EDpt","./code.css":"yTfC","../../../mixins/interface":"QdEO","_bundle_loader":"Cm3W","codemirror/mode/markdown/markdown.js":[["markdown.809344a2.js","dzjQ"],"dzjQ"]}],"32W2":[function(require,module,exports) {
-module.exports=function(n){return new Promise(function(e,o){var r=document.createElement("script");r.async=!0,r.type="text/javascript",r.charset="utf-8",r.src=n,r.onerror=function(n){r.onerror=r.onload=null,o(n)},r.onload=function(){r.onerror=r.onload=null,e()},document.getElementsByTagName("head")[0].appendChild(r)})};
-},{}],0:[function(require,module,exports) {
-var b=require("Cm3W");b.register("js",require("32W2"));
-},{}]},{},[0,"6M6Z"], "__DirectusExtension__")
\ No newline at end of file
+},{"../lib/codemirror":"mts4","../addon/search/searchcursor":"VnAw","../addon/edit/matchbrackets":"Bl/E"}],"QdEO":[function(require,module,exports) {
+module.exports={props:{name:{type:String,required:!0},value:{type:null,default:null},type:{type:String,required:!0},length:{type:[String,Number],default:null},readonly:{type:Boolean,default:!1},required:{type:Boolean,default:!1},options:{type:Object,default:function(){return{}}},newItem:{type:Boolean,default:!1},relation:{type:Object,default:null},fields:{type:Object,default:null},values:{type:Object,default:null}}};
+},{}],"6M6Z":[function(require,module,exports) {
+"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r=require("vue-codemirror");require("codemirror/lib/codemirror.css"),require("codemirror/mode/vue/vue.js"),require("codemirror/mode/javascript/javascript.js"),require("codemirror/mode/php/php.js"),require("codemirror/addon/selection/active-line.js"),require("codemirror/addon/selection/mark-selection.js"),require("codemirror/addon/search/searchcursor.js"),require("codemirror/addon/hint/show-hint.js"),require("codemirror/addon/hint/show-hint.css"),require("codemirror/addon/hint/javascript-hint.js"),require("codemirror/addon/scroll/annotatescrollbar.js"),require("codemirror/addon/search/matchesonscrollbar.js"),require("codemirror/addon/search/match-highlighter.js"),require("codemirror/addon/edit/matchbrackets.js"),require("codemirror/addon/comment/comment.js"),require("codemirror/addon/dialog/dialog.js"),require("codemirror/addon/dialog/dialog.css"),require("codemirror/addon/search/search.js"),require("codemirror/keymap/sublime.js"),require("./code.css");var i=require("../../../mixins/interface"),o=t(i);function t(e){return e&&e.__esModule?e:{default:e}}exports.default={name:"interface-code",mixins:[o.default],components:{codemirror:r.codemirror},data:function(){return{lineCount:0,cmOptions:{tabSize:4,indentUnit:4,styleActiveLine:!0,lineNumbers:this.options.lineNumber,readOnly:!!this.readonly&&"nocursor",styleSelectedText:!0,line:!0,highlightSelectionMatches:{showToken:/\w/,annotateScrollbar:!0},mode:this.options.language,hintOptions:{completeSingle:!0},keyMap:"sublime",matchBrackets:!0,showCursorWhenSelecting:!0,theme:"default",extraKeys:{Ctrl:"autocomplete"}}}},mounted:function(){var e=this.$refs.codemirrorEl.codemirror;this.lineCount=e.lineCount()},watch:{options:function(e,r){e.language!==r.language&&this.$set(this.cmOptions,"mode",e.language),e.lineNumber!==r.lineNumber&&this.$set(this.cmOptions,"lineNumbers",e.lineNumber)}},computed:{availableTypes:function(){return{"text/plain":"Plain Text","text/javascript":"JavaScript","application/json":"JSON","text/x-vue":"Vue","application/x-httpd-php":"PHP"}},language:function(){return this.availableTypes[this.options.language]},stringValue:function(){return"object"===e(this.value)?JSON.stringify(this.value,null,4):this.value}},methods:{onInput:function(e){var r=this.$refs.codemirrorEl.codemirror;this.lineCount!==r.lineCount()&&(this.lineCount=r.lineCount()),this.$emit("input",e)},fillTemplate:function(){if(this.$lodash.isObject(this.options.template))return this.$emit("input",JSON.stringify(this.options.template,null,4));this.$emit("input",this.options.template)}}};
+(function(){var e=exports.default||module.exports;"function"==typeof e&&(e=e.options),Object.assign(e,{render:function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"interface-code",class:{inactive:e.readonly}},[i("codemirror",{ref:"codemirrorEl",attrs:{options:e.cmOptions,value:e.stringValue},on:{input:e.onInput}}),e._v(" "),e.options.template?i("button",{directives:[{name:"tooltip",rawName:"v-tooltip",value:e.$t("interfaces-code-fill_template"),expression:"$t('interfaces-code-fill_template')"}],on:{click:e.fillTemplate}},[i("i",{staticClass:"material-icons"},[e._v("playlist_add")])]):e._e(),e._v(" "),i("small",{staticClass:"line-count"},[e._v(" "+e._s(e.$tc("interfaces-code-loc",e.lineCount,{count:e.lineCount,lang:e.language}))+" ")])],1)},staticRenderFns:[],_compiled:!0,_scopeId:"data-v-32df13",functional:void 0});})();
+},{"vue-codemirror":"mEzW","codemirror/lib/codemirror.css":"yTfC","codemirror/mode/vue/vue.js":"+c2d","codemirror/mode/javascript/javascript.js":"3pNU","codemirror/mode/php/php.js":"HRrC","codemirror/addon/selection/active-line.js":"F9rH","codemirror/addon/selection/mark-selection.js":"BwTv","codemirror/addon/search/searchcursor.js":"VnAw","codemirror/addon/hint/show-hint.js":"u+lD","codemirror/addon/hint/show-hint.css":"yTfC","codemirror/addon/hint/javascript-hint.js":"GCym","codemirror/addon/scroll/annotatescrollbar.js":"UK68","codemirror/addon/search/matchesonscrollbar.js":"LpEv","codemirror/addon/search/match-highlighter.js":"ZMuI","codemirror/addon/edit/matchbrackets.js":"Bl/E","codemirror/addon/comment/comment.js":"gl/8","codemirror/addon/dialog/dialog.js":"a+JB","codemirror/addon/dialog/dialog.css":"yTfC","codemirror/addon/search/search.js":"1IGx","codemirror/keymap/sublime.js":"EDpt","./code.css":"yTfC","../../../mixins/interface":"QdEO"}]},{},["6M6Z"], "__DirectusExtension__")
\ No newline at end of file
diff --git a/public/extensions/core/interfaces/code/node_modules/vue-codemirror/src/codemirror.js b/public/extensions/core/interfaces/code/node_modules/vue-codemirror/src/codemirror.js
index 3df60ea99c..b6cfb13df0 100644
--- a/public/extensions/core/interfaces/code/node_modules/vue-codemirror/src/codemirror.js
+++ b/public/extensions/core/interfaces/code/node_modules/vue-codemirror/src/codemirror.js
@@ -1,8 +1,8 @@
-parcelRequire=function(e,r,n,t){var i="function"==typeof parcelRequire&&parcelRequire,o="function"==typeof require&&require;function u(n,t){if(!r[n]){if(!e[n]){var f="function"==typeof parcelRequire&&parcelRequire;if(!t&&f)return f(n,!0);if(i)return i(n,!0);if(o&&"string"==typeof n)return o(n);var c=new Error("Cannot find module '"+n+"'");throw c.code="MODULE_NOT_FOUND",c}p.resolve=function(r){return e[n][1][r]||r};var l=r[n]=new u.Module(n);e[n][0].call(l.exports,p,l,l.exports,this)}return r[n].exports;function p(e){return u(p.resolve(e))}}u.isParcelRequire=!0,u.Module=function(e){this.id=e,this.bundle=u,this.exports={}},u.modules=e,u.cache=r,u.parent=i,u.register=function(r,n){e[r]=[function(e,r){r.exports=n},{}]};for(var f=0;f=15&&(h=!1,a=!0);var C=y&&(u||h&&(null==x||x<12.11)),S=r||l&&s>=9;function L(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var k,T=function(e,t){var r=e.className,n=L(t).exec(r);if(n){var i=r.slice(n.index+n[0].length);e.className=r.slice(0,n.index)+(i?n[1]+i:"")}};function M(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function N(e,t){return M(e).appendChild(t)}function O(e,t,r,n){var i=document.createElement(e);if(r&&(i.className=r),n&&(i.style.cssText=n),"string"==typeof t)i.appendChild(document.createTextNode(t));else if(t)for(var o=0;o=t)return l+(t-o);l+=s-o,l+=r-l%r,o=s+1}}g?P=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:l&&(P=function(e){try{e.select()}catch(e){}});var R=function(){this.id=null};function B(e,t){for(var r=0;r=t)return n+Math.min(l,t-i);if(i+=o-n,n=o+1,(i+=r-i%r)>=t)return n}}var Y=[""];function _(e){for(;Y.length<=e;)Y.push($(Y)+" ");return Y[e]}function $(e){return e[e.length-1]}function q(e,t){for(var r=[],n=0;n""&&(e.toUpperCase()!=e.toLowerCase()||J.test(e))}function te(e,t){return t?!!(t.source.indexOf("\\w")>-1&&ee(e))||t.test(e):ee(e)}function re(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var ne=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function ie(e){return e.charCodeAt(0)>=768&&ne.test(e)}function oe(e,t,r){for(;(r<0?t>0:tr?-1:1;;){if(t==r)return t;var i=(t+r)/2,o=n<0?Math.ceil(i):Math.floor(i);if(o==t)return e(o)?t:r;e(o)?r=o:t=o+n}}function se(e,t,n){var i=this;this.input=n,i.scrollbarFiller=O("div",null,"CodeMirror-scrollbar-filler"),i.scrollbarFiller.setAttribute("cm-not-content","true"),i.gutterFiller=O("div",null,"CodeMirror-gutter-filler"),i.gutterFiller.setAttribute("cm-not-content","true"),i.lineDiv=A("div",null,"CodeMirror-code"),i.selectionDiv=O("div",null,null,"position: relative; z-index: 1"),i.cursorDiv=O("div",null,"CodeMirror-cursors"),i.measure=O("div",null,"CodeMirror-measure"),i.lineMeasure=O("div",null,"CodeMirror-measure"),i.lineSpace=A("div",[i.measure,i.lineMeasure,i.selectionDiv,i.cursorDiv,i.lineDiv],null,"position: relative; outline: none");var o=A("div",[i.lineSpace],"CodeMirror-lines");i.mover=O("div",[o],null,"position: relative"),i.sizer=O("div",[i.mover],"CodeMirror-sizer"),i.sizerWidth=null,i.heightForcer=O("div",null,null,"position: absolute; height: "+G+"px; width: 1px;"),i.gutters=O("div",null,"CodeMirror-gutters"),i.lineGutter=null,i.scroller=O("div",[i.sizer,i.heightForcer,i.gutters],"CodeMirror-scroll"),i.scroller.setAttribute("tabIndex","-1"),i.wrapper=O("div",[i.scrollbarFiller,i.gutterFiller,i.scroller],"CodeMirror"),l&&s<8&&(i.gutters.style.zIndex=-1,i.scroller.style.paddingRight=0),a||r&&m||(i.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(i.wrapper):e(i.wrapper)),i.viewFrom=i.viewTo=t.first,i.reportedViewFrom=i.reportedViewTo=t.first,i.view=[],i.renderedView=null,i.externalMeasured=null,i.viewOffset=0,i.lastWrapHeight=i.lastWrapWidth=0,i.updateLineNumbers=null,i.nativeBarWidth=i.barHeight=i.barWidth=0,i.scrollbarsClipped=!1,i.lineNumWidth=i.lineNumInnerWidth=i.lineNumChars=null,i.alignWidgets=!1,i.cachedCharWidth=i.cachedTextHeight=i.cachedPaddingH=null,i.maxLine=null,i.maxLineLength=0,i.maxLineChanged=!1,i.wheelDX=i.wheelDY=i.wheelStartX=i.wheelStartY=null,i.shift=!1,i.selForContextMenu=null,i.activeTouch=null,n.init(i)}function ae(e,t){if((t-=e.first)<0||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var r=e;!r.lines;)for(var n=0;;++n){var i=r.children[n],o=i.chunkSize();if(t=e.first&&tr?ve(r,ae(e,r).text.length):function(e,t){var r=e.ch;return null==r||r>t?ve(e.line,t):r<0?ve(e.line,0):e}(t,ae(e,t.line).text.length)}function Le(e,t){for(var r=[],n=0;n=t:o.to>t);(n||(n=[])).push(new Me(l,o.from,s?null:o.to))}}return n}(r,i,l),a=function(e,t,r){var n;if(e)for(var i=0;i=t:o.to>t)||o.from==t&&"bookmark"==l.type&&(!r||o.marker.insertLeft)){var s=null==o.from||(l.inclusiveLeft?o.from<=t:o.from0&&s)for(var b=0;bt)&&(!r||Ee(r,o.marker)<0)&&(r=o.marker)}return r}function Ge(e,t,r,n,i){var o=ae(e,t),l=Te&&o.markedSpans;if(l)for(var s=0;s=0&&h<=0||c<=0&&h>=0)&&(c<=0&&(a.marker.inclusiveRight&&i.inclusiveLeft?me(u.to,r)>=0:me(u.to,r)>0)||c>=0&&(a.marker.inclusiveRight&&i.inclusiveLeft?me(u.from,n)<=0:me(u.from,n)<0)))return!0}}}function Ue(e){for(var t;t=ze(e);)e=t.find(-1,!0).line;return e}function Ve(e,t){var r=ae(e,t),n=Ue(r);return r==n?t:fe(n)}function Ke(e,t){if(t>e.lastLine())return t;var r,n=ae(e,t);if(!je(e,n))return t;for(;r=Re(n);)n=r.find(1,!0).line;return fe(n)+1}function je(e,t){var r=Te&&t.markedSpans;if(r)for(var n=void 0,i=0;it.maxLineLength&&(t.maxLineLength=r,t.maxLine=e)})}var qe=null;function Ze(e,t,r){var n;qe=null;for(var i=0;it)return i;o.to==t&&(o.from!=o.to&&"before"==r?n=i:qe=i),o.from==t&&(o.from!=o.to&&"before"!=r?n=i:qe=i)}return null!=n?n:qe}var Qe=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",t="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";var r=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,n=/[stwN]/,i=/[LRr]/,o=/[Lb1n]/,l=/[1n]/;function s(e,t,r){this.level=e,this.from=t,this.to=r}return function(a,u){var c="ltr"==u?"L":"R";if(0==a.length||"ltr"==u&&!r.test(a))return!1;for(var h,f=a.length,d=[],p=0;p-1&&(n[t]=i.slice(0,o).concat(i.slice(o+1)))}}}function it(e,t){var r=rt(e,t);if(r.length)for(var n=Array.prototype.slice.call(arguments,2),i=0;i0}function at(e){e.prototype.on=function(e,t){tt(this,e,t)},e.prototype.off=function(e,t){nt(this,e,t)}}function ut(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function ct(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function ht(e){return null!=e.defaultPrevented?e.defaultPrevented:0==e.returnValue}function ft(e){ut(e),ct(e)}function dt(e){return e.target||e.srcElement}function pt(e){var t=e.which;return null==t&&(1&e.button?t=1:2&e.button?t=3:4&e.button&&(t=2)),y&&e.ctrlKey&&1==t&&(t=3),t}var gt,vt,mt=function(){if(l&&s<9)return!1;var e=O("div");return"draggable"in e||"dragDrop"in e}();function yt(e){if(null==gt){var t=O("span","");N(e,O("span",[t,document.createTextNode("x")])),0!=e.firstChild.offsetHeight&&(gt=t.offsetWidth<=1&&t.offsetHeight>2&&!(l&&s<8))}var r=gt?O("span",""):O("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return r.setAttribute("cm-text",""),r}function bt(e){if(null!=vt)return vt;var t=N(e,document.createTextNode("AخA")),r=k(t,0,1).getBoundingClientRect(),n=k(t,1,2).getBoundingClientRect();return M(e),!(!r||r.left==r.right)&&(vt=n.right-r.right<3)}var wt,xt=3!="\n\nb".split(/\n/).length?function(e){for(var t=0,r=[],n=e.length;t<=n;){var i=e.indexOf("\n",t);-1==i&&(i=e.length);var o=e.slice(t,"\r"==e.charAt(i-1)?i-1:i),l=o.indexOf("\r");-1!=l?(r.push(o.slice(0,l)),t+=l+1):(r.push(o),t=i+1)}return r}:function(e){return e.split(/\r\n?|\n/)},Ct=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(e){return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch(e){}return!(!t||t.parentElement()!=e)&&0!=t.compareEndPoints("StartToEnd",t)},St="oncopy"in(wt=O("div"))||(wt.setAttribute("oncopy","return;"),"function"==typeof wt.oncopy),Lt=null;var kt={},Tt={};function Mt(e){if("string"==typeof e&&Tt.hasOwnProperty(e))e=Tt[e];else if(e&&"string"==typeof e.name&&Tt.hasOwnProperty(e.name)){var t=Tt[e.name];"string"==typeof t&&(t={name:t}),(e=Q(t,e)).name=t.name}else{if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return Mt("application/xml");if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return Mt("application/json")}return"string"==typeof e?{name:e}:e||{name:"null"}}function Nt(e,t){t=Mt(t);var r=kt[t.name];if(!r)return Nt(e,"text/plain");var n=r(e,t);if(Ot.hasOwnProperty(t.name)){var i=Ot[t.name];for(var o in i)i.hasOwnProperty(o)&&(n.hasOwnProperty(o)&&(n["_"+o]=n[o]),n[o]=i[o])}if(n.name=t.name,t.helperType&&(n.helperType=t.helperType),t.modeProps)for(var l in t.modeProps)n[l]=t.modeProps[l];return n}var Ot={};function At(e,t){I(t,Ot.hasOwnProperty(e)?Ot[e]:Ot[e]={})}function Dt(e,t){if(!0===t)return t;if(e.copyState)return e.copyState(t);var r={};for(var n in t){var i=t[n];i instanceof Array&&(i=i.concat([])),r[n]=i}return r}function Wt(e,t){for(var r;e.innerMode&&(r=e.innerMode(t))&&r.mode!=e;)t=r.state,e=r.mode;return r||{mode:e,state:t}}function Ht(e,t,r){return!e.startState||e.startState(t,r)}var Ft=function(e,t,r){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=r};Ft.prototype.eol=function(){return this.pos>=this.string.length},Ft.prototype.sol=function(){return this.pos==this.lineStart},Ft.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Ft.prototype.next=function(){if(this.post},Ft.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},Ft.prototype.skipToEnd=function(){this.pos=this.string.length},Ft.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},Ft.prototype.backUp=function(e){this.pos-=e},Ft.prototype.column=function(){return this.lastColumnPos0?null:(n&&!1!==t&&(this.pos+=n[0].length),n)}var i=function(e){return r?e.toLowerCase():e};if(i(this.string.substr(this.pos,e.length))==i(e))return!1!==t&&(this.pos+=e.length),!0},Ft.prototype.current=function(){return this.string.slice(this.start,this.pos)},Ft.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},Ft.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},Ft.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};var Pt=function(e,t){this.state=e,this.lookAhead=t},Et=function(e,t,r,n){this.state=t,this.doc=e,this.line=r,this.maxLookAhead=n||0,this.baseTokens=null,this.baseTokenPos=1};function It(e,t,r,n){var i=[e.state.modeGen],o={};Xt(e,t.text,e.doc.mode,r,function(e,t){return i.push(e,t)},o,n);for(var l=r.state,s=function(n){r.baseTokens=i;var s=e.state.overlays[n],a=1,u=0;r.state=!0,Xt(e,t.text,s.mode,r,function(e,t){for(var r=a;ue&&i.splice(a,1,e,i[a+1],n),a+=2,u=Math.min(e,n)}if(t)if(s.opaque)i.splice(r,a-r,e,"overlay "+t),a=r+2;else for(;re.options.maxHighlightLength&&Dt(e.doc.mode,n.state),o=It(e,t,n);i&&(n.state=i),t.stateAfter=n.save(!i),t.styles=o.styles,o.classes?t.styleClasses=o.classes:t.styleClasses&&(t.styleClasses=null),r===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function Rt(e,t,r){var n=e.doc,i=e.display;if(!n.mode.startState)return new Et(n,!0,t);var o=function(e,t,r){for(var n,i,o=e.doc,l=r?-1:t-(e.doc.mode.innerMode?1e3:100),s=t;s>l;--s){if(s<=o.first)return o.first;var a=ae(o,s-1),u=a.stateAfter;if(u&&(!r||s+(u instanceof Pt?u.lookAhead:0)<=o.modeFrontier))return s;var c=z(a.text,null,e.options.tabSize);(null==i||n>c)&&(i=s-1,n=c)}return i}(e,t,r),l=o>n.first&&ae(n,o-1).stateAfter,s=l?Et.fromSaved(n,l,o):new Et(n,Ht(n.mode),o);return n.iter(o,t,function(r){Bt(e,r.text,s);var n=s.line;r.stateAfter=n==t-1||n%5==0||n>=i.viewFrom&&nt.start)return o}throw new Error("Mode "+e.name+" failed to advance stream.")}Et.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return null!=t&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},Et.prototype.baseToken=function(e){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)this.baseTokenPos+=2;var t=this.baseTokens[this.baseTokenPos+1];return{type:t&&t.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},Et.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},Et.fromSaved=function(e,t,r){return t instanceof Pt?new Et(e,Dt(e.mode,t.state),r,t.lookAhead):new Et(e,Dt(e.mode,t),r)},Et.prototype.save=function(e){var t=!1!==e?Dt(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new Pt(t,this.maxLookAhead):t};var Vt=function(e,t,r){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=r};function Kt(e,t,r,n){var i,o,l=e.doc,s=l.mode,a=ae(l,(t=Se(l,t)).line),u=Rt(e,t.line,r),c=new Ft(a.text,e.options.tabSize,u);for(n&&(o=[]);(n||c.pose.options.maxHighlightLength?(s=!1,l&&Bt(e,t,n,h.pos),h.pos=t.length,a=null):a=jt(Ut(r,h,n.state,f),o),f){var d=f[0].name;d&&(a="m-"+(a?d+" "+a:d))}if(!s||c!=a){for(;u1&&!/ /.test(e))return e;for(var r=t,n="",i=0;iu&&h.from<=u);f++);if(h.to>=c)return e(r,n,i,o,l,s,a);e(r,n.slice(0,h.to-u),i,o,null,s,a),o=null,n=n.slice(h.to-u),u=h.to}}}function rr(e,t,r,n){var i=!n&&r.widgetNode;i&&e.map.push(e.pos,e.pos+t,i),!n&&e.cm.display.input.needsContentAttribute&&(i||(i=e.content.appendChild(document.createElement("span"))),i.setAttribute("cm-marker",r.id)),i&&(e.cm.display.input.setUneditable(i),e.content.appendChild(i)),e.pos+=t,e.trailingSpace=!1}function nr(e,t,r){var n=e.markedSpans,i=e.text,o=0;if(n)for(var l,s,a,u,c,h,f,d=i.length,p=0,g=1,v="",m=0;;){if(m==p){a=u=c=h=s="",f=null,m=1/0;for(var y=[],b=void 0,w=0;wp||C.collapsed&&x.to==p&&x.from==p)?(null!=x.to&&x.to!=p&&m>x.to&&(m=x.to,u=""),C.className&&(a+=" "+C.className),C.css&&(s=(s?s+";":"")+C.css),C.startStyle&&x.from==p&&(c+=" "+C.startStyle),C.endStyle&&x.to==m&&(b||(b=[])).push(C.endStyle,x.to),C.title&&!h&&(h=C.title),C.collapsed&&(!f||Ee(f.marker,C)<0)&&(f=x)):x.from>p&&m>x.from&&(m=x.from)}if(b)for(var S=0;S=d)break;for(var k=Math.min(d,m);;){if(v){var T=p+v.length;if(!f){var M=T>k?v.slice(0,k-p):v;t.addToken(t,M,l?l+a:a,c,p+M.length==m?u:"",h,s)}if(T>=k){v=v.slice(k-p),p=k;break}p=T,c=""}v=i.slice(o,o=r[g++]),l=Zt(r[g++],t.cm.options)}}else for(var N=1;Nr)return{map:e.measure.maps[i],cache:e.measure.caches[i],before:!0}}function Ar(e,t,r,n){return Hr(e,Wr(e,t),r,n)}function Dr(e,t){if(t>=e.display.viewFrom&&t=r.lineN&&t2&&o.push((a.bottom+u.top)/2-r.top)}}o.push(r.bottom-r.top)}}(e,t.view,t.rect),t.hasHeights=!0),(o=function(e,t,r,n){var i,o=Er(t.map,r,n),a=o.node,u=o.start,c=o.end,h=o.collapse;if(3==a.nodeType){for(var f=0;f<4;f++){for(;u&&ie(t.line.text.charAt(o.coverStart+u));)--u;for(;o.coverStart+c1}(e))return t;var r=screen.logicalXDPI/screen.deviceXDPI,n=screen.logicalYDPI/screen.deviceYDPI;return{left:t.left*r,right:t.right*r,top:t.top*n,bottom:t.bottom*n}}(e.display.measure,i))}else{var d;u>0&&(h=n="right"),i=e.options.lineWrapping&&(d=a.getClientRects()).length>1?d["right"==n?d.length-1:0]:a.getBoundingClientRect()}if(l&&s<9&&!u&&(!i||!i.left&&!i.right)){var p=a.parentNode.getClientRects()[0];i=p?{left:p.left,right:p.left+rn(e.display),top:p.top,bottom:p.bottom}:Pr}for(var g=i.top-t.rect.top,v=i.bottom-t.rect.top,m=(g+v)/2,y=t.view.measure.heights,b=0;bt)&&(i=(o=a-s)-1,t>=a&&(l="right")),null!=i){if(n=e[u+2],s==a&&r==(n.insertLeft?"left":"right")&&(l=r),"left"==r&&0==i)for(;u&&e[u-2]==e[u-3]&&e[u-1].insertLeft;)n=e[2+(u-=3)],l="left";if("right"==r&&i==a-s)for(;u=0&&(r=e[i]).left==r.right;i--);return r}function zr(e){if(e.measure&&(e.measure.cache={},e.measure.heights=null,e.rest))for(var t=0;t=n.text.length?(a=n.text.length,u="before"):a<=0&&(a=0,u="after"),!s)return l("before"==u?a-1:a,"before"==u);function c(e,t,r){return l(r?e-1:e,1==s[t].level!=r)}var h=Ze(s,a,u),f=qe,d=c(a,h,"before"==u);return null!=f&&(d.other=c(a,f,"before"!=u)),d}function _r(e,t){var r=0;t=Se(e.doc,t),e.options.lineWrapping||(r=rn(e.display)*t.ch);var n=ae(e.doc,t.line),i=Ye(n)+Sr(e.display);return{left:r,right:r,top:i,bottom:i+n.height}}function $r(e,t,r,n,i){var o=ve(e,t,r);return o.xRel=i,n&&(o.outside=!0),o}function qr(e,t,r){var n=e.doc;if((r+=e.display.viewOffset)<0)return $r(n.first,0,null,!0,-1);var i=de(n,r),o=n.first+n.size-1;if(i>o)return $r(n.first+n.size-1,ae(n,o).text.length,null,!0,1);t<0&&(t=0);for(var l=ae(n,i);;){var s=en(e,l,i,t,r),a=Be(l,s.ch+(s.xRel>0?1:0));if(!a)return s;var u=a.find(1);if(u.line==i)return u;l=ae(n,i=u.line)}}function Zr(e,t,r,n){n-=Vr(t);var i=t.text.length,o=le(function(t){return Hr(e,r,t-1).bottom<=n},i,0);return{begin:o,end:i=le(function(t){return Hr(e,r,t).top>n},o,i)}}function Qr(e,t,r,n){return r||(r=Wr(e,t)),Zr(e,t,r,Kr(e,t,Hr(e,r,n),"line").top)}function Jr(e,t,r,n){return!(e.bottom<=r)&&(e.top>r||(n?e.left:e.right)>t)}function en(e,t,r,n,i){i-=Ye(t);var o=Wr(e,t),l=Vr(t),s=0,a=t.text.length,u=!0,c=Je(t,e.doc.direction);if(c){var h=(e.options.lineWrapping?function(e,t,r,n,i,o,l){var s=Zr(e,t,n,l),a=s.begin,u=s.end;/\s/.test(t.text.charAt(u-1))&&u--;for(var c=null,h=null,f=0;f=u||d.to<=a)){var p=1!=d.level,g=Hr(e,n,p?Math.min(u,d.to)-1:Math.max(a,d.from)).right,v=gv)&&(c=d,h=v)}}c||(c=i[i.length-1]);c.fromu&&(c={from:c.from,to:u,level:c.level});return c}:function(e,t,r,n,i,o,l){var s=le(function(s){var a=i[s],u=1!=a.level;return Jr(Yr(e,ve(r,u?a.to:a.from,u?"before":"after"),"line",t,n),o,l,!0)},0,i.length-1),a=i[s];if(s>0){var u=1!=a.level,c=Yr(e,ve(r,u?a.from:a.to,u?"after":"before"),"line",t,n);Jr(c,o,l,!0)&&c.top>l&&(a=i[s-1])}return a})(e,t,r,o,c,n,i);s=(u=1!=h.level)?h.from:h.to-1,a=u?h.to:h.from-1}var f,d,p=null,g=null,v=le(function(t){var r=Hr(e,o,t);return r.top+=l,r.bottom+=l,!!Jr(r,n,i,!1)&&(r.top<=i&&r.left<=n&&(p=t,g=r),!0)},s,a),m=!1;if(g){var y=n-g.left=w.bottom}return $r(r,v=oe(t.text,v,1),d,m,n-f)}function tn(e){if(null!=e.cachedTextHeight)return e.cachedTextHeight;if(null==Fr){Fr=O("pre");for(var t=0;t<49;++t)Fr.appendChild(document.createTextNode("x")),Fr.appendChild(O("br"));Fr.appendChild(document.createTextNode("x"))}N(e.measure,Fr);var r=Fr.offsetHeight/50;return r>3&&(e.cachedTextHeight=r),M(e.measure),r||1}function rn(e){if(null!=e.cachedCharWidth)return e.cachedCharWidth;var t=O("span","xxxxxxxxxx"),r=O("pre",[t]);N(e.measure,r);var n=t.getBoundingClientRect(),i=(n.right-n.left)/10;return i>2&&(e.cachedCharWidth=i),i||10}function nn(e){for(var t=e.display,r={},n={},i=t.gutters.clientLeft,o=t.gutters.firstChild,l=0;o;o=o.nextSibling,++l)r[e.options.gutters[l]]=o.offsetLeft+o.clientLeft+i,n[e.options.gutters[l]]=o.clientWidth;return{fixedPos:on(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:r,gutterWidth:n,wrapperWidth:t.wrapper.clientWidth}}function on(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function ln(e){var t=tn(e.display),r=e.options.lineWrapping,n=r&&Math.max(5,e.display.scroller.clientWidth/rn(e.display)-3);return function(i){if(je(e.doc,i))return 0;var o=0;if(i.widgets)for(var l=0;l=e.display.viewTo)return null;if((t-=e.display.viewFrom)<0)return null;for(var r=e.display.view,n=0;n=e.display.viewTo||s.to().linet||t==r&&l.to==t)&&(n(Math.max(l.from,t),Math.min(l.to,r),1==l.level?"rtl":"ltr",o),i=!0)}i||n(t,r,"ltr")}(g,r||0,null==n?f:n,function(e,t,i,h){var v="ltr"==i,m=d(e,v?"left":"right"),y=d(t-1,v?"right":"left"),b=null==r&&0==e,w=null==n&&t==f,x=0==h,C=!g||h==g.length-1;if(y.top-m.top<=3){var S=(u?w:b)&&C,L=(u?b:w)&&x?s:(v?m:y).left,k=S?a:(v?y:m).right;c(L,m.top,k-L,m.bottom)}else{var T,M,N,O;v?(T=u&&b&&x?s:m.left,M=u?a:p(e,i,"before"),N=u?s:p(t,i,"after"),O=u&&w&&C?a:y.right):(T=u?p(e,i,"before"):s,M=!u&&b&&x?a:m.right,N=!u&&w&&C?s:y.left,O=u?p(t,i,"after"):a),c(T,m.top,M-T,m.bottom),m.bottom0?t.blinker=setInterval(function(){return t.cursorDiv.style.visibility=(r=!r)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function vn(e){e.state.focused||(e.display.input.focus(),yn(e))}function mn(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,bn(e))},100)}function yn(e,t){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),"nocursor"!=e.options.readOnly&&(e.state.focused||(it(e,"focus",e,t),e.state.focused=!0,H(e.display.wrapper,"CodeMirror-focused"),e.curOp||e.display.selForContextMenu==e.doc.sel||(e.display.input.reset(),a&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),gn(e))}function bn(e,t){e.state.delayingBlurEvent||(e.state.focused&&(it(e,"blur",e,t),e.state.focused=!1,T(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150))}function wn(e){for(var t=e.display,r=t.lineDiv.offsetTop,n=0;n.005||c<-.005)&&(he(i.line,o),xn(i.line),i.rest))for(var h=0;h=l&&(o=de(t,Ye(ae(t,a))-e.wrapper.clientHeight),l=a)}return{from:o,to:Math.max(l,o+1)}}function Sn(e){var t=e.display,r=t.view;if(t.alignWidgets||t.gutters.firstChild&&e.options.fixedGutter){for(var n=on(t)-t.scroller.scrollLeft+e.doc.scrollLeft,i=t.gutters.offsetWidth,o=n+"px",l=0;lo&&(t.bottom=t.top+o);var s=e.doc.height+Lr(r),a=t.tops-n;if(t.topi+o){var c=Math.min(t.top,(u?s:t.bottom)-o);c!=i&&(l.scrollTop=c)}var h=e.curOp&&null!=e.curOp.scrollLeft?e.curOp.scrollLeft:r.scroller.scrollLeft,f=Mr(e)-(e.options.fixedGutter?r.gutters.offsetWidth:0),d=t.right-t.left>f;return d&&(t.right=t.left+f),t.left<10?l.scrollLeft=0:t.leftf+h-3&&(l.scrollLeft=t.right+(d?0:10)-f),l}function Tn(e,t){null!=t&&(On(e),e.curOp.scrollTop=(null==e.curOp.scrollTop?e.doc.scrollTop:e.curOp.scrollTop)+t)}function Mn(e){On(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function Nn(e,t,r){null==t&&null==r||On(e),null!=t&&(e.curOp.scrollLeft=t),null!=r&&(e.curOp.scrollTop=r)}function On(e){var t=e.curOp.scrollToPos;t&&(e.curOp.scrollToPos=null,An(e,_r(e,t.from),_r(e,t.to),t.margin))}function An(e,t,r,n){var i=kn(e,{left:Math.min(t.left,r.left),top:Math.min(t.top,r.top)-n,right:Math.max(t.right,r.right),bottom:Math.max(t.bottom,r.bottom)+n});Nn(e,i.scrollLeft,i.scrollTop)}function Dn(e,t){Math.abs(e.doc.scrollTop-t)<2||(r||ai(e,{top:t}),Wn(e,t,!0),r&&ai(e),ni(e,100))}function Wn(e,t,r){t=Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t),(e.display.scroller.scrollTop!=t||r)&&(e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t))}function Hn(e,t,r,n){t=Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth),(r?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!n||(e.doc.scrollLeft=t,Sn(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function Fn(e){var t=e.display,r=t.gutters.offsetWidth,n=Math.round(e.doc.height+Lr(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?r:0,docHeight:n,scrollHeight:n+Tr(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:r}}var Pn=function(e,t,r){this.cm=r;var n=this.vert=O("div",[O("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),i=this.horiz=O("div",[O("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");n.tabIndex=i.tabIndex=-1,e(n),e(i),tt(n,"scroll",function(){n.clientHeight&&t(n.scrollTop,"vertical")}),tt(i,"scroll",function(){i.clientWidth&&t(i.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,l&&s<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Pn.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,r=e.scrollHeight>e.clientHeight+1,n=e.nativeBarWidth;if(r){this.vert.style.display="block",this.vert.style.bottom=t?n+"px":"0";var i=e.viewHeight-(t?n:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+i)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=r?n+"px":"0",this.horiz.style.left=e.barLeft+"px";var o=e.viewWidth-e.barLeft-(r?n:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+o)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(0==n&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:r?n:0,bottom:t?n:0}},Pn.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Pn.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},Pn.prototype.zeroWidthHack=function(){var e=y&&!d?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new R,this.disableVert=new R},Pn.prototype.enableZeroWidthBar=function(e,t,r){e.style.pointerEvents="auto",t.set(1e3,function n(){var i=e.getBoundingClientRect();("vert"==r?document.elementFromPoint(i.right-1,(i.top+i.bottom)/2):document.elementFromPoint((i.right+i.left)/2,i.bottom-1))!=e?e.style.pointerEvents="none":t.set(1e3,n)})},Pn.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var En=function(){};function In(e,t){t||(t=Fn(e));var r=e.display.barWidth,n=e.display.barHeight;zn(e,t);for(var i=0;i<4&&r!=e.display.barWidth||n!=e.display.barHeight;i++)r!=e.display.barWidth&&e.options.lineWrapping&&wn(e),zn(e,Fn(e)),r=e.display.barWidth,n=e.display.barHeight}function zn(e,t){var r=e.display,n=r.scrollbars.update(t);r.sizer.style.paddingRight=(r.barWidth=n.right)+"px",r.sizer.style.paddingBottom=(r.barHeight=n.bottom)+"px",r.heightForcer.style.borderBottom=n.bottom+"px solid transparent",n.right&&n.bottom?(r.scrollbarFiller.style.display="block",r.scrollbarFiller.style.height=n.bottom+"px",r.scrollbarFiller.style.width=n.right+"px"):r.scrollbarFiller.style.display="",n.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(r.gutterFiller.style.display="block",r.gutterFiller.style.height=n.bottom+"px",r.gutterFiller.style.width=t.gutterWidth+"px"):r.gutterFiller.style.display=""}En.prototype.update=function(){return{bottom:0,right:0}},En.prototype.setScrollLeft=function(){},En.prototype.setScrollTop=function(){},En.prototype.clear=function(){};var Rn={native:Pn,null:En};function Bn(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&T(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new Rn[e.options.scrollbarStyle](function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),tt(t,"mousedown",function(){e.state.focused&&setTimeout(function(){return e.display.input.focus()},0)}),t.setAttribute("cm-not-content","true")},function(t,r){"horizontal"==r?Hn(e,t):Dn(e,t)},e),e.display.scrollbars.addClass&&H(e.display.wrapper,e.display.scrollbars.addClass)}var Gn=0;function Un(e){var t;e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:null,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++Gn},t=e.curOp,lr?lr.ops.push(t):t.ownsGroup=lr={ops:[t],delayedCallbacks:[]}}function Vn(e){!function(e,t){var r=e.ownsGroup;if(r)try{!function(e){var t=e.delayedCallbacks,r=0;do{for(;r=r.viewTo)||r.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new oi(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function jn(e){var t=e.cm,r=t.display;e.updatedDisplay&&wn(t),e.barMeasure=Fn(t),r.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=Ar(t,r.maxLine,r.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(r.scroller.clientWidth,r.sizer.offsetLeft+e.adjustWidthTo+Tr(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,r.sizer.offsetLeft+e.adjustWidthTo-Mr(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=r.input.prepareSelection())}function Xn(e){var t=e.cm;null!=e.adjustWidthTo&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft(window.innerHeight||document.documentElement.clientHeight)&&(i=!1),null!=i&&!p){var o=O("div","",null,"position: absolute;\n top: "+(t.top-r.viewOffset-Sr(e.display))+"px;\n height: "+(t.bottom-t.top+Tr(e)+r.barHeight)+"px;\n left: "+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(o),o.scrollIntoView(i),e.display.lineSpace.removeChild(o)}}}(t,function(e,t,r,n){var i;null==n&&(n=0),e.options.lineWrapping||t!=r||(r="before"==(t=t.ch?ve(t.line,"before"==t.sticky?t.ch-1:t.ch,"after"):t).sticky?ve(t.line,t.ch+1,"before"):t);for(var o=0;o<5;o++){var l=!1,s=Yr(e,t),a=r&&r!=t?Yr(e,r):s,u=kn(e,i={left:Math.min(s.left,a.left),top:Math.min(s.top,a.top)-n,right:Math.max(s.left,a.left),bottom:Math.max(s.bottom,a.bottom)+n}),c=e.doc.scrollTop,h=e.doc.scrollLeft;if(null!=u.scrollTop&&(Dn(e,u.scrollTop),Math.abs(e.doc.scrollTop-c)>1&&(l=!0)),null!=u.scrollLeft&&(Hn(e,u.scrollLeft),Math.abs(e.doc.scrollLeft-h)>1&&(l=!0)),!l)break}return i}(t,Se(n,e.scrollToPos.from),Se(n,e.scrollToPos.to),e.scrollToPos.margin));var i=e.maybeHiddenMarkers,o=e.maybeUnhiddenMarkers;if(i)for(var l=0;lt)&&(i.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=i.viewTo)Te&&Ve(e.doc,t)i.viewFrom?ei(e):(i.viewFrom+=n,i.viewTo+=n);else if(t<=i.viewFrom&&r>=i.viewTo)ei(e);else if(t<=i.viewFrom){var o=ti(e,r,r+n,1);o?(i.view=i.view.slice(o.index),i.viewFrom=o.lineN,i.viewTo+=n):ei(e)}else if(r>=i.viewTo){var l=ti(e,t,t,-1);l?(i.view=i.view.slice(0,l.index),i.viewTo=l.lineN):ei(e)}else{var s=ti(e,t,t,-1),a=ti(e,r,r+n,1);s&&a?(i.view=i.view.slice(0,s.index).concat(or(e,s.lineN,a.lineN)).concat(i.view.slice(a.index)),i.viewTo+=n):ei(e)}var u=i.externalMeasured;u&&(r=i.lineN&&t