From bab99a26ec1b936e6ee449a7b3aecd39f51086f7 Mon Sep 17 00:00:00 2001 From: Dan Brown Date: Sun, 22 Apr 2018 20:21:22 +0100 Subject: [PATCH] Updated assets and version for v0.21 release --- public/dist/app.js | 2 +- public/dist/export-styles.css | 17 +++++++++++++++-- public/dist/styles.css | 20 ++++++++++++++++++-- version | 2 +- 4 files changed, 35 insertions(+), 6 deletions(-) diff --git a/public/dist/app.js b/public/dist/app.js index d5fe57fe3..f5ddc41ca 100644 --- a/public/dist/app.js +++ b/public/dist/app.js @@ -1 +1 @@ -!function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.r=function(e){Object.defineProperty(e,"__esModule",{value:!0})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=607)}([function(e,t,n){var r=n(3),i=n(30),o=n(16),a=n(15),s=n(24),l=function(e,t,n){var u,c,d,f,h=e&l.F,p=e&l.G,m=e&l.S,_=e&l.P,g=e&l.B,v=p?r:m?r[t]||(r[t]={}):(r[t]||{}).prototype,y=p?i:i[t]||(i[t]={}),b=y.prototype||(y.prototype={});for(u in p&&(n=t),n)d=((c=!h&&v&&void 0!==v[u])?v:n)[u],f=g&&c?s(d,r):_&&"function"==typeof d?s(Function.call,d):d,v&&a(v,u,d,e&l.U),y[u]!=d&&o(y,u,f),_&&b[u]!=d&&(b[u]=d)};r.core=i,l.F=1,l.G=2,l.S=4,l.P=8,l.B=16,l.W=32,l.U=64,l.R=128,e.exports=l},function(e,t,n){(function(e){e.exports=function(){"use strict";var t,r;function i(){return t.apply(null,arguments)}function o(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function a(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function s(e){return void 0===e}function l(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function u(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function c(e,t){var n,r=[];for(n=0;n>>0,r=0;r0)for(n=0;n=0?n?"+":"":"-")+Math.pow(10,Math.max(0,i)).toString().substr(1)+r}var I=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,q=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,W={},R={};function $(e,t,n,r){var i=r;"string"==typeof r&&(i=function(){return this[r]()}),e&&(R[e]=i),t&&(R[t[0]]=function(){return N(i.apply(this,arguments),t[1],t[2])}),n&&(R[n]=function(){return this.localeData().ordinal(i.apply(this,arguments),e)})}function B(e,t){return e.isValid()?(t=U(t,e.localeData()),W[t]=W[t]||function(e){var t,n,r,i=e.match(I);for(t=0,n=i.length;t=0&&q.test(e);)e=e.replace(q,r),q.lastIndex=0,n-=1;return e}var V=/\d/,G=/\d\d/,J=/\d{3}/,K=/\d{4}/,Z=/[+-]?\d{6}/,X=/\d\d?/,Q=/\d\d\d\d?/,ee=/\d\d\d\d\d\d?/,te=/\d{1,3}/,ne=/\d{1,4}/,re=/[+-]?\d{1,6}/,ie=/\d+/,oe=/[+-]?\d+/,ae=/Z|[+-]\d\d:?\d\d/gi,se=/Z|[+-]\d\d(?::?\d\d)?/gi,le=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,ue={};function ce(e,t,n){ue[e]=C(t)?t:function(e,r){return e&&n?n:t}}function de(e,t){return d(ue,e)?ue[e](t._strict,t._locale):new RegExp(fe(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(e,t,n,r,i){return t||n||r||i})))}function fe(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}var he={};function pe(e,t){var n,r=t;for("string"==typeof e&&(e=[e]),l(t)&&(r=function(e,n){n[t]=x(e)}),n=0;n68?1900:2e3)};var De,Ye=Ce("FullYear",!0);function Ce(e,t){return function(n){return null!=n?(Ae(this,e,n),i.updateOffset(this,t),this):Ee(this,e)}}function Ee(e,t){return e.isValid()?e._d["get"+(e._isUTC?"UTC":"")+t]():NaN}function Ae(e,t,n){e.isValid()&&!isNaN(n)&&("FullYear"===t&&Te(e.year())&&1===e.month()&&29===e.date()?e._d["set"+(e._isUTC?"UTC":"")+t](n,e.month(),je(n,e.month())):e._d["set"+(e._isUTC?"UTC":"")+t](n))}function je(e,t){if(isNaN(e)||isNaN(t))return NaN;var n=(t%12+12)%12;return e+=(t-n)/12,1===n?Te(e)?29:28:31-n%7%2}De=Array.prototype.indexOf?Array.prototype.indexOf:function(e){var t;for(t=0;t=0&&isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e),t}function Re(e,t,n){var r=7+t-n;return-((7+We(e,0,r).getUTCDay()-t)%7)+r-1}function $e(e,t,n,r,i){var o,a,s=1+7*(t-1)+(7+n-r)%7+Re(e,r,i);return s<=0?a=Se(o=e-1)+s:s>Se(e)?(o=e+1,a=s-Se(e)):(o=e,a=s),{year:o,dayOfYear:a}}function Be(e,t,n){var r,i,o=Re(e.year(),t,n),a=Math.floor((e.dayOfYear()-o-1)/7)+1;return a<1?r=a+Ue(i=e.year()-1,t,n):a>Ue(e.year(),t,n)?(r=a-Ue(e.year(),t,n),i=e.year()+1):(i=e.year(),r=a),{week:r,year:i}}function Ue(e,t,n){var r=Re(e,t,n),i=Re(e+1,t,n);return(Se(e)-r+i)/7}$("w",["ww",2],"wo","week"),$("W",["WW",2],"Wo","isoWeek"),O("week","w"),O("isoWeek","W"),z("week",5),z("isoWeek",5),ce("w",X),ce("ww",X,G),ce("W",X),ce("WW",X,G),me(["w","ww","W","WW"],function(e,t,n,r){t[r.substr(0,1)]=x(e)}),$("d",0,"do","day"),$("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)}),$("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)}),$("dddd",0,0,function(e){return this.localeData().weekdays(this,e)}),$("e",0,0,"weekday"),$("E",0,0,"isoWeekday"),O("day","d"),O("weekday","e"),O("isoWeekday","E"),z("day",11),z("weekday",11),z("isoWeekday",11),ce("d",X),ce("e",X),ce("E",X),ce("dd",function(e,t){return t.weekdaysMinRegex(e)}),ce("ddd",function(e,t){return t.weekdaysShortRegex(e)}),ce("dddd",function(e,t){return t.weekdaysRegex(e)}),me(["dd","ddd","dddd"],function(e,t,n,r){var i=n._locale.weekdaysParse(e,r,n._strict);null!=i?t.d=i:p(n).invalidWeekday=e}),me(["d","e","E"],function(e,t,n,r){t[r]=x(e)});var Ve="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Ge="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Je="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),Ke=le,Ze=le,Xe=le;function Qe(){function e(e,t){return t.length-e.length}var t,n,r,i,o,a=[],s=[],l=[],u=[];for(t=0;t<7;t++)n=h([2e3,1]).day(t),r=this.weekdaysMin(n,""),i=this.weekdaysShort(n,""),o=this.weekdays(n,""),a.push(r),s.push(i),l.push(o),u.push(r),u.push(i),u.push(o);for(a.sort(e),s.sort(e),l.sort(e),u.sort(e),t=0;t<7;t++)s[t]=fe(s[t]),l[t]=fe(l[t]),u[t]=fe(u[t]);this._weekdaysRegex=new RegExp("^("+u.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+s.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+a.join("|")+")","i")}function et(){return this.hours()%12||12}function tt(e,t){$(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}function nt(e,t){return t._meridiemParse}$("H",["HH",2],0,"hour"),$("h",["hh",2],0,et),$("k",["kk",2],0,function(){return this.hours()||24}),$("hmm",0,0,function(){return""+et.apply(this)+N(this.minutes(),2)}),$("hmmss",0,0,function(){return""+et.apply(this)+N(this.minutes(),2)+N(this.seconds(),2)}),$("Hmm",0,0,function(){return""+this.hours()+N(this.minutes(),2)}),$("Hmmss",0,0,function(){return""+this.hours()+N(this.minutes(),2)+N(this.seconds(),2)}),tt("a",!0),tt("A",!1),O("hour","h"),z("hour",13),ce("a",nt),ce("A",nt),ce("H",X),ce("h",X),ce("k",X),ce("HH",X,G),ce("hh",X,G),ce("kk",X,G),ce("hmm",Q),ce("hmmss",ee),ce("Hmm",Q),ce("Hmmss",ee),pe(["H","HH"],be),pe(["k","kk"],function(e,t,n){var r=x(e);t[be]=24===r?0:r}),pe(["a","A"],function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e}),pe(["h","hh"],function(e,t,n){t[be]=x(e),p(n).bigHour=!0}),pe("hmm",function(e,t,n){var r=e.length-2;t[be]=x(e.substr(0,r)),t[ke]=x(e.substr(r)),p(n).bigHour=!0}),pe("hmmss",function(e,t,n){var r=e.length-4,i=e.length-2;t[be]=x(e.substr(0,r)),t[ke]=x(e.substr(r,2)),t[we]=x(e.substr(i)),p(n).bigHour=!0}),pe("Hmm",function(e,t,n){var r=e.length-2;t[be]=x(e.substr(0,r)),t[ke]=x(e.substr(r))}),pe("Hmmss",function(e,t,n){var r=e.length-4,i=e.length-2;t[be]=x(e.substr(0,r)),t[ke]=x(e.substr(r,2)),t[we]=x(e.substr(i))});var rt,it=Ce("Hours",!0),ot={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:He,monthsShort:Pe,week:{dow:0,doy:6},weekdays:Ve,weekdaysMin:Je,weekdaysShort:Ge,meridiemParse:/[ap]\.?m?\.?/i},at={},st={};function lt(e){return e?e.toLowerCase().replace("_","-"):e}function ut(t){var r=null;if(!at[t]&&void 0!==e&&e&&e.exports)try{r=rt._abbr,n(382)("./"+t),ct(r)}catch(e){}return at[t]}function ct(e,t){var n;return e&&((n=s(t)?ft(e):dt(e,t))?rt=n:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),rt._abbr}function dt(e,t){if(null!==t){var n,r=ot;if(t.abbr=e,null!=at[e])Y("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),r=at[e]._config;else if(null!=t.parentLocale)if(null!=at[t.parentLocale])r=at[t.parentLocale]._config;else{if(null==(n=ut(t.parentLocale)))return st[t.parentLocale]||(st[t.parentLocale]=[]),st[t.parentLocale].push({name:e,config:t}),null;r=n._config}return at[e]=new A(E(r,t)),st[e]&&st[e].forEach(function(e){dt(e.name,e.config)}),ct(e),at[e]}return delete at[e],null}function ft(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return rt;if(!o(e)){if(t=ut(e))return t;e=[e]}return function(e){for(var t,n,r,i,o=0;o0;){if(r=ut(i.slice(0,t).join("-")))return r;if(n&&n.length>=t&&M(i,n,!0)>=t-1)break;t--}o++}return rt}(e)}function ht(e){var t,n=e._a;return n&&-2===p(e).overflow&&(t=n[ve]<0||n[ve]>11?ve:n[ye]<1||n[ye]>je(n[ge],n[ve])?ye:n[be]<0||n[be]>24||24===n[be]&&(0!==n[ke]||0!==n[we]||0!==n[xe])?be:n[ke]<0||n[ke]>59?ke:n[we]<0||n[we]>59?we:n[xe]<0||n[xe]>999?xe:-1,p(e)._overflowDayOfYear&&(tye)&&(t=ye),p(e)._overflowWeeks&&-1===t&&(t=Me),p(e)._overflowWeekday&&-1===t&&(t=Le),p(e).overflow=t),e}function pt(e,t,n){return null!=e?e:null!=t?t:n}function mt(e){var t,n,r,o,a,s=[];if(!e._d){for(r=function(e){var t=new Date(i.now());return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}(e),e._w&&null==e._a[ye]&&null==e._a[ve]&&function(e){var t,n,r,i,o,a,s,l;if(null!=(t=e._w).GG||null!=t.W||null!=t.E)o=1,a=4,n=pt(t.GG,e._a[ge],Be(Yt(),1,4).year),r=pt(t.W,1),((i=pt(t.E,1))<1||i>7)&&(l=!0);else{o=e._locale._week.dow,a=e._locale._week.doy;var u=Be(Yt(),o,a);n=pt(t.gg,e._a[ge],u.year),r=pt(t.w,u.week),null!=t.d?((i=t.d)<0||i>6)&&(l=!0):null!=t.e?(i=t.e+o,(t.e<0||t.e>6)&&(l=!0)):i=o}r<1||r>Ue(n,o,a)?p(e)._overflowWeeks=!0:null!=l?p(e)._overflowWeekday=!0:(s=$e(n,r,i,o,a),e._a[ge]=s.year,e._dayOfYear=s.dayOfYear)}(e),null!=e._dayOfYear&&(a=pt(e._a[ge],r[ge]),(e._dayOfYear>Se(a)||0===e._dayOfYear)&&(p(e)._overflowDayOfYear=!0),n=We(a,0,e._dayOfYear),e._a[ve]=n.getUTCMonth(),e._a[ye]=n.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=s[t]=r[t];for(;t<7;t++)e._a[t]=s[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[be]&&0===e._a[ke]&&0===e._a[we]&&0===e._a[xe]&&(e._nextDay=!0,e._a[be]=0),e._d=(e._useUTC?We:function(e,t,n,r,i,o,a){var s=new Date(e,t,n,r,i,o,a);return e<100&&e>=0&&isFinite(s.getFullYear())&&s.setFullYear(e),s}).apply(null,s),o=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[be]=24),e._w&&void 0!==e._w.d&&e._w.d!==o&&(p(e).weekdayMismatch=!0)}}var _t=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,gt=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,vt=/Z|[+-]\d\d(?::?\d\d)?/,yt=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/]],bt=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],kt=/^\/?Date\((\-?\d+)/i;function wt(e){var t,n,r,i,o,a,s=e._i,l=_t.exec(s)||gt.exec(s);if(l){for(p(e).iso=!0,t=0,n=yt.length;t0&&p(e).unusedInput.push(a),s=s.slice(s.indexOf(n)+n.length),u+=n.length),R[o]?(n?p(e).empty=!1:p(e).unusedTokens.push(o),_e(o,n,e)):e._strict&&!n&&p(e).unusedTokens.push(o);p(e).charsLeftOver=l-u,s.length>0&&p(e).unusedInput.push(s),e._a[be]<=12&&!0===p(e).bigHour&&e._a[be]>0&&(p(e).bigHour=void 0),p(e).parsedDateParts=e._a.slice(0),p(e).meridiem=e._meridiem,e._a[be]=(c=e._locale,d=e._a[be],null==(f=e._meridiem)?d:null!=c.meridiemHour?c.meridiemHour(d,f):null!=c.isPM?((h=c.isPM(f))&&d<12&&(d+=12),h||12!==d||(d=0),d):d),mt(e),ht(e)}else Lt(e);else wt(e);var c,d,f,h}function Tt(e){var t=e._i,n=e._f;return e._locale=e._locale||ft(e._l),null===t||void 0===n&&""===t?_({nullInput:!0}):("string"==typeof t&&(e._i=t=e._locale.preparse(t)),k(t)?new b(ht(t)):(u(t)?e._d=t:o(n)?function(e){var t,n,r,i,o;if(0===e._f.length)return p(e).invalidFormat=!0,void(e._d=new Date(NaN));for(i=0;ithis?this:e:_()});function At(e,t){var n,r;if(1===t.length&&o(t[0])&&(t=t[0]),!t.length)return Yt();for(n=t[0],r=1;r(o=Ue(e,r,i))&&(t=o),function(e,t,n,r,i){var o=$e(e,t,n,r,i),a=We(o.year,0,o.dayOfYear);return this.year(a.getUTCFullYear()),this.month(a.getUTCMonth()),this.date(a.getUTCDate()),this}.call(this,e,t,n,r,i))}$(0,["gg",2],0,function(){return this.weekYear()%100}),$(0,["GG",2],0,function(){return this.isoWeekYear()%100}),nn("gggg","weekYear"),nn("ggggg","weekYear"),nn("GGGG","isoWeekYear"),nn("GGGGG","isoWeekYear"),O("weekYear","gg"),O("isoWeekYear","GG"),z("weekYear",1),z("isoWeekYear",1),ce("G",oe),ce("g",oe),ce("GG",X,G),ce("gg",X,G),ce("GGGG",ne,K),ce("gggg",ne,K),ce("GGGGG",re,Z),ce("ggggg",re,Z),me(["gggg","ggggg","GGGG","GGGGG"],function(e,t,n,r){t[r.substr(0,2)]=x(e)}),me(["gg","GG"],function(e,t,n,r){t[r]=i.parseTwoDigitYear(e)}),$("Q",0,"Qo","quarter"),O("quarter","Q"),z("quarter",7),ce("Q",V),pe("Q",function(e,t){t[ve]=3*(x(e)-1)}),$("D",["DD",2],"Do","date"),O("date","D"),z("date",9),ce("D",X),ce("DD",X,G),ce("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient}),pe(["D","DD"],ye),pe("Do",function(e,t){t[ye]=x(e.match(X)[0])});var on=Ce("Date",!0);$("DDD",["DDDD",3],"DDDo","dayOfYear"),O("dayOfYear","DDD"),z("dayOfYear",4),ce("DDD",te),ce("DDDD",J),pe(["DDD","DDDD"],function(e,t,n){n._dayOfYear=x(e)}),$("m",["mm",2],0,"minute"),O("minute","m"),z("minute",14),ce("m",X),ce("mm",X,G),pe(["m","mm"],ke);var an=Ce("Minutes",!1);$("s",["ss",2],0,"second"),O("second","s"),z("second",15),ce("s",X),ce("ss",X,G),pe(["s","ss"],we);var sn,ln=Ce("Seconds",!1);for($("S",0,0,function(){return~~(this.millisecond()/100)}),$(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),$(0,["SSS",3],0,"millisecond"),$(0,["SSSS",4],0,function(){return 10*this.millisecond()}),$(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),$(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),$(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),$(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),$(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),O("millisecond","ms"),z("millisecond",16),ce("S",te,V),ce("SS",te,G),ce("SSS",te,J),sn="SSSS";sn.length<=9;sn+="S")ce(sn,ie);function un(e,t){t[xe]=x(1e3*("0."+e))}for(sn="S";sn.length<=9;sn+="S")pe(sn,un);var cn=Ce("Milliseconds",!1);$("z",0,0,"zoneAbbr"),$("zz",0,0,"zoneName");var dn=b.prototype;function fn(e){return e}dn.add=Kt,dn.calendar=function(e,t){var n=e||Yt(),r=It(n,this).startOf("day"),o=i.calendarFormat(this,r)||"sameElse",a=t&&(C(t[o])?t[o].call(this,n):t[o]);return this.format(a||this.localeData().calendar(o,this,Yt(n)))},dn.clone=function(){return new b(this)},dn.diff=function(e,t,n){var r,i,o;if(!this.isValid())return NaN;if(!(r=It(e,this)).isValid())return NaN;switch(i=6e4*(r.utcOffset()-this.utcOffset()),t=H(t)){case"year":o=Xt(this,r)/12;break;case"month":o=Xt(this,r);break;case"quarter":o=Xt(this,r)/3;break;case"second":o=(this-r)/1e3;break;case"minute":o=(this-r)/6e4;break;case"hour":o=(this-r)/36e5;break;case"day":o=(this-r-i)/864e5;break;case"week":o=(this-r-i)/6048e5;break;default:o=this-r}return n?o:w(o)},dn.endOf=function(e){return void 0===(e=H(e))||"millisecond"===e?this:("date"===e&&(e="day"),this.startOf(e).add(1,"isoWeek"===e?"week":e).subtract(1,"ms"))},dn.format=function(e){e||(e=this.isUtc()?i.defaultFormatUtc:i.defaultFormat);var t=B(this,e);return this.localeData().postformat(t)},dn.from=function(e,t){return this.isValid()&&(k(e)&&e.isValid()||Yt(e).isValid())?Bt({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},dn.fromNow=function(e){return this.from(Yt(),e)},dn.to=function(e,t){return this.isValid()&&(k(e)&&e.isValid()||Yt(e).isValid())?Bt({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},dn.toNow=function(e){return this.to(Yt(),e)},dn.get=function(e){return C(this[e=H(e)])?this[e]():this},dn.invalidAt=function(){return p(this).overflow},dn.isAfter=function(e,t){var n=k(e)?e:Yt(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=H(s(t)?"millisecond":t))?this.valueOf()>n.valueOf():n.valueOf()9999?B(n,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):C(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",B(n,"Z")):B(n,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")},dn.inspect=function(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e="moment",t="";this.isLocal()||(e=0===this.utcOffset()?"moment.utc":"moment.parseZone",t="Z");var n="["+e+'("]',r=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",i=t+'[")]';return this.format(n+r+"-MM-DD[T]HH:mm:ss.SSS"+i)},dn.toJSON=function(){return this.isValid()?this.toISOString():null},dn.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},dn.unix=function(){return Math.floor(this.valueOf()/1e3)},dn.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},dn.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},dn.year=Ye,dn.isLeapYear=function(){return Te(this.year())},dn.weekYear=function(e){return rn.call(this,e,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)},dn.isoWeekYear=function(e){return rn.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)},dn.quarter=dn.quarters=function(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)},dn.month=ze,dn.daysInMonth=function(){return je(this.year(),this.month())},dn.week=dn.weeks=function(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),"d")},dn.isoWeek=dn.isoWeeks=function(e){var t=Be(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")},dn.weeksInYear=function(){var e=this.localeData()._week;return Ue(this.year(),e.dow,e.doy)},dn.isoWeeksInYear=function(){return Ue(this.year(),1,4)},dn.date=on,dn.day=dn.days=function(e){if(!this.isValid())return null!=e?this:NaN;var t=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=e?(e=function(e,t){return"string"!=typeof e?e:isNaN(e)?"number"==typeof(e=t.weekdaysParse(e))?e:null:parseInt(e,10)}(e,this.localeData()),this.add(e-t,"d")):t},dn.weekday=function(e){if(!this.isValid())return null!=e?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return null==e?t:this.add(e-t,"d")},dn.isoWeekday=function(e){if(!this.isValid())return null!=e?this:NaN;if(null!=e){var t=function(e,t){return"string"==typeof e?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}(e,this.localeData());return this.day(this.day()%7?t:t-7)}return this.day()||7},dn.dayOfYear=function(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==e?t:this.add(e-t,"d")},dn.hour=dn.hours=it,dn.minute=dn.minutes=an,dn.second=dn.seconds=ln,dn.millisecond=dn.milliseconds=cn,dn.utcOffset=function(e,t,n){var r,o=this._offset||0;if(!this.isValid())return null!=e?this:NaN;if(null!=e){if("string"==typeof e){if(null===(e=Nt(se,e)))return this}else Math.abs(e)<16&&!n&&(e*=60);return!this._isUTC&&t&&(r=qt(this)),this._offset=e,this._isUTC=!0,null!=r&&this.add(r,"m"),o!==e&&(!t||this._changeInProgress?Jt(this,Bt(e-o,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,i.updateOffset(this,!0),this._changeInProgress=null)),this}return this._isUTC?o:qt(this)},dn.utc=function(e){return this.utcOffset(0,e)},dn.local=function(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(qt(this),"m")),this},dn.parseZone=function(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"==typeof this._i){var e=Nt(ae,this._i);null!=e?this.utcOffset(e):this.utcOffset(0,!0)}return this},dn.hasAlignedHourOffset=function(e){return!!this.isValid()&&(e=e?Yt(e).utcOffset():0,(this.utcOffset()-e)%60==0)},dn.isDST=function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},dn.isLocal=function(){return!!this.isValid()&&!this._isUTC},dn.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},dn.isUtc=Wt,dn.isUTC=Wt,dn.zoneAbbr=function(){return this._isUTC?"UTC":""},dn.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},dn.dates=S("dates accessor is deprecated. Use date instead.",on),dn.months=S("months accessor is deprecated. Use month instead",ze),dn.years=S("years accessor is deprecated. Use year instead",Ye),dn.zone=S("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",function(e,t){return null!=e?("string"!=typeof e&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}),dn.isDSTShifted=S("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",function(){if(!s(this._isDSTShifted))return this._isDSTShifted;var e={};if(v(e,this),(e=Tt(e))._a){var t=e._isUTC?h(e._a):Yt(e._a);this._isDSTShifted=this.isValid()&&M(e._a,t.toArray())>0}else this._isDSTShifted=!1;return this._isDSTShifted});var hn=A.prototype;function pn(e,t,n,r){var i=ft(),o=h().set(r,t);return i[n](o,e)}function mn(e,t,n){if(l(e)&&(t=e,e=void 0),e=e||"",null!=t)return pn(e,t,n,"month");var r,i=[];for(r=0;r<12;r++)i[r]=pn(e,r,n,"month");return i}function _n(e,t,n,r){"boolean"==typeof e?(l(t)&&(n=t,t=void 0),t=t||""):(n=t=e,e=!1,l(t)&&(n=t,t=void 0),t=t||"");var i,o=ft(),a=e?o._week.dow:0;if(null!=n)return pn(t,(n+a)%7,r,"day");var s=[];for(i=0;i<7;i++)s[i]=pn(t,(i+a)%7,r,"day");return s}hn.calendar=function(e,t,n){var r=this._calendar[e]||this._calendar.sameElse;return C(r)?r.call(t,n):r},hn.longDateFormat=function(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.replace(/MMMM|MM|DD|dddd/g,function(e){return e.slice(1)}),this._longDateFormat[e])},hn.invalidDate=function(){return this._invalidDate},hn.ordinal=function(e){return this._ordinal.replace("%d",e)},hn.preparse=fn,hn.postformat=fn,hn.relativeTime=function(e,t,n,r){var i=this._relativeTime[n];return C(i)?i(e,t,n,r):i.replace(/%d/i,e)},hn.pastFuture=function(e,t){var n=this._relativeTime[e>0?"future":"past"];return C(n)?n(t):n.replace(/%s/i,t)},hn.set=function(e){var t,n;for(n in e)C(t=e[n])?this[n]=t:this["_"+n]=t;this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)},hn.months=function(e,t){return e?o(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||Oe).test(t)?"format":"standalone"][e.month()]:o(this._months)?this._months:this._months.standalone},hn.monthsShort=function(e,t){return e?o(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[Oe.test(t)?"format":"standalone"][e.month()]:o(this._monthsShort)?this._monthsShort:this._monthsShort.standalone},hn.monthsParse=function(e,t,n){var r,i,o;if(this._monthsParseExact)return function(e,t,n){var r,i,o,a=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],r=0;r<12;++r)o=h([2e3,r]),this._shortMonthsParse[r]=this.monthsShort(o,"").toLocaleLowerCase(),this._longMonthsParse[r]=this.months(o,"").toLocaleLowerCase();return n?"MMM"===t?-1!==(i=De.call(this._shortMonthsParse,a))?i:null:-1!==(i=De.call(this._longMonthsParse,a))?i:null:"MMM"===t?-1!==(i=De.call(this._shortMonthsParse,a))?i:-1!==(i=De.call(this._longMonthsParse,a))?i:null:-1!==(i=De.call(this._longMonthsParse,a))?i:-1!==(i=De.call(this._shortMonthsParse,a))?i:null}.call(this,e,t,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),r=0;r<12;r++){if(i=h([2e3,r]),n&&!this._longMonthsParse[r]&&(this._longMonthsParse[r]=new RegExp("^"+this.months(i,"").replace(".","")+"$","i"),this._shortMonthsParse[r]=new RegExp("^"+this.monthsShort(i,"").replace(".","")+"$","i")),n||this._monthsParse[r]||(o="^"+this.months(i,"")+"|^"+this.monthsShort(i,""),this._monthsParse[r]=new RegExp(o.replace(".",""),"i")),n&&"MMMM"===t&&this._longMonthsParse[r].test(e))return r;if(n&&"MMM"===t&&this._shortMonthsParse[r].test(e))return r;if(!n&&this._monthsParse[r].test(e))return r}},hn.monthsRegex=function(e){return this._monthsParseExact?(d(this,"_monthsRegex")||qe.call(this),e?this._monthsStrictRegex:this._monthsRegex):(d(this,"_monthsRegex")||(this._monthsRegex=Ie),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)},hn.monthsShortRegex=function(e){return this._monthsParseExact?(d(this,"_monthsRegex")||qe.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(d(this,"_monthsShortRegex")||(this._monthsShortRegex=Ne),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)},hn.week=function(e){return Be(e,this._week.dow,this._week.doy).week},hn.firstDayOfYear=function(){return this._week.doy},hn.firstDayOfWeek=function(){return this._week.dow},hn.weekdays=function(e,t){return e?o(this._weekdays)?this._weekdays[e.day()]:this._weekdays[this._weekdays.isFormat.test(t)?"format":"standalone"][e.day()]:o(this._weekdays)?this._weekdays:this._weekdays.standalone},hn.weekdaysMin=function(e){return e?this._weekdaysMin[e.day()]:this._weekdaysMin},hn.weekdaysShort=function(e){return e?this._weekdaysShort[e.day()]:this._weekdaysShort},hn.weekdaysParse=function(e,t,n){var r,i,o;if(this._weekdaysParseExact)return function(e,t,n){var r,i,o,a=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)o=h([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(o,"").toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(o,"").toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(o,"").toLocaleLowerCase();return n?"dddd"===t?-1!==(i=De.call(this._weekdaysParse,a))?i:null:"ddd"===t?-1!==(i=De.call(this._shortWeekdaysParse,a))?i:null:-1!==(i=De.call(this._minWeekdaysParse,a))?i:null:"dddd"===t?-1!==(i=De.call(this._weekdaysParse,a))?i:-1!==(i=De.call(this._shortWeekdaysParse,a))?i:-1!==(i=De.call(this._minWeekdaysParse,a))?i:null:"ddd"===t?-1!==(i=De.call(this._shortWeekdaysParse,a))?i:-1!==(i=De.call(this._weekdaysParse,a))?i:-1!==(i=De.call(this._minWeekdaysParse,a))?i:null:-1!==(i=De.call(this._minWeekdaysParse,a))?i:-1!==(i=De.call(this._weekdaysParse,a))?i:-1!==(i=De.call(this._shortWeekdaysParse,a))?i:null}.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++){if(i=h([2e3,1]).day(r),n&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp("^"+this.weekdays(i,"").replace(".",".?")+"$","i"),this._shortWeekdaysParse[r]=new RegExp("^"+this.weekdaysShort(i,"").replace(".",".?")+"$","i"),this._minWeekdaysParse[r]=new RegExp("^"+this.weekdaysMin(i,"").replace(".",".?")+"$","i")),this._weekdaysParse[r]||(o="^"+this.weekdays(i,"")+"|^"+this.weekdaysShort(i,"")+"|^"+this.weekdaysMin(i,""),this._weekdaysParse[r]=new RegExp(o.replace(".",""),"i")),n&&"dddd"===t&&this._fullWeekdaysParse[r].test(e))return r;if(n&&"ddd"===t&&this._shortWeekdaysParse[r].test(e))return r;if(n&&"dd"===t&&this._minWeekdaysParse[r].test(e))return r;if(!n&&this._weekdaysParse[r].test(e))return r}},hn.weekdaysRegex=function(e){return this._weekdaysParseExact?(d(this,"_weekdaysRegex")||Qe.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(d(this,"_weekdaysRegex")||(this._weekdaysRegex=Ke),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)},hn.weekdaysShortRegex=function(e){return this._weekdaysParseExact?(d(this,"_weekdaysRegex")||Qe.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(d(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Ze),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)},hn.weekdaysMinRegex=function(e){return this._weekdaysParseExact?(d(this,"_weekdaysRegex")||Qe.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(d(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Xe),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)},hn.isPM=function(e){return"p"===(e+"").toLowerCase().charAt(0)},hn.meridiem=function(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"},ct("en",{dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10;return e+(1===x(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")}}),i.lang=S("moment.lang is deprecated. Use moment.locale instead.",ct),i.langData=S("moment.langData is deprecated. Use moment.localeData instead.",ft);var gn=Math.abs;function vn(e,t,n,r){var i=Bt(t,n);return e._milliseconds+=r*i._milliseconds,e._days+=r*i._days,e._months+=r*i._months,e._bubble()}function yn(e){return e<0?Math.floor(e):Math.ceil(e)}function bn(e){return 4800*e/146097}function kn(e){return 146097*e/4800}function wn(e){return function(){return this.as(e)}}var xn=wn("ms"),Mn=wn("s"),Ln=wn("m"),Sn=wn("h"),Tn=wn("d"),Dn=wn("w"),Yn=wn("M"),Cn=wn("y");function En(e){return function(){return this.isValid()?this._data[e]:NaN}}var An=En("milliseconds"),jn=En("seconds"),On=En("minutes"),Hn=En("hours"),Pn=En("days"),Fn=En("months"),zn=En("years"),Nn=Math.round,In={ss:44,s:45,m:45,h:22,d:26,M:11},qn=Math.abs;function Wn(e){return(e>0)-(e<0)||+e}function Rn(){if(!this.isValid())return this.localeData().invalidDate();var e,t,n=qn(this._milliseconds)/1e3,r=qn(this._days),i=qn(this._months);t=w((e=w(n/60))/60),n%=60,e%=60;var o=w(i/12),a=i%=12,s=r,l=t,u=e,c=n?n.toFixed(3).replace(/\.?0+$/,""):"",d=this.asSeconds();if(!d)return"P0D";var f=d<0?"-":"",h=Wn(this._months)!==Wn(d)?"-":"",p=Wn(this._days)!==Wn(d)?"-":"",m=Wn(this._milliseconds)!==Wn(d)?"-":"";return f+"P"+(o?h+o+"Y":"")+(a?h+a+"M":"")+(s?p+s+"D":"")+(l||u||c?"T":"")+(l?m+l+"H":"")+(u?m+u+"M":"")+(c?m+c+"S":"")}var $n=Ot.prototype;return $n.isValid=function(){return this._isValid},$n.abs=function(){var e=this._data;return this._milliseconds=gn(this._milliseconds),this._days=gn(this._days),this._months=gn(this._months),e.milliseconds=gn(e.milliseconds),e.seconds=gn(e.seconds),e.minutes=gn(e.minutes),e.hours=gn(e.hours),e.months=gn(e.months),e.years=gn(e.years),this},$n.add=function(e,t){return vn(this,e,t,1)},$n.subtract=function(e,t){return vn(this,e,t,-1)},$n.as=function(e){if(!this.isValid())return NaN;var t,n,r=this._milliseconds;if("month"===(e=H(e))||"year"===e)return t=this._days+r/864e5,n=this._months+bn(t),"month"===e?n:n/12;switch(t=this._days+Math.round(kn(this._months)),e){case"week":return t/7+r/6048e5;case"day":return t+r/864e5;case"hour":return 24*t+r/36e5;case"minute":return 1440*t+r/6e4;case"second":return 86400*t+r/1e3;case"millisecond":return Math.floor(864e5*t)+r;default:throw new Error("Unknown unit "+e)}},$n.asMilliseconds=xn,$n.asSeconds=Mn,$n.asMinutes=Ln,$n.asHours=Sn,$n.asDays=Tn,$n.asWeeks=Dn,$n.asMonths=Yn,$n.asYears=Cn,$n.valueOf=function(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*x(this._months/12):NaN},$n._bubble=function(){var e,t,n,r,i,o=this._milliseconds,a=this._days,s=this._months,l=this._data;return o>=0&&a>=0&&s>=0||o<=0&&a<=0&&s<=0||(o+=864e5*yn(kn(s)+a),a=0,s=0),l.milliseconds=o%1e3,e=w(o/1e3),l.seconds=e%60,t=w(e/60),l.minutes=t%60,n=w(t/60),l.hours=n%24,s+=i=w(bn(a+=w(n/24))),a-=yn(kn(i)),r=w(s/12),s%=12,l.days=a,l.months=s,l.years=r,this},$n.clone=function(){return Bt(this)},$n.get=function(e){return e=H(e),this.isValid()?this[e+"s"]():NaN},$n.milliseconds=An,$n.seconds=jn,$n.minutes=On,$n.hours=Hn,$n.days=Pn,$n.weeks=function(){return w(this.days()/7)},$n.months=Fn,$n.years=zn,$n.humanize=function(e){if(!this.isValid())return this.localeData().invalidDate();var t=this.localeData(),n=function(e,t,n){var r=Bt(e).abs(),i=Nn(r.as("s")),o=Nn(r.as("m")),a=Nn(r.as("h")),s=Nn(r.as("d")),l=Nn(r.as("M")),u=Nn(r.as("y")),c=i<=In.ss&&["s",i]||i0,c[4]=n,function(e,t,n,r,i){return i.relativeTime(t||1,!!n,e,r)}.apply(null,c)}(this,!e,t);return e&&(n=t.pastFuture(+this,n)),t.postformat(n)},$n.toISOString=Rn,$n.toString=Rn,$n.toJSON=Rn,$n.locale=Qt,$n.localeData=tn,$n.toIsoString=S("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Rn),$n.lang=en,$("X",0,0,"unix"),$("x",0,0,"valueOf"),ce("x",oe),ce("X",/[+-]?\d+(\.\d{1,3})?/),pe("X",function(e,t,n){n._d=new Date(1e3*parseFloat(e,10))}),pe("x",function(e,t,n){n._d=new Date(x(e))}),i.version="2.21.0",t=Yt,i.fn=dn,i.min=function(){return At("isBefore",[].slice.call(arguments,0))},i.max=function(){return At("isAfter",[].slice.call(arguments,0))},i.now=function(){return Date.now?Date.now():+new Date},i.utc=h,i.unix=function(e){return Yt(1e3*e)},i.months=function(e,t){return mn(e,t,"months")},i.isDate=u,i.locale=ct,i.invalid=_,i.duration=Bt,i.isMoment=k,i.weekdays=function(e,t,n){return _n(e,t,n,"weekdays")},i.parseZone=function(){return Yt.apply(null,arguments).parseZone()},i.localeData=ft,i.isDuration=Ht,i.monthsShort=function(e,t){return mn(e,t,"monthsShort")},i.weekdaysMin=function(e,t,n){return _n(e,t,n,"weekdaysMin")},i.defineLocale=dt,i.updateLocale=function(e,t){if(null!=t){var n,r,i=ot;null!=(r=ut(e))&&(i=r._config),(n=new A(t=E(i,t))).parentLocale=at[e],at[e]=n,ct(e)}else null!=at[e]&&(null!=at[e].parentLocale?at[e]=at[e].parentLocale:null!=at[e]&&delete at[e]);return at[e]},i.locales=function(){return T(at)},i.weekdaysShort=function(e,t,n){return _n(e,t,n,"weekdaysShort")},i.normalizeUnits=H,i.relativeTimeRounding=function(e){return void 0===e?Nn:"function"==typeof e&&(Nn=e,!0)},i.relativeTimeThreshold=function(e,t){return void 0!==In[e]&&(void 0===t?In[e]:(In[e]=t,"s"===e&&(In.ss=t-1),!0))},i.calendarFormat=function(e,t){var n=e.diff(t,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"},i.prototype=dn,i.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"YYYY-[W]WW",MONTH:"YYYY-MM"},i}()}).call(this,n(74)(e))},function(e,t,n){var r=n(6);e.exports=function(e){if(!r(e))throw TypeError(e+" is not an object!");return e}},function(e,t){var n=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(e,t,n){"use strict";var r=Object.prototype.hasOwnProperty;function i(e,t){return r.call(e,t)}function o(e){return!(e>=55296&&e<=57343||e>=64976&&e<=65007||65535==(65535&e)||65534==(65535&e)||e>=0&&e<=8||11===e||e>=14&&e<=31||e>=127&&e<=159||e>1114111)}function a(e){if(e>65535){var t=55296+((e-=65536)>>10),n=56320+(1023&e);return String.fromCharCode(t,n)}return String.fromCharCode(e)}var s=/\\([!"#$%&'()*+,\-.\/:;<=>?@[\\\]^_`{|}~])/g,l=new RegExp(s.source+"|"+/&([a-z#][a-z0-9]{1,31});/gi.source,"gi"),u=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))/i,c=n(115),d=/[&<>"]/,f=/[&<>"]/g,h={"&":"&","<":"<",">":">",'"':"""};function p(e){return h[e]}var m=/[.?*+^$[\]\\(){}|-]/g,_=n(72);t.lib={},t.lib.mdurl=n(114),t.lib.ucmicro=n(354),t.assign=function(e){return Array.prototype.slice.call(arguments,1).forEach(function(t){if(t){if("object"!=typeof t)throw new TypeError(t+"must be object");Object.keys(t).forEach(function(n){e[n]=t[n]})}}),e},t.isString=function(e){return"[object String]"===function(e){return Object.prototype.toString.call(e)}(e)},t.has=i,t.unescapeMd=function(e){return e.indexOf("\\")<0?e:e.replace(s,"$1")},t.unescapeAll=function(e){return e.indexOf("\\")<0&&e.indexOf("&")<0?e:e.replace(l,function(e,t,n){return t||function(e,t){var n=0;return i(c,t)?c[t]:35===t.charCodeAt(0)&&u.test(t)&&o(n="x"===t[1].toLowerCase()?parseInt(t.slice(2),16):parseInt(t.slice(1),10))?a(n):e}(e,n)})},t.isValidEntityCode=o,t.fromCodePoint=a,t.escapeHtml=function(e){return d.test(e)?e.replace(f,p):e},t.arrayReplaceAt=function(e,t,n){return[].concat(e.slice(0,t),n,e.slice(t+1))},t.isSpace=function(e){switch(e){case 9:case 32:return!0}return!1},t.isWhiteSpace=function(e){if(e>=8192&&e<=8202)return!0;switch(e){case 9:case 10:case 11:case 12:case 13:case 32:case 160:case 5760:case 8239:case 8287:case 12288:return!0}return!1},t.isMdAsciiPunct=function(e){switch(e){case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 124:case 125:case 126:return!0;default:return!1}},t.isPunctChar=function(e){return _.test(e)},t.escapeRE=function(e){return e.replace(m,"\\$&")},t.normalizeReference=function(e){return e.trim().replace(/\s+/g," ").toUpperCase()}},function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},function(e,t,n){var r=n(68)("wks"),i=n(44),o=n(3).Symbol,a="function"==typeof o;(e.exports=function(e){return r[e]||(r[e]=a&&o[e]||(a?o:i)("Symbol."+e))}).store=r},function(e,t,n){var r=n(27),i=Math.min;e.exports=function(e){return e>0?i(r(e),9007199254740991):0}},function(e,t,n){var r=n(2),i=n(279),o=n(29),a=Object.defineProperty;t.f=n(10)?Object.defineProperty:function(e,t,n){if(r(e),t=o(t,!0),r(n),i)try{return a(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(e[t]=n.value),e}},function(e,t,n){e.exports=!n(5)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(e,t,n){e.exports=function(){"use strict";var e=navigator.userAgent,t=navigator.platform,n=/gecko\/\d/i.test(e),r=/MSIE \d/.test(e),i=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(e),o=/Edge\/(\d+)/.exec(e),a=r||i||o,s=a&&(r?document.documentMode||6:+(o||i)[1]),l=!o&&/WebKit\//.test(e),u=l&&/Qt\/\d+\.\d+/.test(e),c=!o&&/Chrome\//.test(e),d=/Opera\//.test(e),f=/Apple Computer/.test(navigator.vendor),h=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(e),p=/PhantomJS/.test(e),m=!o&&/AppleWebKit/.test(e)&&/Mobile\/\w+/.test(e),_=/Android/.test(e),g=m||_||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(e),v=m||/Mac/.test(t),y=/\bCrOS\b/.test(e),b=/win/i.test(t),k=d&&e.match(/Version\/(\d*\.\d*)/);k&&(k=Number(k[1])),k&&k>=15&&(d=!1,l=!0);var w=v&&(u||d&&(null==k||k<12.11)),x=n||a&&s>=9;function M(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var L,S=function(e,t){var n=e.className,r=M(t).exec(n);if(r){var i=n.slice(r.index+r[0].length);e.className=n.slice(0,r.index)+(i?r[1]+i:"")}};function T(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function D(e,t){return T(e).appendChild(t)}function Y(e,t,n,r){var i=document.createElement(e);if(n&&(i.className=n),r&&(i.style.cssText=r),"string"==typeof t)i.appendChild(document.createTextNode(t));else if(t)for(var o=0;o=t)return a+(t-o);a+=s-o,a+=n-a%n,o=s+1}}m?H=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:a&&(H=function(e){try{e.select()}catch(e){}});var N=function(){this.id=null};function I(e,t){for(var n=0;n=t)return r+Math.min(a,t-i);if(i+=o-r,r=o+1,(i+=n-i%n)>=t)return r}}var V=[""];function G(e){for(;V.length<=e;)V.push(J(V)+" ");return V[e]}function J(e){return e[e.length-1]}function K(e,t){for(var n=[],r=0;r"€"&&(e.toUpperCase()!=e.toLowerCase()||Q.test(e))}function te(e,t){return t?!!(t.source.indexOf("\\w")>-1&&ee(e))||t.test(e):ee(e)}function ne(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var re=/[\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&&re.test(e)}function oe(e,t,n){for(;(n<0?t>0:tn?-1:1;;){if(t==n)return t;var i=(t+n)/2,o=r<0?Math.ceil(i):Math.floor(i);if(o==t)return e(o)?t:n;e(o)?n=o:t=o+r}}function se(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 n=e;!n.lines;)for(var r=0;;++r){var i=n.children[r],o=i.chunkSize();if(t=e.first&&tn?me(n,se(e,n).text.length):function(e,t){var n=e.ch;return null==n||n>t?me(e.line,t):n<0?me(e.line,0):e}(t,se(e,t.line).text.length)}function xe(e,t){for(var n=[],r=0;r=t:o.to>t);(r||(r=[])).push(new Se(a,o.from,s?null:o.to))}}return r}(n,i,a),l=function(e,t,n){var r;if(e)for(var i=0;i=t:o.to>t)||o.from==t&&"bookmark"==a.type&&(!n||o.marker.insertLeft)){var s=null==o.from||(a.inclusiveLeft?o.from<=t:o.from0&&s)for(var y=0;y=0&&d<=0||c<=0&&d>=0)&&(c<=0&&(l.marker.inclusiveRight&&i.inclusiveLeft?_e(u.to,n)>=0:_e(u.to,n)>0)||c>=0&&(l.marker.inclusiveRight&&i.inclusiveLeft?_e(u.from,r)<=0:_e(u.from,r)<0)))return!0}}}function Ie(e){for(var t;t=Fe(e);)e=t.find(-1,!0).line;return e}function qe(e,t){var n=se(e,t),r=Ie(n);return n==r?t:de(r)}function We(e,t){if(t>e.lastLine())return t;var n,r=se(e,t);if(!Re(e,r))return t;for(;n=ze(r);)r=n.find(1,!0).line;return de(r)+1}function Re(e,t){var n=Le&&t.markedSpans;if(n)for(var r=void 0,i=0;it.maxLineLength&&(t.maxLineLength=n,t.maxLine=e)})}var Ge=null;function Je(e,t,n){var r;Ge=null;for(var i=0;it)return i;o.to==t&&(o.from!=o.to&&"before"==n?r=i:Ge=i),o.from==t&&(o.from!=o.to&&"before"!=n?r=i:Ge=i)}return null!=r?r:Ge}var Ke=function(){var e=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,t=/[stwN]/,n=/[LRr]/,r=/[Lb1n]/,i=/[1n]/;function o(e,t,n){this.level=e,this.from=t,this.to=n}return function(a,s){var l,u="ltr"==s?"L":"R";if(0==a.length||"ltr"==s&&!e.test(a))return!1;for(var c=a.length,d=[],f=0;f-1&&(r[t]=i.slice(0,o).concat(i.slice(o+1)))}}}function nt(e,t){var n=et(e,t);if(n.length)for(var r=Array.prototype.slice.call(arguments,2),i=0;i0}function at(e){e.prototype.on=function(e,t){Qe(this,e,t)},e.prototype.off=function(e,t){tt(this,e,t)}}function st(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function lt(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function ut(e){return null!=e.defaultPrevented?e.defaultPrevented:0==e.returnValue}function ct(e){st(e),lt(e)}function dt(e){return e.target||e.srcElement}function ft(e){var t=e.which;return null==t&&(1&e.button?t=1:2&e.button?t=3:4&e.button&&(t=2)),v&&e.ctrlKey&&1==t&&(t=3),t}var ht,pt,mt=function(){if(a&&s<9)return!1;var e=Y("div");return"draggable"in e||"dragDrop"in e}();function _t(e){if(null==ht){var t=Y("span","​");D(e,Y("span",[t,document.createTextNode("x")])),0!=e.firstChild.offsetHeight&&(ht=t.offsetWidth<=1&&t.offsetHeight>2&&!(a&&s<8))}var n=ht?Y("span","​"):Y("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return n.setAttribute("cm-text",""),n}function gt(e){if(null!=pt)return pt;var t=D(e,document.createTextNode("AخA")),n=L(t,0,1).getBoundingClientRect(),r=L(t,1,2).getBoundingClientRect();return T(e),!(!n||n.left==n.right)&&(pt=r.right-n.right<3)}var vt,yt=3!="\n\nb".split(/\n/).length?function(e){for(var t=0,n=[],r=e.length;t<=r;){var i=e.indexOf("\n",t);-1==i&&(i=e.length);var o=e.slice(t,"\r"==e.charAt(i-1)?i-1:i),a=o.indexOf("\r");-1!=a?(n.push(o.slice(0,a)),t+=a+1):(n.push(o),t=i+1)}return n}:function(e){return e.split(/\r\n?|\n/)},bt=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)},kt="oncopy"in(vt=Y("div"))||(vt.setAttribute("oncopy","return;"),"function"==typeof vt.oncopy),wt=null,xt={},Mt={};function Lt(e){if("string"==typeof e&&Mt.hasOwnProperty(e))e=Mt[e];else if(e&&"string"==typeof e.name&&Mt.hasOwnProperty(e.name)){var t=Mt[e.name];"string"==typeof t&&(t={name:t}),(e=X(t,e)).name=t.name}else{if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return Lt("application/xml");if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return Lt("application/json")}return"string"==typeof e?{name:e}:e||{name:"null"}}function St(e,t){t=Lt(t);var n=xt[t.name];if(!n)return St(e,"text/plain");var r=n(e,t);if(Tt.hasOwnProperty(t.name)){var i=Tt[t.name];for(var o in i)i.hasOwnProperty(o)&&(r.hasOwnProperty(o)&&(r["_"+o]=r[o]),r[o]=i[o])}if(r.name=t.name,t.helperType&&(r.helperType=t.helperType),t.modeProps)for(var a in t.modeProps)r[a]=t.modeProps[a];return r}var Tt={};function Dt(e,t){if(!0===t)return t;if(e.copyState)return e.copyState(t);var n={};for(var r in t){var i=t[r];i instanceof Array&&(i=i.concat([])),n[r]=i}return n}function Yt(e,t){for(var n;e.innerMode&&(n=e.innerMode(t))&&n.mode!=e;)t=n.state,e=n.mode;return n||{mode:e,state:t}}function Ct(e,t,n){return!e.startState||e.startState(t,n)}var Et=function(e,t,n){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=n};Et.prototype.eol=function(){return this.pos>=this.string.length},Et.prototype.sol=function(){return this.pos==this.lineStart},Et.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Et.prototype.next=function(){if(this.post},Et.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},Et.prototype.skipToEnd=function(){this.pos=this.string.length},Et.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},Et.prototype.backUp=function(e){this.pos-=e},Et.prototype.column=function(){return this.lastColumnPos0?null:(r&&!1!==t&&(this.pos+=r[0].length),r)}var i=function(e){return n?e.toLowerCase():e};if(i(this.string.substr(this.pos,e.length))==i(e))return!1!==t&&(this.pos+=e.length),!0},Et.prototype.current=function(){return this.string.slice(this.start,this.pos)},Et.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},Et.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},Et.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};var At=function(e,t){this.state=e,this.lookAhead=t},jt=function(e,t,n,r){this.state=t,this.doc=e,this.line=n,this.maxLookAhead=r||0,this.baseTokens=null,this.baseTokenPos=1};function Ot(e,t,n,r){var i=[e.state.modeGen],o={};Rt(e,t.text,e.doc.mode,n,function(e,t){return i.push(e,t)},o,r);for(var a=n.state,s=function(r){n.baseTokens=i;var s=e.state.overlays[r],l=1,u=0;n.state=!0,Rt(e,t.text,s.mode,n,function(e,t){for(var n=l;ue&&i.splice(l,1,e,i[l+1],r),l+=2,u=Math.min(e,r)}if(t)if(s.opaque)i.splice(n,l-n,e,"overlay "+t),l=n+2;else for(;ne.options.maxHighlightLength&&Dt(e.doc.mode,r.state),o=Ot(e,t,r);i&&(r.state=i),t.stateAfter=r.save(!i),t.styles=o.styles,o.classes?t.styleClasses=o.classes:t.styleClasses&&(t.styleClasses=null),n===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function Pt(e,t,n){var r=e.doc,i=e.display;if(!r.mode.startState)return new jt(r,!0,t);var o=function(e,t,n){for(var r,i,o=e.doc,a=n?-1:t-(e.doc.mode.innerMode?1e3:100),s=t;s>a;--s){if(s<=o.first)return o.first;var l=se(o,s-1),u=l.stateAfter;if(u&&(!n||s+(u instanceof At?u.lookAhead:0)<=o.modeFrontier))return s;var c=z(l.text,null,e.options.tabSize);(null==i||r>c)&&(i=s-1,r=c)}return i}(e,t,n),a=o>r.first&&se(r,o-1).stateAfter,s=a?jt.fromSaved(r,a,o):new jt(r,Ct(r.mode),o);return r.iter(o,t,function(n){Ft(e,n.text,s);var r=s.line;n.stateAfter=r==t-1||r%5==0||r>=i.viewFrom&&rt.start)return o}throw new Error("Mode "+e.name+" failed to advance stream.")}jt.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return null!=t&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},jt.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}},jt.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},jt.fromSaved=function(e,t,n){return t instanceof At?new jt(e,Dt(e.mode,t.state),n,t.lookAhead):new jt(e,Dt(e.mode,t),n)},jt.prototype.save=function(e){var t=!1!==e?Dt(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new At(t,this.maxLookAhead):t};var It=function(e,t,n){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=n};function qt(e,t,n,r){var i,o,a=e.doc,s=a.mode,l=se(a,(t=we(a,t)).line),u=Pt(e,t.line,n),c=new Et(l.text,e.options.tabSize,u);for(r&&(o=[]);(r||c.pose.options.maxHighlightLength?(s=!1,a&&Ft(e,t,r,d.pos),d.pos=t.length,l=null):l=Wt(Nt(n,d,r.state,f),o),f){var h=f[0].name;h&&(l="m-"+(l?h+" "+l:h))}if(!s||c!=l){for(;u1&&!/ /.test(e))return e;for(var n=t,r="",i=0;iu&&d.from<=u);f++);if(d.to>=c)return e(n,r,i,o,a,s,l);e(n,r.slice(0,d.to-u),i,o,null,s,l),o=null,r=r.slice(d.to-u),u=d.to}}}function Qt(e,t,n,r){var i=!r&&n.widgetNode;i&&e.map.push(e.pos,e.pos+t,i),!r&&e.cm.display.input.needsContentAttribute&&(i||(i=e.content.appendChild(document.createElement("span"))),i.setAttribute("cm-marker",n.id)),i&&(e.cm.display.input.setUneditable(i),e.content.appendChild(i)),e.pos+=t,e.trailingSpace=!1}function en(e,t,n){var r=e.markedSpans,i=e.text,o=0;if(r)for(var a,s,l,u,c,d,f,h=i.length,p=0,m=1,_="",g=0;;){if(g==p){l=u=c=d=s="",f=null,g=1/0;for(var v=[],y=void 0,b=0;bp||w.collapsed&&k.to==p&&k.from==p)?(null!=k.to&&k.to!=p&&g>k.to&&(g=k.to,u=""),w.className&&(l+=" "+w.className),w.css&&(s=(s?s+";":"")+w.css),w.startStyle&&k.from==p&&(c+=" "+w.startStyle),w.endStyle&&k.to==g&&(y||(y=[])).push(w.endStyle,k.to),w.title&&!d&&(d=w.title),w.collapsed&&(!f||He(f.marker,w)<0)&&(f=k)):k.from>p&&g>k.from&&(g=k.from)}if(y)for(var x=0;x=h)break;for(var L=Math.min(h,g);;){if(_){var S=p+_.length;if(!f){var T=S>L?_.slice(0,L-p):_;t.addToken(t,T,a?a+l:l,c,p+T.length==g?u:"",d,s)}if(S>=L){_=_.slice(L-p),p=L;break}p=S,c=""}_=i.slice(o,o=n[m++]),a=Gt(n[m++],t.cm.options)}}else for(var D=1;Dn)return{map:e.measure.maps[i],cache:e.measure.caches[i],before:!0}}function Dn(e,t,n,r){return En(e,Cn(e,t),n,r)}function Yn(e,t){if(t>=e.display.viewFrom&&t=n.lineN&&t2&&o.push((l.bottom+u.top)/2-n.top)}}o.push(n.bottom-n.top)}}(e,t.view,t.rect),t.hasHeights=!0),(o=function(e,t,n,r){var i,o=On(t.map,n,r),l=o.node,u=o.start,c=o.end,d=o.collapse;if(3==l.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 n=screen.logicalXDPI/screen.deviceXDPI,r=screen.logicalYDPI/screen.deviceYDPI;return{left:t.left*n,right:t.right*n,top:t.top*r,bottom:t.bottom*r}}(e.display.measure,i))}else{var h;u>0&&(d=r="right"),i=e.options.lineWrapping&&(h=l.getClientRects()).length>1?h["right"==r?h.length-1:0]:l.getBoundingClientRect()}if(a&&s<9&&!u&&(!i||!i.left&&!i.right)){var p=l.parentNode.getClientRects()[0];i=p?{left:p.left,right:p.left+er(e.display),top:p.top,bottom:p.bottom}:jn}for(var m=i.top-t.rect.top,_=i.bottom-t.rect.top,g=(m+_)/2,v=t.view.measure.heights,y=0;yt)&&(i=(o=l-s)-1,t>=l&&(a="right")),null!=i){if(r=e[u+2],s==l&&n==(r.insertLeft?"left":"right")&&(a=n),"left"==n&&0==i)for(;u&&e[u-2]==e[u-3]&&e[u-1].insertLeft;)r=e[2+(u-=3)],a="left";if("right"==n&&i==l-s)for(;u=0&&(n=e[i]).left==n.right;i--);return n}function Pn(e){if(e.measure&&(e.measure.cache={},e.measure.heights=null,e.rest))for(var t=0;t=r.text.length?(l=r.text.length,u="before"):l<=0&&(l=0,u="after"),!s)return a("before"==u?l-1:l,"before"==u);function c(e,t,n){var r=1==s[t].level;return a(n?e-1:e,r!=n)}var d=Je(s,l,u),f=Ge,h=c(l,d,"before"==u);return null!=f&&(h.other=c(l,f,"before"!=u)),h}function Un(e,t){var n=0;t=we(e.doc,t),e.options.lineWrapping||(n=er(e.display)*t.ch);var r=se(e.doc,t.line),i=Be(r)+kn(e.display);return{left:n,right:n,top:i,bottom:i+r.height}}function Vn(e,t,n,r,i){var o=me(e,t,n);return o.xRel=i,r&&(o.outside=!0),o}function Gn(e,t,n){var r=e.doc;if((n+=e.display.viewOffset)<0)return Vn(r.first,0,null,!0,-1);var i=fe(r,n),o=r.first+r.size-1;if(i>o)return Vn(r.first+r.size-1,se(r,o).text.length,null,!0,1);t<0&&(t=0);for(var a=se(r,i);;){var s=Xn(e,a,i,t,n),l=ze(a),u=l&&l.find(0,!0);if(!l||!(s.ch>u.from.ch||s.ch==u.from.ch&&s.xRel>0))return s;i=de(a=u.to.line)}}function Jn(e,t,n,r){r-=qn(t);var i=t.text.length,o=ae(function(t){return En(e,n,t-1).bottom<=r},i,0);return{begin:o,end:i=ae(function(t){return En(e,n,t).top>r},o,i)}}function Kn(e,t,n,r){return n||(n=Cn(e,t)),Jn(e,t,n,Wn(e,t,En(e,n,r),"line").top)}function Zn(e,t,n,r){return!(e.bottom<=n)&&(e.top>n||(r?e.left:e.right)>t)}function Xn(e,t,n,r,i){i-=Be(t);var o=Cn(e,t),a=qn(t),s=0,l=t.text.length,u=!0,c=Ze(t,e.doc.direction);if(c){var d=(e.options.lineWrapping?function(e,t,n,r,i,o,a){var s=Jn(e,t,r,a),l=s.begin,u=s.end;/\s/.test(t.text.charAt(u-1))&&u--;for(var c=null,d=null,f=0;f=u||h.to<=l)){var p=En(e,r,1!=h.level?Math.min(u,h.to)-1:Math.max(l,h.from)).right,m=pm)&&(c=h,d=m)}}return c||(c=i[i.length-1]),c.fromu&&(c={from:c.from,to:u,level:c.level}),c}:function(e,t,n,r,i,o,a){var s=ae(function(s){var l=i[s],u=1!=l.level;return Zn(Bn(e,me(n,u?l.to:l.from,u?"before":"after"),"line",t,r),o,a,!0)},0,i.length-1),l=i[s];if(s>0){var u=1!=l.level,c=Bn(e,me(n,u?l.from:l.to,u?"after":"before"),"line",t,r);Zn(c,o,a,!0)&&c.top>a&&(l=i[s-1])}return l})(e,t,n,o,c,r,i);s=(u=1!=d.level)?d.from:d.to-1,l=u?d.to:d.from-1}var f,h,p=null,m=null,_=ae(function(t){var n=En(e,o,t);return n.top+=a,n.bottom+=a,!!Zn(n,r,i,!1)&&(n.top<=i&&n.left<=r&&(p=t,m=n),!0)},s,l),g=!1;if(m){var v=r-m.left=b.bottom}return Vn(n,_=oe(t.text,_,1),h,g,r-f)}function Qn(e){if(null!=e.cachedTextHeight)return e.cachedTextHeight;if(null==An){An=Y("pre");for(var t=0;t<49;++t)An.appendChild(document.createTextNode("x")),An.appendChild(Y("br"));An.appendChild(document.createTextNode("x"))}D(e.measure,An);var n=An.offsetHeight/50;return n>3&&(e.cachedTextHeight=n),T(e.measure),n||1}function er(e){if(null!=e.cachedCharWidth)return e.cachedCharWidth;var t=Y("span","xxxxxxxxxx"),n=Y("pre",[t]);D(e.measure,n);var r=t.getBoundingClientRect(),i=(r.right-r.left)/10;return i>2&&(e.cachedCharWidth=i),i||10}function tr(e){for(var t=e.display,n={},r={},i=t.gutters.clientLeft,o=t.gutters.firstChild,a=0;o;o=o.nextSibling,++a)n[e.options.gutters[a]]=o.offsetLeft+o.clientLeft+i,r[e.options.gutters[a]]=o.clientWidth;return{fixedPos:nr(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:n,gutterWidth:r,wrapperWidth:t.wrapper.clientWidth}}function nr(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function rr(e){var t=Qn(e.display),n=e.options.lineWrapping,r=n&&Math.max(5,e.display.scroller.clientWidth/er(e.display)-3);return function(i){if(Re(e.doc,i))return 0;var o=0;if(i.widgets)for(var a=0;a=e.display.viewTo)return null;if((t-=e.display.viewFrom)<0)return null;for(var n=e.display.view,r=0;r=e.display.viewTo||s.to().linet||t==n&&a.to==t)&&(r(Math.max(a.from,t),Math.min(a.to,n),1==a.level?"rtl":"ltr",o),i=!0)}i||r(t,n,"ltr")}(m,n||0,null==r?f:r,function(e,t,i,d){var _="ltr"==i,g=h(e,_?"left":"right"),v=h(t-1,_?"right":"left"),y=null==n&&0==e,b=null==r&&t==f,k=0==d,w=!m||d==m.length-1;if(v.top-g.top<=3){var x=(u?b:y)&&w,M=(u?y:b)&&k?s:(_?g:v).left,L=x?l:(_?v:g).right;c(M,g.top,L-M,g.bottom)}else{var S,T,D,Y;_?(S=u&&y&&k?s:g.left,T=u?l:p(e,i,"before"),D=u?s:p(t,i,"after"),Y=u&&b&&w?l:v.right):(S=u?p(e,i,"before"):s,T=!u&&y&&k?l:g.right,D=!u&&b&&w?s:v.left,Y=u?p(t,i,"after"):l),c(S,g.top,T-S,g.bottom),g.bottom0?t.blinker=setInterval(function(){return t.cursorDiv.style.visibility=(n=!n)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function hr(e){e.state.focused||(e.display.input.focus(),mr(e))}function pr(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,_r(e))},100)}function mr(e,t){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),"nocursor"!=e.options.readOnly&&(e.state.focused||(nt(e,"focus",e,t),e.state.focused=!0,j(e.display.wrapper,"CodeMirror-focused"),e.curOp||e.display.selForContextMenu==e.doc.sel||(e.display.input.reset(),l&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),fr(e))}function _r(e,t){e.state.delayingBlurEvent||(e.state.focused&&(nt(e,"blur",e,t),e.state.focused=!1,S(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150))}function gr(e){for(var t=e.display,n=t.lineDiv.offsetTop,r=0;r.005||c<-.005)&&(ce(i.line,o),vr(i.line),i.rest))for(var d=0;d=a&&(o=fe(t,Be(se(t,l))-e.wrapper.clientHeight),a=l)}return{from:o,to:Math.max(a,o+1)}}function br(e){var t=e.display,n=t.view;if(t.alignWidgets||t.gutters.firstChild&&e.options.fixedGutter){for(var r=nr(t)-t.scroller.scrollLeft+e.doc.scrollLeft,i=t.gutters.offsetWidth,o=r+"px",a=0;ao&&(t.bottom=t.top+o);var s=e.doc.height+wn(n),l=t.tops-r;if(t.topi+o){var c=Math.min(t.top,(u?s:t.bottom)-o);c!=i&&(a.scrollTop=c)}var d=e.curOp&&null!=e.curOp.scrollLeft?e.curOp.scrollLeft:n.scroller.scrollLeft,f=Ln(e)-(e.options.fixedGutter?n.gutters.offsetWidth:0),h=t.right-t.left>f;return h&&(t.right=t.left+f),t.left<10?a.scrollLeft=0:t.leftf+d-3&&(a.scrollLeft=t.right+(h?0:10)-f),a}function xr(e,t){null!=t&&(Sr(e),e.curOp.scrollTop=(null==e.curOp.scrollTop?e.doc.scrollTop:e.curOp.scrollTop)+t)}function Mr(e){Sr(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function Lr(e,t,n){null==t&&null==n||Sr(e),null!=t&&(e.curOp.scrollLeft=t),null!=n&&(e.curOp.scrollTop=n)}function Sr(e){var t=e.curOp.scrollToPos;t&&(e.curOp.scrollToPos=null,Tr(e,Un(e,t.from),Un(e,t.to),t.margin))}function Tr(e,t,n,r){var i=wr(e,{left:Math.min(t.left,n.left),top:Math.min(t.top,n.top)-r,right:Math.max(t.right,n.right),bottom:Math.max(t.bottom,n.bottom)+r});Lr(e,i.scrollLeft,i.scrollTop)}function Dr(e,t){Math.abs(e.doc.scrollTop-t)<2||(n||oi(e,{top:t}),Yr(e,t,!0),n&&oi(e),ei(e,100))}function Yr(e,t,n){t=Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t),(e.display.scroller.scrollTop!=t||n)&&(e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t))}function Cr(e,t,n,r){t=Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth),(n?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!r||(e.doc.scrollLeft=t,br(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function Er(e){var t=e.display,n=t.gutters.offsetWidth,r=Math.round(e.doc.height+wn(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?n:0,docHeight:r,scrollHeight:r+Mn(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:n}}var Ar=function(e,t,n){this.cm=n;var r=this.vert=Y("div",[Y("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),i=this.horiz=Y("div",[Y("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");e(r),e(i),Qe(r,"scroll",function(){r.clientHeight&&t(r.scrollTop,"vertical")}),Qe(i,"scroll",function(){i.clientWidth&&t(i.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,a&&s<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Ar.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,n=e.scrollHeight>e.clientHeight+1,r=e.nativeBarWidth;if(n){this.vert.style.display="block",this.vert.style.bottom=t?r+"px":"0";var i=e.viewHeight-(t?r: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=n?r+"px":"0",this.horiz.style.left=e.barLeft+"px";var o=e.viewWidth-e.barLeft-(n?r: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==r&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:n?r:0,bottom:t?r:0}},Ar.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Ar.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},Ar.prototype.zeroWidthHack=function(){var e=v&&!h?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new N,this.disableVert=new N},Ar.prototype.enableZeroWidthBar=function(e,t,n){e.style.pointerEvents="auto",t.set(1e3,function r(){var i=e.getBoundingClientRect();("vert"==n?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,r)})},Ar.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var jr=function(){};function Or(e,t){t||(t=Er(e));var n=e.display.barWidth,r=e.display.barHeight;Hr(e,t);for(var i=0;i<4&&n!=e.display.barWidth||r!=e.display.barHeight;i++)n!=e.display.barWidth&&e.options.lineWrapping&&gr(e),Hr(e,Er(e)),n=e.display.barWidth,r=e.display.barHeight}function Hr(e,t){var n=e.display,r=n.scrollbars.update(t);n.sizer.style.paddingRight=(n.barWidth=r.right)+"px",n.sizer.style.paddingBottom=(n.barHeight=r.bottom)+"px",n.heightForcer.style.borderBottom=r.bottom+"px solid transparent",r.right&&r.bottom?(n.scrollbarFiller.style.display="block",n.scrollbarFiller.style.height=r.bottom+"px",n.scrollbarFiller.style.width=r.right+"px"):n.scrollbarFiller.style.display="",r.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(n.gutterFiller.style.display="block",n.gutterFiller.style.height=r.bottom+"px",n.gutterFiller.style.width=t.gutterWidth+"px"):n.gutterFiller.style.display=""}jr.prototype.update=function(){return{bottom:0,right:0}},jr.prototype.setScrollLeft=function(){},jr.prototype.setScrollTop=function(){},jr.prototype.clear=function(){};var Pr={native:Ar,null:jr};function Fr(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&S(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new Pr[e.options.scrollbarStyle](function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),Qe(t,"mousedown",function(){e.state.focused&&setTimeout(function(){return e.display.input.focus()},0)}),t.setAttribute("cm-not-content","true")},function(t,n){"horizontal"==n?Cr(e,t):Dr(e,t)},e),e.display.scrollbars.addClass&&j(e.display.wrapper,e.display.scrollbars.addClass)}var zr=0;function Nr(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:++zr},t=e.curOp,rn?rn.ops.push(t):t.ownsGroup=rn={ops:[t],delayedCallbacks:[]}}function Ir(e){!function(e,t){var n=e.ownsGroup;if(n)try{!function(e){var t=e.delayedCallbacks,n=0;do{for(;n=n.viewTo)||n.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new ni(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function Wr(e){var t=e.cm,n=t.display;e.updatedDisplay&&gr(t),e.barMeasure=Er(t),n.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=Dn(t,n.maxLine,n.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(n.scroller.clientWidth,n.sizer.offsetLeft+e.adjustWidthTo+Mn(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+e.adjustWidthTo-Ln(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=n.input.prepareSelection())}function Rr(e){var t=e.cm;null!=e.adjustWidthTo&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft1&&(a=!0)),null!=u.scrollLeft&&(Cr(e,u.scrollLeft),Math.abs(e.doc.scrollLeft-d)>1&&(a=!0)),!a)break}return i}(t,we(r,e.scrollToPos.from),we(r,e.scrollToPos.to),e.scrollToPos.margin);!function(e,t){if(!rt(e,"scrollCursorIntoView")){var n=e.display,r=n.sizer.getBoundingClientRect(),i=null;if(t.top+r.top<0?i=!0:t.bottom+r.top>(window.innerHeight||document.documentElement.clientHeight)&&(i=!1),null!=i&&!p){var o=Y("div","​",null,"position: absolute;\n top: "+(t.top-n.viewOffset-kn(e.display))+"px;\n height: "+(t.bottom-t.top+Mn(e)+n.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,i)}var o=e.maybeHiddenMarkers,a=e.maybeUnhiddenMarkers;if(o)for(var s=0;st)&&(i.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=i.viewTo)Le&&qe(e.doc,t)i.viewFrom?Zr(e):(i.viewFrom+=r,i.viewTo+=r);else if(t<=i.viewFrom&&n>=i.viewTo)Zr(e);else if(t<=i.viewFrom){var o=Xr(e,n,n+r,1);o?(i.view=i.view.slice(o.index),i.viewFrom=o.lineN,i.viewTo+=r):Zr(e)}else if(n>=i.viewTo){var a=Xr(e,t,t,-1);a?(i.view=i.view.slice(0,a.index),i.viewTo=a.lineN):Zr(e)}else{var s=Xr(e,t,t,-1),l=Xr(e,n,n+r,1);s&&l?(i.view=i.view.slice(0,s.index).concat(nn(e,s.lineN,l.lineN)).concat(i.view.slice(l.index)),i.viewTo+=r):Zr(e)}var u=i.externalMeasured;u&&(n=i.lineN&&t=r.viewTo)){var o=r.view[ar(e,t)];if(null!=o.node){var a=o.changes||(o.changes=[]);-1==I(a,n)&&a.push(n)}}}function Zr(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function Xr(e,t,n,r){var i,o=ar(e,t),a=e.display.view;if(!Le||n==e.doc.first+e.doc.size)return{index:o,lineN:n};for(var s=e.display.viewFrom,l=0;l0){if(o==a.length-1)return null;i=s+a[o].size-t,o++}else i=s-t;t+=i,n+=i}for(;qe(e.doc,n)!=n;){if(o==(r<0?0:a.length-1))return null;n+=r*a[o-(r<0?1:0)].size,o+=r}return{index:o,lineN:n}}function Qr(e){for(var t=e.display.view,n=0,r=0;r=e.display.viewTo)){var n=+new Date+e.options.workTime,r=Pt(e,t.highlightFrontier),i=[];t.iter(r.line,Math.min(t.first+t.size,e.display.viewTo+500),function(o){if(r.line>=e.display.viewFrom){var a=o.styles,s=o.text.length>e.options.maxHighlightLength?Dt(t.mode,r.state):null,l=Ot(e,o,r,!0);s&&(r.state=s),o.styles=l.styles;var u=o.styleClasses,c=l.classes;c?o.styleClasses=c:u&&(o.styleClasses=null);for(var d=!a||a.length!=o.styles.length||u!=c&&(!u||!c||u.bgClass!=c.bgClass||u.textClass!=c.textClass),f=0;!d&&fn)return ei(e,e.options.workDelay),!0}),t.highlightFrontier=r.line,t.modeFrontier=Math.max(t.modeFrontier,r.line),i.length&&Br(e,function(){for(var t=0;t=n.viewFrom&&t.visible.to<=n.viewTo&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo)&&n.renderedView==n.view&&0==Qr(e))return!1;kr(e)&&(Zr(e),t.dims=tr(e));var i=r.first+r.size,o=Math.max(t.visible.from-e.options.viewportMargin,r.first),a=Math.min(i,t.visible.to+e.options.viewportMargin);n.viewFroma&&n.viewTo-a<20&&(a=Math.min(i,n.viewTo)),Le&&(o=qe(e.doc,o),a=We(e.doc,a));var s=o!=n.viewFrom||a!=n.viewTo||n.lastWrapHeight!=t.wrapperHeight||n.lastWrapWidth!=t.wrapperWidth;!function(e,t,n){var r=e.display;0==r.view.length||t>=r.viewTo||n<=r.viewFrom?(r.view=nn(e,t,n),r.viewFrom=t):(r.viewFrom>t?r.view=nn(e,t,r.viewFrom).concat(r.view):r.viewFromn&&(r.view=r.view.slice(0,ar(e,n)))),r.viewTo=n}(e,o,a),n.viewOffset=Be(se(e.doc,n.viewFrom)),e.display.mover.style.top=n.viewOffset+"px";var u=Qr(e);if(!s&&0==u&&!t.force&&n.renderedView==n.view&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo))return!1;var c=function(e){if(e.hasFocus())return null;var t=A();if(!t||!E(e.display.lineDiv,t))return null;var n={activeElt:t};if(window.getSelection){var r=window.getSelection();r.anchorNode&&r.extend&&E(e.display.lineDiv,r.anchorNode)&&(n.anchorNode=r.anchorNode,n.anchorOffset=r.anchorOffset,n.focusNode=r.focusNode,n.focusOffset=r.focusOffset)}return n}(e);return u>4&&(n.lineDiv.style.display="none"),function(e,t,n){var r=e.display,i=e.options.lineNumbers,o=r.lineDiv,a=o.firstChild;function s(t){var n=t.nextSibling;return l&&v&&e.display.currentWheelTarget==t?t.style.display="none":t.parentNode.removeChild(t),n}for(var u=r.view,c=r.viewFrom,d=0;d-1&&(h=!1),ln(e,f,c,n)),h&&(T(f.lineNumber),f.lineNumber.appendChild(document.createTextNode(pe(e.options,c)))),a=f.node.nextSibling}else{var p=mn(e,f,c,n);o.insertBefore(p,a)}c+=f.size}for(;a;)a=s(a)}(e,n.updateLineNumbers,t.dims),u>4&&(n.lineDiv.style.display=""),n.renderedView=n.view,function(e){if(e&&e.activeElt&&e.activeElt!=A()&&(e.activeElt.focus(),e.anchorNode&&E(document.body,e.anchorNode)&&E(document.body,e.focusNode))){var t=window.getSelection(),n=document.createRange();n.setEnd(e.anchorNode,e.anchorOffset),n.collapse(!1),t.removeAllRanges(),t.addRange(n),t.extend(e.focusNode,e.focusOffset)}}(c),T(n.cursorDiv),T(n.selectionDiv),n.gutters.style.height=n.sizer.style.minHeight=0,s&&(n.lastWrapHeight=t.wrapperHeight,n.lastWrapWidth=t.wrapperWidth,ei(e,400)),n.updateLineNumbers=null,!0}function ii(e,t){for(var n=t.viewport,r=!0;(r&&e.options.lineWrapping&&t.oldDisplayWidth!=Ln(e)||(n&&null!=n.top&&(n={top:Math.min(e.doc.height+wn(e.display)-Sn(e),n.top)}),t.visible=yr(e.display,e.doc,n),!(t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)))&&ri(e,t);r=!1){gr(e);var i=Er(e);sr(e),Or(e,i),si(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 oi(e,t){var n=new ni(e,t);if(ri(e,n)){gr(e),ii(e,n);var r=Er(e);sr(e),Or(e,r),si(e,r),n.finish()}}function ai(e){var t=e.display.gutters.offsetWidth;e.display.sizer.style.marginLeft=t+"px"}function si(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+Mn(e)+"px"}function li(e){var t=e.display.gutters,n=e.options.gutters;T(t);for(var r=0;r-1&&!e.lineNumbers&&(e.gutters=e.gutters.slice(0),e.gutters.splice(t,1))}ni.prototype.signal=function(e,t){ot(e,t)&&this.events.push(arguments)},ni.prototype.finish=function(){for(var e=0;es.clientWidth,c=s.scrollHeight>s.clientHeight;if(i&&u||o&&c){if(o&&v&&l)e:for(var f=t.target,h=a.view;f!=s;f=f.parentNode)for(var p=0;p=0&&_e(e,r.to())<=0)return n}return-1};var mi=function(e,t){this.anchor=e,this.head=t};function _i(e,t){var n=e[t];e.sort(function(e,t){return _e(e.from(),t.from())}),t=I(e,n);for(var r=1;r=0){var a=be(o.from(),i.from()),s=ye(o.to(),i.to()),l=o.empty()?i.from()==i.head:o.from()==o.head;r<=t&&--t,e.splice(--r,2,new mi(l?s:a,l?a:s))}}return new pi(e,t)}function gi(e,t){return new pi([new mi(e,t||e)],0)}function vi(e){return e.text?me(e.from.line+e.text.length-1,J(e.text).length+(1==e.text.length?e.from.ch:0)):e.to}function yi(e,t){if(_e(e,t.from)<0)return e;if(_e(e,t.to)<=0)return vi(t);var n=e.line+t.text.length-(t.to.line-t.from.line)-1,r=e.ch;return e.line==t.to.line&&(r+=vi(t).ch-t.to.ch),me(n,r)}function bi(e,t){for(var n=[],r=0;r1&&e.remove(s.line+1,p-1),e.insert(s.line+1,g)}an(e,"change",e,t)}function Si(e,t,n){!function e(r,i,o){if(r.linked)for(var a=0;as-e.cm.options.historyEventDelay||"*"==t.origin.charAt(0)))&&(o=function(e,t){return i.lastOp==r?(Ei(e.done),J(e.done)):e.done.length&&!J(e.done).ranges?J(e.done):e.done.length>1&&!e.done[e.done.length-2].ranges?(e.done.pop(),J(e.done)):void 0}(i)))a=J(o.changes),0==_e(t.from,t.to)&&0==_e(t.from,a.to)?a.to=vi(t):o.changes.push(Ci(e,t));else{var l=J(i.done);for(l&&l.ranges||ji(e.sel,i.done),o={changes:[Ci(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(n),i.generation=++i.maxGeneration,i.lastModTime=i.lastSelTime=s,i.lastOp=i.lastSelOp=r,i.lastOrigin=i.lastSelOrigin=t.origin,a||nt(e,"historyAdded")}function ji(e,t){var n=J(t);n&&n.ranges&&n.equals(e)||t.push(e)}function Oi(e,t,n,r){var i=t["spans_"+e.id],o=0;e.iter(Math.max(e.first,n),Math.min(e.first+e.size,r),function(n){n.markedSpans&&((i||(i=t["spans_"+e.id]={}))[o]=n.markedSpans),++o})}function Hi(e){if(!e)return null;for(var t,n=0;n-1&&(J(s)[d]=u[d],delete u[d])}}}return r}function zi(e,t,n,r){if(r){var i=e.anchor;if(n){var o=_e(t,i)<0;o!=_e(n,i)<0?(i=t,t=n):o!=_e(t,n)<0&&(t=n)}return new mi(i,t)}return new mi(n||t,t)}function Ni(e,t,n,r,i){null==i&&(i=e.cm&&(e.cm.display.shift||e.extend)),$i(e,new pi([zi(e.sel.primary(),t,n,i)],0),r)}function Ii(e,t,n){for(var r=[],i=e.cm&&(e.cm.display.shift||e.extend),o=0;o=t.ch:s.to>t.ch))){if(i&&(nt(l,"beforeCursorEnter"),l.explicitlyCleared)){if(o.markedSpans){--a;continue}break}if(!l.atomic)continue;if(n){var u=l.find(r<0?1:-1),c=void 0;if((r<0?l.inclusiveRight:l.inclusiveLeft)&&(u=Zi(e,u,-r,u&&u.line==t.line?o:null)),u&&u.line==t.line&&(c=_e(u,n))&&(r<0?c<0:c>0))return Ji(e,u,t,r,i)}var d=l.find(r<0?-1:1);return(r<0?l.inclusiveLeft:l.inclusiveRight)&&(d=Zi(e,d,r,d.line==t.line?o:null)),d?Ji(e,d,t,r,i):null}}return t}function Ki(e,t,n,r,i){var o=r||1;return Ji(e,t,n,o,i)||!i&&Ji(e,t,n,o,!0)||Ji(e,t,n,-o,i)||!i&&Ji(e,t,n,-o,!0)||(e.cantEdit=!0,me(e.first,0))}function Zi(e,t,n,r){return n<0&&0==t.ch?t.line>e.first?we(e,me(t.line-1)):null:n>0&&t.ch==(r||se(e,t.line)).text.length?t.line0)){var c=[l,1],d=_e(u.from,s.from),f=_e(u.to,s.to);(d<0||!a.inclusiveLeft&&!d)&&c.push({from:u.from,to:s.from}),(f>0||!a.inclusiveRight&&!f)&&c.push({from:s.to,to:u.to}),i.splice.apply(i,c),l+=c.length-3}}return i}(e,t.from,t.to);if(r)for(var i=r.length-1;i>=0;--i)to(e,{from:r[i].from,to:r[i].to,text:i?[""]:t.text,origin:t.origin});else to(e,t)}}function to(e,t){if(1!=t.text.length||""!=t.text[0]||0!=_e(t.from,t.to)){var n=bi(e,t);Ai(e,t,n,e.cm?e.cm.curOp.id:NaN),io(e,t,n,Ye(e,t));var r=[];Si(e,function(e,n){n||-1!=I(r,e.history)||(lo(e.history,t),r.push(e.history)),io(e,t,null,Ye(e,t))})}}function no(e,t,n){if(!e.cm||!e.cm.state.suppressEdits||n){for(var r,i=e.history,o=e.sel,a="undo"==t?i.done:i.undone,s="undo"==t?i.undone:i.done,l=0;l=0;--f){var h=d(f);if(h)return h.v}}}}function ro(e,t){if(0!=t&&(e.first+=t,e.sel=new pi(K(e.sel.ranges,function(e){return new mi(me(e.anchor.line+t,e.anchor.ch),me(e.head.line+t,e.head.ch))}),e.sel.primIndex),e.cm)){Jr(e.cm,e.first,e.first-t,t);for(var n=e.cm.display,r=n.viewFrom;re.lastLine())){if(t.from.lineo&&(t={from:t.from,to:me(o,se(e,o).text.length),text:[t.text[0]],origin:t.origin}),t.removed=le(e,t.from,t.to),n||(n=bi(e,t)),e.cm?function(e,t,n){var r=e.doc,i=e.display,o=t.from,a=t.to,s=!1,l=o.line;e.options.lineWrapping||(l=de(Ie(se(r,o.line))),r.iter(l,a.line+1,function(e){if(e==i.maxLine)return s=!0,!0})),r.sel.contains(t.from,t.to)>-1&&it(e),Li(r,t,n,rr(e)),e.options.lineWrapping||(r.iter(l,o.line+t.text.length,function(e){var t=Ue(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.highlightFrontiern;r--){var i=se(e,r).stateAfter;if(i&&(!(i instanceof At)||r+i.lookAhead1||!(this.children[0]instanceof co))){var s=[];this.collapse(s),this.children=[new co(s)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t50){for(var a=i.lines.length%25+25,s=a;s10);e.parent.maybeSpill()}},iterN:function(e,t,n){for(var r=0;r0||0==a&&!1!==o.clearWhenEmpty)return o;if(o.replacedWith&&(o.collapsed=!0,o.widgetNode=C("span",[o.replacedWith],"CodeMirror-widget"),r.handleMouseEvents||o.widgetNode.setAttribute("cm-ignore-events","true"),r.insertLeft&&(o.widgetNode.insertLeft=!0)),o.collapsed){if(Ne(e,t.line,t,n,o)||t.line!=n.line&&Ne(e,n.line,t,n,o))throw new Error("Inserting collapsed marker partially overlapping an existing one");Le=!0}o.addToHistory&&Ai(e,{from:t,to:n,origin:"markText"},e.sel,NaN);var s,l=t.line,u=e.cm;if(e.iter(l,n.line+1,function(e){u&&o.collapsed&&!u.options.lineWrapping&&Ie(e)==u.display.maxLine&&(s=!0),o.collapsed&&l!=t.line&&ce(e,0),function(e,t){e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t],t.marker.attachLine(e)}(e,new Se(o,l==t.line?t.ch:null,l==n.line?n.ch:null)),++l}),o.collapsed&&e.iter(t.line,n.line+1,function(t){Re(e,t)&&ce(t,0)}),o.clearOnEnter&&Qe(o,"beforeCursorEnter",function(){return o.clear()}),o.readOnly&&(Me=!0,(e.history.done.length||e.history.undone.length)&&e.clearHistory()),o.collapsed&&(o.id=++mo,o.atomic=!0),u){if(s&&(u.curOp.updateMaxLine=!0),o.collapsed)Jr(u,t.line,n.line+1);else if(o.className||o.title||o.startStyle||o.endStyle||o.css)for(var c=t.line;c<=n.line;c++)Kr(u,c,"text");o.atomic&&Vi(u.doc),an(u,"markerAdded",u,o)}return o}_o.prototype.clear=function(){if(!this.explicitlyCleared){var e=this.doc.cm,t=e&&!e.curOp;if(t&&Nr(e),ot(this,"clear")){var n=this.find();n&&an(this,"clear",n.from,n.to)}for(var r=null,i=null,o=0;oe.display.maxLineLength&&(e.display.maxLine=u,e.display.maxLineLength=c,e.display.maxLineChanged=!0)}null!=r&&e&&this.collapsed&&Jr(e,r,i+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&Vi(e.doc)),e&&an(e,"markerCleared",e,this,r,i),t&&Ir(e),this.parent&&this.parent.clear()}},_o.prototype.find=function(e,t){var n,r;null==e&&"bookmark"==this.type&&(e=1);for(var i=0;i=0;l--)eo(this,r[l]);s?Ri(this,s):this.cm&&Mr(this.cm)}),undo:Gr(function(){no(this,"undo")}),redo:Gr(function(){no(this,"redo")}),undoSelection:Gr(function(){no(this,"undo",!0)}),redoSelection:Gr(function(){no(this,"redo",!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,n=0,r=0;r=e.ch)&&t.push(i.marker.parent||i.marker)}return t},findMarks:function(e,t,n){e=we(this,e),t=we(this,t);var r=[],i=e.line;return this.iter(e.line,t.line+1,function(o){var a=o.markedSpans;if(a)for(var s=0;s=l.to||null==l.from&&i!=e.line||null!=l.from&&i==t.line&&l.from>=t.ch||n&&!n(l.marker)||r.push(l.marker.parent||l.marker)}++i}),r},getAllMarks:function(){var e=[];return this.iter(function(t){var n=t.markedSpans;if(n)for(var r=0;re)return t=e,!0;e-=o,++n}),we(this,me(n,t))},indexFromPos:function(e){var t=(e=we(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 d;if(t.state.draggingText&&!t.state.draggingText.copy&&(d=t.listSelections()),Bi(t.doc,gi(n,n)),d)for(var f=0;f=0;t--)oo(e.doc,"",r[t].from,r[t].to,"+delete");Mr(e)})}function qo(e,t,n){var r=oe(e.text,t+n,n);return r<0||r>e.text.length?null:r}function Wo(e,t,n){var r=qo(e,t.ch,n);return null==r?null:new me(t.line,r,n<0?"after":"before")}function Ro(e,t,n,r,i){if(e){var o=Ze(n,t.doc.direction);if(o){var a,s=i<0?J(o):o[0],l=i<0==(1==s.level)?"after":"before";if(s.level>0||"rtl"==t.doc.direction){var u=Cn(t,n);a=i<0?n.text.length-1:0;var c=En(t,u,a).top;a=ae(function(e){return En(t,u,e).top==c},i<0==(1==s.level)?s.from:s.to-1,a),"before"==l&&(a=qo(n,a,1))}else a=i<0?s.to:s.from;return new me(r,a,l)}}return new me(r,i<0?n.text.length:0,i<0?"before":"after")}jo.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"},jo.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"},jo.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"},jo.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"]},jo.default=v?jo.macDefault:jo.pcDefault;var $o={selectAll:Xi,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),R)},killLine:function(e){return Io(e,function(t){if(t.empty()){var n=se(e.doc,t.head.line).text.length;return t.head.ch==n&&t.head.line0)i=new me(i.line,i.ch+1),e.replaceRange(o.charAt(i.ch-1)+o.charAt(i.ch-2),me(i.line,i.ch-2),i,"+transpose");else if(i.line>e.doc.first){var a=se(e.doc,i.line-1).text;a&&(i=new me(i.line,1),e.replaceRange(o.charAt(0)+e.doc.lineSeparator()+a.charAt(a.length-1),me(i.line-1,a.length-1),i,"+transpose"))}n.push(new mi(i,i))}e.setSelections(n)})},newlineAndIndent:function(e){return Br(e,function(){for(var t=e.listSelections(),n=t.length-1;n>=0;n--)e.replaceRange(e.doc.lineSeparator(),t[n].anchor,t[n].head,"+input");t=e.listSelections();for(var r=0;r-1&&(_e((i=u.ranges[i]).from(),t)<0||t.xRel>0)&&(_e(i.to(),t)>0||t.xRel<0)?function(e,t,n,r){var i=e.display,o=!1,u=Ur(e,function(t){l&&(i.scroller.draggable=!1),e.state.draggingText=!1,tt(document,"mouseup",u),tt(document,"mousemove",c),tt(i.scroller,"dragstart",d),tt(i.scroller,"drop",u),o||(st(t),r.addNew||Ni(e.doc,n,null,null,r.extend),l||a&&9==s?setTimeout(function(){document.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},d=function(){return o=!0};l&&(i.scroller.draggable=!0),e.state.draggingText=u,u.copy=!r.moveOnDrag,i.scroller.dragDrop&&i.scroller.dragDrop(),Qe(document,"mouseup",u),Qe(document,"mousemove",c),Qe(i.scroller,"dragstart",d),Qe(i.scroller,"drop",u),pr(e),setTimeout(function(){return i.input.focus()},20)}(e,r,t,o):function(e,t,n,r){var i=e.display,o=e.doc;st(t);var a,s,l=o.sel,u=l.ranges;if(r.addNew&&!r.extend?(s=o.sel.contains(n),a=s>-1?u[s]:new mi(n,n)):(a=o.sel.primary(),s=o.sel.primIndex),"rectangle"==r.unit)r.addNew||(a=new mi(n,n)),n=or(e,t,!0,!0),s=-1;else{var c=oa(e,n,r.unit);a=r.extend?zi(a,c.anchor,c.head,r.extend):c}r.addNew?-1==s?(s=u.length,$i(o,_i(u.concat([a]),s),{scroll:!1,origin:"*mouse"})):u.length>1&&u[s].empty()&&"char"==r.unit&&!r.extend?($i(o,_i(u.slice(0,s).concat(u.slice(s+1)),0),{scroll:!1,origin:"*mouse"}),l=o.sel):qi(o,s,a,$):(s=0,$i(o,new pi([a],0),$),l=o.sel);var d=n;function f(t){if(0!=_e(d,t))if(d=t,"rectangle"==r.unit){for(var i=[],u=e.options.tabSize,c=z(se(o,n.line).text,n.ch,u),f=z(se(o,t.line).text,t.ch,u),h=Math.min(c,f),p=Math.max(c,f),m=Math.min(n.line,t.line),_=Math.min(e.lastLine(),Math.max(n.line,t.line));m<=_;m++){var g=se(o,m).text,v=U(g,h,u);h==p?i.push(new mi(me(m,v),me(m,v))):g.length>v&&i.push(new mi(me(m,v),me(m,U(g,p,u))))}i.length||i.push(new mi(n,n)),$i(o,_i(l.ranges.slice(0,s).concat(i),s),{origin:"*mouse",scroll:!1}),e.scrollIntoView(t)}else{var y,b=a,k=oa(e,t,r.unit),w=b.anchor;_e(k.anchor,w)>0?(y=k.head,w=be(b.from(),k.anchor)):(y=k.anchor,w=ye(b.to(),k.head));var x=l.ranges.slice(0);x[s]=function(e,t){var n=t.anchor,r=t.head,i=se(e.doc,n.line);if(0==_e(n,r)&&n.sticky==r.sticky)return t;var o=Ze(i);if(!o)return t;var a=Je(o,n.ch,n.sticky),s=o[a];if(s.from!=n.ch&&s.to!=n.ch)return t;var l,u=a+(s.from==n.ch==(1!=s.level)?0:1);if(0==u||u==o.length)return t;if(r.line!=n.line)l=(r.line-n.line)*("ltr"==e.doc.direction?1:-1)>0;else{var c=Je(o,r.ch,r.sticky),d=c-a||(r.ch-n.ch)*(1==s.level?-1:1);l=c==u-1||c==u?d<0:d>0}var f=o[u+(l?-1:0)],h=l==(1==f.level),p=h?f.from:f.to,m=h?"after":"before";return n.ch==p&&n.sticky==m?t:new mi(new me(n.line,p,m),r)}(e,new mi(we(o,w),y)),$i(o,_i(x,s),$)}}var h=i.wrapper.getBoundingClientRect(),p=0;function m(t){e.state.selectingText=!1,p=1/0,st(t),i.input.focus(),tt(document,"mousemove",_),tt(document,"mouseup",g),o.history.lastSelOrigin=null}var _=Ur(e,function(t){ft(t)?function t(n){var a=++p,s=or(e,n,!0,"rectangle"==r.unit);if(s)if(0!=_e(s,d)){e.curOp.focus=A(),f(s);var l=yr(i,o);(s.line>=l.to||s.lineh.bottom?20:0;u&&setTimeout(Ur(e,function(){p==a&&(i.scroller.scrollTop+=u,t(n))}),50)}}(t):m(t)}),g=Ur(e,m);e.state.selectingText=g,Qe(document,"mousemove",_),Qe(document,"mouseup",g)}(e,r,t,o)}(t,r,o,e):dt(e)==n.scroller&&st(e):2==i?(r&&Ni(t.doc,r),setTimeout(function(){return n.input.focus()},20)):3==i&&(x?la(t,e):pr(t)))}}function oa(e,t,n){if("char"==n)return new mi(t,t);if("word"==n)return e.findWordAt(t);if("line"==n)return new mi(me(t.line,0),we(e.doc,me(t.line+1,0)));var r=n(e,t);return new mi(r.from,r.to)}function aa(e,t,n,r){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;r&&st(t);var a=e.display,s=a.lineDiv.getBoundingClientRect();if(o>s.bottom||!ot(e,n))return ut(t);o-=s.top-a.viewOffset;for(var l=0;l=i)return nt(e,n,e,fe(e.doc,o),e.options.gutters[l],t),ut(t)}}function sa(e,t){return aa(e,t,"gutterClick",!0)}function la(e,t){bn(e.display,t)||function(e,t){return!!ot(e,"gutterContextMenu")&&aa(e,t,"gutterContextMenu",!1)}(e,t)||rt(e,t,"contextmenu")||e.display.input.onContextMenu(t)}function ua(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),zn(e)}ra.prototype.compare=function(e,t,n){return this.time+400>e&&0==_e(t,this.pos)&&n==this.button};var ca={toString:function(){return"CodeMirror.Init"}},da={},fa={};function ha(e){li(e),Jr(e),br(e)}function pa(e,t,n){if(!t!=!(n&&n!=ca)){var r=e.display.dragFunctions,i=t?Qe:tt;i(e.display.scroller,"dragstart",r.start),i(e.display.scroller,"dragenter",r.enter),i(e.display.scroller,"dragover",r.over),i(e.display.scroller,"dragleave",r.leave),i(e.display.scroller,"drop",r.drop)}}function ma(e){e.options.lineWrapping?(j(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(S(e.display.wrapper,"CodeMirror-wrap"),Ve(e)),ir(e),Jr(e),zn(e),setTimeout(function(){return Or(e)},100)}function _a(e,t){var r=this;if(!(this instanceof _a))return new _a(e,t);this.options=t=t?F(t):{},F(da,t,!1),ui(t);var i=t.value;"string"==typeof i&&(i=new wo(i,t.mode,null,t.lineSeparator,t.direction)),this.doc=i;var o=new _a.inputStyles[t.inputStyle](this),u=this.display=new function(e,t,r){var i=this;this.input=r,i.scrollbarFiller=Y("div",null,"CodeMirror-scrollbar-filler"),i.scrollbarFiller.setAttribute("cm-not-content","true"),i.gutterFiller=Y("div",null,"CodeMirror-gutter-filler"),i.gutterFiller.setAttribute("cm-not-content","true"),i.lineDiv=C("div",null,"CodeMirror-code"),i.selectionDiv=Y("div",null,null,"position: relative; z-index: 1"),i.cursorDiv=Y("div",null,"CodeMirror-cursors"),i.measure=Y("div",null,"CodeMirror-measure"),i.lineMeasure=Y("div",null,"CodeMirror-measure"),i.lineSpace=C("div",[i.measure,i.lineMeasure,i.selectionDiv,i.cursorDiv,i.lineDiv],null,"position: relative; outline: none");var o=C("div",[i.lineSpace],"CodeMirror-lines");i.mover=Y("div",[o],null,"position: relative"),i.sizer=Y("div",[i.mover],"CodeMirror-sizer"),i.sizerWidth=null,i.heightForcer=Y("div",null,null,"position: absolute; height: "+q+"px; width: 1px;"),i.gutters=Y("div",null,"CodeMirror-gutters"),i.lineGutter=null,i.scroller=Y("div",[i.sizer,i.heightForcer,i.gutters],"CodeMirror-scroll"),i.scroller.setAttribute("tabIndex","-1"),i.wrapper=Y("div",[i.scrollbarFiller,i.gutterFiller,i.scroller],"CodeMirror"),a&&s<8&&(i.gutters.style.zIndex=-1,i.scroller.style.paddingRight=0),l||n&&g||(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,r.init(i)}(e,i,o);for(var c in u.wrapper.CodeMirror=this,li(this),ua(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Fr(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 N,keySeq:null,specialChars:null},t.autofocus&&!g&&u.input.focus(),a&&s<11&&setTimeout(function(){return r.display.input.reset(!0)},20),function(e){var t=e.display;Qe(t.scroller,"mousedown",Ur(e,ia)),Qe(t.scroller,"dblclick",a&&s<11?Ur(e,function(t){if(!rt(e,t)){var n=or(e,t);if(n&&!sa(e,t)&&!bn(e.display,t)){st(t);var r=e.findWordAt(n);Ni(e.doc,r.anchor,r.head)}}}):function(t){return rt(e,t)||st(t)}),x||Qe(t.scroller,"contextmenu",function(t){return la(e,t)});var n,r={end:0};function i(){t.activeTouch&&(n=setTimeout(function(){return t.activeTouch=null},1e3),(r=t.activeTouch).end=+new Date)}function o(e,t){if(null==t.left)return!0;var n=t.left-e.left,r=t.top-e.top;return n*n+r*r>400}Qe(t.scroller,"touchstart",function(i){if(!rt(e,i)&&!function(e){if(1!=e.touches.length)return!1;var t=e.touches[0];return t.radiusX<=1&&t.radiusY<=1}(i)&&!sa(e,i)){t.input.ensurePolled(),clearTimeout(n);var o=+new Date;t.activeTouch={start:o,moved:!1,prev:o-r.end<=300?r:null},1==i.touches.length&&(t.activeTouch.left=i.touches[0].pageX,t.activeTouch.top=i.touches[0].pageY)}}),Qe(t.scroller,"touchmove",function(){t.activeTouch&&(t.activeTouch.moved=!0)}),Qe(t.scroller,"touchend",function(n){var r=t.activeTouch;if(r&&!bn(t,n)&&null!=r.left&&!r.moved&&new Date-r.start<300){var a,s=e.coordsChar(t.activeTouch,"page");a=!r.prev||o(r,r.prev)?new mi(s,s):!r.prev.prev||o(r,r.prev.prev)?e.findWordAt(s):new mi(me(s.line,0),we(e.doc,me(s.line+1,0))),e.setSelection(a.anchor,a.head),e.focus(),st(n)}i()}),Qe(t.scroller,"touchcancel",i),Qe(t.scroller,"scroll",function(){t.scroller.clientHeight&&(Dr(e,t.scroller.scrollTop),Cr(e,t.scroller.scrollLeft,!0),nt(e,"scroll",e))}),Qe(t.scroller,"mousewheel",function(t){return hi(e,t)}),Qe(t.scroller,"DOMMouseScroll",function(t){return hi(e,t)}),Qe(t.wrapper,"scroll",function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0}),t.dragFunctions={enter:function(t){rt(e,t)||ct(t)},over:function(t){rt(e,t)||(function(e,t){var n=or(e,t);if(n){var r=document.createDocumentFragment();ur(e,n,r),e.display.dragCursor||(e.display.dragCursor=Y("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),D(e.display.dragCursor,r)}}(e,t),ct(t))},start:function(t){return function(e,t){if(a&&(!e.state.draggingText||+new Date-xo<100))ct(t);else if(!rt(e,t)&&!bn(e.display,t)&&(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!f)){var n=Y("img",null,null,"position: fixed; left: 0; top: 0;");n.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",d&&(n.width=n.height=1,e.display.wrapper.appendChild(n),n._top=n.offsetTop),t.dataTransfer.setDragImage(n,0,0),d&&n.parentNode.removeChild(n)}}(e,t)},drop:Ur(e,Mo),leave:function(t){rt(e,t)||Lo(e)}};var l=t.input.getField();Qe(l,"keyup",function(t){return Qo.call(e,t)}),Qe(l,"keydown",Ur(e,Xo)),Qe(l,"keypress",Ur(e,ea)),Qe(l,"focus",function(t){return mr(e,t)}),Qe(l,"blur",function(t){return _r(e,t)})}(this),function(){var e;To||(Qe(window,"resize",function(){null==e&&(e=setTimeout(function(){e=null,So(Do)},100))}),Qe(window,"blur",function(){return So(_r)}),To=!0)}(),Nr(this),this.curOp.forceUpdate=!0,Ti(this,i),t.autofocus&&!g||this.hasFocus()?setTimeout(P(mr,this),20):_r(this),fa)fa.hasOwnProperty(c)&&fa[c](r,t[c],ca);kr(this),t.finishInit&&t.finishInit(this);for(var h=0;h150)){if(!r)return;n="prev"}}else u=0,n="not";"prev"==n?u=t>o.first?z(se(o,t-1).text,null,a):0:"add"==n?u=l+e.options.indentUnit:"subtract"==n?u=l-e.options.indentUnit:"number"==typeof n&&(u=l+n),u=Math.max(0,u);var d="",f=0;if(e.options.indentWithTabs)for(var h=Math.floor(u/a);h;--h)f+=a,d+="\t";if(f1)if(ya&&ya.text.join("\n")==t){if(r.ranges.length%ya.text.length==0){u=[];for(var c=0;c=0;d--){var f=r.ranges[d],h=f.from(),p=f.to();f.empty()&&(n&&n>0?h=me(h.line,h.ch-n):e.state.overwrite&&!s?p=me(p.line,Math.min(se(o,p.line).text.length,p.ch+J(l).length)):ya&&ya.lineWise&&ya.text.join("\n")==t&&(h=p=me(h.line,0))),a=e.curOp.updateInput;var m={from:h,to:p,text:u?u[d%u.length]:l,origin:i||(s?"paste":e.state.cutIncoming?"cut":"+input")};eo(e.doc,m),an(e,"inputRead",e,m)}t&&!s&&xa(e,t),Mr(e),e.curOp.updateInput=a,e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=!1}function wa(e,t){var n=e.clipboardData&&e.clipboardData.getData("Text");if(n)return e.preventDefault(),t.isReadOnly()||t.options.disableInput||Br(t,function(){return ka(t,n,0,null,"paste")}),!0}function xa(e,t){if(e.options.electricChars&&e.options.smartIndent)for(var n=e.doc.sel,r=n.ranges.length-1;r>=0;r--){var i=n.ranges[r];if(!(i.head.ch>100||r&&n.ranges[r-1].head.line==i.head.line)){var o=e.getModeAt(i.head),a=!1;if(o.electricChars){for(var s=0;s-1){a=va(e,i.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(se(e.doc,i.head.line).text.slice(0,i.head.ch))&&(a=va(e,i.head.line,"smart"));a&&an(e,"electricInput",e,i.head.line)}}}function Ma(e){for(var t=[],n=[],r=0;r=t.text.length?(n.ch=t.text.length,n.sticky="before"):n.ch<=0&&(n.ch=0,n.sticky="after");var o=Je(i,n.ch,n.sticky),a=i[o];if("ltr"==e.doc.direction&&a.level%2==0&&(r>0?a.to>n.ch:a.from=a.from&&f>=c.begin)){var h=d?"before":"after";return new me(n.line,f,h)}}var p=function(e,t,r){for(var o=function(e,t){return t?new me(n.line,l(e,1),"before"):new me(n.line,e,"after")};e>=0&&e0==(1!=a.level),u=s?r.begin:l(r.end,-1);if(a.from<=u&&u0?c.end:l(c.begin,-1);return null==_||r>0&&_==t.text.length||!(m=p(r>0?0:i.length-1,r,u(_)))?null:m}(e.cm,s,t,n):Wo(s,t,n))){if(r||(a=t.line+n)=e.first+e.size||(t=new me(a,t.ch,t.sticky),!(s=se(e,a))))return!1;t=Ro(i,e.cm,s,t.line,n)}else t=o;return!0}if("char"==r)l();else if("column"==r)l(!0);else if("word"==r||"group"==r)for(var u=null,c="group"==r,d=e.cm&&e.cm.getHelper(t,"wordChars"),f=!0;!(n<0)||l(!f);f=!1){var h=s.text.charAt(t.ch)||"\n",p=te(h,d)?"w":c&&"\n"==h?"n":!c||/\s/.test(h)?null:"p";if(!c||f||p||(p="s"),u&&u!=p){n<0&&(n=1,l(),t.sticky="after");break}if(p&&(u=p),n>0&&!l(!f))break}var m=Ki(e,t,o,a,!0);return ge(o,m)&&(m.hitSide=!0),m}function Da(e,t,n,r){var i,o,a=e.doc,s=t.left;if("page"==r){var l=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),u=Math.max(l-.5*Qn(e.display),3);i=(n>0?t.bottom:t.top)+n*u}else"line"==r&&(i=n>0?t.bottom+3:t.top-3);for(;(o=Gn(e,s,i)).outside;){if(n<0?i<=0:i>=a.height){o.hitSide=!0;break}i+=5*n}return o}var Ya=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new N,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};function Ca(e,t){var n=Yn(e,t.line);if(!n||n.hidden)return null;var r=se(e.doc,t.line),i=Tn(n,r,t.line),o=Ze(r,e.doc.direction),a="left";o&&(a=Je(o,t.ch)%2?"right":"left");var s=On(i.map,t.ch,a);return s.offset="right"==s.collapse?s.end:s.start,s}function Ea(e,t){return t&&(e.bad=!0),e}function Aa(e,t,n){var r;if(t==e.display.lineDiv){if(!(r=e.display.lineDiv.childNodes[n]))return Ea(e.clipPos(me(e.display.viewTo-1)),!0);t=null,n=0}else for(r=t;;r=r.parentNode){if(!r||r==e.display.lineDiv)return null;if(r.parentNode&&r.parentNode==e.display.lineDiv)break}for(var i=0;i=t.display.viewTo||o.line=t.display.viewFrom&&Ca(t,i)||{node:l[0].measure.map[2],offset:0},c=o.liner.firstLine()&&(a=me(a.line-1,se(r.doc,a.line-1).length)),s.ch==se(r.doc,s.line).text.length&&s.linei.viewTo-1)return!1;a.line==i.viewFrom||0==(e=ar(r,a.line))?(t=de(i.view[0].line),n=i.view[0].node):(t=de(i.view[e].line),n=i.view[e-1].node.nextSibling);var l,u,c=ar(r,s.line);if(c==i.view.length-1?(l=i.viewTo-1,u=i.lineDiv.lastChild):(l=de(i.view[c+1].line)-1,u=i.view[c+1].node.previousSibling),!n)return!1;for(var d=r.doc.splitLines(function(e,t,n,r,i){var o="",a=!1,s=e.doc.lineSeparator();function l(){a&&(o+=s,a=!1)}function u(e){e&&(l(),o+=e)}function c(t){if(1==t.nodeType){var n=t.getAttribute("cm-text");if(null!=n)return void u(n||t.textContent.replace(/\u200b/g,""));var o,d=t.getAttribute("cm-marker");if(d){var f=e.findMarks(me(r,0),me(i+1,0),(m=+d,function(e){return e.id==m}));return void(f.length&&(o=f[0].find(0))&&u(le(e.doc,o.from,o.to).join(s)))}if("false"==t.getAttribute("contenteditable"))return;var h=/^(pre|div|p)$/i.test(t.nodeName);h&&l();for(var p=0;p1&&f.length>1;)if(J(d)==J(f))d.pop(),f.pop(),l--;else{if(d[0]!=f[0])break;d.shift(),f.shift(),t++}for(var h=0,p=0,m=d[0],_=f[0],g=Math.min(m.length,_.length);ha.ch&&v.charCodeAt(v.length-p-1)==y.charCodeAt(y.length-p-1);)h--,p++;d[d.length-1]=v.slice(0,v.length-p).replace(/^\u200b+/,""),d[0]=d[0].slice(h).replace(/\u200b+$/,"");var k=me(t,h),w=me(l,f.length?J(f).length-p:0);return d.length>1||d[0]||_e(k,w)?(oo(r.doc,d,k,w,"+input"),!0):void 0},Ya.prototype.ensurePolled=function(){this.forceCompositionEnd()},Ya.prototype.reset=function(){this.forceCompositionEnd()},Ya.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Ya.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))},Ya.prototype.updateFromDOM=function(){var e=this;!this.cm.isReadOnly()&&this.pollContent()||Br(this.cm,function(){return Jr(e.cm)})},Ya.prototype.setUneditable=function(e){e.contentEditable="false"},Ya.prototype.onKeyPress=function(e){0!=e.charCode&&(e.preventDefault(),this.cm.isReadOnly()||Ur(this.cm,ka)(this.cm,String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),0))},Ya.prototype.readOnlyChanged=function(e){this.div.contentEditable=String("nocursor"!=e)},Ya.prototype.onContextMenu=function(){},Ya.prototype.resetPosition=function(){},Ya.prototype.needsContentAttribute=!0;var Oa=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new N,this.hasSelection=!1,this.composing=null};Oa.prototype.init=function(e){var t=this,n=this,r=this.cm,i=this.wrapper=Sa(),o=this.textarea=i.firstChild;function l(e){if(!rt(r,e)){if(r.somethingSelected())ba({lineWise:!1,text:r.getSelections()});else{if(!r.options.lineWiseCopyCut)return;var t=Ma(r);ba({lineWise:!0,text:t.text}),"cut"==e.type?r.setSelections(t.ranges,null,R):(n.prevInput="",o.value=t.text.join("\n"),H(o))}"cut"==e.type&&(r.state.cutIncoming=!0)}}e.wrapper.insertBefore(i,e.wrapper.firstChild),m&&(o.style.width="0px"),Qe(o,"input",function(){a&&s>=9&&t.hasSelection&&(t.hasSelection=null),n.poll()}),Qe(o,"paste",function(e){rt(r,e)||wa(e,r)||(r.state.pasteIncoming=!0,n.fastPoll())}),Qe(o,"cut",l),Qe(o,"copy",l),Qe(e.scroller,"paste",function(t){bn(e,t)||rt(r,t)||(r.state.pasteIncoming=!0,n.focus())}),Qe(e.lineSpace,"selectstart",function(t){bn(e,t)||st(t)}),Qe(o,"compositionstart",function(){var e=r.getCursor("from");n.composing&&n.composing.range.clear(),n.composing={start:e,range:r.markText(e,r.getCursor("to"),{className:"CodeMirror-composing"})}}),Qe(o,"compositionend",function(){n.composing&&(n.poll(),n.composing.range.clear(),n.composing=null)})},Oa.prototype.prepareSelection=function(){var e=this.cm,t=e.display,n=e.doc,r=lr(e);if(e.options.moveInputWithCursor){var i=Bn(e,n.sel.primary().head,"div"),o=t.wrapper.getBoundingClientRect(),a=t.lineDiv.getBoundingClientRect();r.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,i.top+a.top-o.top)),r.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,i.left+a.left-o.left))}return r},Oa.prototype.showSelection=function(e){var t=this.cm.display;D(t.cursorDiv,e.cursors),D(t.selectionDiv,e.selection),null!=e.teTop&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},Oa.prototype.reset=function(e){if(!this.contextMenuPending&&!this.composing){var t=this.cm;if(t.somethingSelected()){this.prevInput="";var n=t.getSelection();this.textarea.value=n,t.state.focused&&H(this.textarea),a&&s>=9&&(this.hasSelection=n)}else e||(this.prevInput=this.textarea.value="",a&&s>=9&&(this.hasSelection=null))}},Oa.prototype.getField=function(){return this.textarea},Oa.prototype.supportsTouch=function(){return!1},Oa.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!g||A()!=this.textarea))try{this.textarea.focus()}catch(e){}},Oa.prototype.blur=function(){this.textarea.blur()},Oa.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Oa.prototype.receivedFocus=function(){this.slowPoll()},Oa.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){e.poll(),e.cm.state.focused&&e.slowPoll()})},Oa.prototype.fastPoll=function(){var e=!1,t=this;t.pollingFast=!0,t.polling.set(20,function n(){t.poll()||e?(t.pollingFast=!1,t.slowPoll()):(e=!0,t.polling.set(60,n))})},Oa.prototype.poll=function(){var e=this,t=this.cm,n=this.textarea,r=this.prevInput;if(this.contextMenuPending||!t.state.focused||bt(n)&&!r&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var i=n.value;if(i==r&&!t.somethingSelected())return!1;if(a&&s>=9&&this.hasSelection===i||v&&/[\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||r||(r="​"),8666==o)return this.reset(),this.cm.execCommand("undo")}for(var l=0,u=Math.min(r.length,i.length);l1e3||i.indexOf("\n")>-1?n.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},Oa.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Oa.prototype.onKeyPress=function(){a&&s>=9&&(this.hasSelection=null),this.fastPoll()},Oa.prototype.onContextMenu=function(e){var t=this,n=t.cm,r=n.display,i=t.textarea,o=or(n,e),u=r.scroller.scrollTop;if(o&&!d){n.options.resetSelectionOnContextMenu&&-1==n.doc.sel.contains(o)&&Ur(n,$i)(n.doc,gi(o),R);var c=i.style.cssText,f=t.wrapper.style.cssText;t.wrapper.style.cssText="position: absolute";var h,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: "+(a?"rgba(255, 255, 255, .05)":"transparent")+";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);",l&&(h=window.scrollY),r.input.focus(),l&&window.scrollTo(null,h),r.input.reset(),n.somethingSelected()||(i.value=t.prevInput=" "),t.contextMenuPending=!0,r.selForContextMenu=n.doc.sel,clearTimeout(r.detectingSelectAll),a&&s>=9&&_(),x){ct(e);var m=function(){tt(window,"mouseup",m),setTimeout(g,20)};Qe(window,"mouseup",m)}else setTimeout(g,50)}function _(){if(null!=i.selectionStart){var e=n.somethingSelected(),o="​"+(e?i.value:"");i.value="⇚",i.value=o,t.prevInput=e?"":"​",i.selectionStart=1,i.selectionEnd=o.length,r.selForContextMenu=n.doc.sel}}function g(){if(t.contextMenuPending=!1,t.wrapper.style.cssText=f,i.style.cssText=c,a&&s<9&&r.scrollbars.setScrollTop(r.scroller.scrollTop=u),null!=i.selectionStart){(!a||a&&s<9)&&_();var e=0,o=function(){r.selForContextMenu==n.doc.sel&&0==i.selectionStart&&i.selectionEnd>0&&"​"==t.prevInput?Ur(n,Xi)(n):e++<10?r.detectingSelectAll=setTimeout(o,500):(r.selForContextMenu=null,r.input.reset())};r.detectingSelectAll=setTimeout(o,200)}}},Oa.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled="nocursor"==e},Oa.prototype.setUneditable=function(){},Oa.prototype.needsContentAttribute=!1,function(e){var t=e.optionHandlers;function n(n,r,i,o){e.defaults[n]=r,i&&(t[n]=o?function(e,t,n){n!=ca&&i(e,t,n)}:i)}e.defineOption=n,e.Init=ca,n("value","",function(e,t){return e.setValue(t)},!0),n("mode",null,function(e,t){e.doc.modeOption=t,wi(e)},!0),n("indentUnit",2,wi,!0),n("indentWithTabs",!1),n("smartIndent",!0),n("tabSize",4,function(e){xi(e),zn(e),Jr(e)},!0),n("lineSeparator",null,function(e,t){if(e.doc.lineSep=t,t){var n=[],r=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,n.push(me(r,o))}r++});for(var i=n.length-1;i>=0;i--)oo(e.doc,t,n[i],me(n[i].line,n[i].ch+t.length))}}),n("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200f\u2028\u2029\ufeff]/g,function(e,t,n){e.state.specialChars=new RegExp(t.source+(t.test("\t")?"":"|\t"),"g"),n!=ca&&e.refresh()}),n("specialCharPlaceholder",Kt,function(e){return e.refresh()},!0),n("electricChars",!0),n("inputStyle",g?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),n("spellcheck",!1,function(e,t){return e.getInputField().spellcheck=t},!0),n("rtlMoveVisually",!b),n("wholeLineUpdateBefore",!0),n("theme","default",function(e){ua(e),ha(e)},!0),n("keyMap","default",function(e,t,n){var r=No(t),i=n!=ca&&No(n);i&&i.detach&&i.detach(e,r),r.attach&&r.attach(e,i||null)}),n("extraKeys",null),n("configureMouse",null),n("lineWrapping",!1,ma,!0),n("gutters",[],function(e){ui(e.options),ha(e)},!0),n("fixedGutter",!0,function(e,t){e.display.gutters.style.left=t?nr(e.display)+"px":"0",e.refresh()},!0),n("coverGutterNextToScrollbar",!1,function(e){return Or(e)},!0),n("scrollbarStyle","native",function(e){Fr(e),Or(e),e.display.scrollbars.setScrollTop(e.doc.scrollTop),e.display.scrollbars.setScrollLeft(e.doc.scrollLeft)},!0),n("lineNumbers",!1,function(e){ui(e.options),ha(e)},!0),n("firstLineNumber",1,ha,!0),n("lineNumberFormatter",function(e){return e},ha,!0),n("showCursorWhenSelecting",!1,sr,!0),n("resetSelectionOnContextMenu",!0),n("lineWiseCopyCut",!0),n("pasteLinesPerSelection",!0),n("readOnly",!1,function(e,t){"nocursor"==t&&(_r(e),e.display.input.blur()),e.display.input.readOnlyChanged(t)}),n("disableInput",!1,function(e,t){t||e.display.input.reset()},!0),n("dragDrop",!0,pa),n("allowDropFileTypes",null),n("cursorBlinkRate",530),n("cursorScrollMargin",0),n("cursorHeight",1,sr,!0),n("singleCursorHeightPerLine",!0,sr,!0),n("workTime",100),n("workDelay",100),n("flattenSpans",!0,xi,!0),n("addModeClass",!1,xi,!0),n("pollInterval",100),n("undoDepth",200,function(e,t){return e.doc.history.undoDepth=t}),n("historyEventDelay",1250),n("viewportMargin",10,function(e){return e.refresh()},!0),n("maxHighlightLength",1e4,xi,!0),n("moveInputWithCursor",!0,function(e,t){t||e.display.input.resetPosition()}),n("tabindex",null,function(e,t){return e.display.input.getField().tabIndex=t||""}),n("autofocus",null),n("direction","ltr",function(e,t){return e.doc.setDirection(t)},!0)}(_a),function(e){var t=e.optionHandlers,n=e.helpers={};e.prototype={constructor:e,focus:function(){window.focus(),this.display.input.focus()},setOption:function(e,n){var r=this.options,i=r[e];r[e]==n&&"mode"!=e||(r[e]=n,t.hasOwnProperty(e)&&Ur(this,t[e])(this,n,i),nt(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"](No(e))},removeKeyMap:function(e){for(var t=this.state.keyMaps,n=0;nn&&(va(this,i.head.line,e,!0),n=i.head.line,r==this.doc.sel.primIndex&&Mr(this));else{var o=i.from(),a=i.to(),s=Math.max(n,o.line);n=Math.min(this.lastLine(),a.line-(a.ch?0:1))+1;for(var l=s;l0&&qi(this.doc,r,new mi(o,u[r].to()),R)}}}),getTokenAt:function(e,t){return qt(this,e,t)},getLineTokens:function(e,t){return qt(this,me(e),t,!0)},getTokenTypeAt:function(e){e=we(this.doc,e);var t,n=Ht(this,se(this.doc,e.line)),r=0,i=(n.length-1)/2,o=e.ch;if(0==o)t=n[2];else for(;;){var a=r+i>>1;if((a?n[2*a-1]:0)>=o)i=a;else{if(!(n[2*a+1]o&&(e=o,i=!0),r=se(this.doc,e)}else r=e;return Wn(this,r,{top:0,left:0},t||"page",n||i).top+(i?this.doc.height-Be(r):0)},defaultTextHeight:function(){return Qn(this.display)},defaultCharWidth:function(){return er(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(e,t,n,r,i){var o,a,s=this.display,l=(e=Bn(this,we(this.doc,e))).bottom,u=e.left;if(t.style.position="absolute",t.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(t),s.sizer.appendChild(t),"over"==r)l=e.top;else if("above"==r||"near"==r){var c=Math.max(s.wrapper.clientHeight,this.doc.height),d=Math.max(s.sizer.clientWidth,s.lineSpace.clientWidth);("above"==r||e.bottom+t.offsetHeight>c)&&e.top>t.offsetHeight?l=e.top-t.offsetHeight:e.bottom+t.offsetHeight<=c&&(l=e.bottom),u+t.offsetWidth>d&&(u=d-t.offsetWidth)}t.style.top=l+"px",t.style.left=t.style.right="","right"==i?(u=s.sizer.clientWidth-t.offsetWidth,t.style.right="0px"):("left"==i?u=0:"middle"==i&&(u=(s.sizer.clientWidth-t.offsetWidth)/2),t.style.left=u+"px"),n&&(null!=(a=wr(o=this,{left:u,top:l,right:u+t.offsetWidth,bottom:l+t.offsetHeight})).scrollTop&&Dr(o,a.scrollTop),null!=a.scrollLeft&&Cr(o,a.scrollLeft))},triggerOnKeyDown:Vr(Xo),triggerOnKeyPress:Vr(ea),triggerOnKeyUp:Qo,triggerOnMouseDown:Vr(ia),execCommand:function(e){if($o.hasOwnProperty(e))return $o[e].call(null,this)},triggerElectric:Vr(function(e){xa(this,e)}),findPosH:function(e,t,n,r){var i=1;t<0&&(i=-1,t=-t);for(var o=we(this.doc,e),a=0;a0&&a(t.charAt(n-1));)--n;for(;r.5)&&ir(this),nt(this,"refresh",this)}),swapDoc:Vr(function(e){var t=this.doc;return t.cm=null,Ti(this,e),zn(this),this.display.input.reset(),Lr(this,e.scrollLeft,e.scrollTop),this.curOp.forceScroll=!0,an(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,r,i){n.hasOwnProperty(t)||(n[t]=e[t]={_global:[]}),n[t][r]=i},e.registerGlobalHelper=function(t,r,i,o){e.registerHelper(t,r,o),n[t]._global.push({pred:i,val:o})}}(_a);var Ha,Pa="iter insert remove copy getEditor constructor".split(" ");for(var Fa in wo.prototype)wo.prototype.hasOwnProperty(Fa)&&I(Pa,Fa)<0&&(_a.prototype[Fa]=function(e){return function(){return e.apply(this.doc,arguments)}}(wo.prototype[Fa]));return at(wo),_a.inputStyles={textarea:Oa,contenteditable:Ya},_a.defineMode=function(e){_a.defaults.mode||"null"==e||(_a.defaults.mode=e),function(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),xt[e]=t}.apply(this,arguments)},_a.defineMIME=function(e,t){Mt[e]=t},_a.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),_a.defineMIME("text/plain","null"),_a.defineExtension=function(e,t){_a.prototype[e]=t},_a.defineDocExtension=function(e,t){wo.prototype[e]=t},_a.fromTextArea=function(e,t){if((t=t?F(t):{}).value=e.value,!t.tabindex&&e.tabIndex&&(t.tabindex=e.tabIndex),!t.placeholder&&e.placeholder&&(t.placeholder=e.placeholder),null==t.autofocus){var n=A();t.autofocus=n==e||null!=e.getAttribute("autofocus")&&n==document.body}function r(){e.value=s.getValue()}var i;if(e.form&&(Qe(e.form,"submit",r),!t.leaveSubmitMethodAlone)){var o=e.form;i=o.submit;try{var a=o.submit=function(){r(),o.submit=i,o.submit(),o.submit=a}}catch(e){}}t.finishInit=function(t){t.save=r,t.getTextArea=function(){return e},t.toTextArea=function(){t.toTextArea=isNaN,r(),e.parentNode.removeChild(t.getWrapperElement()),e.style.display="",e.form&&(tt(e.form,"submit",r),"function"==typeof e.form.submit&&(e.form.submit=i))}},e.style.display="none";var s=_a(function(t){return e.parentNode.insertBefore(t,e.nextSibling)},t);return s},(Ha=_a).off=tt,Ha.on=Qe,Ha.wheelEventPixels=function(e){var t=fi(e);return t.x*=di,t.y*=di,t},Ha.Doc=wo,Ha.splitLines=yt,Ha.countColumn=z,Ha.findColumn=U,Ha.isWordChar=ee,Ha.Pass=W,Ha.signal=nt,Ha.Line=$t,Ha.changeEnd=vi,Ha.scrollbarModel=Pr,Ha.Pos=me,Ha.cmpPos=_e,Ha.modes=xt,Ha.mimeModes=Mt,Ha.resolveMode=Lt,Ha.getMode=St,Ha.modeExtensions=Tt,Ha.extendMode=function(e,t){F(t,Tt.hasOwnProperty(e)?Tt[e]:Tt[e]={})},Ha.copyState=Dt,Ha.startState=Ct,Ha.innerMode=Yt,Ha.commands=$o,Ha.keyMap=jo,Ha.keyName=zo,Ha.isModifierKey=Po,Ha.lookupKey=Ho,Ha.normalizeKeyMap=function(e){var t={};for(var n in e)if(e.hasOwnProperty(n)){var r=e[n];if(/^(name|fallthrough|(de|at)tach)$/.test(n))continue;if("..."==r){delete e[n];continue}for(var i=K(n.split(" "),Oo),o=0;o"+i+""};e.exports=function(e,t){var n={};n[e]=t(s),r(r.P+r.F*i(function(){var t=""[e]('"');return t!==t.toLowerCase()||t.split('"').length>3}),"String",n)}},function(e,t,n){var r=n(3),i=n(16),o=n(17),a=n(44)("src"),s=Function.toString,l=(""+s).split("toString");n(30).inspectSource=function(e){return s.call(e)},(e.exports=function(e,t,n,s){var u="function"==typeof n;u&&(o(n,"name")||i(n,"name",t)),e[t]!==n&&(u&&(o(n,a)||i(n,a,e[t]?""+e[t]:l.join(String(t)))),e===r?e[t]=n:s?e[t]?e[t]=n:i(e,t,n):(delete e[t],i(e,t,n)))})(Function.prototype,"toString",function(){return"function"==typeof this&&this[a]||s.call(this)})},function(e,t,n){var r=n(9),i=n(45);e.exports=n(10)?function(e,t,n){return r.f(e,t,i(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},function(e,t,n){"use strict";var r=n(106),i=n(296),o=Object.prototype.toString;function a(e){return"[object Array]"===o.call(e)}function s(e){return null!==e&&"object"==typeof e}function l(e){return"[object Function]"===o.call(e)}function u(e,t){if(null!==e&&void 0!==e)if("object"!=typeof e&&(e=[e]),a(e))for(var n=0,r=e.length;nk;k++)if((f||k in v)&&(_=y(m=v[k],k,g),e))if(n)w[k]=_;else if(_)switch(e){case 3:return!0;case 5:return m;case 6:return k;case 2:w.push(m)}else if(c)return!1;return d?-1:u||c?c:w}}},function(e,t,n){var r=n(0),i=n(30),o=n(5);e.exports=function(e,t){var n=(i.Object||{})[e]||Object[e],a={};a[e]=t(n),r(r.S+r.F*o(function(){n(1)}),"Object",a)}},function(e,t){var n=Math.ceil,r=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?r:n)(e)}},function(e,t){e.exports=function(e){if(void 0==e)throw TypeError("Can't call method on "+e);return e}},function(e,t,n){var r=n(6);e.exports=function(e,t){if(!r(e))return e;var n,i;if(t&&"function"==typeof(n=e.toString)&&!r(i=n.call(e)))return i;if("function"==typeof(n=e.valueOf)&&!r(i=n.call(e)))return i;if(!t&&"function"==typeof(n=e.toString)&&!r(i=n.call(e)))return i;throw TypeError("Can't convert object to primitive value")}},function(e,t){var n=e.exports={version:"2.5.1"};"number"==typeof __e&&(__e=n)},function(e,t,n){var r=n(258),i=n(0),o=n(68)("metadata"),a=o.store||(o.store=new(n(255))),s=function(e,t,n){var i=a.get(e);if(!i){if(!n)return;a.set(e,i=new r)}var o=i.get(t);if(!o){if(!n)return;i.set(t,o=new r)}return o};e.exports={store:a,map:s,has:function(e,t,n){var r=s(t,n,!1);return void 0!==r&&r.has(e)},get:function(e,t,n){var r=s(t,n,!1);return void 0===r?void 0:r.get(e)},set:function(e,t,n,r){s(n,r,!0).set(e,t)},keys:function(e,t){var n=s(e,t,!1),r=[];return n&&n.forEach(function(e,t){r.push(t)}),r},key:function(e){return void 0===e||"symbol"==typeof e?e:String(e)},exp:function(e){i(i.S,"Reflect",e)}}},function(e,t,n){"use strict";if(n(10)){var r=n(43),i=n(3),o=n(5),a=n(0),s=n(58),l=n(76),u=n(24),c=n(37),d=n(45),f=n(16),h=n(35),p=n(27),m=n(8),_=n(253),g=n(41),v=n(29),y=n(17),b=n(51),k=n(6),w=n(12),x=n(85),M=n(40),L=n(19),S=n(39).f,T=n(83),D=n(44),Y=n(7),C=n(25),E=n(67),A=n(60),j=n(80),O=n(47),H=n(63),P=n(38),F=n(81),z=n(263),N=n(9),I=n(20),q=N.f,W=I.f,R=i.RangeError,$=i.TypeError,B=i.Uint8Array,U=Array.prototype,V=l.ArrayBuffer,G=l.DataView,J=C(0),K=C(2),Z=C(3),X=C(4),Q=C(5),ee=C(6),te=E(!0),ne=E(!1),re=j.values,ie=j.keys,oe=j.entries,ae=U.lastIndexOf,se=U.reduce,le=U.reduceRight,ue=U.join,ce=U.sort,de=U.slice,fe=U.toString,he=U.toLocaleString,pe=Y("iterator"),me=Y("toStringTag"),_e=D("typed_constructor"),ge=D("def_constructor"),ve=s.CONSTR,ye=s.TYPED,be=s.VIEW,ke=C(1,function(e,t){return Se(A(e,e[ge]),t)}),we=o(function(){return 1===new B(new Uint16Array([1]).buffer)[0]}),xe=!!B&&!!B.prototype.set&&o(function(){new B(1).set({})}),Me=function(e,t){var n=p(e);if(n<0||n%t)throw R("Wrong offset!");return n},Le=function(e){if(k(e)&&ye in e)return e;throw $(e+" is not a typed array!")},Se=function(e,t){if(!(k(e)&&_e in e))throw $("It is not a typed array constructor!");return new e(t)},Te=function(e,t){return De(A(e,e[ge]),t)},De=function(e,t){for(var n=0,r=t.length,i=Se(e,r);r>n;)i[n]=t[n++];return i},Ye=function(e,t,n){q(e,t,{get:function(){return this._d[n]}})},Ce=function(e){var t,n,r,i,o,a,s=w(e),l=arguments.length,c=l>1?arguments[1]:void 0,d=void 0!==c,f=T(s);if(void 0!=f&&!x(f)){for(a=f.call(s),r=[],t=0;!(o=a.next()).done;t++)r.push(o.value);s=r}for(d&&l>2&&(c=u(c,arguments[2],2)),t=0,n=m(s.length),i=Se(this,n);n>t;t++)i[t]=d?c(s[t],t):s[t];return i},Ee=function(){for(var e=0,t=arguments.length,n=Se(this,t);t>e;)n[e]=arguments[e++];return n},Ae=!!B&&o(function(){he.call(new B(1))}),je=function(){return he.apply(Ae?de.call(Le(this)):Le(this),arguments)},Oe={copyWithin:function(e,t){return z.call(Le(this),e,t,arguments.length>2?arguments[2]:void 0)},every:function(e){return X(Le(this),e,arguments.length>1?arguments[1]:void 0)},fill:function(e){return F.apply(Le(this),arguments)},filter:function(e){return Te(this,K(Le(this),e,arguments.length>1?arguments[1]:void 0))},find:function(e){return Q(Le(this),e,arguments.length>1?arguments[1]:void 0)},findIndex:function(e){return ee(Le(this),e,arguments.length>1?arguments[1]:void 0)},forEach:function(e){J(Le(this),e,arguments.length>1?arguments[1]:void 0)},indexOf:function(e){return ne(Le(this),e,arguments.length>1?arguments[1]:void 0)},includes:function(e){return te(Le(this),e,arguments.length>1?arguments[1]:void 0)},join:function(e){return ue.apply(Le(this),arguments)},lastIndexOf:function(e){return ae.apply(Le(this),arguments)},map:function(e){return ke(Le(this),e,arguments.length>1?arguments[1]:void 0)},reduce:function(e){return se.apply(Le(this),arguments)},reduceRight:function(e){return le.apply(Le(this),arguments)},reverse:function(){for(var e,t=Le(this).length,n=Math.floor(t/2),r=0;r1?arguments[1]:void 0)},sort:function(e){return ce.call(Le(this),e)},subarray:function(e,t){var n=Le(this),r=n.length,i=g(e,r);return new(A(n,n[ge]))(n.buffer,n.byteOffset+i*n.BYTES_PER_ELEMENT,m((void 0===t?r:g(t,r))-i))}},He=function(e,t){return Te(this,de.call(Le(this),e,t))},Pe=function(e){Le(this);var t=Me(arguments[1],1),n=this.length,r=w(e),i=m(r.length),o=0;if(i+t>n)throw R("Wrong length!");for(;o255?255:255&r),i.v[h](n*t+i.o,r,we)}(this,n,e)},enumerable:!0})};y?(p=n(function(e,n,r,i){c(e,p,u,"_d");var o,a,s,l,d=0,h=0;if(k(n)){if(!(n instanceof V||"ArrayBuffer"==(l=b(n))||"SharedArrayBuffer"==l))return ye in n?De(p,n):Ce.call(p,n);o=n,h=Me(r,t);var g=n.byteLength;if(void 0===i){if(g%t)throw R("Wrong length!");if((a=g-h)<0)throw R("Wrong length!")}else if((a=m(i)*t)+h>g)throw R("Wrong length!");s=a/t}else s=_(n),o=new V(a=s*t);for(f(e,"_d",{b:o,o:h,l:a,e:s,v:new G(o)});dy;y++)if((_=t?v(a(p=e[y])[0],p[1]):v(e[y]))===u||_===c)return _}else for(m=g.call(e);!(p=m.next()).done;)if((_=i(m,v,p.value,t))===u||_===c)return _}).BREAK=u,t.RETURN=c},function(e,t){e.exports=function(e,t,n,r){if(!(e instanceof t)||void 0!==r&&r in e)throw TypeError(n+": incorrect invocation!");return e}},function(e,t,n){"use strict";var r=n(3),i=n(9),o=n(10),a=n(7)("species");e.exports=function(e){var t=r[e];o&&t&&!t[a]&&i.f(t,a,{configurable:!0,get:function(){return this}})}},function(e,t,n){var r=n(277),i=n(98).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return r(e,i)}},function(e,t,n){var r=n(2),i=n(276),o=n(98),a=n(99)("IE_PROTO"),s=function(){},l=function(){var e,t=n(101)("iframe"),r=o.length;for(t.style.display="none",n(97).appendChild(t),t.src="javascript:",(e=t.contentWindow.document).open(),e.write("