From 3eed8afef3ce99e33c5b21c237918d5f2a3d040b Mon Sep 17 00:00:00 2001 From: Daniel Correia Date: Thu, 18 Aug 2016 10:36:39 +0100 Subject: [PATCH] Update dist folder and add publish script. --- dist/APIExplorer.umd.js | 94 ++++++++++++++++++------------------- dist/APIExplorer.umd.js.map | 2 +- dist/index.html | 2 +- publish.sh | 4 ++ 4 files changed, 53 insertions(+), 49 deletions(-) create mode 100755 publish.sh diff --git a/dist/APIExplorer.umd.js b/dist/APIExplorer.umd.js index dbba47f..3dbd6a0 100644 --- a/dist/APIExplorer.umd.js +++ b/dist/APIExplorer.umd.js @@ -1,16 +1,28 @@ -!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.APIExplorer=t():e.APIExplorer=t()}(this,function(){return function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return e[r].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var n={};return t.m=e,t.c=n,t.p="/",t(0)}(function(e){for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t))switch(typeof e[t]){case"function":break;case"object":e[t]=function(t){var n=t.slice(1),r=e[t[0]];return function(e,t,o){r.apply(this,[e,t,o].concat(n))}}(e[t]);break;default:e[t]=e[e[t]]}return e}([function(e,t,n){"use strict";function r(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t["default"]=e,t}function o(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var a=function(){function e(e,t){for(var n=0;n0)for(n in cr)r=cr[n],o=t[r],h(o)||(e[r]=o);return e}function v(e){m(this,e),this._d=new Date(null!=e._d?e._d.getTime():NaN),fr===!1&&(fr=!0,t.updateOffset(this),fr=!1)}function y(e){return e instanceof v||null!=e&&null!=e._isAMomentObject}function g(e){return e<0?Math.ceil(e):Math.floor(e)}function _(e){var t=+e,n=0;return 0!==t&&isFinite(t)&&(n=g(t)),n}function b(e,t,n){var r,o=Math.min(e.length,t.length),i=Math.abs(e.length-t.length),a=0;for(r=0;r0;){if(r=C(o.slice(0,t).join("-")))return r;if(n&&n.length>=t&&b(o,n,!0)>=t-1)break;t--}i++}return null}function C(t){var r=null;if(!vr[t]&&"undefined"!=typeof e&&e&&e.exports)try{r=hr._abbr,n(827)("./"+t),P(r)}catch(o){}return vr[t]}function P(e,t){var n;return e&&(n=h(t)?A(e):Y(e,t),n&&(hr=n)),hr._abbr}function Y(e,t){return null!==t?(t.abbr=e,null!=vr[e]?(x("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale"),t=E(vr[e]._config,t)):null!=t.parentLocale&&(null!=vr[t.parentLocale]?t=E(vr[t.parentLocale]._config,t):x("parentLocaleUndefined","specified parentLocale is not defined yet")),vr[e]=new T(t),P(e),vr[e]):(delete vr[e],null)}function j(e,t){if(null!=t){var n;null!=vr[e]&&(t=E(vr[e]._config,t)),n=new T(t),n.parentLocale=vr[e],vr[e]=n,P(e)}else null!=vr[e]&&(null!=vr[e].parentLocale?vr[e]=vr[e].parentLocale:null!=vr[e]&&delete vr[e]);return vr[e]}function A(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return hr;if(!o(e)){if(t=C(e))return t;e=[e]}return O(e)}function N(){return pr(vr)}function I(e,t){var n=e.toLowerCase();yr[n]=yr[n+"s"]=yr[t]=e}function R(e){return"string"==typeof e?yr[e]||yr[e.toLowerCase()]:void 0}function F(e){var t,n,r={};for(n in e)s(e,n)&&(t=R(n),t&&(r[t]=e[n]));return r}function H(e,n){return function(r){return null!=r?(W(this,e,r),t.updateOffset(this,n),this):z(this,e)}}function z(e,t){return e.isValid()?e._d["get"+(e._isUTC?"UTC":"")+t]():NaN}function W(e,t,n){e.isValid()&&e._d["set"+(e._isUTC?"UTC":"")+t](n)}function U(e,t){var n;if("object"==typeof e)for(n in e)this.set(n,e[n]);else if(e=R(e),k(this[e]))return this[e](t);return this}function B(e,t,n){var r=""+Math.abs(e),o=t-r.length,i=e>=0;return(i?n?"+":"":"-")+Math.pow(10,Math.max(0,o)).toString().substr(1)+r}function q(e,t,n,r){var o=r;"string"==typeof r&&(o=function(){return this[r]()}),e&&(wr[e]=o),t&&(wr[t[0]]=function(){return B(o.apply(this,arguments),t[1],t[2])}),n&&(wr[n]=function(){return this.localeData().ordinal(o.apply(this,arguments),e)})}function V(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function G(e){var t,n,r=e.match(gr);for(t=0,n=r.length;t=0&&_r.test(e);)e=e.replace(_r,n),_r.lastIndex=0,r-=1;return e}function Q(e,t,n){Fr[e]=k(t)?t:function(e,r){return e&&n?n:t}}function $(e,t){return s(Fr,e)?Fr[e](t._strict,t._locale):new RegExp(X(e))}function X(e){return Z(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(e,t,n,r,o){return t||n||r||o}))}function Z(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function ee(e,t){var n,r=t;for("string"==typeof e&&(e=[e]),"number"==typeof t&&(r=function(e,n){n[t]=_(e)}),n=0;n11?Wr:n[Ur]<1||n[Ur]>re(n[zr],n[Wr])?Ur:n[Br]<0||n[Br]>24||24===n[Br]&&(0!==n[qr]||0!==n[Vr]||0!==n[Gr])?Br:n[qr]<0||n[qr]>59?qr:n[Vr]<0||n[Vr]>59?Vr:n[Gr]<0||n[Gr]>999?Gr:-1,f(e)._overflowDayOfYear&&(tUr)&&(t=Ur),f(e)._overflowWeeks&&t===-1&&(t=Kr),f(e)._overflowWeekday&&t===-1&&(t=Jr),f(e).overflow=t),e}function me(e){var t,n,r,o,i,a,s=e._i,u=to.exec(s)||no.exec(s);if(u){for(f(e).iso=!0,t=0,n=oo.length;t=0&&isFinite(s.getFullYear())&&s.setFullYear(e),s}function ge(e){var t=new Date(Date.UTC.apply(null,arguments));return e<100&&e>=0&&isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e),t}function _e(e){return be(e)?366:365}function be(e){return e%4===0&&e%100!==0||e%400===0}function we(){return be(this.year())}function Me(e,t,n){var r=7+t-n,o=(7+ge(e,0,r).getUTCDay()-t)%7;return-o+r-1}function xe(e,t,n,r,o){var i,a,s=(7+n-r)%7,u=Me(e,r,o),l=1+7*(t-1)+s+u;return l<=0?(i=e-1,a=_e(i)+l):l>_e(e)?(i=e+1,a=l-_e(e)):(i=e,a=l),{year:i,dayOfYear:a}}function ke(e,t,n){var r,o,i=Me(e.year(),t,n),a=Math.floor((e.dayOfYear()-i-1)/7)+1;return a<1?(o=e.year()-1,r=a+Le(o,t,n)):a>Le(e.year(),t,n)?(r=a-Le(e.year(),t,n),o=e.year()+1):(o=e.year(),r=a),{week:r,year:o}}function Le(e,t,n){var r=Me(e,t,n),o=Me(e+1,t,n);return(_e(e)-r+o)/7}function Se(e,t,n){return null!=e?e:null!=t?t:n}function Ee(e){var n=new Date(t.now());return e._useUTC?[n.getUTCFullYear(),n.getUTCMonth(),n.getUTCDate()]:[n.getFullYear(),n.getMonth(),n.getDate()]}function Te(e){var t,n,r,o,i=[];if(!e._d){for(r=Ee(e),e._w&&null==e._a[Ur]&&null==e._a[Wr]&&De(e),e._dayOfYear&&(o=Se(e._a[zr],r[zr]),e._dayOfYear>_e(o)&&(f(e)._overflowDayOfYear=!0),n=ge(o,0,e._dayOfYear),e._a[Wr]=n.getUTCMonth(),e._a[Ur]=n.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=i[t]=r[t];for(;t<7;t++)e._a[t]=i[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[Br]&&0===e._a[qr]&&0===e._a[Vr]&&0===e._a[Gr]&&(e._nextDay=!0,e._a[Br]=0),e._d=(e._useUTC?ge:ye).apply(null,i),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[Br]=24)}}function De(e){var t,n,r,o,i,a,s,u;t=e._w,null!=t.GG||null!=t.W||null!=t.E?(i=1,a=4,n=Se(t.GG,e._a[zr],ke(Re(),1,4).year),r=Se(t.W,1),o=Se(t.E,1),(o<1||o>7)&&(u=!0)):(i=e._locale._week.dow,a=e._locale._week.doy,n=Se(t.gg,e._a[zr],ke(Re(),i,a).year),r=Se(t.w,1),null!=t.d?(o=t.d,(o<0||o>6)&&(u=!0)):null!=t.e?(o=t.e+i,(t.e<0||t.e>6)&&(u=!0)):o=i),r<1||r>Le(n,i,a)?f(e)._overflowWeeks=!0:null!=u?f(e)._overflowWeekday=!0:(s=xe(n,r,o,i,a),e._a[zr]=s.year,e._dayOfYear=s.dayOfYear)}function Oe(e){if(e._f===t.ISO_8601)return void me(e);e._a=[],f(e).empty=!0;var n,r,o,i,a,s=""+e._i,u=s.length,l=0;for(o=J(e._f,e._locale).match(gr)||[],n=0;n0&&f(e).unusedInput.push(a),s=s.slice(s.indexOf(r)+r.length),l+=r.length),wr[i]?(r?f(e).empty=!1:f(e).unusedTokens.push(i),ne(i,r,e)):e._strict&&!r&&f(e).unusedTokens.push(i);f(e).charsLeftOver=u-l,s.length>0&&f(e).unusedInput.push(s),f(e).bigHour===!0&&e._a[Br]<=12&&e._a[Br]>0&&(f(e).bigHour=void 0),f(e).parsedDateParts=e._a.slice(0),f(e).meridiem=e._meridiem,e._a[Br]=Ce(e._locale,e._a[Br],e._meridiem),Te(e),he(e)}function Ce(e,t,n){var r;return null==n?t:null!=e.meridiemHour?e.meridiemHour(t,n):null!=e.isPM?(r=e.isPM(n),r&&t<12&&(t+=12),r||12!==t||(t=0),t):t}function Pe(e){var t,n,r,o,i;if(0===e._f.length)return f(e).invalidFormat=!0,void(e._d=new Date(NaN));for(o=0;othis.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function tt(){if(!h(this._isDSTShifted))return this._isDSTShifted;var e={};if(m(e,this),e=Ae(e),e._a){var t=e._isUTC?l(e._a):Re(e._a);this._isDSTShifted=this.isValid()&&b(e._a,t.toArray())>0}else this._isDSTShifted=!1;return this._isDSTShifted}function nt(){return!!this.isValid()&&!this._isUTC}function rt(){return!!this.isValid()&&this._isUTC}function ot(){return!!this.isValid()&&(this._isUTC&&0===this._offset)}function it(e,t){var n,r,o,i=e,a=null;return Ue(e)?i={ms:e._milliseconds,d:e._days,M:e._months}:"number"==typeof e?(i={},t?i[t]=e:i.milliseconds=e):(a=po.exec(e))?(n="-"===a[1]?-1:1,i={y:0,d:_(a[Ur])*n,h:_(a[Br])*n,m:_(a[qr])*n,s:_(a[Vr])*n,ms:_(a[Gr])*n}):(a=ho.exec(e))?(n="-"===a[1]?-1:1,i={y:at(a[2],n),M:at(a[3],n),w:at(a[4],n),d:at(a[5],n),h:at(a[6],n),m:at(a[7],n),s:at(a[8],n)}):null==i?i={}:"object"==typeof i&&("from"in i||"to"in i)&&(o=ut(Re(i.from),Re(i.to)),i={},i.ms=o.milliseconds,i.M=o.months),r=new We(i),Ue(e)&&s(e,"_locale")&&(r._locale=e._locale),r}function at(e,t){var n=e&&parseFloat(e.replace(",","."));return(isNaN(n)?0:n)*t}function st(e,t){var n={milliseconds:0,months:0};return n.months=t.month()-e.month()+12*(t.year()-e.year()),e.clone().add(n.months,"M").isAfter(t)&&--n.months,n.milliseconds=+t-+e.clone().add(n.months,"M"),n}function ut(e,t){var n;return e.isValid()&&t.isValid()?(t=Ve(t,e),e.isBefore(t)?n=st(e,t):(n=st(t,e),n.milliseconds=-n.milliseconds,n.months=-n.months),n):{milliseconds:0,months:0}}function lt(e){return e<0?Math.round(-1*e)*-1:Math.round(e)}function ct(e,t){return function(n,r){var o,i;return null===r||isNaN(+r)||(x(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period)."),i=n,n=r,r=i),n="string"==typeof n?+n:n,o=it(n,r),ft(this,o,e),this}}function ft(e,n,r,o){var i=n._milliseconds,a=lt(n._days),s=lt(n._months);e.isValid()&&(o=null==o||o,i&&e._d.setTime(e._d.valueOf()+i*r),a&&W(e,"Date",z(e,"Date")+a*r),s&&ue(e,z(e,"Month")+s*r),o&&t.updateOffset(e,a||s))}function dt(e,t){var n=e||Re(),r=Ve(n,this).startOf("day"),o=this.diff(r,"days",!0),i=o<-6?"sameElse":o<-1?"lastWeek":o<0?"lastDay":o<1?"sameDay":o<2?"nextDay":o<7?"nextWeek":"sameElse",a=t&&(k(t[i])?t[i]():t[i]);return this.format(a||this.localeData().calendar(i,this,Re(n)))}function pt(){return new v(this)}function ht(e,t){var n=y(e)?e:Re(e);return!(!this.isValid()||!n.isValid())&&(t=R(h(t)?"millisecond":t),"millisecond"===t?this.valueOf()>n.valueOf():n.valueOf()i&&(t=i),Jt.call(this,e,t,n,r,o))}function Jt(e,t,n,r,o){var i=xe(e,t,n,r,o),a=ge(i.year,0,i.dayOfYear);return this.year(a.getUTCFullYear()),this.month(a.getUTCMonth()),this.date(a.getUTCDate()),this}function Qt(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)}function $t(e){return ke(e,this._week.dow,this._week.doy).week}function Xt(){return this._week.dow}function Zt(){return this._week.doy}function en(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),"d")}function tn(e){var t=ke(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")}function nn(e,t){return"string"!=typeof e?e:isNaN(e)?(e=t.weekdaysParse(e),"number"==typeof e?e:null):parseInt(e,10)}function rn(e,t){return o(this._weekdays)?this._weekdays[e.day()]:this._weekdays[this._weekdays.isFormat.test(t)?"format":"standalone"][e.day()]}function on(e){return this._weekdaysShort[e.day()]}function an(e){return this._weekdaysMin[e.day()]}function sn(e,t,n){var r,o,i,a=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)i=l([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(i,"").toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(i,"").toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(i,"").toLocaleLowerCase();return n?"dddd"===t?(o=mr.call(this._weekdaysParse,a),o!==-1?o:null):"ddd"===t?(o=mr.call(this._shortWeekdaysParse,a),o!==-1?o:null):(o=mr.call(this._minWeekdaysParse,a),o!==-1?o:null):"dddd"===t?(o=mr.call(this._weekdaysParse,a),o!==-1?o:(o=mr.call(this._shortWeekdaysParse,a),o!==-1?o:(o=mr.call(this._minWeekdaysParse,a),o!==-1?o:null))):"ddd"===t?(o=mr.call(this._shortWeekdaysParse,a),o!==-1?o:(o=mr.call(this._weekdaysParse,a),o!==-1?o:(o=mr.call(this._minWeekdaysParse,a),o!==-1?o:null))):(o=mr.call(this._minWeekdaysParse,a),o!==-1?o:(o=mr.call(this._weekdaysParse,a),o!==-1?o:(o=mr.call(this._shortWeekdaysParse,a),o!==-1?o:null)))}function un(e,t,n){var r,o,i;if(this._weekdaysParseExact)return sn.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++){if(o=l([2e3,1]).day(r),n&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp("^"+this.weekdays(o,"").replace(".",".?")+"$","i"),this._shortWeekdaysParse[r]=new RegExp("^"+this.weekdaysShort(o,"").replace(".",".?")+"$","i"),this._minWeekdaysParse[r]=new RegExp("^"+this.weekdaysMin(o,"").replace(".",".?")+"$","i")),this._weekdaysParse[r]||(i="^"+this.weekdays(o,"")+"|^"+this.weekdaysShort(o,"")+"|^"+this.weekdaysMin(o,""),this._weekdaysParse[r]=new RegExp(i.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}}function ln(e){if(!this.isValid())return null!=e?this:NaN;var t=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=e?(e=nn(e,this.localeData()),this.add(e-t,"d")):t}function cn(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")}function fn(e){return this.isValid()?null==e?this.day()||7:this.day(this.day()%7?e:e-7):null!=e?this:NaN}function dn(e){return this._weekdaysParseExact?(s(this,"_weekdaysRegex")||mn.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex}function pn(e){return this._weekdaysParseExact?(s(this,"_weekdaysRegex")||mn.call(this), -e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex}function hn(e){return this._weekdaysParseExact?(s(this,"_weekdaysRegex")||mn.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex}function mn(){function e(e,t){return t.length-e.length}var t,n,r,o,i,a=[],s=[],u=[],c=[];for(t=0;t<7;t++)n=l([2e3,1]).day(t),r=this.weekdaysMin(n,""),o=this.weekdaysShort(n,""),i=this.weekdays(n,""),a.push(r),s.push(o),u.push(i),c.push(r),c.push(o),c.push(i);for(a.sort(e),s.sort(e),u.sort(e),c.sort(e),t=0;t<7;t++)s[t]=Z(s[t]),u[t]=Z(u[t]),c[t]=Z(c[t]);this._weekdaysRegex=new RegExp("^("+c.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+u.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+s.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+a.join("|")+")","i")}function vn(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==e?t:this.add(e-t,"d")}function yn(){return this.hours()%12||12}function gn(){return this.hours()||24}function _n(e,t){q(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}function bn(e,t){return t._meridiemParse}function wn(e){return"p"===(e+"").toLowerCase().charAt(0)}function Mn(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"}function xn(e,t){t[Gr]=_(1e3*("0."+e))}function kn(){return this._isUTC?"UTC":""}function Ln(){return this._isUTC?"Coordinated Universal Time":""}function Sn(e){return Re(1e3*e)}function En(){return Re.apply(null,arguments).parseZone()}function Tn(e,t,n){var r=this._calendar[e];return k(r)?r.call(t,n):r}function Dn(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])}function On(){return this._invalidDate}function Cn(e){return this._ordinal.replace("%d",e)}function Pn(e){return e}function Yn(e,t,n,r){var o=this._relativeTime[n];return k(o)?o(e,t,n,r):o.replace(/%d/i,e)}function jn(e,t){var n=this._relativeTime[e>0?"future":"past"];return k(n)?n(t):n.replace(/%s/i,t)}function An(e,t,n,r){var o=A(),i=l().set(r,t);return o[n](i,e)}function Nn(e,t,n){if("number"==typeof e&&(t=e,e=void 0),e=e||"",null!=t)return An(e,t,n,"month");var r,o=[];for(r=0;r<12;r++)o[r]=An(e,r,n,"month");return o}function In(e,t,n,r){"boolean"==typeof e?("number"==typeof t&&(n=t,t=void 0),t=t||""):(t=e,n=t,e=!1,"number"==typeof t&&(n=t,t=void 0),t=t||"");var o=A(),i=e?o._week.dow:0;if(null!=n)return An(t,(n+i)%7,r,"day");var a,s=[];for(a=0;a<7;a++)s[a]=An(t,(a+i)%7,r,"day");return s}function Rn(e,t){return Nn(e,t,"months")}function Fn(e,t){return Nn(e,t,"monthsShort")}function Hn(e,t,n){return In(e,t,n,"weekdays")}function zn(e,t,n){return In(e,t,n,"weekdaysShort")}function Wn(e,t,n){return In(e,t,n,"weekdaysMin")}function Un(){var e=this._data;return this._milliseconds=zo(this._milliseconds),this._days=zo(this._days),this._months=zo(this._months),e.milliseconds=zo(e.milliseconds),e.seconds=zo(e.seconds),e.minutes=zo(e.minutes),e.hours=zo(e.hours),e.months=zo(e.months),e.years=zo(e.years),this}function Bn(e,t,n,r){var o=it(t,n);return e._milliseconds+=r*o._milliseconds,e._days+=r*o._days,e._months+=r*o._months,e._bubble()}function qn(e,t){return Bn(this,e,t,1)}function Vn(e,t){return Bn(this,e,t,-1)}function Gn(e){return e<0?Math.floor(e):Math.ceil(e)}function Kn(){var e,t,n,r,o,i=this._milliseconds,a=this._days,s=this._months,u=this._data;return i>=0&&a>=0&&s>=0||i<=0&&a<=0&&s<=0||(i+=864e5*Gn(Qn(s)+a),a=0,s=0),u.milliseconds=i%1e3,e=g(i/1e3),u.seconds=e%60,t=g(e/60),u.minutes=t%60,n=g(t/60),u.hours=n%24,a+=g(n/24),o=g(Jn(a)),s+=o,a-=Gn(Qn(o)),r=g(s/12),s%=12,u.days=a,u.months=s,u.years=r,this}function Jn(e){return 4800*e/146097}function Qn(e){return 146097*e/4800}function $n(e){var t,n,r=this._milliseconds;if(e=R(e),"month"===e||"year"===e)return t=this._days+r/864e5,n=this._months+Jn(t),"month"===e?n:n/12;switch(t=this._days+Math.round(Qn(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)}}function Xn(){return this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*_(this._months/12)}function Zn(e){return function(){return this.as(e)}}function er(e){return e=R(e),this[e+"s"]()}function tr(e){return function(){return this._data[e]}}function nr(){return g(this.days()/7)}function rr(e,t,n,r,o){return o.relativeTime(t||1,!!n,e,r)}function or(e,t,n){var r=it(e).abs(),o=ri(r.as("s")),i=ri(r.as("m")),a=ri(r.as("h")),s=ri(r.as("d")),u=ri(r.as("M")),l=ri(r.as("y")),c=o0,c[4]=n,rr.apply(null,c)}function ir(e,t){return void 0!==oi[e]&&(void 0===t?oi[e]:(oi[e]=t,!0))}function ar(e){var t=this.localeData(),n=or(this,!e,t);return e&&(n=t.pastFuture(+this,n)),t.postformat(n)}function sr(){var e,t,n,r=ii(this._milliseconds)/1e3,o=ii(this._days),i=ii(this._months);e=g(r/60),t=g(e/60),r%=60,e%=60,n=g(i/12),i%=12;var a=n,s=i,u=o,l=t,c=e,f=r,d=this.asSeconds();return d?(d<0?"-":"")+"P"+(a?a+"Y":"")+(s?s+"M":"")+(u?u+"D":"")+(l||c||f?"T":"")+(l?l+"H":"")+(c?c+"M":"")+(f?f+"S":""):"P0D"}var ur,lr;lr=Array.prototype.some?Array.prototype.some:function(e){for(var t=Object(this),n=t.length>>>0,r=0;r68?1900:2e3)};var so=H("FullYear",!0);t.ISO_8601=function(){};var uo=M("moment().min is deprecated, use moment.max instead. https://github.com/moment/moment/issues/1548",function(){var e=Re.apply(null,arguments);return this.isValid()&&e.isValid()?ethis?this:e:p()}),co=function(){return Date.now?Date.now():+new Date};Be("Z",":"),Be("ZZ",""),Q("Z",Nr),Q("ZZ",Nr),ee(["Z","ZZ"],function(e,t,n){n._useUTC=!0,n._tzm=qe(Nr,e)});var fo=/([\+\-]|\d\d)/gi;t.updateOffset=function(){};var po=/^(\-)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)\.?(\d{3})?\d*)?$/,ho=/^(-)?P(?:(-?[0-9,.]*)Y)?(?:(-?[0-9,.]*)M)?(?:(-?[0-9,.]*)W)?(?:(-?[0-9,.]*)D)?(?:T(?:(-?[0-9,.]*)H)?(?:(-?[0-9,.]*)M)?(?:(-?[0-9,.]*)S)?)?$/;it.fn=We.prototype;var mo=ct(1,"add"),vo=ct(-1,"subtract");t.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",t.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var yo=M("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return void 0===e?this.localeData():this.locale(e)});q(0,["gg",2],0,function(){return this.weekYear()%100}),q(0,["GG",2],0,function(){return this.isoWeekYear()%100}),Ut("gggg","weekYear"),Ut("ggggg","weekYear"),Ut("GGGG","isoWeekYear"),Ut("GGGGG","isoWeekYear"),I("weekYear","gg"),I("isoWeekYear","GG"),Q("G",jr),Q("g",jr),Q("GG",Er,xr),Q("gg",Er,xr),Q("GGGG",Cr,Lr),Q("gggg",Cr,Lr),Q("GGGGG",Pr,Sr),Q("ggggg",Pr,Sr),te(["gggg","ggggg","GGGG","GGGGG"],function(e,t,n,r){t[r.substr(0,2)]=_(e)}),te(["gg","GG"],function(e,n,r,o){n[o]=t.parseTwoDigitYear(e)}),q("Q",0,"Qo","quarter"),I("quarter","Q"),Q("Q",Mr),ee("Q",function(e,t){t[Wr]=3*(_(e)-1)}),q("w",["ww",2],"wo","week"),q("W",["WW",2],"Wo","isoWeek"),I("week","w"),I("isoWeek","W"),Q("w",Er),Q("ww",Er,xr),Q("W",Er),Q("WW",Er,xr),te(["w","ww","W","WW"],function(e,t,n,r){t[r.substr(0,1)]=_(e)});var go={dow:0,doy:6};q("D",["DD",2],"Do","date"),I("date","D"),Q("D",Er),Q("DD",Er,xr),Q("Do",function(e,t){return e?t._ordinalParse:t._ordinalParseLenient}),ee(["D","DD"],Ur),ee("Do",function(e,t){t[Ur]=_(e.match(Er)[0],10)});var _o=H("Date",!0);q("d",0,"do","day"),q("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)}),q("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)}),q("dddd",0,0,function(e){return this.localeData().weekdays(this,e)}),q("e",0,0,"weekday"),q("E",0,0,"isoWeekday"),I("day","d"),I("weekday","e"),I("isoWeekday","E"),Q("d",Er),Q("e",Er),Q("E",Er),Q("dd",function(e,t){return t.weekdaysMinRegex(e)}),Q("ddd",function(e,t){return t.weekdaysShortRegex(e)}),Q("dddd",function(e,t){return t.weekdaysRegex(e)}),te(["dd","ddd","dddd"],function(e,t,n,r){var o=n._locale.weekdaysParse(e,r,n._strict);null!=o?t.d=o:f(n).invalidWeekday=e}),te(["d","e","E"],function(e,t,n,r){t[r]=_(e)});var bo="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),wo="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Mo="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),xo=Rr,ko=Rr,Lo=Rr;q("DDD",["DDDD",3],"DDDo","dayOfYear"),I("dayOfYear","DDD"),Q("DDD",Or),Q("DDDD",kr),ee(["DDD","DDDD"],function(e,t,n){n._dayOfYear=_(e)}),q("H",["HH",2],0,"hour"),q("h",["hh",2],0,yn),q("k",["kk",2],0,gn),q("hmm",0,0,function(){return""+yn.apply(this)+B(this.minutes(),2)}),q("hmmss",0,0,function(){return""+yn.apply(this)+B(this.minutes(),2)+B(this.seconds(),2)}),q("Hmm",0,0,function(){return""+this.hours()+B(this.minutes(),2)}),q("Hmmss",0,0,function(){return""+this.hours()+B(this.minutes(),2)+B(this.seconds(),2)}),_n("a",!0),_n("A",!1),I("hour","h"),Q("a",bn),Q("A",bn),Q("H",Er),Q("h",Er),Q("HH",Er,xr),Q("hh",Er,xr),Q("hmm",Tr),Q("hmmss",Dr),Q("Hmm",Tr),Q("Hmmss",Dr),ee(["H","HH"],Br),ee(["a","A"],function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e}),ee(["h","hh"],function(e,t,n){t[Br]=_(e),f(n).bigHour=!0}),ee("hmm",function(e,t,n){var r=e.length-2;t[Br]=_(e.substr(0,r)),t[qr]=_(e.substr(r)),f(n).bigHour=!0}),ee("hmmss",function(e,t,n){var r=e.length-4,o=e.length-2;t[Br]=_(e.substr(0,r)),t[qr]=_(e.substr(r,2)),t[Vr]=_(e.substr(o)),f(n).bigHour=!0}),ee("Hmm",function(e,t,n){var r=e.length-2;t[Br]=_(e.substr(0,r)),t[qr]=_(e.substr(r))}),ee("Hmmss",function(e,t,n){var r=e.length-4,o=e.length-2;t[Br]=_(e.substr(0,r)),t[qr]=_(e.substr(r,2)),t[Vr]=_(e.substr(o))});var So=/[ap]\.?m?\.?/i,Eo=H("Hours",!0);q("m",["mm",2],0,"minute"),I("minute","m"),Q("m",Er),Q("mm",Er,xr),ee(["m","mm"],qr);var To=H("Minutes",!1);q("s",["ss",2],0,"second"),I("second","s"),Q("s",Er),Q("ss",Er,xr),ee(["s","ss"],Vr);var Do=H("Seconds",!1);q("S",0,0,function(){return~~(this.millisecond()/100)}),q(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),q(0,["SSS",3],0,"millisecond"),q(0,["SSSS",4],0,function(){return 10*this.millisecond()}),q(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),q(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),q(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),q(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),q(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),I("millisecond","ms"),Q("S",Or,Mr),Q("SS",Or,xr),Q("SSS",Or,kr);var Oo;for(Oo="SSSS";Oo.length<=9;Oo+="S")Q(Oo,Yr);for(Oo="S";Oo.length<=9;Oo+="S")ee(Oo,xn);var Co=H("Milliseconds",!1);q("z",0,0,"zoneAbbr"),q("zz",0,0,"zoneName");var Po=v.prototype;Po.add=mo,Po.calendar=dt,Po.clone=pt,Po.diff=bt,Po.endOf=Pt,Po.format=kt,Po.from=Lt,Po.fromNow=St,Po.to=Et,Po.toNow=Tt,Po.get=U,Po.invalidAt=zt,Po.isAfter=ht,Po.isBefore=mt,Po.isBetween=vt,Po.isSame=yt,Po.isSameOrAfter=gt,Po.isSameOrBefore=_t,Po.isValid=Ft,Po.lang=yo,Po.locale=Dt,Po.localeData=Ot,Po.max=lo,Po.min=uo,Po.parsingFlags=Ht,Po.set=U,Po.startOf=Ct,Po.subtract=vo,Po.toArray=Nt,Po.toObject=It,Po.toDate=At,Po.toISOString=xt,Po.toJSON=Rt,Po.toString=Mt,Po.unix=jt,Po.valueOf=Yt,Po.creationData=Wt,Po.year=so,Po.isLeapYear=we,Po.weekYear=Bt,Po.isoWeekYear=qt,Po.quarter=Po.quarters=Qt,Po.month=le,Po.daysInMonth=ce,Po.week=Po.weeks=en,Po.isoWeek=Po.isoWeeks=tn,Po.weeksInYear=Gt,Po.isoWeeksInYear=Vt,Po.date=_o,Po.day=Po.days=ln,Po.weekday=cn,Po.isoWeekday=fn,Po.dayOfYear=vn,Po.hour=Po.hours=Eo,Po.minute=Po.minutes=To,Po.second=Po.seconds=Do,Po.millisecond=Po.milliseconds=Co,Po.utcOffset=Ke,Po.utc=Qe,Po.local=$e,Po.parseZone=Xe,Po.hasAlignedHourOffset=Ze,Po.isDST=et,Po.isDSTShifted=tt,Po.isLocal=nt,Po.isUtcOffset=rt,Po.isUtc=ot,Po.isUTC=ot,Po.zoneAbbr=kn,Po.zoneName=Ln,Po.dates=M("dates accessor is deprecated. Use date instead.",_o),Po.months=M("months accessor is deprecated. Use month instead",le),Po.years=M("years accessor is deprecated. Use year instead",so),Po.zone=M("moment().zone is deprecated, use moment().utcOffset instead. https://github.com/moment/moment/issues/1779",Je);var Yo=Po,jo={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},Ao={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"},No="Invalid date",Io="%d",Ro=/\d{1,2}/,Fo={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},Ho=T.prototype;Ho._calendar=jo,Ho.calendar=Tn,Ho._longDateFormat=Ao,Ho.longDateFormat=Dn,Ho._invalidDate=No,Ho.invalidDate=On,Ho._ordinal=Io,Ho.ordinal=Cn,Ho._ordinalParse=Ro,Ho.preparse=Pn,Ho.postformat=Pn,Ho._relativeTime=Fo,Ho.relativeTime=Yn,Ho.pastFuture=jn,Ho.set=S,Ho.months=oe,Ho._months=$r,Ho.monthsShort=ie,Ho._monthsShort=Xr,Ho.monthsParse=se,Ho._monthsRegex=eo,Ho.monthsRegex=de,Ho._monthsShortRegex=Zr,Ho.monthsShortRegex=fe,Ho.week=$t,Ho._week=go,Ho.firstDayOfYear=Zt,Ho.firstDayOfWeek=Xt,Ho.weekdays=rn,Ho._weekdays=bo,Ho.weekdaysMin=an,Ho._weekdaysMin=Mo,Ho.weekdaysShort=on,Ho._weekdaysShort=wo,Ho.weekdaysParse=un,Ho._weekdaysRegex=xo,Ho.weekdaysRegex=dn,Ho._weekdaysShortRegex=ko,Ho.weekdaysShortRegex=pn,Ho._weekdaysMinRegex=Lo,Ho.weekdaysMinRegex=hn,Ho.isPM=wn,Ho._meridiemParse=So,Ho.meridiem=Mn,P("en",{ordinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10,n=1===_(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th";return e+n}}),t.lang=M("moment.lang is deprecated. Use moment.locale instead.",P),t.langData=M("moment.langData is deprecated. Use moment.localeData instead.",A);var zo=Math.abs,Wo=Zn("ms"),Uo=Zn("s"),Bo=Zn("m"),qo=Zn("h"),Vo=Zn("d"),Go=Zn("w"),Ko=Zn("M"),Jo=Zn("y"),Qo=tr("milliseconds"),$o=tr("seconds"),Xo=tr("minutes"),Zo=tr("hours"),ei=tr("days"),ti=tr("months"),ni=tr("years"),ri=Math.round,oi={s:45,m:45,h:22,d:26,M:11},ii=Math.abs,ai=We.prototype;ai.abs=Un,ai.add=qn,ai.subtract=Vn,ai.as=$n,ai.asMilliseconds=Wo,ai.asSeconds=Uo,ai.asMinutes=Bo,ai.asHours=qo,ai.asDays=Vo,ai.asWeeks=Go,ai.asMonths=Ko,ai.asYears=Jo,ai.valueOf=Xn,ai._bubble=Kn,ai.get=er,ai.milliseconds=Qo,ai.seconds=$o,ai.minutes=Xo,ai.hours=Zo,ai.days=ei,ai.weeks=nr,ai.months=ti,ai.years=ni,ai.humanize=ar,ai.toISOString=sr,ai.toString=sr,ai.toJSON=sr,ai.locale=Dt,ai.localeData=Ot,ai.toIsoString=M("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",sr),ai.lang=yo,q("X",0,0,"unix"),q("x",0,0,"valueOf"),Q("x",jr),Q("X",Ir),ee("X",function(e,t,n){n._d=new Date(1e3*parseFloat(e,10))}),ee("x",function(e,t,n){n._d=new Date(_(e))}),t.version="2.13.0",r(Re),t.fn=Yo,t.min=He,t.max=ze,t.now=co,t.utc=l,t.unix=Sn,t.months=Rn,t.isDate=i,t.locale=P,t.invalid=p,t.duration=it,t.isMoment=y,t.weekdays=Hn,t.parseZone=En,t.localeData=A,t.isDuration=Ue,t.monthsShort=Fn,t.weekdaysMin=Wn,t.defineLocale=Y,t.updateLocale=j,t.locales=N,t.weekdaysShort=zn,t.normalizeUnits=R,t.relativeTimeThreshold=ir,t.prototype=Yo;var si=t;return si})}).call(t,n(207)(e))},function(e,t,n){"use strict";e.exports=n(956)},function(e,t,n){var r=n(11),o=n(41),i=n(35),a=n(28),s=n(33),u="prototype",l=function(e,t,n){var c,f,d,p,h=e&l.F,m=e&l.G,v=e&l.S,y=e&l.P,g=e&l.B,_=m?r:v?r[t]||(r[t]={}):(r[t]||{})[u],b=m?o:o[t]||(o[t]={}),w=b[u]||(b[u]={});m&&(n=t);for(c in n)f=!h&&_&&c in _,d=(f?_:n)[c],p=g&&f?s(d,r):y&&"function"==typeof d?s(Function.call,d):d,_&&!f&&a(_,c,d),b[c]!=d&&i(b,c,p),y&&w[c]!=d&&(w[c]=d)};r.core=o,l.F=1,l.G=2,l.S=4,l.P=8,l.B=16,l.W=32,e.exports=l},function(e,t,n){"use strict";function r(e,t,n,r,o,i,a,s){if(!e){var u;if(void 0===t)u=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=[n,r,o,i,a,s],c=0;u=new Error(t.replace(/%s/g,function(){return l[c++]})),u.name="Invariant Violation"}throw u.framesToPop=1,u}}e.exports=r},function(e,t){var n=Object;e.exports={create:n.create,getProto:n.getPrototypeOf,isEnum:{}.propertyIsEnumerable,getDesc:n.getOwnPropertyDescriptor,setDesc:n.defineProperty,setDescs:n.defineProperties,getKeys:n.keys,getNames:n.getOwnPropertyNames,getSymbols:n.getOwnPropertySymbols,each:[].forEach}},function(e,t,n){"use strict";var r=n(30),o=r;e.exports=o},function(e,t){"use strict";function n(e,t){if(null==e)throw new TypeError("Object.assign target cannot be null or undefined");for(var n=Object(e),r=Object.prototype.hasOwnProperty,o=1;ot.maxLineLength&&(t.maxLineLength=n,t.maxLine=e)})}function p(e){var t=jo(e.gutters,"CodeMirror-linenumbers");t==-1&&e.lineNumbers?e.gutters=e.gutters.concat(["CodeMirror-linenumbers"]):t>-1&&!e.lineNumbers&&(e.gutters=e.gutters.slice(0),e.gutters.splice(t,1))}function h(e){var t=e.display,n=t.gutters.offsetWidth,r=Math.round(e.doc.height+Be(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+Ve(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:n}}function m(e,t,n){this.cm=n;var r=this.vert=Uo("div",[Uo("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),o=this.horiz=Uo("div",[Uo("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");e(r),e(o),Oa(r,"scroll",function(){r.clientHeight&&t(r.scrollTop,"vertical")}),Oa(o,"scroll",function(){o.clientWidth&&t(o.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,_i&&bi<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")}function v(){}function y(t){t.display.scrollbars&&(t.display.scrollbars.clear(),t.display.scrollbars.addClass&&$a(t.display.wrapper,t.display.scrollbars.addClass)),t.display.scrollbars=new e.scrollbarModel[t.options.scrollbarStyle](function(e){t.display.wrapper.insertBefore(e,t.display.scrollbarFiller),Oa(e,"mousedown",function(){t.state.focused&&setTimeout(function(){t.display.input.focus()},0)}),e.setAttribute("cm-not-content","true")},function(e,n){"horizontal"==n?on(t,e):rn(t,e)},t),t.display.scrollbars.addClass&&Xa(t.display.wrapper,t.display.scrollbars.addClass)}function g(e,t){t||(t=h(e));var n=e.display.barWidth,r=e.display.barHeight;_(e,t);for(var o=0;o<4&&n!=e.display.barWidth||r!=e.display.barHeight;o++)n!=e.display.barWidth&&e.options.lineWrapping&&C(e),_(e,h(e)),n=e.display.barWidth,r=e.display.barHeight}function _(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=""}function b(e,t,n){var r=n&&null!=n.top?Math.max(0,n.top):e.scroller.scrollTop;r=Math.floor(r-Ue(e));var o=n&&null!=n.bottom?n.bottom:r+e.wrapper.clientHeight,i=no(t,r),a=no(t,o);if(n&&n.ensure){var s=n.ensure.from.line,u=n.ensure.to.line;s=a&&(i=no(t,ro($r(t,u))-e.wrapper.clientHeight),a=u)}return{from:i,to:Math.max(a,i+1)}}function w(e){var t=e.display,n=t.view;if(t.alignWidgets||t.gutters.firstChild&&e.options.fixedGutter){for(var r=k(t)-t.scroller.scrollLeft+e.doc.scrollLeft,o=t.gutters.offsetWidth,i=r+"px",a=0;a=n.viewFrom&&t.visible.to<=n.viewTo&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo)&&n.renderedView==n.view&&0==zt(e))return!1;M(e)&&(It(e),t.dims=Y(e));var o=r.first+r.size,i=Math.max(t.visible.from-e.options.viewportMargin,r.first),a=Math.min(o,t.visible.to+e.options.viewportMargin);n.viewFroma&&n.viewTo-a<20&&(a=Math.min(o,n.viewTo)),Ii&&(i=br(e.doc,i),a=wr(e.doc,a));var s=i!=n.viewFrom||a!=n.viewTo||n.lastWrapHeight!=t.wrapperHeight||n.lastWrapWidth!=t.wrapperWidth;Ht(e,i,a),n.viewOffset=ro($r(e.doc,n.viewFrom)),e.display.mover.style.top=n.viewOffset+"px";var u=zt(e);if(!s&&0==u&&!t.force&&n.renderedView==n.view&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo))return!1;var l=Vo();return u>4&&(n.lineDiv.style.display="none"),j(e,n.updateLineNumbers,t.dims),u>4&&(n.lineDiv.style.display=""),n.renderedView=n.view,l&&Vo()!=l&&l.offsetHeight&&l.focus(),Bo(n.cursorDiv),Bo(n.selectionDiv),n.gutters.style.height=n.sizer.style.minHeight=0,s&&(n.lastWrapHeight=t.wrapperHeight,n.lastWrapWidth=t.wrapperWidth,Fe(e,400)),n.updateLineNumbers=null,!0}function T(e,t){for(var n=t.viewport,r=!0;(r&&e.options.lineWrapping&&t.oldDisplayWidth!=Ge(e)||(n&&null!=n.top&&(n={top:Math.min(e.doc.height+Be(e.display)-Ke(e),n.top)}),t.visible=b(e.display,e.doc,n),!(t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)))&&E(e,t);r=!1){C(e);var o=h(e);je(e),g(e,o),O(e,o)}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 D(e,t){var n=new L(e,t);if(E(e,n)){C(e),T(e,n);var r=h(e);je(e),g(e,r),O(e,r),n.finish()}}function O(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+Ve(e)+"px"}function C(e){for(var t=e.display,n=t.lineDiv.offsetTop,r=0;r.001||u<-.001)&&(eo(i.line,o),P(i.line),i.rest))for(var l=0;l-1&&(d=!1),A(e,f,l,n)),d&&(Bo(f.lineNumber),f.lineNumber.appendChild(document.createTextNode(x(e.options,l)))),s=f.node.nextSibling}else{var p=U(e,f,l,n);a.insertBefore(p,s)}l+=f.size}for(;s;)s=r(s)}function A(e,t,n,r){for(var o=0;o1)if(Hi&&Hi.text.join("\n")==t){if(r.ranges.length%Hi.text.length==0){u=[];for(var l=0;l=0;l--){var c=r.ranges[l],f=c.from(),d=c.to();c.empty()&&(n&&n>0?f=Ri(f.line,f.ch-n):e.state.overwrite&&!a?d=Ri(d.line,Math.min($r(i,d.line).text.length,d.ch+Yo(s).length)):Hi&&Hi.lineWise&&Hi.text.join("\n")==t&&(f=d=Ri(f.line,0)));var p=e.curOp.updateInput,h={from:f,to:d,text:u?u[l%u.length]:s,origin:o||(a?"paste":e.state.cutIncoming?"cut":"+input")};Sn(e.doc,h),Lo(e,"inputRead",e,h)}t&&!a&&Z(e,t),Rn(e),e.curOp.updateInput=p,e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=!1}function X(e,t){var n=e.clipboardData&&e.clipboardData.getData("text/plain");if(n)return e.preventDefault(),t.isReadOnly()||t.options.disableInput||Dt(t,function(){$(t,n,0,null,"paste")}),!0}function Z(e,t){if(e.options.electricChars&&e.options.smartIndent)for(var n=e.doc.sel,r=n.ranges.length-1;r>=0;r--){var o=n.ranges[r];if(!(o.head.ch>100||r&&n.ranges[r-1].head.line==o.head.line)){var i=e.getModeAt(o.head),a=!1;if(i.electricChars){for(var s=0;s-1){a=Hn(e,o.head.line,"smart");break}}else i.electricInput&&i.electricInput.test($r(e.doc,o.head.line).text.slice(0,o.head.ch))&&(a=Hn(e,o.head.line,"smart"));a&&Lo(e,"electricInput",e,o.head.line)}}}function ee(e){for(var t=[],n=[],r=0;r=0){var a=J(i.from(),o.from()),s=K(i.to(),o.to()),u=i.empty()?o.from()==o.head:i.from()==i.head;r<=t&&--t,e.splice(--r,2,new fe(u?s:a,u?a:s))}}return new ce(e,t)}function pe(e,t){return new ce([new fe(e,t||e)],0)}function he(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function me(e,t){if(t.linen?Ri(n,$r(e,n).text.length):ve(t,$r(e,t.line).text.length)}function ve(e,t){var n=e.ch;return null==n||n>t?Ri(e.line,t):n<0?Ri(e.line,0):e}function ye(e,t){return t>=e.first&&t=t.ch:s.to>t.ch))){if(o&&(Ya(u,"beforeCursorEnter"),u.explicitlyCleared)){if(i.markedSpans){--a;continue}break}if(!u.atomic)continue;if(n){var l,c=u.find(r<0?1:-1);if((r<0?u.inclusiveRight:u.inclusiveLeft)&&(c=Ye(e,c,-r,c&&c.line==t.line?i:null)),c&&c.line==t.line&&(l=Fi(c,n))&&(r<0?l<0:l>0))return Ce(e,c,t,r,o)}var f=u.find(r<0?-1:1);return(r<0?u.inclusiveLeft:u.inclusiveRight)&&(f=Ye(e,f,r,f.line==t.line?i:null)),f?Ce(e,f,t,r,o):null}}return t}function Pe(e,t,n,r,o){var i=r||1,a=Ce(e,t,n,i,o)||!o&&Ce(e,t,n,i,!0)||Ce(e,t,n,-i,o)||!o&&Ce(e,t,n,-i,!0);return a?a:(e.cantEdit=!0,Ri(e.first,0))}function Ye(e,t,n,r){return n<0&&0==t.ch?t.line>e.first?me(e,Ri(t.line-1)):null:n>0&&t.ch==(r||$r(e,t.line)).text.length?t.line=e.display.viewTo||s.to().line3&&(r(p,m.top,null,m.bottom),p=l,m.bottomu.bottom||f.bottom==u.bottom&&f.right>u.right)&&(u=f),p0?t.blinker=setInterval(function(){t.cursorDiv.style.visibility=(n=!n)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function Fe(e,t){e.doc.mode.startState&&e.doc.frontier=e.display.viewTo)){var n=+new Date+e.options.workTime,r=ua(t.mode,We(e,t.frontier)),o=[];t.iter(t.frontier,Math.min(t.first+t.size,e.display.viewTo+500),function(i){if(t.frontier>=e.display.viewFrom){var a=i.styles,s=i.text.length>e.options.maxHighlightLength,u=jr(e,i,s?ua(t.mode,r):r,!0);i.styles=u.styles;var l=i.styleClasses,c=u.classes;c?i.styleClasses=c:l&&(i.styleClasses=null);for(var f=!a||a.length!=i.styles.length||l!=c&&(!l||!c||l.bgClass!=c.bgClass||l.textClass!=c.textClass),d=0;!f&&dn)return Fe(e,e.options.workDelay),!0}),o.length&&Dt(e,function(){for(var t=0;ta;--s){if(s<=i.first)return i.first;var u=$r(i,s-1);if(u.stateAfter&&(!n||s<=i.frontier))return s;var l=Ha(u.text,null,e.options.tabSize);(null==o||r>l)&&(o=s-1,r=l)}return o}function We(e,t,n){var r=e.doc,o=e.display;if(!r.mode.startState)return!0;var i=ze(e,t,n),a=i>r.first&&$r(r,i-1).stateAfter;return a=a?ua(r.mode,a):la(r.mode),r.iter(i,t,function(n){Nr(e,n.text,a);var s=i==t-1||i%5==0||i>=o.viewFrom&&i2&&i.push((u.bottom+l.top)/2-n.top)}}i.push(n.bottom-n.top)}}function Qe(e,t,n){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};for(var r=0;rn)return{map:e.measure.maps[r],cache:e.measure.caches[r],before:!0}}function $e(e,t){t=gr(t);var n=to(t),r=e.display.externalMeasured=new Yt(e.doc,t,n);r.lineN=n;var o=r.built=Rr(e,r);return r.text=o.pre,qo(e.display.lineMeasure,o.pre),r}function Xe(e,t,n,r){return tt(e,et(e,t),n,r)}function Ze(e,t){if(t>=e.display.viewFrom&&t=n.lineN&&tt)&&(i=l-u,o=i-1,t>=l&&(a="right")),null!=o){if(r=e[s+2],u==l&&n==(r.insertLeft?"left":"right")&&(a=n),"left"==n&&0==o)for(;s&&e[s-2]==e[s-3]&&e[s-1].insertLeft;)r=e[(s-=3)+2],a="left";if("right"==n&&o==l-u)for(;s0&&(l=r="right");var f;o=e.options.lineWrapping&&(f=a.getClientRects()).length>1?f["right"==r?f.length-1:0]:a.getBoundingClientRect()}if(_i&&bi<9&&!s&&(!o||!o.left&&!o.right)){var d=a.parentNode.getClientRects()[0];o=d?{left:d.left,right:d.left+_t(e.display),top:d.top,bottom:d.bottom}:Bi}for(var p=o.top-t.rect.top,h=o.bottom-t.rect.top,m=(p+h)/2,v=t.view.measure.heights,c=0;cn.from?a(e-1):a(e,r)}r=r||$r(e.doc,t.line),o||(o=et(e,r));var u=oo(r),l=t.ch;if(!u)return a(l);var c=ci(u,l),f=s(l,c);return null!=as&&(f.other=s(l,as)),f}function ht(e,t){var n=0,t=me(e.doc,t);e.options.lineWrapping||(n=_t(e.display)*t.ch);var r=$r(e.doc,t.line),o=ro(r)+Ue(e.display);return{left:n,right:n,top:o,bottom:o+r.height}}function mt(e,t,n,r){var o=Ri(e,t);return o.xRel=r,n&&(o.outside=!0),o}function vt(e,t,n){var r=e.doc;if(n+=e.display.viewOffset,n<0)return mt(r.first,0,!0,-1);var o=no(r,n),i=r.first+r.size-1;if(o>i)return mt(r.first+r.size-1,$r(r,i).text.length,!0,1);t<0&&(t=0);for(var a=$r(r,o);;){var s=yt(e,a,o,t,n),u=vr(a),l=u&&u.find(0,!0);if(!u||!(s.ch>l.from.ch||s.ch==l.from.ch&&s.xRel>0))return s;o=to(a=l.to.line)}}function yt(e,t,n,r,o){function i(r){var o=pt(e,Ri(n,r),"line",t,l);return s=!0,a>o.bottom?o.left-u:av)return mt(n,p,y,1);for(;;){if(c?p==d||p==di(t,d,1):p-d<=1){var g=r0&&g1){var w=tt(e,l,g,"right");a<=w.bottom&&a>=w.top&&Math.abs(r-w.right)1?1:0);return M}var x=Math.ceil(f/2),k=d+x;if(c){k=d;for(var L=0;Lr?(p=k,v=S,(y=s)&&(v+=1e3),f=x):(d=k,h=S,m=s,f-=x)}}function gt(e){if(null!=e.cachedTextHeight)return e.cachedTextHeight;if(null==zi){zi=Uo("pre");for(var t=0;t<49;++t)zi.appendChild(document.createTextNode("x")),zi.appendChild(Uo("br"));zi.appendChild(document.createTextNode("x"))}qo(e.measure,zi);var n=zi.offsetHeight/50;return n>3&&(e.cachedTextHeight=n),Bo(e.measure),n||1}function _t(e){if(null!=e.cachedCharWidth)return e.cachedCharWidth; -var t=Uo("span","xxxxxxxxxx"),n=Uo("pre",[t]);qo(e.measure,n);var r=t.getBoundingClientRect(),o=(r.right-r.left)/10;return o>2&&(e.cachedCharWidth=o),o||10}function bt(e){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:++Vi},qi?qi.ops.push(e.curOp):e.curOp.ownsGroup=qi={ops:[e.curOp],delayedCallbacks:[]}}function wt(e){var t=e.delayedCallbacks,n=0;do{for(;n=n.viewTo)||n.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new L(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function Lt(e){e.updatedDisplay=e.mustUpdate&&E(e.cm,e.update)}function St(e){var t=e.cm,n=t.display;e.updatedDisplay&&C(t),e.barMeasure=h(t),n.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=Xe(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+Ve(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+e.adjustWidthTo-Ge(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=n.input.prepareSelection(e.focus))}function Et(e){var t=e.cm;null!=e.adjustWidthTo&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeftt)&&(o.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=o.viewTo)Ii&&br(e.doc,t)o.viewFrom?It(e):(o.viewFrom+=r,o.viewTo+=r);else if(t<=o.viewFrom&&n>=o.viewTo)It(e);else if(t<=o.viewFrom){var i=Ft(e,n,n+r,1);i?(o.view=o.view.slice(i.index),o.viewFrom=i.lineN,o.viewTo+=r):It(e)}else if(n>=o.viewTo){var i=Ft(e,t,t,-1);i?(o.view=o.view.slice(0,i.index),o.viewTo=i.lineN):It(e)}else{var a=Ft(e,t,t,-1),s=Ft(e,n,n+r,1);a&&s?(o.view=o.view.slice(0,a.index).concat(jt(e,a.lineN,s.lineN)).concat(o.view.slice(s.index)),o.viewTo+=r):It(e)}var u=o.externalMeasured;u&&(n=o.lineN&&t=r.viewTo)){var i=r.view[Rt(e,t)];if(null!=i.node){var a=i.changes||(i.changes=[]);jo(a,n)==-1&&a.push(n)}}}function It(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function Rt(e,t){if(t>=e.display.viewTo)return null;if(t-=e.display.viewFrom,t<0)return null;for(var n=e.display.view,r=0;r0){if(i==a.length-1)return null;o=u+a[i].size-t,i++}else o=u-t;t+=o,n+=o}for(;br(e.doc,n)!=n;){if(i==(r<0?0:a.length-1))return null;n+=r*a[i-(r<0?1:0)].size,i+=r}return{index:i,lineN:n}}function Ht(e,t,n){var r=e.display,o=r.view;0==o.length||t>=r.viewTo||n<=r.viewFrom?(r.view=jt(e,t,n),r.viewFrom=t):(r.viewFrom>t?r.view=jt(e,t,r.viewFrom).concat(r.view):r.viewFromn&&(r.view=r.view.slice(0,Rt(e,n)))),r.viewTo=n}function zt(e){for(var t=e.display.view,n=0,r=0;r400}var o=e.display;Oa(o.scroller,"mousedown",Ot(e,Gt)),_i&&bi<11?Oa(o.scroller,"dblclick",Ot(e,function(t){if(!Eo(e,t)){var n=Vt(e,t);if(n&&!Xt(e,t)&&!qt(e.display,t)){Ea(t);var r=e.findWordAt(n);be(e.doc,r.anchor,r.head)}}})):Oa(o.scroller,"dblclick",function(t){Eo(e,t)||Ea(t)}),Ai||Oa(o.scroller,"contextmenu",function(t){_n(e,t)});var i,a={end:0};Oa(o.scroller,"touchstart",function(t){if(!Eo(e,t)&&!n(t)){clearTimeout(i);var r=+new Date;o.activeTouch={start:r,moved:!1,prev:r-a.end<=300?a:null},1==t.touches.length&&(o.activeTouch.left=t.touches[0].pageX,o.activeTouch.top=t.touches[0].pageY)}}),Oa(o.scroller,"touchmove",function(){o.activeTouch&&(o.activeTouch.moved=!0)}),Oa(o.scroller,"touchend",function(n){var i=o.activeTouch;if(i&&!qt(o,n)&&null!=i.left&&!i.moved&&new Date-i.start<300){var a,s=e.coordsChar(o.activeTouch,"page");a=!i.prev||r(i,i.prev)?new fe(s,s):!i.prev.prev||r(i,i.prev.prev)?e.findWordAt(s):new fe(Ri(s.line,0),me(e.doc,Ri(s.line+1,0))),e.setSelection(a.anchor,a.head),e.focus(),Ea(n)}t()}),Oa(o.scroller,"touchcancel",t),Oa(o.scroller,"scroll",function(){o.scroller.clientHeight&&(rn(e,o.scroller.scrollTop),on(e,o.scroller.scrollLeft,!0),Ya(e,"scroll",e))}),Oa(o.scroller,"mousewheel",function(t){an(e,t)}),Oa(o.scroller,"DOMMouseScroll",function(t){an(e,t)}),Oa(o.wrapper,"scroll",function(){o.wrapper.scrollTop=o.wrapper.scrollLeft=0}),o.dragFunctions={enter:function(t){Eo(e,t)||Da(t)},over:function(t){Eo(e,t)||(tn(e,t),Da(t))},start:function(t){en(e,t)},drop:Ot(e,Zt),leave:function(t){Eo(e,t)||nn(e)}};var s=o.input.getField();Oa(s,"keyup",function(t){hn.call(e,t)}),Oa(s,"keydown",Ot(e,dn)),Oa(s,"keypress",Ot(e,mn)),Oa(s,"focus",Fo(yn,e)),Oa(s,"blur",Fo(gn,e))}function Ut(t,n,r){var o=r&&r!=e.Init;if(!n!=!o){var i=t.display.dragFunctions,a=n?Oa:Pa;a(t.display.scroller,"dragstart",i.start),a(t.display.scroller,"dragenter",i.enter),a(t.display.scroller,"dragover",i.over),a(t.display.scroller,"dragleave",i.leave),a(t.display.scroller,"drop",i.drop)}}function Bt(e){var t=e.display;t.lastWrapHeight==t.wrapper.clientHeight&&t.lastWrapWidth==t.wrapper.clientWidth||(t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null,t.scrollbarsClipped=!1,e.setSize())}function qt(e,t){for(var n=Mo(t);n!=e.wrapper;n=n.parentNode)if(!n||1==n.nodeType&&"true"==n.getAttribute("cm-ignore-events")||n.parentNode==e.sizer&&n!=e.mover)return!0}function Vt(e,t,n,r){var o=e.display;if(!n&&"true"==Mo(t).getAttribute("cm-not-content"))return null;var i,a,s=o.lineSpace.getBoundingClientRect();try{i=t.clientX-s.left,a=t.clientY-s.top}catch(t){return null}var u,l=vt(e,i,a);if(r&&1==l.xRel&&(u=$r(e.doc,l.line).text).length==l.ch){var c=Ha(u,u.length,e.options.tabSize)-u.length;l=Ri(l.line,Math.max(0,Math.round((i-qe(e.display).left)/_t(e.display))-c))}return l}function Gt(e){var t=this,n=t.display;if(!(Eo(t,e)||n.activeTouch&&n.input.supportsTouch())){if(n.shift=e.shiftKey,qt(n,e))return void(wi||(n.scroller.draggable=!1,setTimeout(function(){n.scroller.draggable=!0},100)));if(!Xt(t,e)){var r=Vt(t,e);switch(window.focus(),xo(e)){case 1:t.state.selectingText?t.state.selectingText(e):r?Kt(t,e,r):Mo(e)==n.scroller&&Ea(e);break;case 2:wi&&(t.state.lastMiddleDown=+new Date),r&&be(t.doc,r),setTimeout(function(){n.input.focus()},20),Ea(e);break;case 3:Ai?_n(t,e):vn(t)}}}}function Kt(e,t,n){_i?setTimeout(Fo(Q,e),0):e.curOp.focus=Vo();var r,o=+new Date;Ui&&Ui.time>o-400&&0==Fi(Ui.pos,n)?r="triple":Wi&&Wi.time>o-400&&0==Fi(Wi.pos,n)?(r="double",Ui={time:o,pos:n}):(r="single",Wi={time:o,pos:n});var i,a=e.doc.sel,s=Oi?t.metaKey:t.ctrlKey;e.options.dragDrop&&es&&!e.isReadOnly()&&"single"==r&&(i=a.contains(n))>-1&&(Fi((i=a.ranges[i]).from(),n)<0||n.xRel>0)&&(Fi(i.to(),n)>0||n.xRel<0)?Jt(e,t,n,s):Qt(e,t,n,r,s)}function Jt(e,t,n,r){var o=e.display,i=+new Date,a=Ot(e,function(s){wi&&(o.scroller.draggable=!1),e.state.draggingText=!1,Pa(document,"mouseup",a),Pa(o.scroller,"drop",a),Math.abs(t.clientX-s.clientX)+Math.abs(t.clientY-s.clientY)<10&&(Ea(s),!r&&+new Date-200g&&o.push(new fe(Ri(h,g),Ri(h,za(y,p,i))))}o.length||o.push(new fe(n,n)),Se(l,de(d.ranges.slice(0,f).concat(o),f),{origin:"*mouse",scroll:!1}),e.scrollIntoView(t)}else{var _=c,b=_.anchor,w=t;if("single"!=r){if("double"==r)var M=e.findWordAt(t);else var M=new fe(Ri(t.line,0),me(l,Ri(t.line+1,0)));Fi(M.anchor,b)>0?(w=M.head,b=J(_.from(),M.anchor)):(w=M.anchor,b=K(_.to(),M.head))}var o=d.ranges.slice(0);o[f]=new fe(me(l,b),w),Se(l,de(o,f),Ra)}}function a(t){var n=++g,o=Vt(e,t,!0,"rect"==r);if(o)if(0!=Fi(o,v)){e.curOp.focus=Vo(),i(o);var s=b(u,l);(o.line>=s.to||o.liney.bottom?20:0;c&&setTimeout(Ot(e,function(){g==n&&(u.scroller.scrollTop+=c,a(t))}),50)}}function s(t){e.state.selectingText=!1,g=1/0,Ea(t),u.input.focus(),Pa(document,"mousemove",_),Pa(document,"mouseup",w),l.history.lastSelOrigin=null}var u=e.display,l=e.doc;Ea(t);var c,f,d=l.sel,p=d.ranges;if(o&&!t.shiftKey?(f=l.sel.contains(n),c=f>-1?p[f]:new fe(n,n)):(c=l.sel.primary(),f=l.sel.primIndex),Ci?t.shiftKey&&t.metaKey:t.altKey)r="rect",o||(c=new fe(n,n)),n=Vt(e,t,!0,!0),f=-1;else if("double"==r){var h=e.findWordAt(n);c=e.display.shift||l.extend?_e(l,c,h.anchor,h.head):h}else if("triple"==r){var m=new fe(Ri(n.line,0),me(l,Ri(n.line+1,0)));c=e.display.shift||l.extend?_e(l,c,m.anchor,m.head):m}else c=_e(l,c,n);o?f==-1?(f=p.length,Se(l,de(p.concat([c]),f),{scroll:!1,origin:"*mouse"})):p.length>1&&p[f].empty()&&"single"==r&&!t.shiftKey?(Se(l,de(p.slice(0,f).concat(p.slice(f+1)),0),{scroll:!1,origin:"*mouse"}),d=l.sel):Me(l,f,c,Ra):(f=0,Se(l,new ce([c],0),Ra),d=l.sel);var v=n,y=u.wrapper.getBoundingClientRect(),g=0,_=Ot(e,function(e){xo(e)?a(e):s(e)}),w=Ot(e,s);e.state.selectingText=w,Oa(document,"mousemove",_),Oa(document,"mouseup",w)}function $t(e,t,n,r){try{var o=t.clientX,i=t.clientY}catch(t){return!1}if(o>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;r&&Ea(t);var a=e.display,s=a.lineDiv.getBoundingClientRect();if(i>s.bottom||!Do(e,n))return wo(t);i-=s.top-a.viewOffset;for(var u=0;u=o){var c=no(e.doc,i),f=e.options.gutters[u];return Ya(e,n,e,c,f,t),wo(t)}}}function Xt(e,t){return $t(e,t,"gutterClick",!0)}function Zt(e){var t=this;if(nn(t),!Eo(t,e)&&!qt(t.display,e)){Ea(e),_i&&(Gi=+new Date);var n=Vt(t,e,!0),r=e.dataTransfer.files;if(n&&!t.isReadOnly())if(r&&r.length&&window.FileReader&&window.File)for(var o=r.length,i=Array(o),a=0,s=function(e,r){if(!t.options.allowDropFileTypes||jo(t.options.allowDropFileTypes,e.type)!=-1){var s=new FileReader;s.onload=Ot(t,function(){var e=s.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(e)&&(e=""),i[r]=e,++a==o){n=me(t.doc,n);var u={from:n,to:n,text:t.doc.splitLines(i.join(t.doc.lineSeparator())),origin:"paste"};Sn(t.doc,u),Le(t.doc,pe(n,Zi(u)))}}),s.readAsText(e)}},u=0;u-1)return t.state.draggingText(e),void setTimeout(function(){t.display.input.focus()},20);try{var i=e.dataTransfer.getData("Text");if(i){if(t.state.draggingText&&!t.state.draggingText.copy)var l=t.listSelections();if(Ee(t.doc,pe(n,n)),l)for(var u=0;ua.clientWidth,u=a.scrollHeight>a.clientHeight;if(r&&s||o&&u){if(o&&Oi&&wi)e:for(var l=t.target,c=i.view;l!=a;l=l.parentNode)for(var f=0;f=0;--o)En(e,{from:r[o].from,to:r[o].to,text:o?[""]:t.text});else En(e,t)}}function En(e,t){if(1!=t.text.length||""!=t.text[0]||0!=Fi(t.from,t.to)){var n=Mn(e,t);lo(e,t,n,e.cm?e.cm.curOp.id:NaN),On(e,t,n,ir(e,t));var r=[];Jr(e,function(e,n){n||jo(r,e.history)!=-1||(bo(e.history,t),r.push(e.history)),On(e,t,null,ir(e,t))})}}function Tn(e,t,n){if(!e.cm||!e.cm.state.suppressEdits){for(var r,o=e.history,i=e.sel,a="undo"==t?o.done:o.undone,s="undo"==t?o.undone:o.done,u=0;u=0;--u){var f=r.changes[u];if(f.origin=t,c&&!Ln(e,f,!1))return void(a.length=0);l.push(ao(e,f));var d=u?Mn(e,f):Yo(a);On(e,f,d,sr(e,f)),!u&&e.cm&&e.cm.scrollIntoView({from:f.from,to:Zi(f)});var p=[];Jr(e,function(e,t){t||jo(p,e.history)!=-1||(bo(e.history,f),p.push(e.history)),On(e,f,null,sr(e,f))})}}}}function Dn(e,t){if(0!=t&&(e.first+=t,e.sel=new ce(Ao(e.sel.ranges,function(e){return new fe(Ri(e.anchor.line+t,e.anchor.ch),Ri(e.head.line+t,e.head.ch))}),e.sel.primIndex),e.cm)){At(e.cm,e.first,e.first-t,t);for(var n=e.cm.display,r=n.viewFrom;re.lastLine())){if(t.from.linei&&(t={from:t.from,to:Ri(i,$r(e,i).text.length),text:[t.text[0]],origin:t.origin}),t.removed=Xr(e,t.from,t.to),n||(n=Mn(e,t)),e.cm?Cn(e.cm,t,r):Vr(e,t,r),Ee(e,n,Ia)}}function Cn(e,t,n){var r=e.doc,o=e.display,a=t.from,s=t.to,u=!1,l=a.line;e.options.lineWrapping||(l=to(gr($r(r,a.line))),r.iter(l,s.line+1,function(e){if(e==o.maxLine)return u=!0,!0})),r.sel.contains(t.from,t.to)>-1&&To(e),Vr(r,t,n,i(e)),e.options.lineWrapping||(r.iter(l,a.line+t.text.length,function(e){var t=f(e);t>o.maxLineLength&&(o.maxLine=e,o.maxLineLength=t,o.maxLineChanged=!0,u=!1)}),u&&(e.curOp.updateMaxLine=!0)),r.frontier=Math.min(r.frontier,a.line),Fe(e,400);var c=t.text.length-(s.line-a.line)-1;t.full?At(e):a.line!=s.line||1!=t.text.length||qr(e.doc,t)?At(e,a.line,s.line+1,c):Nt(e,a.line,"text");var d=Do(e,"changes"),p=Do(e,"change");if(p||d){var h={from:a,to:s,text:t.text,removed:t.removed,origin:t.origin};p&&Lo(e,"change",e,h),d&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(h)}e.display.selForContextMenu=null}function Pn(e,t,n,r,o){if(r||(r=n),Fi(r,n)<0){var i=r;r=n,n=i}"string"==typeof t&&(t=e.splitLines(t)),Sn(e,{from:n,to:r,text:t,origin:o})}function Yn(e,t){if(!Eo(e,"scrollCursorIntoView")){var n=e.display,r=n.sizer.getBoundingClientRect(),o=null;if(t.top+r.top<0?o=!0:t.bottom+r.top>(window.innerHeight||document.documentElement.clientHeight)&&(o=!1),null!=o&&!Ei){var i=Uo("div","​",null,"position: absolute; top: "+(t.top-n.viewOffset-Ue(e.display))+"px; height: "+(t.bottom-t.top+Ve(e)+n.barHeight)+"px; left: "+t.left+"px; width: 2px;");e.display.lineSpace.appendChild(i),i.scrollIntoView(o),e.display.lineSpace.removeChild(i)}}}function jn(e,t,n,r){null==r&&(r=0);for(var o=0;o<5;o++){var i=!1,a=pt(e,t),s=n&&n!=t?pt(e,n):a,u=Nn(e,Math.min(a.left,s.left),Math.min(a.top,s.top)-r,Math.max(a.left,s.left),Math.max(a.bottom,s.bottom)+r),l=e.doc.scrollTop,c=e.doc.scrollLeft;if(null!=u.scrollTop&&(rn(e,u.scrollTop),Math.abs(e.doc.scrollTop-l)>1&&(i=!0)),null!=u.scrollLeft&&(on(e,u.scrollLeft),Math.abs(e.doc.scrollLeft-c)>1&&(i=!0)),!i)break}return a}function An(e,t,n,r,o){var i=Nn(e,t,n,r,o);null!=i.scrollTop&&rn(e,i.scrollTop),null!=i.scrollLeft&&on(e,i.scrollLeft)}function Nn(e,t,n,r,o){var i=e.display,a=gt(e.display);n<0&&(n=0);var s=e.curOp&&null!=e.curOp.scrollTop?e.curOp.scrollTop:i.scroller.scrollTop,u=Ke(e),l={};o-n>u&&(o=n+u);var c=e.doc.height+Be(i),f=nc-a;if(ns+u){var p=Math.min(n,(d?c:o)-u);p!=s&&(l.scrollTop=p)}var h=e.curOp&&null!=e.curOp.scrollLeft?e.curOp.scrollLeft:i.scroller.scrollLeft,m=Ge(e)-(e.options.fixedGutter?i.gutters.offsetWidth:0),v=r-t>m;return v&&(r=t+m),t<10?l.scrollLeft=0:tm+h-3&&(l.scrollLeft=r+(v?0:10)-m),l}function In(e,t,n){null==t&&null==n||Fn(e),null!=t&&(e.curOp.scrollLeft=(null==e.curOp.scrollLeft?e.doc.scrollLeft:e.curOp.scrollLeft)+t),null!=n&&(e.curOp.scrollTop=(null==e.curOp.scrollTop?e.doc.scrollTop:e.curOp.scrollTop)+n)}function Rn(e){Fn(e);var t=e.getCursor(),n=t,r=t;e.options.lineWrapping||(n=t.ch?Ri(t.line,t.ch-1):t,r=Ri(t.line,t.ch+1)),e.curOp.scrollToPos={from:n,to:r,margin:e.options.cursorScrollMargin,isCursor:!0}}function Fn(e){var t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null;var n=ht(e,t.from),r=ht(e,t.to),o=Nn(e,Math.min(n.left,r.left),Math.min(n.top,r.top)-t.margin,Math.max(n.right,r.right),Math.max(n.bottom,r.bottom)+t.margin);e.scrollTo(o.scrollLeft,o.scrollTop)}}function Hn(e,t,n,r){var o,i=e.doc;null==n&&(n="add"),"smart"==n&&(i.mode.indent?o=We(e,t):n="prev");var a=e.options.tabSize,s=$r(i,t),u=Ha(s.text,null,a);s.stateAfter&&(s.stateAfter=null);var l,c=s.text.match(/^\s*/)[0];if(r||/\S/.test(s.text)){if("smart"==n&&(l=i.mode.indent(o,s.text.slice(c.length),s.text),l==Na||l>150)){if(!r)return;n="prev"}}else l=0,n="not";"prev"==n?l=t>i.first?Ha($r(i,t-1).text,null,a):0:"add"==n?l=u+e.options.indentUnit:"subtract"==n?l=u-e.options.indentUnit:"number"==typeof n&&(l=u+n),l=Math.max(0,l);var f="",d=0;if(e.options.indentWithTabs)for(var p=Math.floor(l/a);p;--p)d+=a,f+="\t";if(d=0;t--)Pn(e.doc,"",r[t].from,r[t].to,"+delete");Rn(e)})}function Un(e,t,n,r,o){function i(){var t=s+n;return!(t=e.first+e.size)&&(s=t,c=$r(e,t))}function a(e){var t=(o?di:pi)(c,u,n,!0);if(null==t){if(e||!i())return!1;u=o?(n<0?ii:oi)(c):n<0?c.text.length:0}else u=t;return!0}var s=t.line,u=t.ch,l=n,c=$r(e,s);if("char"==r)a();else if("column"==r)a(!0);else if("word"==r||"group"==r)for(var f=null,d="group"==r,p=e.cm&&e.cm.getHelper(t,"wordChars"),h=!0;!(n<0)||a(!h);h=!1){var m=c.text.charAt(u)||"\n",v=Ho(m,p)?"w":d&&"\n"==m?"n":!d||/\s/.test(m)?null:"p";if(!d||h||v||(v="s"),f&&f!=v){n<0&&(n=1,a());break}if(v&&(f=v),n>0&&!a(!h))break}var y=Pe(e,Ri(s,u),t,l,!0);return Fi(t,y)||(y.hitSide=!0),y}function Bn(e,t,n,r){var o,i=e.doc,a=t.left;if("page"==r){var s=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight);o=t.top+n*(s-(n<0?1.5:.5)*gt(e.display))}else"line"==r&&(o=n>0?t.bottom+3:t.top-3);for(;;){var u=vt(e,a,o);if(!u.outside)break;if(n<0?o<=0:o>=i.height){u.hitSide=!0;break}o+=5*n}return u}function qn(t,n,r,o){e.defaults[t]=n,r&&(ta[t]=o?function(e,t,n){n!=na&&r(e,t,n)}:r)}function Vn(e){for(var t,n,r,o,i=e.split(/-(?!$)/),e=i[i.length-1],a=0;a0||0==a&&i.clearWhenEmpty!==!1)return i;if(i.replacedWith&&(i.collapsed=!0,i.widgetNode=Uo("span",[i.replacedWith],"CodeMirror-widget"),r.handleMouseEvents||i.widgetNode.setAttribute("cm-ignore-events","true"),r.insertLeft&&(i.widgetNode.insertLeft=!0)),i.collapsed){if(yr(e,t.line,t,n,i)||t.line!=n.line&&yr(e,n.line,t,n,i))throw new Error("Inserting collapsed marker partially overlapping an existing one");Ii=!0}i.addToHistory&&lo(e,{from:t,to:n,origin:"markText"},e.sel,NaN);var s,u=t.line,l=e.cm;if(e.iter(u,n.line+1,function(e){l&&i.collapsed&&!l.options.lineWrapping&&gr(e)==l.display.maxLine&&(s=!0),i.collapsed&&u!=t.line&&eo(e,0),nr(e,new Zn(i,u==t.line?t.ch:null,u==n.line?n.ch:null)),++u}),i.collapsed&&e.iter(t.line,n.line+1,function(t){Mr(e,t)&&eo(t,0)}),i.clearOnEnter&&Oa(i,"beforeCursorEnter",function(){i.clear()}),i.readOnly&&(Ni=!0,(e.history.done.length||e.history.undone.length)&&e.clearHistory()),i.collapsed&&(i.id=++va,i.atomic=!0),l){if(s&&(l.curOp.updateMaxLine=!0),i.collapsed)At(l,t.line,n.line+1);else if(i.className||i.title||i.startStyle||i.endStyle||i.css)for(var c=t.line;c<=n.line;c++)Nt(l,c,"text");i.atomic&&De(l.doc),Lo(l,"markerAdded",l,i)}return i}function Jn(e,t,n,r,o){r=Ro(r),r.shared=!1;var i=[Kn(e,t,n,r,o)],a=i[0],s=r.widgetNode;return Jr(e,function(e){s&&(r.widgetNode=s.cloneNode(!0)),i.push(Kn(e,me(e,t),me(e,n),r,o));for(var u=0;u=t:i.to>t);(r||(r=[])).push(new Zn(a,i.from,u?null:i.to))}}return r}function or(e,t,n){if(e)for(var r,o=0;o=t:i.to>t);if(s||i.from==t&&"bookmark"==a.type&&(!n||i.marker.insertLeft)){var u=null==i.from||(a.inclusiveLeft?i.from<=t:i.from0&&s)for(var f=0;f0)){var c=[u,1],f=Fi(l.from,s.from),d=Fi(l.to,s.to);(f<0||!a.inclusiveLeft&&!f)&&c.push({from:l.from,to:s.from}),(d>0||!a.inclusiveRight&&!d)&&c.push({from:s.to,to:l.to}),o.splice.apply(o,c),u+=c.length-1}}return o}function lr(e){var t=e.markedSpans;if(t){for(var n=0;n=0&&f<=0||c<=0&&f>=0)&&(c<=0&&(u.marker.inclusiveRight&&o.inclusiveLeft?Fi(l.to,n)>=0:Fi(l.to,n)>0)||c>=0&&(u.marker.inclusiveRight&&o.inclusiveLeft?Fi(l.from,r)<=0:Fi(l.from,r)<0)))return!0}}}function gr(e){for(var t;t=mr(e);)e=t.find(-1,!0).line;return e}function _r(e){for(var t,n;t=vr(e);)e=t.find(1,!0).line,(n||(n=[])).push(e);return n}function br(e,t){var n=$r(e,t),r=gr(n);return n==r?t:to(r)}function wr(e,t){if(t>e.lastLine())return t;var n,r=$r(e,t);if(!Mr(e,r))return t;for(;n=vr(r);)r=n.find(1,!0).line;return to(r)+1}function Mr(e,t){var n=Ii&&t.markedSpans;if(n)for(var r,o=0;on.start)return a}throw new Error("Mode "+t.name+" failed to advance stream.")}function Pr(e,t,n,r){function o(e){return{start:f.start,end:f.pos,string:f.current(),type:i||null,state:e?ua(a.mode,c):c}}var i,a=e.doc,s=a.mode;t=me(a,t);var u,l=$r(a,t.line),c=We(e,t.line,n),f=new ma(l.text,e.options.tabSize);for(r&&(u=[]);(r||f.pose.options.maxHighlightLength?(s=!1,a&&Nr(e,t,r,f.pos),f.pos=t.length,u=null):u=Dr(Cr(n,f,r,d),i),d){var p=d[0].name;p&&(u="m-"+(u?p+" "+u:p))}if(!s||c!=u){for(;le&&o.splice(u,1,e,o[u+1],r),u+=2,l=Math.min(e,r)}if(t)if(s.opaque)o.splice(n,u-n,e,"cm-overlay "+t),u=n+2;else for(;ne.options.maxHighlightLength?ua(e.doc.mode,r):r);t.stateAfter=r,t.styles=o.styles,o.classes?t.styleClasses=o.classes:t.styleClasses&&(t.styleClasses=null),n===e.doc.frontier&&e.doc.frontier++}return t.styles}function Nr(e,t,n,r){var o=e.doc.mode,i=new ma(t,e.options.tabSize);for(i.start=i.pos=r||0,""==t&&Or(o,n);!i.eol();)Cr(o,i,n),i.start=i.pos}function Ir(e,t){if(!e||/^\s*$/.test(e))return null;var n=t.addModeClass?Ma:wa;return n[e]||(n[e]=e.replace(/\S+/g,"cm-$&"))}function Rr(e,t){var n=Uo("span",null,null,wi?"padding-right: .1px":null),r={pre:Uo("pre",[n],"CodeMirror-line"),content:n,col:0,pos:0,cm:e,splitSpaces:(_i||wi)&&e.getOption("lineWrapping")};t.measure={};for(var o=0;o<=(t.rest?t.rest.length:0);o++){var i,a=o?t.rest[o-1]:t.line;r.pos=0,r.addToken=Hr,Zo(e.display.measure)&&(i=oo(a))&&(r.addToken=Wr(r.addToken,i)),r.map=[];var s=t!=e.display.externalMeasured&&to(a);Br(a,r,Ar(e,a,s)),a.styleClasses&&(a.styleClasses.bgClass&&(r.bgClass=Ko(a.styleClasses.bgClass,r.bgClass||"")),a.styleClasses.textClass&&(r.textClass=Ko(a.styleClasses.textClass,r.textClass||""))),0==r.map.length&&r.map.push(0,0,r.content.appendChild(Xo(e.display.measure))),0==o?(t.measure.map=r.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(r.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(wi){var u=r.content.lastChild;(/\bcm-tab\b/.test(u.className)||u.querySelector&&u.querySelector(".cm-tab"))&&(r.content.className="cm-tab-wrap-hack")}return Ya(e,"renderLine",e,t.line,r.pre),r.pre.className&&(r.textClass=Ko(r.pre.className,r.textClass||"")),r}function Fr(e){var t=Uo("span","•","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function Hr(e,t,n,r,o,i,a){if(t){var s=e.splitSpaces?t.replace(/ {3,}/g,zr):t,u=e.cm.state.specialChars,l=!1;if(u.test(t))for(var c=document.createDocumentFragment(),f=0;;){u.lastIndex=f;var d=u.exec(t),p=d?d.index-f:t.length-f;if(p){var h=document.createTextNode(s.slice(f,f+p));_i&&bi<9?c.appendChild(Uo("span",[h])):c.appendChild(h),e.map.push(e.pos,e.pos+p,h),e.col+=p,e.pos+=p}if(!d)break;if(f+=p+1,"\t"==d[0]){var m=e.cm.options.tabSize,v=m-e.col%m,h=c.appendChild(Uo("span",Po(v),"cm-tab"));h.setAttribute("role","presentation"),h.setAttribute("cm-text","\t"),e.col+=v}else if("\r"==d[0]||"\n"==d[0]){var h=c.appendChild(Uo("span","\r"==d[0]?"␍":"␤","cm-invalidchar"));h.setAttribute("cm-text",d[0]),e.col+=1}else{var h=e.cm.options.specialCharPlaceholder(d[0]);h.setAttribute("cm-text",d[0]),_i&&bi<9?c.appendChild(Uo("span",[h])):c.appendChild(h),e.col+=1}e.map.push(e.pos,e.pos+1,h),e.pos++}else{e.col+=t.length;var c=document.createTextNode(s);e.map.push(e.pos,e.pos+t.length,c),_i&&bi<9&&(l=!0),e.pos+=t.length}if(n||r||o||l||a){var y=n||"";r&&(y+=r),o&&(y+=o);var g=Uo("span",[c],y,a);return i&&(g.title=i),e.content.appendChild(g)}e.content.appendChild(c)}}function zr(e){for(var t=" ",n=0;nl&&d.from<=l)break}if(d.to>=c)return e(n,r,o,i,a,s,u);e(n,r.slice(0,d.to-l),o,i,null,s,u),i=null,r=r.slice(d.to-l),l=d.to}}}function Ur(e,t,n,r){var o=!r&&n.widgetNode;o&&e.map.push(e.pos,e.pos+t,o),!r&&e.cm.display.input.needsContentAttribute&&(o||(o=e.content.appendChild(document.createElement("span"))),o.setAttribute("cm-marker",n.id)),o&&(e.cm.display.input.setUneditable(o),e.content.appendChild(o)),e.pos+=t}function Br(e,t,n){var r=e.markedSpans,o=e.text,i=0;if(r)for(var a,s,u,l,c,f,d,p=o.length,h=0,m=1,v="",y=0;;){if(y==h){u=l=c=f=s="",d=null,y=1/0;for(var g,_=[],b=0;bh||M.collapsed&&w.to==h&&w.from==h)?(null!=w.to&&w.to!=h&&y>w.to&&(y=w.to,l=""),M.className&&(u+=" "+M.className),M.css&&(s=(s?s+";":"")+M.css),M.startStyle&&w.from==h&&(c+=" "+M.startStyle),M.endStyle&&w.to==y&&(g||(g=[])).push(M.endStyle,w.to),M.title&&!f&&(f=M.title),M.collapsed&&(!d||pr(d.marker,M)<0)&&(d=w)):w.from>h&&y>w.from&&(y=w.from)}if(g)for(var b=0;b=p)break;for(var x=Math.min(p,y);;){if(v){var k=h+v.length;if(!d){var L=k>x?v.slice(0,x-h):v;t.addToken(t,L,a?a+u:u,c,h+L.length==y?l:"",f,s)}if(k>=x){v=v.slice(x-h),h=x;break}h=k,c=""}v=o.slice(i,i=n[m++]),a=Ir(n[m++],t.cm.options)}}else for(var m=1;m1&&e.remove(s.line+1,h-1),e.insert(s.line+1,m)}Lo(e,"change",e,t)}function Gr(e){this.lines=e,this.parent=null;for(var t=0,n=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 o=n.children[r],i=o.chunkSize();if(t1&&!e.done[e.done.length-2].ranges?(e.done.pop(),Yo(e.done)):void 0}function lo(e,t,n,r){var o=e.history;o.undone.length=0;var i,a=+new Date;if((o.lastOp==r||o.lastOrigin==t.origin&&t.origin&&("+"==t.origin.charAt(0)&&e.cm&&o.lastModTime>a-e.cm.options.historyEventDelay||"*"==t.origin.charAt(0)))&&(i=uo(o,o.lastOp==r))){var s=Yo(i.changes);0==Fi(t.from,t.to)&&0==Fi(t.from,s.to)?s.to=Zi(t):i.changes.push(ao(e,t))}else{var u=Yo(o.done);for(u&&u.ranges||po(e.sel,o.done),i={changes:[ao(e,t)],generation:o.generation},o.done.push(i);o.done.length>o.undoDepth;)o.done.shift(),o.done[0].ranges||o.done.shift()}o.done.push(n),o.generation=++o.maxGeneration,o.lastModTime=o.lastSelTime=a,o.lastOp=o.lastSelOp=r,o.lastOrigin=o.lastSelOrigin=t.origin,s||Ya(e,"historyAdded")}function co(e,t,n,r){var o=t.charAt(0);return"*"==o||"+"==o&&n.ranges.length==r.ranges.length&&n.somethingSelected()==r.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function fo(e,t,n,r){var o=e.history,i=r&&r.origin;n==o.lastSelOp||i&&o.lastSelOrigin==i&&(o.lastModTime==o.lastSelTime&&o.lastOrigin==i||co(e,i,Yo(o.done),t))?o.done[o.done.length-1]=t:po(t,o.done),o.lastSelTime=+new Date,o.lastSelOrigin=i,o.lastSelOp=n,r&&r.clearRedo!==!1&&so(o.undone)}function po(e,t){var n=Yo(t);n&&n.ranges&&n.equals(e)||t.push(e)}function ho(e,t,n,r){var o=t["spans_"+e.id],i=0;e.iter(Math.max(e.first,n),Math.min(e.first+e.size,r),function(n){n.markedSpans&&((o||(o=t["spans_"+e.id]={}))[i]=n.markedSpans),++i})}function mo(e){if(!e)return null;for(var t,n=0;n-1&&(Yo(s)[f]=c[f],delete c[f])}}}return o}function go(e,t,n,r){n0?r.slice():Ca:r||Ca}function Lo(e,t){function n(e){return function(){e.apply(null,i)}}var r=ko(e,t,!1);if(r.length){var o,i=Array.prototype.slice.call(arguments,2);qi?o=qi.delayedCallbacks:ja?o=ja:(o=ja=[],setTimeout(So,0));for(var a=0;a0}function Oo(e){e.prototype.on=function(e,t){Oa(this,e,t)},e.prototype.off=function(e,t){Pa(this,e,t)}}function Co(){this.id=null}function Po(e){for(;Wa.length<=e;)Wa.push(Yo(Wa)+" ");return Wa[e]}function Yo(e){return e[e.length-1]}function jo(e,t){for(var n=0;n-1&&Va(e))||t.test(e):Va(e)}function zo(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}function Wo(e){return e.charCodeAt(0)>=768&&Ga.test(e)}function Uo(e,t,n,r){var o=document.createElement(e);if(n&&(o.className=n),r&&(o.style.cssText=r),"string"==typeof t)o.appendChild(document.createTextNode(t));else if(t)for(var i=0;i0;--t)e.removeChild(e.firstChild);return e}function qo(e,t){return Bo(e).appendChild(t)}function Vo(){for(var e=document.activeElement;e&&e.root&&e.root.activeElement;)e=e.root.activeElement;return e}function Go(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}function Ko(e,t){for(var n=e.split(" "),r=0;r2&&!(_i&&bi<8))}var n=Ja?Uo("span","​"):Uo("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return n.setAttribute("cm-text",""),n}function Zo(e){if(null!=Qa)return Qa;var t=qo(e,document.createTextNode("AخA")),n=Ba(t,0,1).getBoundingClientRect();if(!n||n.left==n.right)return!1;var r=Ba(t,1,2).getBoundingClientRect();return Qa=r.right-n.right<3}function ei(e){if(null!=os)return os;var t=qo(e,Uo("span","x")),n=t.getBoundingClientRect(),r=Ba(t,0,1).getBoundingClientRect();return os=Math.abs(n.left-r.left)>1}function ti(e,t,n,r){if(!e)return r(t,n,"ltr");for(var o=!1,i=0;it||t==n&&a.to==t)&&(r(Math.max(a.from,t),Math.min(a.to,n),1==a.level?"rtl":"ltr"),o=!0)}o||r(t,n,"ltr")}function ni(e){return e.level%2?e.to:e.from}function ri(e){return e.level%2?e.from:e.to}function oi(e){var t=oo(e);return t?ni(t[0]):0}function ii(e){var t=oo(e);return t?ri(Yo(t)):e.text.length}function ai(e,t){var n=$r(e.doc,t),r=gr(n);r!=n&&(t=to(r));var o=oo(r),i=o?o[0].level%2?ii(r):oi(r):0;return Ri(t,i)}function si(e,t){for(var n,r=$r(e.doc,t);n=vr(r);)r=n.find(1,!0).line,t=null;var o=oo(r),i=o?o[0].level%2?oi(r):ii(r):r.text.length;return Ri(null==t?to(r):t,i)}function ui(e,t){var n=ai(e,t.line),r=$r(e.doc,n.line),o=oo(r);if(!o||0==o[0].level){var i=Math.max(0,r.text.search(/\S/)),a=t.line==n.line&&t.ch<=i&&t.ch;return Ri(n.line,a?0:i)}return n}function li(e,t,n){var r=e[0].level;return t==r||n!=r&&tt)return r;if(o.from==t||o.to==t){if(null!=n)return li(e,o.level,e[n].level)?(o.from!=o.to&&(as=n),r):(o.from!=o.to&&(as=r),n);n=r}}return n}function fi(e,t,n,r){if(!r)return t+n;do t+=n;while(t>0&&Wo(e.text.charAt(t)));return t}function di(e,t,n,r){var o=oo(e);if(!o)return pi(e,t,n,r);for(var i=ci(o,t),a=o[i],s=fi(e,t,a.level%2?-n:n,r);;){if(s>a.from&&s0==a.level%2?a.to:a.from);if(a=o[i+=n],!a)return null;s=n>0==a.level%2?fi(e,a.to,-1,r):fi(e,a.from,1,r)}}function pi(e,t,n,r){var o=t+n;if(r)for(;o>0&&Wo(e.text.charAt(o));)o+=n;return o<0||o>e.text.length?null:o}var hi=navigator.userAgent,mi=navigator.platform,vi=/gecko\/\d/i.test(hi),yi=/MSIE \d/.test(hi),gi=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(hi),_i=yi||gi,bi=_i&&(yi?document.documentMode||6:gi[1]),wi=/WebKit\//.test(hi),Mi=wi&&/Qt\/\d+\.\d+/.test(hi),xi=/Chrome\//.test(hi),ki=/Opera\//.test(hi),Li=/Apple Computer/.test(navigator.vendor),Si=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(hi),Ei=/PhantomJS/.test(hi),Ti=/AppleWebKit/.test(hi)&&/Mobile\/\w+/.test(hi),Di=Ti||/Android|webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(hi),Oi=Ti||/Mac/.test(mi),Ci=/\bCrOS\b/.test(hi),Pi=/win/i.test(mi),Yi=ki&&hi.match(/Version\/(\d*\.\d*)/);Yi&&(Yi=Number(Yi[1])),Yi&&Yi>=15&&(ki=!1,wi=!0);var ji=Oi&&(Mi||ki&&(null==Yi||Yi<12.11)),Ai=vi||_i&&bi>=9,Ni=!1,Ii=!1;m.prototype=Ro({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 o=e.viewHeight-(t?r:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+o)+"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 i=e.viewWidth-e.barLeft-(n?r:0);this.horiz.firstChild.style.width=e.scrollWidth-e.clientWidth+i+"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}},setScrollLeft:function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz)},setScrollTop:function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert)},zeroWidthHack:function(){var e=Oi&&!Si?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new Co,this.disableVert=new Co},enableZeroWidthBar:function(e,t){function n(){var r=e.getBoundingClientRect(),o=document.elementFromPoint(r.left+1,r.bottom-1);o!=e?e.style.pointerEvents="none":t.set(1e3,n)}e.style.pointerEvents="auto",t.set(1e3,n)},clear:function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)}},m.prototype),v.prototype=Ro({update:function(){return{bottom:0,right:0}},setScrollLeft:function(){},setScrollTop:function(){},clear:function(){}},v.prototype),e.scrollbarModel={"native":m,"null":v},L.prototype.signal=function(e,t){Do(e,t)&&this.events.push(arguments)},L.prototype.finish=function(){for(var e=0;e=9&&n.hasSelection&&(n.hasSelection=null),n.poll()}),Oa(i,"paste",function(e){Eo(r,e)||X(e,r)||(r.state.pasteIncoming=!0,n.fastPoll())}),Oa(i,"cut",t),Oa(i,"copy",t),Oa(e.scroller,"paste",function(t){qt(e,t)||Eo(r,t)||(r.state.pasteIncoming=!0,n.focus())}),Oa(e.lineSpace,"selectstart",function(t){qt(e,t)||Ea(t)}),Oa(i,"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"})}}),Oa(i,"compositionend",function(){n.composing&&(n.poll(),n.composing.range.clear(),n.composing=null)})},prepareSelection:function(){var e=this.cm,t=e.display,n=e.doc,r=Ae(e);if(e.options.moveInputWithCursor){var o=pt(e,n.sel.primary().head,"div"),i=t.wrapper.getBoundingClientRect(),a=t.lineDiv.getBoundingClientRect();r.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,o.top+a.top-i.top)),r.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,o.left+a.left-i.left))}return r},showSelection:function(e){var t=this.cm,n=t.display;qo(n.cursorDiv,e.cursors),qo(n.selectionDiv,e.selection),null!=e.teTop&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},reset:function(e){if(!this.contextMenuPending){var t,n,r=this.cm,o=r.doc;if(r.somethingSelected()){this.prevInput="";var i=o.sel.primary();t=rs&&(i.to().line-i.from().line>100||(n=r.getSelection()).length>1e3);var a=t?"-":n||r.getSelection();this.textarea.value=a,r.state.focused&&Ua(this.textarea),_i&&bi>=9&&(this.hasSelection=a)}else e||(this.prevInput=this.textarea.value="",_i&&bi>=9&&(this.hasSelection=null));this.inaccurateSelection=t}},getField:function(){return this.textarea},supportsTouch:function(){return!1},focus:function(){if("nocursor"!=this.cm.options.readOnly&&(!Di||Vo()!=this.textarea))try{this.textarea.focus()}catch(e){}},blur:function(){this.textarea.blur()},resetPosition:function(){this.wrapper.style.top=this.wrapper.style.left=0},receivedFocus:function(){this.slowPoll()},slowPoll:function(){var e=this;e.pollingFast||e.polling.set(this.cm.options.pollInterval,function(){e.poll(),e.cm.state.focused&&e.slowPoll()})},fastPoll:function(){function e(){var r=n.poll();r||t?(n.pollingFast=!1,n.slowPoll()):(t=!0,n.polling.set(60,e))}var t=!1,n=this;n.pollingFast=!0,n.polling.set(20,e)},poll:function(){var e=this.cm,t=this.textarea,n=this.prevInput;if(this.contextMenuPending||!e.state.focused||ns(t)&&!n&&!this.composing||e.isReadOnly()||e.options.disableInput||e.state.keySeq)return!1;var r=t.value;if(r==n&&!e.somethingSelected())return!1;if(_i&&bi>=9&&this.hasSelection===r||Oi&&/[\uf700-\uf7ff]/.test(r))return e.display.input.reset(),!1;if(e.doc.sel==e.display.selForContextMenu){var o=r.charCodeAt(0);if(8203!=o||n||(n="​"),8666==o)return this.reset(),this.cm.execCommand("undo")}for(var i=0,a=Math.min(n.length,r.length);i1e3||r.indexOf("\n")>-1?t.value=s.prevInput="":s.prevInput=r,s.composing&&(s.composing.range.clear(),s.composing.range=e.markText(s.composing.start,e.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},ensurePolled:function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},onKeyPress:function(){_i&&bi>=9&&(this.hasSelection=null),this.fastPoll()},onContextMenu:function(e){function t(){if(null!=a.selectionStart){var e=o.somethingSelected(),t="​"+(e?a.value:"");a.value="⇚",a.value=t,r.prevInput=e?"":"​",a.selectionStart=1,a.selectionEnd=t.length,i.selForContextMenu=o.doc.sel}}function n(){if(r.contextMenuPending=!1,r.wrapper.style.cssText=f,a.style.cssText=c,_i&&bi<9&&i.scrollbars.setScrollTop(i.scroller.scrollTop=u),null!=a.selectionStart){(!_i||_i&&bi<9)&&t();var e=0,n=function(){i.selForContextMenu==o.doc.sel&&0==a.selectionStart&&a.selectionEnd>0&&"​"==r.prevInput?Ot(o,ca.selectAll)(o):e++<10?i.detectingSelectAll=setTimeout(n,500):i.input.reset()};i.detectingSelectAll=setTimeout(n,200)}}var r=this,o=r.cm,i=o.display,a=r.textarea,s=Vt(o,e),u=i.scroller.scrollTop;if(s&&!ki){var l=o.options.resetSelectionOnContextMenu;l&&o.doc.sel.contains(s)==-1&&Ot(o,Se)(o.doc,pe(s),Ia);var c=a.style.cssText,f=r.wrapper.style.cssText; -r.wrapper.style.cssText="position: absolute";var d=r.wrapper.getBoundingClientRect();if(a.style.cssText="position: absolute; width: 30px; height: 30px; top: "+(e.clientY-d.top-5)+"px; left: "+(e.clientX-d.left-5)+"px; z-index: 1000; background: "+(_i?"rgba(255, 255, 255, .05)":"transparent")+"; outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);",wi)var p=window.scrollY;if(i.input.focus(),wi&&window.scrollTo(null,p),i.input.reset(),o.somethingSelected()||(a.value=r.prevInput=" "),r.contextMenuPending=!0,i.selForContextMenu=o.doc.sel,clearTimeout(i.detectingSelectAll),_i&&bi>=9&&t(),Ai){Da(e);var h=function(){Pa(window,"mouseup",h),setTimeout(n,20)};Oa(window,"mouseup",h)}else setTimeout(n,50)}},readOnlyChanged:function(e){e||this.reset()},setUneditable:No,needsContentAttribute:!1},ne.prototype),oe.prototype=Ro({init:function(e){function t(e){if(!Eo(r,e)){if(r.somethingSelected())Hi={lineWise:!1,text:r.getSelections()},"cut"==e.type&&r.replaceSelection("",null,"cut");else{if(!r.options.lineWiseCopyCut)return;var t=ee(r);Hi={lineWise:!0,text:t.text},"cut"==e.type&&r.operation(function(){r.setSelections(t.ranges,0,Ia),r.replaceSelection("",null,"cut")})}if(e.clipboardData&&!Ti)e.preventDefault(),e.clipboardData.clearData(),e.clipboardData.setData("text/plain",Hi.text.join("\n"));else{var n=re(),o=n.firstChild;r.display.lineSpace.insertBefore(n,r.display.lineSpace.firstChild),o.value=Hi.text.join("\n");var i=document.activeElement;Ua(o),setTimeout(function(){r.display.lineSpace.removeChild(n),i.focus()},50)}}}var n=this,r=n.cm,o=n.div=e.lineDiv;te(o),Oa(o,"paste",function(e){Eo(r,e)||X(e,r)}),Oa(o,"compositionstart",function(e){var t=e.data;if(n.composing={sel:r.doc.sel,data:t,startData:t},t){var o=r.doc.sel.primary(),i=r.getLine(o.head.line),a=i.indexOf(t,Math.max(0,o.head.ch-t.length));a>-1&&a<=o.head.ch&&(n.composing.sel=pe(Ri(o.head.line,a),Ri(o.head.line,a+t.length)))}}),Oa(o,"compositionupdate",function(e){n.composing.data=e.data}),Oa(o,"compositionend",function(e){var t=n.composing;t&&(e.data==t.startData||/\u200b/.test(e.data)||(t.data=e.data),setTimeout(function(){t.handled||n.applyComposition(t),n.composing==t&&(n.composing=null)},50))}),Oa(o,"touchstart",function(){n.forceCompositionEnd()}),Oa(o,"input",function(){n.composing||!r.isReadOnly()&&n.pollContent()||Dt(n.cm,function(){At(r)})}),Oa(o,"copy",t),Oa(o,"cut",t)},prepareSelection:function(){var e=Ae(this.cm,!1);return e.focus=this.cm.state.focused,e},showSelection:function(e,t){e&&this.cm.display.view.length&&((e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e))},showPrimarySelection:function(){var e=window.getSelection(),t=this.cm.doc.sel.primary(),n=se(this.cm,e.anchorNode,e.anchorOffset),r=se(this.cm,e.focusNode,e.focusOffset);if(!n||n.bad||!r||r.bad||0!=Fi(J(n,r),t.from())||0!=Fi(K(n,r),t.to())){var o=ie(this.cm,t.from()),i=ie(this.cm,t.to());if(o||i){var a=this.cm.display.view,s=e.rangeCount&&e.getRangeAt(0);if(o){if(!i){var u=a[a.length-1].measure,l=u.maps?u.maps[u.maps.length-1]:u.map;i={node:l[l.length-1],offset:l[l.length-2]-l[l.length-3]}}}else o={node:a[0].measure.map[2],offset:0};try{var c=Ba(o.node,o.offset,i.offset,i.node)}catch(f){}c&&(!vi&&this.cm.state.focused?(e.collapse(o.node,o.offset),c.collapsed||e.addRange(c)):(e.removeAllRanges(),e.addRange(c)),s&&null==e.anchorNode?e.addRange(s):vi&&this.startGracePeriod()),this.rememberSelection()}}},startGracePeriod:function(){var e=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout(function(){e.gracePeriod=!1,e.selectionChanged()&&e.cm.operation(function(){e.cm.curOp.selectionChanged=!0})},20)},showMultipleSelections:function(e){qo(this.cm.display.cursorDiv,e.cursors),qo(this.cm.display.selectionDiv,e.selection)},rememberSelection:function(){var e=window.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},selectionInEditor:function(){var e=window.getSelection();if(!e.rangeCount)return!1;var t=e.getRangeAt(0).commonAncestorContainer;return Ka(this.div,t)},focus:function(){"nocursor"!=this.cm.options.readOnly&&this.div.focus()},blur:function(){this.div.blur()},getField:function(){return this.div},supportsTouch:function(){return!0},receivedFocus:function(){function e(){t.cm.state.focused&&(t.pollSelection(),t.polling.set(t.cm.options.pollInterval,e))}var t=this;this.selectionInEditor()?this.pollSelection():Dt(this.cm,function(){t.cm.curOp.selectionChanged=!0}),this.polling.set(this.cm.options.pollInterval,e)},selectionChanged:function(){var e=window.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},pollSelection:function(){if(!this.composing&&!this.gracePeriod&&this.selectionChanged()){var e=window.getSelection(),t=this.cm;this.rememberSelection();var n=se(t,e.anchorNode,e.anchorOffset),r=se(t,e.focusNode,e.focusOffset);n&&r&&Dt(t,function(){Se(t.doc,pe(n,r),Ia),(n.bad||r.bad)&&(t.curOp.selectionChanged=!0)})}},pollContent:function(){var e=this.cm,t=e.display,n=e.doc.sel.primary(),r=n.from(),o=n.to();if(r.linet.viewTo-1)return!1;var i;if(r.line==t.viewFrom||0==(i=Rt(e,r.line)))var a=to(t.view[0].line),s=t.view[0].node;else var a=to(t.view[i].line),s=t.view[i-1].node.nextSibling;var u=Rt(e,o.line);if(u==t.view.length-1)var l=t.viewTo-1,c=t.lineDiv.lastChild;else var l=to(t.view[u+1].line)-1,c=t.view[u+1].node.previousSibling;for(var f=e.doc.splitLines(le(e,s,c,a,l)),d=Xr(e.doc,Ri(a,0),Ri(l,$r(e.doc,l).text.length));f.length>1&&d.length>1;)if(Yo(f)==Yo(d))f.pop(),d.pop(),l--;else{if(f[0]!=d[0])break;f.shift(),d.shift(),a++}for(var p=0,h=0,m=f[0],v=d[0],y=Math.min(m.length,v.length);p1||f[0]||Fi(w,M)?(Pn(e.doc,f,w,M,"+input"),!0):void 0},ensurePolled:function(){this.forceCompositionEnd()},reset:function(){this.forceCompositionEnd()},forceCompositionEnd:function(){this.composing&&!this.composing.handled&&(this.applyComposition(this.composing),this.composing.handled=!0,this.div.blur(),this.div.focus())},applyComposition:function(e){this.cm.isReadOnly()?Ot(this.cm,At)(this.cm):e.data&&e.data!=e.startData&&Ot(this.cm,$)(this.cm,e.data,0,e.sel)},setUneditable:function(e){e.contentEditable="false"},onKeyPress:function(e){e.preventDefault(),this.cm.isReadOnly()||Ot(this.cm,$)(this.cm,String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),0)},readOnlyChanged:function(e){this.div.contentEditable=String("nocursor"!=e)},onContextMenu:No,resetPosition:No,needsContentAttribute:!0},oe.prototype),e.inputStyles={textarea:ne,contenteditable:oe},ce.prototype={primary:function(){return this.ranges[this.primIndex]},equals:function(e){if(e==this)return!0;if(e.primIndex!=this.primIndex||e.ranges.length!=this.ranges.length)return!1;for(var t=0;t=0&&Fi(e,r.to())<=0)return n}return-1}},fe.prototype={from:function(){return J(this.anchor,this.head)},to:function(){return K(this.anchor,this.head)},empty:function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch}};var zi,Wi,Ui,Bi={left:0,right:0,top:0,bottom:0},qi=null,Vi=0,Gi=0,Ki=0,Ji=null;_i?Ji=-.53:vi?Ji=15:xi?Ji=-.7:Li&&(Ji=-1/3);var Qi=function(e){var t=e.wheelDeltaX,n=e.wheelDeltaY;return null==t&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(t=e.detail),null==n&&e.detail&&e.axis==e.VERTICAL_AXIS?n=e.detail:null==n&&(n=e.wheelDelta),{x:t,y:n}};e.wheelEventPixels=function(e){var t=Qi(e);return t.x*=Ji,t.y*=Ji,t};var $i=new Co,Xi=null,Zi=e.changeEnd=function(e){return e.text?Ri(e.from.line+e.text.length-1,Yo(e.text).length+(1==e.text.length?e.from.ch:0)):e.to};e.prototype={constructor:e,focus:function(){window.focus(),this.display.input.focus()},setOption:function(e,t){var n=this.options,r=n[e];n[e]==t&&"mode"!=e||(n[e]=t,ta.hasOwnProperty(e)&&Ot(this,ta[e])(this,t,r))},getOption:function(e){return this.options[e]},getDoc:function(){return this.doc},addKeyMap:function(e,t){this.state.keyMaps[t?"push":"unshift"](Gn(e))},removeKeyMap:function(e){for(var t=this.state.keyMaps,n=0;nn&&(Hn(this,o.head.line,e,!0),n=o.head.line,r==this.doc.sel.primIndex&&Rn(this));else{var i=o.from(),a=o.to(),s=Math.max(n,i.line);n=Math.min(this.lastLine(),a.line-(a.ch?0:1))+1;for(var u=s;u0&&Me(this.doc,r,new fe(i,l[r].to()),Ia)}}}),getTokenAt:function(e,t){return Pr(this,e,t)},getLineTokens:function(e,t){return Pr(this,Ri(e),t,!0)},getTokenTypeAt:function(e){e=me(this.doc,e);var t,n=Ar(this,$r(this.doc,e.line)),r=0,o=(n.length-1)/2,i=e.ch;if(0==i)t=n[2];else for(;;){var a=r+o>>1;if((a?n[2*a-1]:0)>=i)o=a;else{if(!(n[2*a+1]o&&(e=o,r=!0),n=$r(this.doc,e)}else n=e;return ct(this,n,{top:0,left:0},t||"page").top+(r?this.doc.height-ro(n):0)},defaultTextHeight:function(){return gt(this.display)},defaultCharWidth:function(){return _t(this.display)},setGutterMarker:Ct(function(e,t,n){return zn(this.doc,e,"gutter",function(e){var r=e.gutterMarkers||(e.gutterMarkers={});return r[t]=n,!n&&zo(r)&&(e.gutterMarkers=null),!0})}),clearGutter:Ct(function(e){var t=this,n=t.doc,r=n.first;n.iter(function(n){n.gutterMarkers&&n.gutterMarkers[e]&&(n.gutterMarkers[e]=null,Nt(t,r,"gutter"),zo(n.gutterMarkers)&&(n.gutterMarkers=null)),++r})}),lineInfo:function(e){if("number"==typeof e){if(!ye(this.doc,e))return null;var t=e;if(e=$r(this.doc,e),!e)return null}else{var t=to(e);if(null==t)return null}return{line:t,handle:e,text:e.text,gutterMarkers:e.gutterMarkers,textClass:e.textClass,bgClass:e.bgClass,wrapClass:e.wrapClass,widgets:e.widgets}},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(e,t,n,r,o){var i=this.display;e=pt(this,me(this.doc,e));var a=e.bottom,s=e.left;if(t.style.position="absolute",t.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(t),i.sizer.appendChild(t),"over"==r)a=e.top;else if("above"==r||"near"==r){var u=Math.max(i.wrapper.clientHeight,this.doc.height),l=Math.max(i.sizer.clientWidth,i.lineSpace.clientWidth);("above"==r||e.bottom+t.offsetHeight>u)&&e.top>t.offsetHeight?a=e.top-t.offsetHeight:e.bottom+t.offsetHeight<=u&&(a=e.bottom),s+t.offsetWidth>l&&(s=l-t.offsetWidth)}t.style.top=a+"px",t.style.left=t.style.right="","right"==o?(s=i.sizer.clientWidth-t.offsetWidth,t.style.right="0px"):("left"==o?s=0:"middle"==o&&(s=(i.sizer.clientWidth-t.offsetWidth)/2),t.style.left=s+"px"),n&&An(this,s,a,s+t.offsetWidth,a+t.offsetHeight)},triggerOnKeyDown:Ct(dn),triggerOnKeyPress:Ct(mn),triggerOnKeyUp:hn,execCommand:function(e){if(ca.hasOwnProperty(e))return ca[e].call(null,this)},triggerElectric:Ct(function(e){Z(this,e)}),findPosH:function(e,t,n,r){var o=1;t<0&&(o=-1,t=-t);for(var i=0,a=me(this.doc,e);i0&&s(n.charAt(r-1));)--r;for(;o.5)&&a(this),Ya(this,"refresh",this)}),swapDoc:Ct(function(e){var t=this.doc;return t.cm=null,Qr(this,e),st(this),this.display.input.reset(),this.scrollTo(e.scrollLeft,e.scrollTop),this.curOp.forceScroll=!0,Lo(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}},Oo(e);var ea=e.defaults={},ta=e.optionHandlers={},na=e.Init={toString:function(){return"CodeMirror.Init"}};qn("value","",function(e,t){e.setValue(t)},!0),qn("mode",null,function(e,t){e.doc.modeOption=t,n(e)},!0),qn("indentUnit",2,n,!0),qn("indentWithTabs",!1),qn("smartIndent",!0),qn("tabSize",4,function(e){r(e),st(e),At(e)},!0),qn("lineSeparator",null,function(e,t){if(e.doc.lineSep=t,t){var n=[],r=e.doc.first;e.doc.iter(function(e){for(var o=0;;){var i=e.text.indexOf(t,o);if(i==-1)break;o=i+t.length,n.push(Ri(r,i))}r++});for(var o=n.length-1;o>=0;o--)Pn(e.doc,t,n[o],Ri(n[o].line,n[o].ch+t.length))}}),qn("specialChars",/[\u0000-\u001f\u007f\u00ad\u200b-\u200f\u2028\u2029\ufeff]/g,function(t,n,r){t.state.specialChars=new RegExp(n.source+(n.test("\t")?"":"|\t"),"g"),r!=e.Init&&t.refresh()}),qn("specialCharPlaceholder",Fr,function(e){e.refresh()},!0),qn("electricChars",!0),qn("inputStyle",Di?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),qn("rtlMoveVisually",!Pi),qn("wholeLineUpdateBefore",!0),qn("theme","default",function(e){s(e),u(e)},!0),qn("keyMap","default",function(t,n,r){var o=Gn(n),i=r!=e.Init&&Gn(r);i&&i.detach&&i.detach(t,o),o.attach&&o.attach(t,i||null)}),qn("extraKeys",null),qn("lineWrapping",!1,o,!0),qn("gutters",[],function(e){p(e.options),u(e)},!0),qn("fixedGutter",!0,function(e,t){e.display.gutters.style.left=t?k(e.display)+"px":"0",e.refresh()},!0),qn("coverGutterNextToScrollbar",!1,function(e){g(e)},!0),qn("scrollbarStyle","native",function(e){y(e),g(e),e.display.scrollbars.setScrollTop(e.doc.scrollTop),e.display.scrollbars.setScrollLeft(e.doc.scrollLeft)},!0),qn("lineNumbers",!1,function(e){p(e.options),u(e)},!0),qn("firstLineNumber",1,u,!0),qn("lineNumberFormatter",function(e){return e},u,!0),qn("showCursorWhenSelecting",!1,je,!0),qn("resetSelectionOnContextMenu",!0),qn("lineWiseCopyCut",!0),qn("readOnly",!1,function(e,t){"nocursor"==t?(gn(e),e.display.input.blur(),e.display.disabled=!0):e.display.disabled=!1,e.display.input.readOnlyChanged(t)}),qn("disableInput",!1,function(e,t){t||e.display.input.reset()},!0),qn("dragDrop",!0,Ut),qn("allowDropFileTypes",null),qn("cursorBlinkRate",530),qn("cursorScrollMargin",0),qn("cursorHeight",1,je,!0),qn("singleCursorHeightPerLine",!0,je,!0),qn("workTime",100),qn("workDelay",100),qn("flattenSpans",!0,r,!0),qn("addModeClass",!1,r,!0),qn("pollInterval",100),qn("undoDepth",200,function(e,t){e.doc.history.undoDepth=t}),qn("historyEventDelay",1250),qn("viewportMargin",10,function(e){e.refresh()},!0),qn("maxHighlightLength",1e4,r,!0),qn("moveInputWithCursor",!0,function(e,t){t||e.display.input.resetPosition()}),qn("tabindex",null,function(e,t){e.display.input.getField().tabIndex=t||""}),qn("autofocus",null);var ra=e.modes={},oa=e.mimeModes={};e.defineMode=function(t,n){e.defaults.mode||"null"==t||(e.defaults.mode=t),arguments.length>2&&(n.dependencies=Array.prototype.slice.call(arguments,2)),ra[t]=n},e.defineMIME=function(e,t){oa[e]=t},e.resolveMode=function(t){if("string"==typeof t&&oa.hasOwnProperty(t))t=oa[t];else if(t&&"string"==typeof t.name&&oa.hasOwnProperty(t.name)){var n=oa[t.name];"string"==typeof n&&(n={name:n}),t=Io(n,t),t.name=n.name}else if("string"==typeof t&&/^[\w\-]+\/[\w\-]+\+xml$/.test(t))return e.resolveMode("application/xml");return"string"==typeof t?{name:t}:t||{name:"null"}},e.getMode=function(t,n){var n=e.resolveMode(n),r=ra[n.name];if(!r)return e.getMode(t,"text/plain");var o=r(t,n);if(ia.hasOwnProperty(n.name)){var i=ia[n.name];for(var a in i)i.hasOwnProperty(a)&&(o.hasOwnProperty(a)&&(o["_"+a]=o[a]),o[a]=i[a])}if(o.name=n.name,n.helperType&&(o.helperType=n.helperType),n.modeProps)for(var a in n.modeProps)o[a]=n.modeProps[a];return o},e.defineMode("null",function(){return{token:function(e){e.skipToEnd()}}}),e.defineMIME("text/plain","null");var ia=e.modeExtensions={};e.extendMode=function(e,t){var n=ia.hasOwnProperty(e)?ia[e]:ia[e]={};Ro(t,n)},e.defineExtension=function(t,n){e.prototype[t]=n},e.defineDocExtension=function(e,t){ka.prototype[e]=t},e.defineOption=qn;var aa=[];e.defineInitHook=function(e){aa.push(e)};var sa=e.helpers={};e.registerHelper=function(t,n,r){sa.hasOwnProperty(t)||(sa[t]=e[t]={_global:[]}),sa[t][n]=r},e.registerGlobalHelper=function(t,n,r,o){e.registerHelper(t,n,o),sa[t]._global.push({pred:r,val:o})};var ua=e.copyState=function(e,t){if(t===!0)return t;if(e.copyState)return e.copyState(t);var n={};for(var r in t){var o=t[r];o instanceof Array&&(o=o.concat([])),n[r]=o}return n},la=e.startState=function(e,t,n){return!e.startState||e.startState(t,n)};e.innerMode=function(e,t){for(;e.innerMode;){var n=e.innerMode(t);if(!n||n.mode==e)break;t=n.state,e=n.mode}return n||{mode:e,state:t}};var ca=e.commands={selectAll:function(e){e.setSelection(Ri(e.firstLine(),0),Ri(e.lastLine()),Ia)},singleSelection:function(e){e.setSelection(e.getCursor("anchor"),e.getCursor("head"),Ia)},killLine:function(e){Wn(e,function(t){if(t.empty()){var n=$r(e.doc,t.head.line).text.length;return t.head.ch==n&&t.head.line0)o=new Ri(o.line,o.ch+1),e.replaceRange(i.charAt(o.ch-1)+i.charAt(o.ch-2),Ri(o.line,o.ch-2),o,"+transpose");else if(o.line>e.doc.first){var a=$r(e.doc,o.line-1).text;a&&e.replaceRange(i.charAt(0)+e.doc.lineSeparator()+a.charAt(a.length-1),Ri(o.line-1,a.length-1),Ri(o.line,1),"+transpose")}n.push(new fe(o,o))}e.setSelections(n)})},newlineAndIndent:function(e){Dt(e,function(){for(var t=e.listSelections().length,n=0;n=this.string.length},sol:function(){return this.pos==this.lineStart},peek:function(){return this.string.charAt(this.pos)||void 0},next:function(){if(this.post},eatSpace:function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},skipToEnd:function(){this.pos=this.string.length},skipTo:function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},backUp:function(e){this.pos-=e},column:function(){return this.lastColumnPos0?null:(r&&t!==!1&&(this.pos+=r[0].length),r)}var o=function(e){return n?e.toLowerCase():e},i=this.string.substr(this.pos,e.length);if(o(i)==o(e))return t!==!1&&(this.pos+=e.length),!0},current:function(){return this.string.slice(this.start,this.pos)},hideFirstChars:function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}}};var va=0,ya=e.TextMarker=function(e,t){this.lines=[],this.type=t,this.doc=e,this.id=++va};Oo(ya),ya.prototype.clear=function(){if(!this.explicitlyCleared){var e=this.doc.cm,t=e&&!e.curOp;if(t&&bt(e),Do(this,"clear")){var n=this.find();n&&Lo(this,"clear",n.from,n.to)}for(var r=null,o=null,i=0;ie.display.maxLineLength&&(e.display.maxLine=u,e.display.maxLineLength=l,e.display.maxLineChanged=!0)}null!=r&&e&&this.collapsed&&At(e,r,o+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&De(e.doc)),e&&Lo(e,"markerCleared",e,this),t&&Mt(e),this.parent&&this.parent.clear()}},ya.prototype.find=function(e,t){null==e&&"bookmark"==this.type&&(e=1);for(var n,r,o=0;o1||!(this.children[0]instanceof Gr))){var s=[];this.collapse(s),this.children=[new Gr(s)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t50){for(var a=o.lines.length%25+25,s=a;s10);e.parent.maybeSpill()}},iterN:function(e,t,n){for(var r=0;r=0;i--)Sn(this,r[i]);s?Le(this,s):this.cm&&Rn(this.cm)}),undo:Pt(function(){Tn(this,"undo")}),redo:Pt(function(){Tn(this,"redo")}),undoSelection:Pt(function(){Tn(this,"undo",!0)}),redoSelection:Pt(function(){Tn(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(o.marker.parent||o.marker)}return t},findMarks:function(e,t,n){e=me(this,e),t=me(this,t);var r=[],o=e.line;return this.iter(e.line,t.line+1,function(i){var a=i.markedSpans;if(a)for(var s=0;s=u.to||null==u.from&&o!=e.line||null!=u.from&&o==t.line&&u.from>=t.ch||n&&!n(u.marker)||r.push(u.marker.parent||u.marker)}++o}),r},getAllMarks:function(){var e=[];return this.iter(function(t){var n=t.markedSpans;if(n)for(var r=0;re?(t=e,!0):(e-=i,void++n)}),me(this,Ri(n,t))},indexFromPos:function(e){e=me(this,e);var t=e.ch;if(e.linet&&(t=e.from),null!=e.to&&e.to=t)return a+(t-i);a+=s-i,a+=n-a%n,i=s+1}},za=e.findColumn=function(e,t,n){for(var r=0,o=0;;){var i=e.indexOf("\t",r);i==-1&&(i=e.length);var a=i-r;if(i==e.length||o+a>=t)return r+Math.min(a,t-o);if(o+=i-r,o+=n-o%n,r=i+1,o>=t)return r}},Wa=[""],Ua=function(e){e.select()};Ti?Ua=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:_i&&(Ua=function(e){try{e.select()}catch(t){}});var Ba,qa=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/,Va=e.isWordChar=function(e){return/\w/.test(e)||e>"€"&&(e.toUpperCase()!=e.toLowerCase()||qa.test(e))},Ga=/[\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]/;Ba=document.createRange?function(e,t,n,r){var o=document.createRange();return o.setEnd(r||e,n),o.setStart(e,t),o}:function(e,t,n){var r=document.body.createTextRange();try{r.moveToElementText(e.parentNode)}catch(o){return r}return r.collapse(!0),r.moveEnd("character",n),r.moveStart("character",t),r};var Ka=e.contains=function(e,t){if(3==t.nodeType&&(t=t.parentNode),e.contains)return e.contains(t);do if(11==t.nodeType&&(t=t.host),t==e)return!0;while(t=t.parentNode)};_i&&bi<11&&(Vo=function(){try{return document.activeElement}catch(e){return document.body}});var Ja,Qa,$a=e.rmClass=function(e,t){var n=e.className,r=Go(t).exec(n);if(r){var o=n.slice(r.index+r[0].length);e.className=n.slice(0,r.index)+(o?r[1]+o:"")}},Xa=e.addClass=function(e,t){var n=e.className;Go(t).test(n)||(e.className+=(n?" ":"")+t)},Za=!1,es=function(){if(_i&&bi<9)return!1;var e=Uo("div");return"draggable"in e||"dragDrop"in e}(),ts=e.splitLines=3!="\n\nb".split(/\n/).length?function(e){for(var t=0,n=[],r=e.length;t<=r;){var o=e.indexOf("\n",t);o==-1&&(o=e.length);var i=e.slice(t,"\r"==e.charAt(o-1)?o-1:o),a=i.indexOf("\r");a!=-1?(n.push(i.slice(0,a)),t+=a+1):(n.push(i),t=o+1)}return n}:function(e){return e.split(/\r\n?|\n/)},ns=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(t){return!1}}:function(e){try{var t=e.ownerDocument.selection.createRange()}catch(n){}return!(!t||t.parentElement()!=e)&&0!=t.compareEndPoints("StartToEnd",t)},rs=function(){var e=Uo("div");return"oncopy"in e||(e.setAttribute("oncopy","return;"),"function"==typeof e.oncopy)}(),os=null,is=e.keyNames={3:"Enter",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",106:"*",107:"=",109:"-",110:".",111:"/",127:"Delete",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"};!function(){for(var e=0;e<10;e++)is[e+48]=is[e+96]=String(e);for(var e=65;e<=90;e++)is[e]=String.fromCharCode(e);for(var e=1;e<=12;e++)is[e+111]=is[e+63235]="F"+e}();var as,ss=function(){function e(e){return e<=247?n.charAt(e):1424<=e&&e<=1524?"R":1536<=e&&e<=1773?r.charAt(e-1536):1774<=e&&e<=2220?"r":8192<=e&&e<=8203?"w":8204==e?"b":"L"}function t(e,t,n){this.level=e,this.from=t,this.to=n}var n="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",r="rrrrrrrrrrrr,rNNmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmrrrrrrrnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmNmmmm",o=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,i=/[stwN]/,a=/[LRr]/,s=/[Lb1n]/,u=/[1n]/,l="L";return function(n){if(!o.test(n))return!1;for(var r,c=n.length,f=[],d=0;d1){for(var p=Array(d),h=0;h1){for(var m=Array(h),v=0;v>>0;if(""+n!==t||4294967295===n)return NaN;t=n}return t<0?h(e)+t:t}function v(){return!0}function y(e,t,n){return(0===e||void 0!==n&&e<=-n)&&(void 0===t||void 0!==n&&t>=n)}function g(e,t){return b(e,t,0)}function _(e,t){return b(e,t,t)}function b(e,t,n){return void 0===e?n:e<0?Math.max(0,t+e):void 0===t?e:Math.min(t,e)}function w(e){this.next=e}function M(e,t,n,r){var o=0===e?t:1===e?n:[t,n];return r?r.value=o:r={value:o,done:!1},r}function x(){return{value:void 0,done:!0}}function k(e){return!!E(e)}function L(e){return e&&"function"==typeof e.next}function S(e){var t=E(e);return t&&t.call(e)}function E(e){var t=e&&(xn&&e[xn]||e[kn]);if("function"==typeof t)return t}function T(e){return e&&"number"==typeof e.length}function D(e){return null===e||void 0===e?R():i(e)?e.toSeq():z(e)}function O(e){return null===e||void 0===e?R().toKeyedSeq():i(e)?a(e)?e.toSeq():e.fromEntrySeq():F(e)}function C(e){return null===e||void 0===e?R():i(e)?a(e)?e.entrySeq():e.toIndexedSeq():H(e)}function P(e){return(null===e||void 0===e?R():i(e)?a(e)?e.entrySeq():e:H(e)).toSetSeq()}function Y(e){this._array=e,this.size=e.length}function j(e){var t=Object.keys(e);this._object=e,this._keys=t,this.size=t.length}function A(e){this._iterable=e,this.size=e.length||e.size}function N(e){this._iterator=e,this._iteratorCache=[]}function I(e){return!(!e||!e[Sn])}function R(){return En||(En=new Y([]))}function F(e){var t=Array.isArray(e)?new Y(e).fromEntrySeq():L(e)?new N(e).fromEntrySeq():k(e)?new A(e).fromEntrySeq():"object"==typeof e?new j(e):void 0;if(!t)throw new TypeError("Expected Array or iterable object of [k, v] entries, or keyed object: "+e);return t}function H(e){var t=W(e);if(!t)throw new TypeError("Expected Array or iterable object of values: "+e);return t}function z(e){var t=W(e)||"object"==typeof e&&new j(e);if(!t)throw new TypeError("Expected Array or iterable object of values, or keyed object: "+e);return t}function W(e){return T(e)?new Y(e):L(e)?new N(e):k(e)?new A(e):void 0}function U(e,t,n,r){var o=e._cache;if(o){for(var i=o.length-1,a=0;a<=i;a++){var s=o[n?i-a:a];if(t(s[1],r?s[0]:a,e)===!1)return a+1}return a}return e.__iterateUncached(t,n)}function B(e,t,n,r){var o=e._cache;if(o){var i=o.length-1,a=0;return new w(function(){var e=o[n?i-a:a];return a++>i?x():M(t,r?e[0]:a-1,e[1])})}return e.__iteratorUncached(t,n)}function q(e,t){return t?V(t,e,"",{"":e}):G(e)}function V(e,t,n,r){return Array.isArray(t)?e.call(r,n,C(t).map(function(n,r){return V(e,n,r,t)})):K(t)?e.call(r,n,O(t).map(function(n,r){return V(e,n,r,t)})):t}function G(e){return Array.isArray(e)?C(e).map(G).toList():K(e)?O(e).map(G).toMap():e}function K(e){return e&&(e.constructor===Object||void 0===e.constructor)}function J(e,t){if(e===t||e!==e&&t!==t)return!0;if(!e||!t)return!1;if("function"==typeof e.valueOf&&"function"==typeof t.valueOf){if(e=e.valueOf(),t=t.valueOf(),e===t||e!==e&&t!==t)return!0;if(!e||!t)return!1}return!("function"!=typeof e.equals||"function"!=typeof t.equals||!e.equals(t))}function Q(e,t){if(e===t)return!0;if(!i(t)||void 0!==e.size&&void 0!==t.size&&e.size!==t.size||void 0!==e.__hash&&void 0!==t.__hash&&e.__hash!==t.__hash||a(e)!==a(t)||s(e)!==s(t)||l(e)!==l(t))return!1;if(0===e.size&&0===t.size)return!0;var n=!u(e);if(l(e)){var r=e.entries();return t.every(function(e,t){var o=r.next().value;return o&&J(o[1],e)&&(n||J(o[0],t))})&&r.next().done}var o=!1;if(void 0===e.size)if(void 0===t.size)"function"==typeof e.cacheResult&&e.cacheResult();else{o=!0;var c=e;e=t,t=c}var f=!0,d=t.__iterate(function(t,r){if(n?!e.has(t):o?!J(t,e.get(r,yn)):!J(e.get(r,yn),t))return f=!1,!1});return f&&e.size===d}function $(e,t){if(!(this instanceof $))return new $(e,t);if(this._value=e,this.size=void 0===t?1/0:Math.max(0,t),0===this.size){if(Tn)return Tn;Tn=this}}function X(e,t){if(!e)throw new Error(t)}function Z(e,t,n){if(!(this instanceof Z))return new Z(e,t,n);if(X(0!==n,"Cannot step a Range by 0"),e=e||0,void 0===t&&(t=1/0),n=void 0===n?1:Math.abs(n),t>>1&1073741824|3221225471&e}function ie(e){if(e===!1||null===e||void 0===e)return 0;if("function"==typeof e.valueOf&&(e=e.valueOf(),e===!1||null===e||void 0===e))return 0;if(e===!0)return 1;var t=typeof e;if("number"===t){if(e!==e||e===1/0)return 0;var n=0|e;for(n!==e&&(n^=4294967295*e);e>4294967295;)e/=4294967295,n^=e;return oe(n)}if("string"===t)return e.length>In?ae(e):se(e);if("function"==typeof e.hashCode)return e.hashCode();if("object"===t)return ue(e);if("function"==typeof e.toString)return se(e.toString());throw new Error("Value type "+t+" cannot be hashed.")}function ae(e){var t=Hn[e];return void 0===t&&(t=se(e),Fn===Rn&&(Fn=0,Hn={}),Fn++,Hn[e]=t),t}function se(e){for(var t=0,n=0;n0)switch(e.nodeType){case 1:return e.uniqueID;case 9:return e.documentElement&&e.documentElement.uniqueID}}function ce(e){X(e!==1/0,"Cannot perform this action with an infinite size.")}function fe(e){return null===e||void 0===e?Me():de(e)&&!l(e)?e:Me().withMutations(function(t){var r=n(e);ce(r.size),r.forEach(function(e,n){return t.set(n,e)})})}function de(e){return!(!e||!e[zn])}function pe(e,t){this.ownerID=e,this.entries=t}function he(e,t,n){this.ownerID=e,this.bitmap=t,this.nodes=n}function me(e,t,n){this.ownerID=e,this.count=t,this.nodes=n}function ve(e,t,n){this.ownerID=e,this.keyHash=t,this.entries=n}function ye(e,t,n){this.ownerID=e,this.keyHash=t,this.entry=n}function ge(e,t,n){this._type=t,this._reverse=n,this._stack=e._root&&be(e._root)}function _e(e,t){return M(e,t[0],t[1])}function be(e,t){return{node:e,index:0,__prev:t}}function we(e,t,n,r){var o=Object.create(Wn); -return o.size=e,o._root=t,o.__ownerID=n,o.__hash=r,o.__altered=!1,o}function Me(){return Un||(Un=we(0))}function xe(e,t,n){var r,o;if(e._root){var i=c(gn),a=c(_n);if(r=ke(e._root,e.__ownerID,0,void 0,t,n,i,a),!a.value)return e;o=e.size+(i.value?n===yn?-1:1:0)}else{if(n===yn)return e;o=1,r=new pe(e.__ownerID,[[t,n]])}return e.__ownerID?(e.size=o,e._root=r,e.__hash=void 0,e.__altered=!0,e):r?we(o,r):Me()}function ke(e,t,n,r,o,i,a,s){return e?e.update(t,n,r,o,i,a,s):i===yn?e:(f(s),f(a),new ye(t,r,[o,i]))}function Le(e){return e.constructor===ye||e.constructor===ve}function Se(e,t,n,r,o){if(e.keyHash===r)return new ve(t,r,[e.entry,o]);var i,a=(0===n?e.keyHash:e.keyHash>>>n)&vn,s=(0===n?r:r>>>n)&vn,u=a===s?[Se(e,t,n+hn,r,o)]:(i=new ye(t,r,o),a>>=1)a[s]=1&n?t[i++]:void 0;return a[r]=o,new me(e,i+1,a)}function Oe(e,t,r){for(var o=[],a=0;a>1&1431655765,e=(858993459&e)+(e>>2&858993459),e=e+(e>>4)&252645135,e+=e>>8,e+=e>>16,127&e}function Ne(e,t,n,r){var o=r?e:p(e);return o[t]=n,o}function Ie(e,t,n,r){var o=e.length+1;if(r&&t+1===o)return e[t]=n,e;for(var i=new Array(o),a=0,s=0;s0&&oi?0:i-n,l=a-n;return l>mn&&(l=mn),function(){if(o===l)return Qn;var e=t?--l:o++;return r&&r[e]}}function o(e,r,o){var s,u=e&&e.array,l=o>i?0:i-o>>r,c=(a-o>>r)+1;return c>mn&&(c=mn),function(){for(;;){if(s){var e=s();if(e!==Qn)return e;s=null}if(l===c)return Qn;var i=t?--c:l++;s=n(u&&u[i],r-hn,o+(i<=e.size||t<0)return e.withMutations(function(e){t<0?Je(e,t).set(0,n):Je(e,0,t+1).set(t,n)});t+=e._origin;var r=e._tail,o=e._root,i=c(_n);return t>=$e(e._capacity)?r=Ve(r,e.__ownerID,0,t,n,i):o=Ve(o,e.__ownerID,e._level,t,n,i),i.value?e.__ownerID?(e._root=o,e._tail=r,e.__hash=void 0,e.__altered=!0,e):Ue(e._origin,e._capacity,e._level,o,r):e}function Ve(e,t,n,r,o,i){var a=r>>>n&vn,s=e&&a0){var l=e&&e.array[a],c=Ve(l,t,n-hn,r,o,i);return c===l?e:(u=Ge(e,t),u.array[a]=c,u)}return s&&e.array[a]===o?e:(f(i),u=Ge(e,t),void 0===o&&a===u.array.length-1?u.array.pop():u.array[a]=o,u)}function Ge(e,t){return t&&e&&t===e.ownerID?e:new ze(e?e.array.slice():[],t)}function Ke(e,t){if(t>=$e(e._capacity))return e._tail;if(t<1<0;)n=n.array[t>>>r&vn],r-=hn;return n}}function Je(e,t,n){void 0!==t&&(t=0|t),void 0!==n&&(n=0|n);var r=e.__ownerID||new d,o=e._origin,i=e._capacity,a=o+t,s=void 0===n?i:n<0?i+n:o+n;if(a===o&&s===i)return e;if(a>=s)return e.clear();for(var u=e._level,l=e._root,c=0;a+c<0;)l=new ze(l&&l.array.length?[void 0,l]:[],r),u+=hn,c+=1<=1<f?new ze([],r):h;if(h&&p>f&&ahn;y-=hn){var g=f>>>y&vn;v=v.array[g]=Ge(v.array[g],r)}v.array[f>>>hn&vn]=h}if(s=p)a-=p,s-=p,u=hn,l=null,m=m&&m.removeBefore(r,0,a);else if(a>o||p>>u&vn;if(_!==p>>>u&vn)break;_&&(c+=(1<o&&(l=l.removeBefore(r,u,a-c)),l&&pa&&(a=l.size),i(u)||(l=l.map(function(e){return q(e)})),o.push(l)}return a>e.size&&(e=e.setSize(a)),Ye(e,t,o)}function $e(e){return e>>hn<=mn&&a.size>=2*i.size?(o=a.filter(function(e,t){return void 0!==e&&s!==t}),r=o.toKeyedSeq().map(function(e){return e[0]}).flip().toMap(),e.__ownerID&&(r.__ownerID=o.__ownerID=e.__ownerID)):(r=i.remove(t),o=s===a.size-1?a.pop():a.set(s,void 0))}else if(u){if(n===a.get(s)[1])return e;r=i,o=a.set(s,[t,n])}else r=i.set(t,a.size),o=a.set(a.size,[t,n]);return e.__ownerID?(e.size=r.size,e._map=r,e._list=o,e.__hash=void 0,e):et(r,o)}function rt(e,t){this._iter=e,this._useKeys=t,this.size=e.size}function ot(e){this._iter=e,this.size=e.size}function it(e){this._iter=e,this.size=e.size}function at(e){this._iter=e,this.size=e.size}function st(e){var t=Tt(e);return t._iter=e,t.size=e.size,t.flip=function(){return e},t.reverse=function(){var t=e.reverse.apply(this);return t.flip=function(){return e.reverse()},t},t.has=function(t){return e.includes(t)},t.includes=function(t){return e.has(t)},t.cacheResult=Dt,t.__iterateUncached=function(t,n){var r=this;return e.__iterate(function(e,n){return t(n,e,r)!==!1},n)},t.__iteratorUncached=function(t,n){if(t===Mn){var r=e.__iterator(t,n);return new w(function(){var e=r.next();if(!e.done){var t=e.value[0];e.value[0]=e.value[1],e.value[1]=t}return e})}return e.__iterator(t===wn?bn:wn,n)},t}function ut(e,t,n){var r=Tt(e);return r.size=e.size,r.has=function(t){return e.has(t)},r.get=function(r,o){var i=e.get(r,yn);return i===yn?o:t.call(n,i,r,e)},r.__iterateUncached=function(r,o){var i=this;return e.__iterate(function(e,o,a){return r(t.call(n,e,o,a),o,i)!==!1},o)},r.__iteratorUncached=function(r,o){var i=e.__iterator(Mn,o);return new w(function(){var o=i.next();if(o.done)return o;var a=o.value,s=a[0];return M(r,s,t.call(n,a[1],s,e),o)})},r}function lt(e,t){var n=Tt(e);return n._iter=e,n.size=e.size,n.reverse=function(){return e},e.flip&&(n.flip=function(){var t=st(e);return t.reverse=function(){return e.flip()},t}),n.get=function(n,r){return e.get(t?n:-1-n,r)},n.has=function(n){return e.has(t?n:-1-n)},n.includes=function(t){return e.includes(t)},n.cacheResult=Dt,n.__iterate=function(t,n){var r=this;return e.__iterate(function(e,n){return t(e,n,r)},!n)},n.__iterator=function(t,n){return e.__iterator(t,!n)},n}function ct(e,t,n,r){var o=Tt(e);return r&&(o.has=function(r){var o=e.get(r,yn);return o!==yn&&!!t.call(n,o,r,e)},o.get=function(r,o){var i=e.get(r,yn);return i!==yn&&t.call(n,i,r,e)?i:o}),o.__iterateUncached=function(o,i){var a=this,s=0;return e.__iterate(function(e,i,u){if(t.call(n,e,i,u))return s++,o(e,r?i:s-1,a)},i),s},o.__iteratorUncached=function(o,i){var a=e.__iterator(Mn,i),s=0;return new w(function(){for(;;){var i=a.next();if(i.done)return i;var u=i.value,l=u[0],c=u[1];if(t.call(n,c,l,e))return M(o,r?l:s++,c,i)}})},o}function ft(e,t,n){var r=fe().asMutable();return e.__iterate(function(o,i){r.update(t.call(n,o,i,e),0,function(e){return e+1})}),r.asImmutable()}function dt(e,t,n){var r=a(e),o=(l(e)?Xe():fe()).asMutable();e.__iterate(function(i,a){o.update(t.call(n,i,a,e),function(e){return e=e||[],e.push(r?[a,i]:i),e})});var i=Et(e);return o.map(function(t){return kt(e,i(t))})}function pt(e,t,n,r){var o=e.size;if(void 0!==t&&(t=0|t),void 0!==n&&(n=n===1/0?o:0|n),y(t,n,o))return e;var i=g(t,o),a=_(n,o);if(i!==i||a!==a)return pt(e.toSeq().cacheResult(),t,n,r);var s,u=a-i;u===u&&(s=u<0?0:u);var l=Tt(e);return l.size=0===s?s:e.size&&s||void 0,!r&&I(e)&&s>=0&&(l.get=function(t,n){return t=m(this,t),t>=0&&ts)return x();var e=o.next();return r||t===wn?e:t===bn?M(t,u-1,void 0,e):M(t,u-1,e.value[1],e)})},l}function ht(e,t,n){var r=Tt(e);return r.__iterateUncached=function(r,o){var i=this;if(o)return this.cacheResult().__iterate(r,o);var a=0;return e.__iterate(function(e,o,s){return t.call(n,e,o,s)&&++a&&r(e,o,i)}),a},r.__iteratorUncached=function(r,o){var i=this;if(o)return this.cacheResult().__iterator(r,o);var a=e.__iterator(Mn,o),s=!0;return new w(function(){if(!s)return x();var e=a.next();if(e.done)return e;var o=e.value,u=o[0],l=o[1];return t.call(n,l,u,i)?r===Mn?e:M(r,u,l,e):(s=!1,x())})},r}function mt(e,t,n,r){var o=Tt(e);return o.__iterateUncached=function(o,i){var a=this;if(i)return this.cacheResult().__iterate(o,i);var s=!0,u=0;return e.__iterate(function(e,i,l){if(!s||!(s=t.call(n,e,i,l)))return u++,o(e,r?i:u-1,a)}),u},o.__iteratorUncached=function(o,i){var a=this;if(i)return this.cacheResult().__iterator(o,i);var s=e.__iterator(Mn,i),u=!0,l=0;return new w(function(){var e,i,c;do{if(e=s.next(),e.done)return r||o===wn?e:o===bn?M(o,l++,void 0,e):M(o,l++,e.value[1],e);var f=e.value;i=f[0],c=f[1],u&&(u=t.call(n,c,i,a))}while(u);return o===Mn?e:M(o,i,c,e)})},o}function vt(e,t){var r=a(e),o=[e].concat(t).map(function(e){return i(e)?r&&(e=n(e)):e=r?F(e):H(Array.isArray(e)?e:[e]),e}).filter(function(e){return 0!==e.size});if(0===o.length)return e;if(1===o.length){var u=o[0];if(u===e||r&&a(u)||s(e)&&s(u))return u}var l=new Y(o);return r?l=l.toKeyedSeq():s(e)||(l=l.toSetSeq()),l=l.flatten(!0),l.size=o.reduce(function(e,t){if(void 0!==e){var n=t.size;if(void 0!==n)return e+n}},0),l}function yt(e,t,n){var r=Tt(e);return r.__iterateUncached=function(r,o){function a(e,l){var c=this;e.__iterate(function(e,o){return(!t||l0}function xt(e,n,r){var o=Tt(e);return o.size=new Y(r).map(function(e){return e.size}).min(),o.__iterate=function(e,t){for(var n,r=this.__iterator(wn,t),o=0;!(n=r.next()).done&&e(n.value,o++,this)!==!1;);return o},o.__iteratorUncached=function(e,o){var i=r.map(function(e){return e=t(e),S(o?e.reverse():e)}),a=0,s=!1;return new w(function(){var t;return s||(t=i.map(function(e){return e.next()}),s=t.some(function(e){return e.done})),s?x():M(e,a++,n.apply(null,t.map(function(e){return e.value})))})},o}function kt(e,t){return I(e)?t:e.constructor(t)}function Lt(e){if(e!==Object(e))throw new TypeError("Expected [K, V] tuple: "+e)}function St(e){return ce(e.size),h(e)}function Et(e){return a(e)?n:s(e)?r:o}function Tt(e){return Object.create((a(e)?O:s(e)?C:P).prototype)}function Dt(){return this._iter.cacheResult?(this._iter.cacheResult(),this.size=this._iter.size,this):D.prototype.cacheResult.call(this)}function Ot(e,t){return e>t?1:et?-1:0}function on(e){if(e.size===1/0)return 0;var t=l(e),n=a(e),r=t?1:0,o=e.__iterate(n?t?function(e,t){r=31*r+sn(ie(e),ie(t))|0}:function(e,t){r=r+sn(ie(e),ie(t))|0}:t?function(e){r=31*r+ie(e)|0}:function(e){r=r+ie(e)|0});return an(o,r)}function an(e,t){return t=Cn(t,3432918353),t=Cn(t<<15|t>>>-15,461845907),t=Cn(t<<13|t>>>-13,5),t=(t+3864292196|0)^e,t=Cn(t^t>>>16,2246822507),t=Cn(t^t>>>13,3266489909),t=oe(t^t>>>16)}function sn(e,t){return e^t+2654435769+(e<<6)+(e>>2)|0}var un=Array.prototype.slice;e(n,t),e(r,t),e(o,t),t.isIterable=i,t.isKeyed=a,t.isIndexed=s,t.isAssociative=u,t.isOrdered=l,t.Keyed=n,t.Indexed=r,t.Set=o;var ln="@@__IMMUTABLE_ITERABLE__@@",cn="@@__IMMUTABLE_KEYED__@@",fn="@@__IMMUTABLE_INDEXED__@@",dn="@@__IMMUTABLE_ORDERED__@@",pn="delete",hn=5,mn=1<r?x():M(e,o,n[t?r-o++:o++])})},e(j,O),j.prototype.get=function(e,t){return void 0===t||this.has(e)?this._object[e]:t},j.prototype.has=function(e){return this._object.hasOwnProperty(e)},j.prototype.__iterate=function(e,t){for(var n=this._object,r=this._keys,o=r.length-1,i=0;i<=o;i++){var a=r[t?o-i:i];if(e(n[a],a,this)===!1)return i+1}return i},j.prototype.__iterator=function(e,t){var n=this._object,r=this._keys,o=r.length-1,i=0;return new w(function(){var a=r[t?o-i:i];return i++>o?x():M(e,a,n[a])})},j.prototype[dn]=!0,e(A,C),A.prototype.__iterateUncached=function(e,t){if(t)return this.cacheResult().__iterate(e,t);var n=this._iterable,r=S(n),o=0;if(L(r))for(var i;!(i=r.next()).done&&e(i.value,o++,this)!==!1;);return o},A.prototype.__iteratorUncached=function(e,t){if(t)return this.cacheResult().__iterator(e,t);var n=this._iterable,r=S(n);if(!L(r))return new w(x);var o=0;return new w(function(){var t=r.next();return t.done?t:M(e,o++,t.value)})},e(N,C),N.prototype.__iterateUncached=function(e,t){if(t)return this.cacheResult().__iterate(e,t);for(var n=this._iterator,r=this._iteratorCache,o=0;o=r.length){var t=n.next();if(t.done)return t;r[o]=t.value}return M(e,o,r[o++])})};var En;e($,C),$.prototype.toString=function(){return 0===this.size?"Repeat []":"Repeat [ "+this._value+" "+this.size+" times ]"},$.prototype.get=function(e,t){return this.has(e)?this._value:t},$.prototype.includes=function(e){return J(this._value,e)},$.prototype.slice=function(e,t){var n=this.size;return y(e,t,n)?this:new $(this._value,_(t,n)-g(e,n))},$.prototype.reverse=function(){return this},$.prototype.indexOf=function(e){return J(this._value,e)?0:-1},$.prototype.lastIndexOf=function(e){return J(this._value,e)?this.size:-1},$.prototype.__iterate=function(e,t){for(var n=0;n=0&&t=0&&nn?x():M(e,i++,a)})},Z.prototype.equals=function(e){return e instanceof Z?this._start===e._start&&this._end===e._end&&this._step===e._step:Q(this,e)};var Dn;e(ee,t),e(te,ee),e(ne,ee),e(re,ee),ee.Keyed=te,ee.Indexed=ne,ee.Set=re;var On,Cn="function"==typeof Math.imul&&Math.imul(4294967295,2)===-2?Math.imul:function(e,t){e=0|e,t=0|t;var n=65535&e,r=65535&t;return n*r+((e>>>16)*r+n*(t>>>16)<<16>>>0)|0},Pn=Object.isExtensible,Yn=function(){try{return Object.defineProperty({},"@",{}),!0}catch(e){return!1}}(),jn="function"==typeof WeakMap;jn&&(On=new WeakMap);var An=0,Nn="__immutablehash__";"function"==typeof Symbol&&(Nn=Symbol(Nn));var In=16,Rn=255,Fn=0,Hn={};e(fe,te),fe.of=function(){var e=un.call(arguments,0);return Me().withMutations(function(t){for(var n=0;n=e.length)throw new Error("Missing value for key: "+e[n]);t.set(e[n],e[n+1])}})},fe.prototype.toString=function(){return this.__toString("Map {","}")},fe.prototype.get=function(e,t){return this._root?this._root.get(0,void 0,e,t):t},fe.prototype.set=function(e,t){return xe(this,e,t)},fe.prototype.setIn=function(e,t){return this.updateIn(e,yn,function(){return t})},fe.prototype.remove=function(e){return xe(this,e,yn)},fe.prototype.deleteIn=function(e){return this.updateIn(e,function(){return yn})},fe.prototype.update=function(e,t,n){return 1===arguments.length?e(this):this.updateIn([e],t,n)},fe.prototype.updateIn=function(e,t,n){n||(n=t,t=void 0);var r=je(this,Ct(e),t,n);return r===yn?void 0:r},fe.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._root=null,this.__hash=void 0,this.__altered=!0,this):Me()},fe.prototype.merge=function(){return Oe(this,void 0,arguments)},fe.prototype.mergeWith=function(e){var t=un.call(arguments,1);return Oe(this,e,t)},fe.prototype.mergeIn=function(e){var t=un.call(arguments,1);return this.updateIn(e,Me(),function(e){return"function"==typeof e.merge?e.merge.apply(e,t):t[t.length-1]})},fe.prototype.mergeDeep=function(){return Oe(this,Ce,arguments)},fe.prototype.mergeDeepWith=function(e){var t=un.call(arguments,1);return Oe(this,Pe(e),t)},fe.prototype.mergeDeepIn=function(e){var t=un.call(arguments,1);return this.updateIn(e,Me(),function(e){return"function"==typeof e.mergeDeep?e.mergeDeep.apply(e,t):t[t.length-1]})},fe.prototype.sort=function(e){return Xe(bt(this,e))},fe.prototype.sortBy=function(e,t){return Xe(bt(this,t,e))},fe.prototype.withMutations=function(e){var t=this.asMutable();return e(t),t.wasAltered()?t.__ensureOwner(this.__ownerID):this},fe.prototype.asMutable=function(){return this.__ownerID?this:this.__ensureOwner(new d)},fe.prototype.asImmutable=function(){return this.__ensureOwner()},fe.prototype.wasAltered=function(){return this.__altered},fe.prototype.__iterator=function(e,t){return new ge(this,e,t)},fe.prototype.__iterate=function(e,t){var n=this,r=0;return this._root&&this._root.iterate(function(t){return r++,e(t[1],t[0],n)},t),r},fe.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?we(this.size,this._root,e,this.__hash):(this.__ownerID=e,this.__altered=!1,this)},fe.isMap=de;var zn="@@__IMMUTABLE_MAP__@@",Wn=fe.prototype;Wn[zn]=!0,Wn[pn]=Wn.remove,Wn.removeIn=Wn.deleteIn,pe.prototype.get=function(e,t,n,r){for(var o=this.entries,i=0,a=o.length;i=Bn)return Ee(e,u,r,o);var h=e&&e===this.ownerID,m=h?u:p(u);return d?s?l===c-1?m.pop():m[l]=m.pop():m[l]=[r,o]:m.push([r,o]),h?(this.entries=m,this):new pe(e,m)}},he.prototype.get=function(e,t,n,r){void 0===t&&(t=ie(n));var o=1<<((0===e?t:t>>>e)&vn),i=this.bitmap;return 0===(i&o)?r:this.nodes[Ae(i&o-1)].get(e+hn,t,n,r)},he.prototype.update=function(e,t,n,r,o,i,a){void 0===n&&(n=ie(r));var s=(0===t?n:n>>>t)&vn,u=1<=qn)return De(e,d,l,s,h);if(c&&!h&&2===d.length&&Le(d[1^f]))return d[1^f];if(c&&h&&1===d.length&&Le(h))return h;var m=e&&e===this.ownerID,v=c?h?l:l^u:l|u,y=c?h?Ne(d,f,h,m):Re(d,f,m):Ie(d,f,h,m);return m?(this.bitmap=v,this.nodes=y,this):new he(e,v,y)},me.prototype.get=function(e,t,n,r){void 0===t&&(t=ie(n));var o=(0===e?t:t>>>e)&vn,i=this.nodes[o];return i?i.get(e+hn,t,n,r):r},me.prototype.update=function(e,t,n,r,o,i,a){void 0===n&&(n=ie(r));var s=(0===t?n:n>>>t)&vn,u=o===yn,l=this.nodes,c=l[s];if(u&&!c)return this;var f=ke(c,e,t+hn,n,r,o,i,a);if(f===c)return this;var d=this.count;if(c){if(!f&&(d--,d=0&&e>>t&vn;if(r>=this.array.length)return new ze([],e);var o,i=0===r;if(t>0){var a=this.array[r];if(o=a&&a.removeBefore(e,t-hn,n),o===a&&i)return this}if(i&&!o)return this;var s=Ge(this,e);if(!i)for(var u=0;u>>t&vn;if(r>=this.array.length)return this;var o;if(t>0){var i=this.array[r];if(o=i&&i.removeAfter(e,t-hn,n),o===i&&r===this.array.length-1)return this}var a=Ge(this,e);return a.array.splice(r+1),o&&(a.array[r]=o),a};var Jn,Qn={};e(Xe,fe),Xe.of=function(){return this(arguments)},Xe.prototype.toString=function(){return this.__toString("OrderedMap {","}")},Xe.prototype.get=function(e,t){var n=this._map.get(e);return void 0!==n?this._list.get(n)[1]:t},Xe.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._map.clear(), -this._list.clear(),this):tt()},Xe.prototype.set=function(e,t){return nt(this,e,t)},Xe.prototype.remove=function(e){return nt(this,e,yn)},Xe.prototype.wasAltered=function(){return this._map.wasAltered()||this._list.wasAltered()},Xe.prototype.__iterate=function(e,t){var n=this;return this._list.__iterate(function(t){return t&&e(t[1],t[0],n)},t)},Xe.prototype.__iterator=function(e,t){return this._list.fromEntrySeq().__iterator(e,t)},Xe.prototype.__ensureOwner=function(e){if(e===this.__ownerID)return this;var t=this._map.__ensureOwner(e),n=this._list.__ensureOwner(e);return e?et(t,n,e,this.__hash):(this.__ownerID=e,this._map=t,this._list=n,this)},Xe.isOrderedMap=Ze,Xe.prototype[dn]=!0,Xe.prototype[pn]=Xe.prototype.remove;var $n;e(rt,O),rt.prototype.get=function(e,t){return this._iter.get(e,t)},rt.prototype.has=function(e){return this._iter.has(e)},rt.prototype.valueSeq=function(){return this._iter.valueSeq()},rt.prototype.reverse=function(){var e=this,t=lt(this,!0);return this._useKeys||(t.valueSeq=function(){return e._iter.toSeq().reverse()}),t},rt.prototype.map=function(e,t){var n=this,r=ut(this,e,t);return this._useKeys||(r.valueSeq=function(){return n._iter.toSeq().map(e,t)}),r},rt.prototype.__iterate=function(e,t){var n,r=this;return this._iter.__iterate(this._useKeys?function(t,n){return e(t,n,r)}:(n=t?St(this):0,function(o){return e(o,t?--n:n++,r)}),t)},rt.prototype.__iterator=function(e,t){if(this._useKeys)return this._iter.__iterator(e,t);var n=this._iter.__iterator(wn,t),r=t?St(this):0;return new w(function(){var o=n.next();return o.done?o:M(e,t?--r:r++,o.value,o)})},rt.prototype[dn]=!0,e(ot,C),ot.prototype.includes=function(e){return this._iter.includes(e)},ot.prototype.__iterate=function(e,t){var n=this,r=0;return this._iter.__iterate(function(t){return e(t,r++,n)},t)},ot.prototype.__iterator=function(e,t){var n=this._iter.__iterator(wn,t),r=0;return new w(function(){var t=n.next();return t.done?t:M(e,r++,t.value,t)})},e(it,P),it.prototype.has=function(e){return this._iter.includes(e)},it.prototype.__iterate=function(e,t){var n=this;return this._iter.__iterate(function(t){return e(t,t,n)},t)},it.prototype.__iterator=function(e,t){var n=this._iter.__iterator(wn,t);return new w(function(){var t=n.next();return t.done?t:M(e,t.value,t.value,t)})},e(at,O),at.prototype.entrySeq=function(){return this._iter.toSeq()},at.prototype.__iterate=function(e,t){var n=this;return this._iter.__iterate(function(t){if(t){Lt(t);var r=i(t);return e(r?t.get(1):t[1],r?t.get(0):t[0],n)}},t)},at.prototype.__iterator=function(e,t){var n=this._iter.__iterator(wn,t);return new w(function(){for(;;){var t=n.next();if(t.done)return t;var r=t.value;if(r){Lt(r);var o=i(r);return M(e,o?r.get(0):r[0],o?r.get(1):r[1],t)}}})},ot.prototype.cacheResult=rt.prototype.cacheResult=it.prototype.cacheResult=at.prototype.cacheResult=Dt,e(Pt,te),Pt.prototype.toString=function(){return this.__toString(jt(this)+" {","}")},Pt.prototype.has=function(e){return this._defaultValues.hasOwnProperty(e)},Pt.prototype.get=function(e,t){if(!this.has(e))return t;var n=this._defaultValues[e];return this._map?this._map.get(e,n):n},Pt.prototype.clear=function(){if(this.__ownerID)return this._map&&this._map.clear(),this;var e=this.constructor;return e._empty||(e._empty=Yt(this,Me()))},Pt.prototype.set=function(e,t){if(!this.has(e))throw new Error('Cannot set unknown key "'+e+'" on '+jt(this));if(this._map&&!this._map.has(e)){var n=this._defaultValues[e];if(t===n)return this}var r=this._map&&this._map.set(e,t);return this.__ownerID||r===this._map?this:Yt(this,r)},Pt.prototype.remove=function(e){if(!this.has(e))return this;var t=this._map&&this._map.remove(e);return this.__ownerID||t===this._map?this:Yt(this,t)},Pt.prototype.wasAltered=function(){return this._map.wasAltered()},Pt.prototype.__iterator=function(e,t){var r=this;return n(this._defaultValues).map(function(e,t){return r.get(t)}).__iterator(e,t)},Pt.prototype.__iterate=function(e,t){var r=this;return n(this._defaultValues).map(function(e,t){return r.get(t)}).__iterate(e,t)},Pt.prototype.__ensureOwner=function(e){if(e===this.__ownerID)return this;var t=this._map&&this._map.__ensureOwner(e);return e?Yt(this,t,e):(this.__ownerID=e,this._map=t,this)};var Xn=Pt.prototype;Xn[pn]=Xn.remove,Xn.deleteIn=Xn.removeIn=Wn.removeIn,Xn.merge=Wn.merge,Xn.mergeWith=Wn.mergeWith,Xn.mergeIn=Wn.mergeIn,Xn.mergeDeep=Wn.mergeDeep,Xn.mergeDeepWith=Wn.mergeDeepWith,Xn.mergeDeepIn=Wn.mergeDeepIn,Xn.setIn=Wn.setIn,Xn.update=Wn.update,Xn.updateIn=Wn.updateIn,Xn.withMutations=Wn.withMutations,Xn.asMutable=Wn.asMutable,Xn.asImmutable=Wn.asImmutable,e(It,re),It.of=function(){return this(arguments)},It.fromKeys=function(e){return this(n(e).keySeq())},It.prototype.toString=function(){return this.__toString("Set {","}")},It.prototype.has=function(e){return this._map.has(e)},It.prototype.add=function(e){return Ft(this,this._map.set(e,!0))},It.prototype.remove=function(e){return Ft(this,this._map.remove(e))},It.prototype.clear=function(){return Ft(this,this._map.clear())},It.prototype.union=function(){var e=un.call(arguments,0);return e=e.filter(function(e){return 0!==e.size}),0===e.length?this:0!==this.size||this.__ownerID||1!==e.length?this.withMutations(function(t){for(var n=0;n=0;n--)t={value:arguments[n],next:t};return this.__ownerID?(this.size=e,this._head=t,this.__hash=void 0,this.__altered=!0,this):Kt(e,t)},Vt.prototype.pushAll=function(e){if(e=r(e),0===e.size)return this;ce(e.size);var t=this.size,n=this._head;return e.reverse().forEach(function(e){t++,n={value:e,next:n}}),this.__ownerID?(this.size=t,this._head=n,this.__hash=void 0,this.__altered=!0,this):Kt(t,n)},Vt.prototype.pop=function(){return this.slice(1)},Vt.prototype.unshift=function(){return this.push.apply(this,arguments)},Vt.prototype.unshiftAll=function(e){return this.pushAll(e)},Vt.prototype.shift=function(){return this.pop.apply(this,arguments)},Vt.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._head=void 0,this.__hash=void 0,this.__altered=!0,this):Jt()},Vt.prototype.slice=function(e,t){if(y(e,t,this.size))return this;var n=g(e,this.size),r=_(t,this.size);if(r!==this.size)return ne.prototype.slice.call(this,e,t);for(var o=this.size-n,i=this._head;n--;)i=i.next;return this.__ownerID?(this.size=o,this._head=i,this.__hash=void 0,this.__altered=!0,this):Kt(o,i)},Vt.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?Kt(this.size,this._head,e,this.__hash):(this.__ownerID=e,this.__altered=!1,this)},Vt.prototype.__iterate=function(e,t){if(t)return this.reverse().__iterate(e);for(var n=0,r=this._head;r&&e(r.value,n++,this)!==!1;)r=r.next;return n},Vt.prototype.__iterator=function(e,t){if(t)return this.reverse().__iterator(e);var n=0,r=this._head;return new w(function(){if(r){var t=r.value;return r=r.next,M(e,n++,t)}return x()})},Vt.isStack=Gt;var or="@@__IMMUTABLE_STACK__@@",ir=Vt.prototype;ir[or]=!0,ir.withMutations=Wn.withMutations,ir.asMutable=Wn.asMutable,ir.asImmutable=Wn.asImmutable,ir.wasAltered=Wn.wasAltered;var ar;t.Iterator=w,Qt(t,{toArray:function(){ce(this.size);var e=new Array(this.size||0);return this.valueSeq().__iterate(function(t,n){e[n]=t}),e},toIndexedSeq:function(){return new ot(this)},toJS:function(){return this.toSeq().map(function(e){return e&&"function"==typeof e.toJS?e.toJS():e}).__toJS()},toJSON:function(){return this.toSeq().map(function(e){return e&&"function"==typeof e.toJSON?e.toJSON():e}).__toJS()},toKeyedSeq:function(){return new rt(this,(!0))},toMap:function(){return fe(this.toKeyedSeq())},toObject:function(){ce(this.size);var e={};return this.__iterate(function(t,n){e[n]=t}),e},toOrderedMap:function(){return Xe(this.toKeyedSeq())},toOrderedSet:function(){return Wt(a(this)?this.valueSeq():this)},toSet:function(){return It(a(this)?this.valueSeq():this)},toSetSeq:function(){return new it(this)},toSeq:function(){return s(this)?this.toIndexedSeq():a(this)?this.toKeyedSeq():this.toSetSeq()},toStack:function(){return Vt(a(this)?this.valueSeq():this)},toList:function(){return Fe(a(this)?this.valueSeq():this)},toString:function(){return"[Iterable]"},__toString:function(e,t){return 0===this.size?e+t:e+" "+this.toSeq().map(this.__toStringMapper).join(", ")+" "+t},concat:function(){var e=un.call(arguments,0);return kt(this,vt(this,e))},includes:function(e){return this.some(function(t){return J(t,e)})},entries:function(){return this.__iterator(Mn)},every:function(e,t){ce(this.size);var n=!0;return this.__iterate(function(r,o,i){if(!e.call(t,r,o,i))return n=!1,!1}),n},filter:function(e,t){return kt(this,ct(this,e,t,!0))},find:function(e,t,n){var r=this.findEntry(e,t);return r?r[1]:n},forEach:function(e,t){return ce(this.size),this.__iterate(t?e.bind(t):e)},join:function(e){ce(this.size),e=void 0!==e?""+e:",";var t="",n=!0;return this.__iterate(function(r){n?n=!1:t+=e,t+=null!==r&&void 0!==r?r.toString():""}),t},keys:function(){return this.__iterator(bn)},map:function(e,t){return kt(this,ut(this,e,t))},reduce:function(e,t,n){ce(this.size);var r,o;return arguments.length<2?o=!0:r=t,this.__iterate(function(t,i,a){o?(o=!1,r=t):r=e.call(n,r,t,i,a)}),r},reduceRight:function(e,t,n){var r=this.toKeyedSeq().reverse();return r.reduce.apply(r,arguments)},reverse:function(){return kt(this,lt(this,!0))},slice:function(e,t){return kt(this,pt(this,e,t,!0))},some:function(e,t){return!this.every(Zt(e),t)},sort:function(e){return kt(this,bt(this,e))},values:function(){return this.__iterator(wn)},butLast:function(){return this.slice(0,-1)},isEmpty:function(){return void 0!==this.size?0===this.size:!this.some(function(){return!0})},count:function(e,t){return h(e?this.toSeq().filter(e,t):this)},countBy:function(e,t){return ft(this,e,t)},equals:function(e){return Q(this,e)},entrySeq:function(){var e=this;if(e._cache)return new Y(e._cache);var t=e.toSeq().map(Xt).toIndexedSeq();return t.fromEntrySeq=function(){return e.toSeq()},t},filterNot:function(e,t){return this.filter(Zt(e),t)},findEntry:function(e,t,n){var r=n;return this.__iterate(function(n,o,i){if(e.call(t,n,o,i))return r=[o,n],!1}),r},findKey:function(e,t){var n=this.findEntry(e,t);return n&&n[0]},findLast:function(e,t,n){return this.toKeyedSeq().reverse().find(e,t,n)},findLastEntry:function(e,t,n){return this.toKeyedSeq().reverse().findEntry(e,t,n)},findLastKey:function(e,t){return this.toKeyedSeq().reverse().findKey(e,t)},first:function(){return this.find(v)},flatMap:function(e,t){return kt(this,gt(this,e,t))},flatten:function(e){return kt(this,yt(this,e,!0))},fromEntrySeq:function(){return new at(this)},get:function(e,t){return this.find(function(t,n){return J(n,e)},void 0,t)},getIn:function(e,t){for(var n,r=this,o=Ct(e);!(n=o.next()).done;){var i=n.value;if(r=r&&r.get?r.get(i,yn):yn,r===yn)return t}return r},groupBy:function(e,t){return dt(this,e,t)},has:function(e){return this.get(e,yn)!==yn},hasIn:function(e){return this.getIn(e,yn)!==yn},isSubset:function(e){return e="function"==typeof e.includes?e:t(e),this.every(function(t){return e.includes(t)})},isSuperset:function(e){return e="function"==typeof e.isSubset?e:t(e),e.isSubset(this)},keyOf:function(e){return this.findKey(function(t){return J(t,e)})},keySeq:function(){return this.toSeq().map($t).toIndexedSeq()},last:function(){return this.toSeq().reverse().first()},lastKeyOf:function(e){return this.toKeyedSeq().reverse().keyOf(e)},max:function(e){return wt(this,e)},maxBy:function(e,t){return wt(this,t,e)},min:function(e){return wt(this,e?en(e):rn)},minBy:function(e,t){return wt(this,t?en(t):rn,e)},rest:function(){return this.slice(1)},skip:function(e){return this.slice(Math.max(0,e))},skipLast:function(e){return kt(this,this.toSeq().reverse().skip(e).reverse())},skipWhile:function(e,t){return kt(this,mt(this,e,t,!0))},skipUntil:function(e,t){return this.skipWhile(Zt(e),t)},sortBy:function(e,t){return kt(this,bt(this,t,e))},take:function(e){return this.slice(0,Math.max(0,e))},takeLast:function(e){return kt(this,this.toSeq().reverse().take(e).reverse())},takeWhile:function(e,t){return kt(this,ht(this,e,t))},takeUntil:function(e,t){return this.takeWhile(Zt(e),t)},valueSeq:function(){return this.toIndexedSeq()},hashCode:function(){return this.__hash||(this.__hash=on(this))}});var sr=t.prototype;sr[ln]=!0,sr[Ln]=sr.values,sr.__toJS=sr.toArray,sr.__toStringMapper=tn,sr.inspect=sr.toSource=function(){return this.toString()},sr.chain=sr.flatMap,sr.contains=sr.includes,Qt(n,{flip:function(){return kt(this,st(this))},mapEntries:function(e,t){var n=this,r=0;return kt(this,this.toSeq().map(function(o,i){return e.call(t,[i,o],r++,n)}).fromEntrySeq())},mapKeys:function(e,t){var n=this;return kt(this,this.toSeq().flip().map(function(r,o){return e.call(t,r,o,n)}).flip())}});var ur=n.prototype;ur[cn]=!0,ur[Ln]=sr.entries,ur.__toJS=sr.toObject,ur.__toStringMapper=function(e,t){return JSON.stringify(t)+": "+tn(e)},Qt(r,{toKeyedSeq:function(){return new rt(this,(!1))},filter:function(e,t){return kt(this,ct(this,e,t,!1))},findIndex:function(e,t){var n=this.findEntry(e,t);return n?n[0]:-1},indexOf:function(e){var t=this.keyOf(e);return void 0===t?-1:t},lastIndexOf:function(e){var t=this.lastKeyOf(e);return void 0===t?-1:t},reverse:function(){return kt(this,lt(this,!1))},slice:function(e,t){return kt(this,pt(this,e,t,!1))},splice:function(e,t){var n=arguments.length;if(t=Math.max(0|t,0),0===n||2===n&&!t)return this;e=g(e,e<0?this.count():this.size);var r=this.slice(0,e);return kt(this,1===n?r:r.concat(p(arguments,2),this.slice(e+t)))},findLastIndex:function(e,t){var n=this.findLastEntry(e,t);return n?n[0]:-1},first:function(){return this.get(0)},flatten:function(e){return kt(this,yt(this,e,!1))},get:function(e,t){return e=m(this,e),e<0||this.size===1/0||void 0!==this.size&&e>this.size?t:this.find(function(t,n){return n===e},void 0,t)},has:function(e){return e=m(this,e),e>=0&&(void 0!==this.size?this.size===1/0||e=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function i(){return{fields:{SchemaField:n(409)["default"],TitleField:C["default"],DescriptionField:Y["default"]},widgets:{},definitions:{}}}function a(e,t){return"undefined"==typeof e?t["default"]:e}function s(e,t){var n=arguments.length<=2||void 0===arguments[2]?{}:arguments[2],r=e.type,o=e.format;if("function"==typeof t)return t;if("string"!=typeof t)throw new Error("Unsupported widget definition: "+("undefined"==typeof t?"undefined":E(t)));if(t in n)return n[t];if(!ce.hasOwnProperty(r))throw new Error("No alternative widget for type "+r);if(ce[r].hasOwnProperty(t))return ce[r][t];if("string"===r&&fe.hasOwnProperty(o))return fe[o];var i="string"===r&&o?"/"+o:"";throw new Error('No alternative widget "'+t+'" for type '+r+i)}function u(e,t){var n=arguments.length<=2||void 0===arguments[2]?{}:arguments[2],r=t;if(c(r)&&c(e["default"]))r=f(r,e["default"]);else if("default"in e)r=e["default"];else if("enum"in e&&Array.isArray(e["enum"]))r=e["enum"][0];else{if("$ref"in e){var o=g(e.$ref,n);return u(o,r,n)}m(e)&&(r=e.items.map(function(e){return u(e,void 0,n)}))}return"undefined"==typeof r&&(r=e["default"]),"object"===e.type?Object.keys(e.properties).reduce(function(t,o){return t[o]=u(e.properties[o],(r||{})[o],n),t},{}):r}function l(e,t){var n=arguments.length<=2||void 0===arguments[2]?{}:arguments[2];if(!c(e))throw new Error("Invalid schema: "+e);var r=_(e,n),o=u(r,e["default"],n);return"undefined"==typeof t?o:c(t)?f(o,t):t||o}function c(e){return"object"===("undefined"==typeof e?"undefined":E(e))&&null!==e&&!Array.isArray(e)}function f(e,t){var n=!(arguments.length<=2||void 0===arguments[2])&&arguments[2],r=Object.assign({},e);return Object.keys(t).reduce(function(r,o){var i=e[o],a=t[o];return e.hasOwnProperty(o)&&c(a)?r[o]=f(i,a,n):n&&Array.isArray(i)&&Array.isArray(a)?r[o]=i.concat(a):r[o]=a,r},r)}function d(e){if(/\.$/.test(e))return e;var t=Number(e),n="number"==typeof t&&!Number.isNaN(t);return n?t:e}function p(e,t){if(!Array.isArray(t))return e;if(t.length!==e.length)throw new Error("uiSchema order list length should match object properties length");var n=function(e){return[].slice.call(e).sort().toString()};if(n(t)!==n(e))throw new Error("uiSchema order list does not match object properties list");return t}function h(e){return Array.isArray(e.items["enum"])&&e.uniqueItems}function m(e){return Array.isArray(e.items)&&e.items.length>0&&e.items.every(function(e){return c(e)})}function v(e){return e.additionalItems===!0&&console.warn("additionalItems=true is currently not supported"),c(e.additionalItems)}function y(e){return e["enum"].map(function(t,n){var r=e.enumNames&&e.enumNames[n]||String(t);return{label:r,value:t}})}function g(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],n=/#\/definitions\/(.*)$/.exec(e);if(n&&n[1]&&t.hasOwnProperty(n[1]))return t[n[1]];throw new Error("Could not find a definition for "+e+".")}function _(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];if(!e.hasOwnProperty("$ref"))return e;var n=g(e.$ref,t),r=(e.$ref,o(e,["$ref"]));return S({},n,r)}function b(e,t,n){return!(0,D["default"])(e.props,t)||!(0,D["default"])(e.state,n)}function w(e,t,n){var r={id:t||"root"};if("$ref"in e){var o=_(e,n);return w(o,t,n)}if("items"in e)return w(e.items,t,n);if("object"!==e.type)return r;for(var i in e.properties||{}){var a=e.properties[i],s=r.id+"_"+i;r[i]=w(a,s,n)}return r}function M(e){var t=arguments.length<=1||void 0===arguments[1]||arguments[1];if(!e)return{year:-1,month:-1,day:-1,hour:t?-1:0,minute:t?-1:0,second:t?-1:0};var n=new Date(e);if(Number.isNaN(n.getTime()))throw new Error("Unable to parse date "+e);return{year:n.getUTCFullYear(),month:n.getUTCMonth()+1,day:n.getUTCDate(),hour:t?n.getUTCHours():0,minute:t?n.getUTCMinutes():0,second:t?n.getUTCSeconds():0}}function x(e){var t=e.year,n=e.month,r=e.day,o=e.hour,i=void 0===o?0:o,a=e.minute,s=void 0===a?0:a,u=e.second,l=void 0===u?0:u,c=arguments.length<=1||void 0===arguments[1]||arguments[1],f=Date.UTC(t,n-1,r,i,s,l),d=new Date(f).toJSON();return c?d:d.slice(0,10)}function k(e,t){for(var n=String(e);n.length should not have a "'+t+'" prop')}t.__esModule=!0,t.falsy=r;var o=n(2),i=o.PropTypes.func,a=o.PropTypes.object,s=o.PropTypes.arrayOf,u=o.PropTypes.oneOfType,l=o.PropTypes.element,c=o.PropTypes.shape,f=o.PropTypes.string,d=c({listen:i.isRequired,pushState:i.isRequired,replaceState:i.isRequired,go:i.isRequired});t.history=d;var p=c({pathname:f.isRequired,search:f.isRequired,state:a,action:f.isRequired,key:f});t.location=p;var h=u([i,f]);t.component=h;var m=u([h,a]);t.components=m;var v=u([a,l]);t.route=v;var y=u([v,s(v)]);t.routes=y,t["default"]={falsy:r,history:d,location:p,component:h,components:m,route:v}},function(e,t,n){"use strict";function r(){o.attachRefs(this,this._currentElement)}var o=n(975),i={mountComponent:function(e,t,n,o){var i=e.mountComponent(t,n,o);return e._currentElement&&null!=e._currentElement.ref&&n.getReactMountReady().enqueue(r,e),i},unmountComponent:function(e){o.detachRefs(e,e._currentElement),e.unmountComponent()},receiveComponent:function(e,t,n,i){var a=e._currentElement;if(t!==a||i!==e._context){var s=o.shouldUpdateRefs(a,t);s&&o.detachRefs(e,a),e.receiveComponent(t,n,i),s&&e._currentElement&&null!=e._currentElement.ref&&n.getReactMountReady().enqueue(r,e)}},performUpdateIfNecessary:function(e,t){e.performUpdateIfNecessary(t)}};e.exports=i},function(e,t,n){"use strict";function r(e,t,n,r){this.dispatchConfig=e,this.dispatchMarker=t,this.nativeEvent=n;var o=this.constructor.Interface;for(var i in o)if(o.hasOwnProperty(i)){var s=o[i];s?this[i]=s(n):"target"===i?this.target=r:this[i]=n[i]}var u=null!=n.defaultPrevented?n.defaultPrevented:n.returnValue===!1;u?this.isDefaultPrevented=a.thatReturnsTrue:this.isDefaultPrevented=a.thatReturnsFalse,this.isPropagationStopped=a.thatReturnsFalse}var o=n(51),i=n(7),a=n(30),s=(n(6),{type:null,target:null,currentTarget:a.thatReturnsNull,eventPhase:null,bubbles:null,cancelable:null,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:null,isTrusted:null});i(r.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():e.returnValue=!1,this.isDefaultPrevented=a.thatReturnsTrue)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():e.cancelBubble=!0,this.isPropagationStopped=a.thatReturnsTrue)},persist:function(){this.isPersistent=a.thatReturnsTrue},isPersistent:a.thatReturnsFalse,destructor:function(){var e=this.constructor.Interface;for(var t in e)this[t]=null;this.dispatchConfig=null,this.dispatchMarker=null,this.nativeEvent=null}}),r.Interface=s,r.augmentClass=function(e,t){var n=this,r=Object.create(n.prototype);i(r,e.prototype),e.prototype=r,e.prototype.constructor=e,e.Interface=i({},n.Interface,t),e.augmentClass=n.augmentClass,o.addPoolingTo(e,o.fourArgumentPooler)},o.addPoolingTo(r,o.fourArgumentPooler),e.exports=r},function(e,t){"use strict";t.__esModule=!0;var n="@@reduxReactRouter/routerDidChange";t.ROUTER_DID_CHANGE=n;var r="@@reduxReactRouter/historyAPI";t.HISTORY_API=r;var o="@@reduxReactRouter/match";t.MATCH=o;var i="@@reduxReactRouter/initRoutes";t.INIT_ROUTES=i;var a="@@reduxReactRouter/replaceRoutes";t.REPLACE_ROUTES=a;var s="@@reduxReactRouter/routerStateSelector";t.ROUTER_STATE_SELECTOR=s;var u="@@reduxReactRouter/doesNeedRefresh";t.DOES_NEED_REFRESH=u},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}t.__esModule=!0,t.compose=t.applyMiddleware=t.bindActionCreators=t.combineReducers=t.createStore=void 0;var o=n(456),i=r(o),a=n(1028),s=r(a),u=n(1027),l=r(u),c=n(1026),f=r(c),d=n(455),p=r(d),h=n(457);r(h);t.createStore=i["default"],t.combineReducers=s["default"],t.bindActionCreators=l["default"],t.applyMiddleware=f["default"],t.compose=p["default"]},function(e,t,n){function r(e,t){for(var n=0;n1){var t=e.indexOf(p,1);return t>-1?e.substr(0,t):e}return null},traverseEnterLeave:function(e,t,n,r,o){var i=l(e,t);i!==e&&c(e,i,n,r,!1,!0),i!==t&&c(i,t,n,o,!0,!1)},traverseTwoPhase:function(e,t,n){e&&(c("",e,t,n,!0,!1),c(e,"",t,n,!1,!0))},traverseTwoPhaseSkipTarget:function(e,t,n){e&&(c("",e,t,n,!0,!0),c(e,"",t,n,!0,!0))},traverseAncestors:function(e,t,n){c("",e,t,n,!0,!1)},getFirstCommonAncestorID:l,_getNextDescendantID:u,isAncestorIDOf:a,SEPARATOR:p};e.exports=v},function(e,t,n){var r=n(141),o=n(52),i=n(138),a="prototype",s=function(e,t,n){var u,l,c,f=e&s.F,d=e&s.G,p=e&s.S,h=e&s.P,m=e&s.B,v=e&s.W,y=d?o:o[t]||(o[t]={}),g=d?r:p?r[t]:(r[t]||{})[a];d&&(n=t);for(u in n)l=!f&&g&&u in g,l&&u in y||(c=l?g[u]:n[u],y[u]=d&&"function"!=typeof g[u]?n[u]:m&&l?i(c,r):v&&g[u]==c?function(e){var t=function(t){return this instanceof e?new e(t):e(t)};return t[a]=e[a],t}(c):h&&"function"==typeof c?i(Function.call,c):c,h&&((y[a]||(y[a]={}))[u]=c))};s.F=1,s.G=2,s.S=4,s.P=8,s.B=16,s.W=32,e.exports=s},function(e,t,n){var r=n(33),o=n(239),i=n(236),a=n(9),s=n(21),u=n(250);e.exports=function(e,t,n,l){var c,f,d,p=u(e),h=r(n,l,t?2:1),m=0;if("function"!=typeof p)throw TypeError(e+" is not iterable!");if(i(p))for(c=s(e.length);c>m;m++)t?h(a(f=e[m])[0],f[1]):h(e[m]);else for(d=p.call(e);!(f=d.next()).done;)o(d,h,f.value,t)}},function(e,t){e.exports={}},[1067,5,20,10],function(e,t,n){var r=n(86),o=Math.max,i=Math.min;e.exports=function(e,t){return e=r(e),e<0?o(e+t,0):i(e,t)}},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,n){"use strict";var r={};e.exports=r},function(e,t,n){"use strict";var r=n(459),o=t.ValidationError=function(e,t,n,r,o,i){r&&(this.property=r),e&&(this.message=e),n&&(n.id?this.schema=n.id:this.schema=n),t&&(this.instance=t),this.name=o,this.argument=i,this.stack=this.toString()};o.prototype.toString=function(){return this.property+" "+this.message};var i=t.ValidatorResult=function(e,t,n,r){this.instance=e,this.schema=t,this.propertyPath=r.propertyPath,this.errors=[],this.throwError=n&&n.throwError,this.disableFormat=n&&n.disableFormat===!0};i.prototype.addError=function(e){var t;if("string"==typeof e)t=new o(e,this.instance,this.schema,this.propertyPath);else{if(!e)throw new Error("Missing error detail");if(!e.message)throw new Error("Missing error message");if(!e.name)throw new Error("Missing validator type");t=new o(e.message,this.instance,this.schema,this.propertyPath,e.name,e.argument)}if(this.throwError)throw t;return this.errors.push(t),t},i.prototype.importErrors=function(e){if("string"==typeof e||e&&e.validatorType)this.addError(e);else if(e&&e.errors){var t=this.errors;e.errors.forEach(function(e){t.push(e)})}},i.prototype.toString=function(e){return this.errors.map(function(e,t){return t+": "+e.toString()+"\n"}).join("")},Object.defineProperty(i.prototype,"valid",{get:function(){return!this.errors.length}});var a=t.SchemaError=function c(e,t){this.message=e,this.schema=t,Error.call(this,e),Error.captureStackTrace(this,c)};a.prototype=Object.create(Error.prototype,{constructor:{value:a,enumerable:!1},name:{value:"SchemaError",enumerable:!1}});var s=t.SchemaContext=function(e,t,n,r,o){this.schema=e,this.options=t,this.propertyPath=n,this.base=r,this.schemas=o};s.prototype.resolve=function(e){return r.resolve(this.base,e)},s.prototype.makeChild=function(e,t){var n=void 0===t?this.propertyPath:this.propertyPath+l(t),o=r.resolve(this.base,e.id||""),i=new s(e,this.options,n,o,Object.create(this.schemas));return e.id&&!i.schemas[o]&&(i.schemas[o]=e),i};var u=t.FORMAT_REGEXPS={"date-time":/^\d{4}-(?:0[0-9]{1}|1[0-2]{1})-(3[01]|0[1-9]|[12][0-9])[tT ](2[0-4]|[01][0-9]):([0-5][0-9]):(60|[0-5][0-9])(\.\d+)?([zZ]|[+-]([0-5][0-9]):(60|[0-5][0-9]))$/,date:/^\d{4}-(?:0[0-9]{1}|1[0-2]{1})-(3[01]|0[1-9]|[12][0-9])$/,time:/^(2[0-4]|[01][0-9]):([0-5][0-9]):(60|[0-5][0-9])$/,email:/^(?:[\w\!\#\$\%\&\'\*\+\-\/\=\?\^\`\{\|\}\~]+\.)*[\w\!\#\$\%\&\'\*\+\-\/\=\?\^\`\{\|\}\~]+@(?:(?:(?:[a-zA-Z0-9](?:[a-zA-Z0-9\-](?!\.)){0,61}[a-zA-Z0-9]?\.)+[a-zA-Z0-9](?:[a-zA-Z0-9\-](?!$)){0,61}[a-zA-Z0-9]?)|(?:\[(?:(?:[01]?\d{1,2}|2[0-4]\d|25[0-5])\.){3}(?:[01]?\d{1,2}|2[0-4]\d|25[0-5])\]))$/,"ip-address":/^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/,ipv6:/^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$/,uri:/^[a-zA-Z][a-zA-Z0-9+-.]*:[^\s]*$/,color:/^(#?([0-9A-Fa-f]{3}){1,2}\b|aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow|(rgb\(\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*,\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*,\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*\))|(rgb\(\s*(\d?\d%|100%)+\s*,\s*(\d?\d%|100%)+\s*,\s*(\d?\d%|100%)+\s*\)))$/,hostname:/^(?=.{1,255}$)[0-9A-Za-z](?:(?:[0-9A-Za-z]|-){0,61}[0-9A-Za-z])?(?:\.[0-9A-Za-z](?:(?:[0-9A-Za-z]|-){0,61}[0-9A-Za-z])?)*\.?$/,"host-name":/^(?=.{1,255}$)[0-9A-Za-z](?:(?:[0-9A-Za-z]|-){0,61}[0-9A-Za-z])?(?:\.[0-9A-Za-z](?:(?:[0-9A-Za-z]|-){0,61}[0-9A-Za-z])?)*\.?$/,alpha:/^[a-zA-Z]+$/,alphanumeric:/^[a-zA-Z0-9]+$/,"utc-millisec":function(e){return"string"==typeof e&&parseFloat(e)===parseInt(e,10)&&!isNaN(e)},regex:function(e){var t=!0;try{new RegExp(e)}catch(n){t=!1}return t},style:/\s*(.+?):\s*([^;]+);?/g,phone:/^\+(?:[0-9] ?){6,14}[0-9]$/};u.regexp=u.regex,u.pattern=u.regex,u.ipv4=u["ip-address"],t.isFormat=function(e,t,n){if("string"==typeof e&&void 0!==u[t]){if(u[t]instanceof RegExp)return u[t].test(e);if("function"==typeof u[t])return u[t](e)}else if(n&&n.customFormats&&"function"==typeof n.customFormats[t])return n.customFormats[t](e);return!0};var l=t.makeSuffix=function(e){return e=e.toString(),e.match(/[.\s\[\]]/)||e.match(/^[\d]/)?e.match(/^\d+$/)?"["+e+"]":"["+JSON.stringify(e)+"]":"."+e};t.deepCompareStrict=function f(e,t){if(typeof e!=typeof t)return!1;if(e instanceof Array)return t instanceof Array&&(e.length===t.length&&e.every(function(n,r){return f(e[r],t[r])}));if("object"==typeof e){if(!e||!t)return e===t;var n=Object.keys(e),r=Object.keys(t);return n.length===r.length&&n.every(function(n){return f(e[n],t[n])})}return e===t},e.exports.deepMerge=function d(e,t){var n=Array.isArray(t),r=n&&[]||{};return n?(e=e||[],r=r.concat(e),t.forEach(function(t,n){"object"==typeof t?r[n]=d(e[n],t):e.indexOf(t)===-1&&r.push(t)})):(e&&"object"==typeof e&&Object.keys(e).forEach(function(t){r[t]=e[t]}),Object.keys(t).forEach(function(n){"object"==typeof t[n]&&t[n]&&e[n]?r[n]=d(e[n],t[n]):r[n]=t[n]})),r},t.objectGetPath=function(e,t){for(var n,r=t.split("/").slice(1);"string"==typeof(n=r.shift());){var o=decodeURIComponent(n.replace(/~0/,"~").replace(/~1/g,"/"));if(!(o in e))return;e=e[o]}return e},t.encodePath=function(e){return e.map(function(e){return"/"+encodeURIComponent(e).replace(/~/g,"%7E")}).join("")}},function(e,t){function n(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}e.exports=n},function(e,t){function n(){f&&l&&(f=!1,l.length?c=l.concat(c):d=-1,c.length&&r())}function r(){if(!f){var e=a(n);f=!0;for(var t=c.length;t;){for(l=c,c=[];++d1)for(var n=1;n=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}t.__esModule=!0;var o=n(168),i=r(o);t["default"]=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==("undefined"==typeof t?"undefined":(0,i["default"])(t))&&"function"!=typeof t?e:t}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function i(e){return o(e).replace(/\/+/g,"/+")}function a(e){for(var t="",n=[],r=[],o=void 0,a=0,s=/:([a-zA-Z_$][a-zA-Z0-9_$]*)|\*\*|\*|\(|\)/g;o=s.exec(e);)o.index!==a&&(r.push(e.slice(a,o.index)),t+=i(e.slice(a,o.index))),o[1]?(t+="([^/?#]+)",n.push(o[1])):"**"===o[0]?(t+="([\\s\\S]*)",n.push("splat")):"*"===o[0]?(t+="([\\s\\S]*?)",n.push("splat")):"("===o[0]?t+="(?:":")"===o[0]&&(t+=")?"),r.push(o[0]),a=s.lastIndex;return a!==e.length&&(r.push(e.slice(a,e.length)),t+=i(e.slice(a,e.length))),{pattern:e,regexpSource:t,paramNames:n,tokens:r}}function s(e){return e in h||(h[e]=a(e)),h[e]}function u(e,t){"/"!==e.charAt(0)&&(e="/"+e),"/"!==t.charAt(0)&&(t="/"+t);var n=s(e),r=n.regexpSource,o=n.paramNames,i=n.tokens;r+="/*";var a="*"!==i[i.length-1];a&&(r+="([\\s\\S]*?)");var u=t.match(new RegExp("^"+r+"$","i")),l=void 0,c=void 0;if(null!=u){if(a){l=u.pop();var f=u[0].substr(0,u[0].length-l.length);if(l&&"/"!==f.charAt(f.length-1))return{remainingPathname:null,paramNames:o,paramValues:null}}else l="";c=u.slice(1).map(function(e){return null!=e?decodeURIComponent(e):e})}else l=c=null;return{remainingPathname:l,paramNames:o,paramValues:c}}function l(e){return s(e).paramNames}function c(e,t){var n=u(e,t),r=n.paramNames,o=n.paramValues;return null!=o?r.reduce(function(e,t,n){return e[t]=o[n],e},{}):null}function f(e,t){t=t||{};for(var n=s(e),r=n.tokens,o=0,i="",a=0,u=void 0,l=void 0,c=void 0,f=0,d=r.length;f0?void 0:p["default"](!1),null!=c&&(i+=encodeURI(c))):"("===u?o+=1:")"===u?o-=1:":"===u.charAt(0)?(l=u.substring(1),c=t[l],null!=c||o>0?void 0:p["default"](!1),null!=c&&(i+=encodeURIComponent(c))):i+=u;return i.replace(/\/+/g,"/")}t.__esModule=!0,t.compilePattern=s,t.matchPattern=u,t.getParamNames=l,t.getParams=c,t.formatPattern=f;var d=n(16),p=r(d),h={}},function(e,t,n){"use strict";var r=n(423),o=n(953),i=n(436),a=n(445),s=n(446),u=n(4),l=(n(6),{}),c=null,f=function(e,t){e&&(o.executeDispatchesInOrder(e,t),e.isPersistent()||e.constructor.release(e))},d=function(e){return f(e,!0)},p=function(e){return f(e,!1)},h=null,m={injection:{injectMount:o.injection.injectMount,injectInstanceHandle:function(e){h=e},getInstanceHandle:function(){return h},injectEventPluginOrder:r.injectEventPluginOrder,injectEventPluginsByName:r.injectEventPluginsByName},eventNameDispatchConfigs:r.eventNameDispatchConfigs,registrationNameModules:r.registrationNameModules,putListener:function(e,t,n){"function"!=typeof n?u(!1):void 0;var o=l[t]||(l[t]={});o[e]=n;var i=r.registrationNameModules[t];i&&i.didPutListener&&i.didPutListener(e,t,n)},getListener:function(e,t){var n=l[t];return n&&n[e]},deleteListener:function(e,t){var n=r.registrationNameModules[t];n&&n.willDeleteListener&&n.willDeleteListener(e,t);var o=l[t];o&&delete o[e]},deleteAllListeners:function(e){for(var t in l)if(l[t][e]){var n=r.registrationNameModules[t];n&&n.willDeleteListener&&n.willDeleteListener(e,t),delete l[t][e]}},extractEvents:function(e,t,n,o,i){for(var s,u=r.plugins,l=0;l=0&&(e._idleTimeoutId=setTimeout(function(){e._onTimeout&&e._onTimeout()},t))},t.setImmediate="function"==typeof e?e:function(e){var n=l++,r=!(arguments.length<2)&&s.call(arguments,1);return u[n]=!0,i(function(){u[n]&&(r?e.apply(null,r):e.call(null),t.clearImmediate(n))}),n},t.clearImmediate="function"==typeof r?r:function(e){delete u[e]}}).call(t,n(100).setImmediate,n(100).clearImmediate)},function(e,t,n){"use strict";function r(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t["default"]=e,t}function o(e){return{type:y.API_CONFIGURATIONS,payload:e}}function i(e){return{type:y.CONFIG_HEADERS,headers:e}}function a(e){return function(t){var n=function(n){return t(s(e,"["+e.friendlyName+"] "+n))},r=function(n){return t(u(e,n))},o=function(n){return t(s(e,"["+e.friendlyName+"] "+n))},i=function(n){return t(l(e,n))},a=function(n){return t(c(e,n))},d=function(n){return t(f(e,n))};t({type:y.LOAD_START,config:e}),t({type:y.CONFIG_URL,url:e.url}),e.loader(e,{onLoadProgress:n,onNewAPI:i,onNewOperation:a,onNewDefinition:d,onLoadCompleted:r,onLoadError:o})}}function s(e,t){return{type:y.UPDATE_PROGRESS,config:e,currentStep:t}}function u(e,t){return{type:y.LOAD_COMPLETE,config:e,apis:t}}function l(e,t){return{type:y.NEW_API,config:e,api:t}}function c(e,t){return{type:y.NEW_OPERATION,config:e,operation:t}}function f(e,t){return{type:y.NEW_DEFINITION,config:e,definition:t}}function d(e){return{type:y.SELECTED_OPERATION,operationId:e}}function p(e,t){return{type:y.NEW_PARAMETERS,operationName:e,parameters:t}}function h(e,t){return{type:y.LOCAL_PARAMETERS,operationName:e,parameters:t}}function m(e,t){return{type:y.NEW_RESPONSE,operation:e,response:t}}Object.defineProperty(t,"__esModule",{value:!0}),t.apiConfigurations=o,t.headers=i,t.load=a,t.selectedOperation=d,t.newParameters=p,t.localParameters=h,t.newResponse=m;var v=n(25),y=r(v)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{ -value:!0});var o=n(473),i=r(o);t.OperationsFilter=i["default"];var a=n(468),s=r(a);t.ApplicationLoading=s["default"];var u=n(470),l=r(u);t.ExplorerHeader=l["default"];var c=n(471),f=r(c);t.LateralMenu=f["default"];var d=n(477),p=r(d);t.ResponseSchemaWidgetTab=p["default"];var h=n(478),m=r(h);t.SpecWidgetTab=m["default"];var v=n(479),y=r(v);t.TryOutWidgetTab=y["default"];var g=n(467),_=r(g);t.ApplicationAskForAPI=_["default"];var b=n(466),w=r(b);t.APICounter=w["default"]},function(e,t,n){var r=n(33),o=n(108),i=n(42),a=n(21),s=n(602);e.exports=function(e){var t=1==e,n=2==e,u=3==e,l=4==e,c=6==e,f=5==e||c;return function(d,p,h){for(var m,v,y=i(d),g=o(y),_=r(p,h,3),b=a(g.length),w=0,M=t?s(d,b):n?s(d,0):void 0;b>w;w++)if((f||w in g)&&(m=g[w],v=_(m,w,y),e))if(t)M[w]=v;else if(v)switch(e){case 3:return!0;case 5:return m;case 6:return w;case 2:M.push(m)}else if(l)return!1;return c?-1:u||l?l:M}}},[1054,40,10],function(e,t,n){"use strict";var r=n(11),o=n(3),i=n(28),a=n(109),s=n(82),u=n(111),l=n(8),c=n(12),f=n(148),d=n(84);e.exports=function(e,t,n,p,h,m){var v=r[e],y=v,g=h?"set":"add",_=y&&y.prototype,b={},w=function(e){var t=_[e];i(_,e,"delete"==e?function(e){return!(m&&!l(e))&&t.call(this,0===e?0:e)}:"has"==e?function(e){return!(m&&!l(e))&&t.call(this,0===e?0:e)}:"get"==e?function(e){return m&&!l(e)?void 0:t.call(this,0===e?0:e)}:"add"==e?function(e){return t.call(this,0===e?0:e),this}:function(e,n){return t.call(this,0===e?0:e,n),this})};if("function"==typeof y&&(m||_.forEach&&!c(function(){(new y).entries().next()}))){var M,x=new y,k=x[g](m?{}:-0,1)!=x,L=c(function(){x.has(1)}),S=f(function(e){new y(e)});S||(y=t(function(t,n){u(t,y,e);var r=new v;return void 0!=n&&s(n,h,r[g],r),r}),y.prototype=_,_.constructor=y),m||x.forEach(function(e,t){M=1/t===-(1/0)}),(L||M)&&(w("delete"),w("has"),h&&w("get")),(M||k)&&w(g),m&&_.clear&&delete _.clear}else y=p.getConstructor(t,e,h,g),a(y.prototype,n);return d(y,e),b[e]=y,o(o.G+o.W+o.F*(y!=v),b),m||p.setStrong(y,e,h),y}},function(e,t,n){"use strict";var r=n(35),o=n(28),i=n(12),a=n(34),s=n(10);e.exports=function(e,t,n){var u=s(e),l=""[e];i(function(){var t={};return t[u]=function(){return 7},7!=""[e](t)})&&(o(String.prototype,e,n(a,u,l)),r(RegExp.prototype,u,2==t?function(e,t){return l.call(e,this,t)}:function(e){return l.call(e,this)}))}},function(e,t){e.exports=function(e,t,n){var r=void 0===n;switch(t.length){case 0:return r?e():e.call(n);case 1:return r?e(t[0]):e.call(n,t[0]);case 2:return r?e(t[0],t[1]):e.call(n,t[0],t[1]);case 3:return r?e(t[0],t[1],t[2]):e.call(n,t[0],t[1],t[2]);case 4:return r?e(t[0],t[1],t[2],t[3]):e.call(n,t[0],t[1],t[2],t[3])}return e.apply(n,t)}},[1058,40],function(e,t,n){var r=n(28);e.exports=function(e,t){for(var n in t)r(e,n,t[n]);return e}},function(e,t,n){"use strict";var r=n(11),o=n(5),i=n(26),a=n(10)("species");e.exports=function(e){var t=r[e];i&&t&&!t[a]&&o.setDesc(t,a,{configurable:!0,get:function(){return this}})}},function(e,t){e.exports=function(e,t,n){if(!(e instanceof t))throw TypeError(n+": use the 'new' operator!");return e}},function(e,t,n){var r=n(3),o=n(34),i=n(12),a="\t\n\x0B\f\r   ᠎              \u2028\u2029\ufeff",s="["+a+"]",u="​…",l=RegExp("^"+s+s+"*"),c=RegExp(s+s+"*$"),f=function(e,t){var n={};n[e]=t(d),r(r.P+r.F*i(function(){return!!a[e]()||u[e]()!=u}),"String",n)},d=f.trim=function(e,t){return e=String(o(e)),1&t&&(e=e.replace(l,"")),2&t&&(e=e.replace(c,"")),e};e.exports=f},function(e,t,n){"use strict";var r=n(4),o=function(e){var t,n={};e instanceof Object&&!Array.isArray(e)?void 0:r(!1);for(t in e)e.hasOwnProperty(t)&&(n[t]=t);return n};e.exports=o},function(e,t){"use strict";t.__esModule=!0;var n=!("undefined"==typeof window||!window.document||!window.document.createElement);t.canUseDOM=n},function(e,t,n){function r(e){var t=-1,n=e?e.length:0;for(this.clear();++t-1&&e%1==0&&e<=r}var r=9007199254740991;e.exports=n},function(e,t,n){function r(e){if(!a(e)||d.call(e)!=s||i(e))return!1;var t=o(e);if(null===t)return!0;var n=c.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&l.call(n)==f}var o=n(277),i=n(161),a=n(70),s="[object Object]",u=Object.prototype,l=Function.prototype.toString,c=u.hasOwnProperty,f=l.call(Object),d=u.toString;e.exports=r},function(e,t,n){function r(e){return"symbol"==typeof e||o(e)&&s.call(e)==i}var o=n(70),i="[object Symbol]",a=Object.prototype,s=a.toString;e.exports=r},83,function(e,t){t.f={}.propertyIsEnumerable},54,67,function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){return"boolean"===e?"true"===t:"number"===e?(0,u.asNumber)(t):t}function i(e){var t=e.schema,n=e.id,r=e.options,i=e.placeholder,a=e.value,u=e.required,l=e.disabled,c=e.readonly,f=e.multiple,d=e.onChange;return s["default"].createElement("select",{id:n,multiple:f,className:"form-control",title:i,value:a,required:u,disabled:l,readOnly:c,onChange:function(e){var n=void 0;n=f?[].filter.call(e.target.options,function(e){return e.selected}).map(function(e){return e.value}):e.target.value,d(o(t.type,n))}},r.map(function(e,t){var n=e.value,r=e.label;return s["default"].createElement("option",{key:t,value:n},r)}))}Object.defineProperty(t,"__esModule",{value:!0});var a=n(2),s=r(a),u=n(31);t["default"]=i},function(e,t,n){"use strict";function r(e){return Object.prototype.hasOwnProperty.call(e,v)||(e[v]=h++,d[e[v]]={}),d[e[v]]}var o=n(38),i=n(96),a=n(423),s=n(968),u=n(23),l=n(444),c=n(7),f=n(199),d={},p=!1,h=0,m={topAbort:"abort",topBlur:"blur",topCanPlay:"canplay",topCanPlayThrough:"canplaythrough",topChange:"change",topClick:"click",topCompositionEnd:"compositionend",topCompositionStart:"compositionstart",topCompositionUpdate:"compositionupdate",topContextMenu:"contextmenu",topCopy:"copy",topCut:"cut",topDoubleClick:"dblclick",topDrag:"drag",topDragEnd:"dragend",topDragEnter:"dragenter",topDragExit:"dragexit",topDragLeave:"dragleave",topDragOver:"dragover",topDragStart:"dragstart",topDrop:"drop",topDurationChange:"durationchange",topEmptied:"emptied",topEncrypted:"encrypted",topEnded:"ended",topError:"error",topFocus:"focus",topInput:"input",topKeyDown:"keydown",topKeyPress:"keypress",topKeyUp:"keyup",topLoadedData:"loadeddata",topLoadedMetadata:"loadedmetadata",topLoadStart:"loadstart",topMouseDown:"mousedown",topMouseMove:"mousemove",topMouseOut:"mouseout",topMouseOver:"mouseover",topMouseUp:"mouseup",topPaste:"paste",topPause:"pause",topPlay:"play",topPlaying:"playing",topProgress:"progress",topRateChange:"ratechange",topScroll:"scroll",topSeeked:"seeked",topSeeking:"seeking",topSelectionChange:"selectionchange",topStalled:"stalled",topSuspend:"suspend",topTextInput:"textInput",topTimeUpdate:"timeupdate",topTouchCancel:"touchcancel",topTouchEnd:"touchend",topTouchMove:"touchmove",topTouchStart:"touchstart",topVolumeChange:"volumechange",topWaiting:"waiting",topWheel:"wheel"},v="_reactListenersID"+String(Math.random()).slice(2),y=c({},s,{ReactEventListener:null,injection:{injectReactEventListener:function(e){e.setHandleTopLevel(y.handleTopLevel),y.ReactEventListener=e}},setEnabled:function(e){y.ReactEventListener&&y.ReactEventListener.setEnabled(e)},isEnabled:function(){return!(!y.ReactEventListener||!y.ReactEventListener.isEnabled())},listenTo:function(e,t){for(var n=t,i=r(n),s=a.registrationNameDependencies[e],u=o.topLevelTypes,l=0;l":">","<":"<",'"':""","'":"'"},i=/[&><"']/g;e.exports=r},function(e,t,n){"use strict";var r=n(13),o=/^[ \r\n\t\f]/,i=/<(!--|link|noscript|meta|script|style)[ \r\n\t\f\/>]/,a=function(e,t){e.innerHTML=t};if("undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction&&(a=function(e,t){MSApp.execUnsafeLocalFunction(function(){e.innerHTML=t})}),r.canUseDOM){var s=document.createElement("div");s.innerHTML=" ",""===s.innerHTML&&(a=function(e,t){if(e.parentNode&&e.parentNode.replaceChild(e,e),o.test(t)||"<"===t[0]&&i.test(t)){e.innerHTML=String.fromCharCode(65279)+t;var n=e.firstChild;1===n.data.length?e.removeChild(n):n.deleteData(0,1)}else e.innerHTML=t})}e.exports=a},function(e,t,n){"use strict";function r(e){return(0,o.connect)(function(e){var t=e.operations.filter(function(t){return t.get("id")===e.router.params.id}).first();t=t.size>0?t.toJS():null;var n=e.operationResponses.get(e.router.params.id);return{operation:t,operationResponse:n,operations:e.operations,definitions:e.definitions.size>0?e.definitions.toJS():{},apis:e.apis.get("byName").get(t.apiname),apiConfig:APIExplorer.getAPI(t.apiname),config:{defaultScheme:e.configs.get("url").protocol,useProxy:e.configs.get("url").useProxy,headers:e.configs.get("headers"),queryString:e.configs.get("url").getQueryString(),HttpClientConfigurator:APIExplorer.HttpClientConfigurator},operationLocalParameters:e.operationLocalParameters.get(t.id)||{},operationLastParameters:e.operationLastParameters.get(t.id)||(0,i.List)([])}})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=r;var o=n(48),i=n(22);e.exports=t["default"]},[1055,576],34,12,11,[1057,32,225,578],83,[1072,139],function(e,t,n){var r=n(10)("match");e.exports=function(e){var t=/./;try{"/./"[e](t)}catch(n){try{return t[r]=!1,!"/./"[e](t)}catch(o){}}return!0}},function(e,t,n){var r=n(40);e.exports=Array.isArray||function(e){return"Array"==r(e)}},[1062,149,3,28,35,20,83,240,84,5,10],[1063,10],function(e,t){e.exports=!1},function(e,t){e.exports=Math.expm1||function(e){return 0==(e=+e)?e:e>-1e-6&&e<1e-6?e+e*e/2:Math.exp(e)-1}},function(e,t){e.exports=Math.sign||function(e){return 0==(e=+e)||e!=e?e:e<0?-1:1}},[1066,5,8,9,33],[1069,86,34],function(e,t,n){var r=n(238),o=n(34);e.exports=function(e,t,n){if(r(t))throw TypeError("String#"+n+" doesn't accept regex!");return String(o(e))}},function(e,t){"use strict";function n(e,t,n){e.addEventListener?e.addEventListener(t,n,!1):e.attachEvent("on"+t,n)}function r(e,t,n){e.removeEventListener?e.removeEventListener(t,n,!1):e.detachEvent("on"+t,n)}function o(){return window.location.href.split("#")[1]||""}function i(e){window.location.replace(window.location.pathname+window.location.search+"#"+e)}function a(){return window.location.pathname+window.location.search+window.location.hash}function s(e){e&&window.history.go(e)}function u(e,t){t(window.confirm(e))}function l(){var e=navigator.userAgent;return(e.indexOf("Android 2.")===-1&&e.indexOf("Android 4.0")===-1||e.indexOf("Mobile Safari")===-1||e.indexOf("Chrome")!==-1||e.indexOf("Windows Phone")!==-1)&&(e.indexOf("CriOS")===-1&&(window.history&&"pushState"in window.history))}function c(){var e=navigator.userAgent;return e.indexOf("Firefox")===-1}t.__esModule=!0,t.addEventListener=n,t.removeEventListener=r,t.getHashPath=o,t.replaceHashPath=i,t.getWindowPath=a,t.go=s,t.getUserConfirmation=u,t.supportsHistory=l,t.supportsGoWithoutReloadUsingHash=c},function(e,t){"use strict";function n(e){return e}t.__esModule=!0,t["default"]=n,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t,n){var r=e(t,n);e.length<2&&n(r)}t.__esModule=!0;var i=n(19);r(i);t["default"]=o,e.exports=t["default"]},function(e,t,n){var r,o;!function(i,a){var s={Identity:function(e){return e},True:function(){return!0},Blank:function(){}},u={Boolean:typeof!0,Number:"number",String:"string",Object:typeof{},Undefined:typeof a,Function:"function"},l={"":s.Identity},c={createLambda:function(e){if(null==e)return s.Identity;if(typeof e===u.String){var t=l[e];if(null!=t)return t;if(e.indexOf("=>")===-1){for(var n,r=new RegExp("[$]+","g"),o=0;null!=(n=r.exec(e));){var i=n[0].length;i>o&&(o=i)}for(var a=[],c=1;c<=o;c++){for(var f="",d=0;d(.*)/);return t=new Function(h[1],"return "+h[2]),l[e]=t,t}return e},isIEnumerable:function(e){if(typeof Enumerator!==u.Undefined)try{return new Enumerator(e),!0}catch(t){}return!1},defineProperty:null!=Object.defineProperties?function(e,t,n){Object.defineProperty(e,t,{enumerable:!1,configurable:!0,writable:!0,value:n})}:function(e,t,n){e[t]=n},compare:function(e,t){return e===t?0:e>t?1:-1},dispose:function(e){null!=e&&e.dispose()}},f={Before:0,Running:1,After:2},d=function(e,t,n){var r=new p,o=f.Before;this.current=r.current,this.moveNext=function(){try{switch(o){case f.Before:o=f.Running,e();case f.Running:return!!t.apply(r)||(this.dispose(),!1);case f.After:return!1}}catch(n){throw this.dispose(),n}},this.dispose=function(){if(o==f.Running)try{n()}finally{o=f.After}}},p=function(){var e=null;this.current=function(){return e},this.yieldReturn=function(t){return e=t,!0},this.yieldBreak=function(){return!1}},h=function(e){this.getEnumerator=e};h.Utils={},h.Utils.createLambda=function(e){return c.createLambda(e)},h.Utils.createEnumerable=function(e){return new h(e)},h.Utils.createEnumerator=function(e,t,n){return new d(e,t,n)},h.Utils.extendTo=function(e){var t,n=e.prototype;e===Array?(t=g.prototype,c.defineProperty(n,"getSource",function(){return this})):(t=h.prototype,c.defineProperty(n,"getEnumerator",function(){return h.from(this).getEnumerator()}));for(var r in t){var o=t[r];n[r]!=o&&(null!=n[r]&&(r+="ByLinq",n[r]==o)||o instanceof Function&&c.defineProperty(n,r,o))}},h.choice=function(){var e=arguments;return new h(function(){return new d(function(){e=e[0]instanceof Array?e[0]:null!=e[0].getEnumerator?e[0].toArray():e},function(){return this.yieldReturn(e[Math.floor(Math.random()*e.length)])},s.Blank)})},h.cycle=function(){var e=arguments;return new h(function(){var t=0;return new d(function(){e=e[0]instanceof Array?e[0]:null!=e[0].getEnumerator?e[0].toArray():e},function(){return t>=e.length&&(t=0),this.yieldReturn(e[t++])},s.Blank)})},h.empty=function(){return new h(function(){return new d(s.Blank,function(){return!1},s.Blank)})},h.from=function(e){if(null==e)return h.empty();if(e instanceof h)return e;if(typeof e==u.Number||typeof e==u.Boolean)return h.repeat(e,1);if(typeof e==u.String)return new h(function(){var t=0;return new d(s.Blank,function(){return t=t?this.yieldReturn(e):this.yieldBreak()},s.Blank)})},h.repeat=function(e,t){return null!=t?h.repeat(e).take(t):new h(function(){return new d(s.Blank,function(){return this.yieldReturn(e)},s.Blank)})},h.repeatWithFinalize=function(e,t){return e=c.createLambda(e),t=c.createLambda(t),new h(function(){var n;return new d(function(){n=e()},function(){return this.yieldReturn(n)},function(){null!=n&&(t(n),n=null)})})},h.generate=function(e,t){return null!=t?h.generate(e).take(t):(e=c.createLambda(e),new h(function(){return new d(s.Blank,function(){return this.yieldReturn(e())},s.Blank)}))},h.toInfinity=function(e,t){return null==e&&(e=0),null==t&&(t=1),new h(function(){var n;return new d(function(){n=e-t},function(){return this.yieldReturn(n+=t)},s.Blank)})},h.toNegativeInfinity=function(e,t){return null==e&&(e=0),null==t&&(t=1),new h(function(){var n;return new d(function(){n=e+t},function(){return this.yieldReturn(n-=t)},s.Blank)})},h.unfold=function(e,t){return t=c.createLambda(t),new h(function(){var n,r=!0;return new d(s.Blank,function(){return r?(r=!1,n=e,this.yieldReturn(n)):(n=t(n),this.yieldReturn(n))},s.Blank)})},h.defer=function(e){return new h(function(){var t;return new d(function(){t=h.from(e()).getEnumerator()},function(){return t.moveNext()?this.yieldReturn(t.current()):this.yieldBreak()},function(){c.dispose(t)})})},h.prototype.traverseBreadthFirst=function(e,t){var n=this;return e=c.createLambda(e),t=c.createLambda(t),new h(function(){var r,o=0,i=[];return new d(function(){r=n.getEnumerator()},function(){for(;;){if(r.moveNext())return i.push(r.current()),this.yieldReturn(t(r.current(),o));var n=h.from(i).selectMany(function(t){return e(t)});if(!n.any())return!1;o++,i=[],c.dispose(r),r=n.getEnumerator()}},function(){c.dispose(r)})})},h.prototype.traverseDepthFirst=function(e,t){var n=this;return e=c.createLambda(e),t=c.createLambda(t),new h(function(){var r,o=[];return new d(function(){r=n.getEnumerator()},function(){for(;;){if(r.moveNext()){var n=t(r.current(),o.length);return o.push(r),r=h.from(e(r.current())).getEnumerator(),this.yieldReturn(n)}if(o.length<=0)return!1;c.dispose(r),r=o.pop()}},function(){try{c.dispose(r)}finally{h.from(o).forEach(function(e){e.dispose()})}})})},h.prototype.flatten=function(){var e=this;return new h(function(){var t,n=null;return new d(function(){t=e.getEnumerator()},function(){for(;;){if(null!=n){if(n.moveNext())return this.yieldReturn(n.current());n=null}if(t.moveNext()){if(t.current()instanceof Array){c.dispose(n),n=h.from(t.current()).selectMany(s.Identity).flatten().getEnumerator();continue}return this.yieldReturn(t.current())}return!1}},function(){try{c.dispose(t)}finally{c.dispose(n)}})})},h.prototype.pairwise=function(e){var t=this;return e=c.createLambda(e),new h(function(){var n;return new d(function(){n=t.getEnumerator(),n.moveNext()},function(){var t=n.current();return!!n.moveNext()&&this.yieldReturn(e(t,n.current()))},function(){c.dispose(n)})})},h.prototype.scan=function(e,t){var n;null==t?(t=c.createLambda(e),n=!1):(t=c.createLambda(t),n=!0);var r=this;return new h(function(){var o,i,a=!0;return new d(function(){o=r.getEnumerator()},function(){if(a){if(a=!1,n)return this.yieldReturn(i=e);if(o.moveNext())return this.yieldReturn(i=o.current())}return!!o.moveNext()&&this.yieldReturn(i=t(i,o.current()))},function(){c.dispose(o)})})},h.prototype.select=function(e){if(e=c.createLambda(e),e.length<=1)return new b(this,null,e);var t=this;return new h(function(){var n,r=0;return new d(function(){n=t.getEnumerator()},function(){return!!n.moveNext()&&this.yieldReturn(e(n.current(),r++))},function(){c.dispose(n)})})},h.prototype.selectMany=function(e,t){var n=this;return e=c.createLambda(e),null==t&&(t=function(e,t){return t}),t=c.createLambda(t),new h(function(){var r,o=a,i=0;return new d(function(){r=n.getEnumerator()},function(){if(o===a&&!r.moveNext())return!1;do{if(null==o){var n=e(r.current(),i++);o=h.from(n).getEnumerator()}if(o.moveNext())return this.yieldReturn(t(r.current(),o.current()));c.dispose(o),o=null}while(r.moveNext());return!1},function(){try{c.dispose(r)}finally{c.dispose(o)}})})},h.prototype.where=function(e){if(e=c.createLambda(e),e.length<=1)return new _(this,e);var t=this;return new h(function(){var n,r=0;return new d(function(){n=t.getEnumerator()},function(){for(;n.moveNext();)if(e(n.current(),r++))return this.yieldReturn(n.current());return!1},function(){c.dispose(n)})})},h.prototype.choose=function(e){e=c.createLambda(e);var t=this;return new h(function(){var n,r=0;return new d(function(){n=t.getEnumerator()},function(){for(;n.moveNext();){var t=e(n.current(),r++);if(null!=t)return this.yieldReturn(t)}return this.yieldBreak()},function(){c.dispose(n)})})},h.prototype.ofType=function(e){var t;switch(e){case Number:t=u.Number;break;case String:t=u.String;break;case Boolean:t=u.Boolean;break;case Function:t=u.Function;break;default:t=null}return null===t?this.where(function(t){return t instanceof e}):this.where(function(e){return typeof e===t})},h.prototype.zip=function(){var e=arguments,t=c.createLambda(arguments[arguments.length-1]),n=this;if(2==arguments.length){var r=arguments[0];return new h(function(){var e,o,i=0;return new d(function(){e=n.getEnumerator(),o=h.from(r).getEnumerator()},function(){return!(!e.moveNext()||!o.moveNext())&&this.yieldReturn(t(e.current(),o.current(),i++))},function(){try{c.dispose(e)}finally{c.dispose(o)}})})}return new h(function(){var r,o=0;return new d(function(){var t=h.make(n).concat(h.from(e).takeExceptLast().select(h.from)).select(function(e){return e.getEnumerator()}).toArray();r=h.from(t)},function(){if(r.all(function(e){return e.moveNext()})){var e=r.select(function(e){return e.current()}).toArray();return e.push(o++),this.yieldReturn(t.apply(null,e))}return this.yieldBreak()},function(){h.from(r).forEach(c.dispose)})})},h.prototype.merge=function(){var e=arguments,t=this;return new h(function(){var n,r=-1;return new d(function(){n=h.make(t).concat(h.from(e).select(h.from)).select(function(e){return e.getEnumerator()}).toArray()},function(){for(;n.length>0;){r=r>=n.length-1?0:r+1;var e=n[r];if(e.moveNext())return this.yieldReturn(e.current());e.dispose(),n.splice(r--,1)}return this.yieldBreak()},function(){h.from(n).forEach(c.dispose)})})},h.prototype.join=function(e,t,n,r,o){t=c.createLambda(t),n=c.createLambda(n),r=c.createLambda(r),o=c.createLambda(o);var i=this;return new h(function(){var u,l,f=null,p=0;return new d(function(){u=i.getEnumerator(),l=h.from(e).toLookup(n,s.Identity,o)},function(){for(;;){if(null!=f){var e=f[p++];if(e!==a)return this.yieldReturn(r(u.current(),e));e=null,p=0}if(!u.moveNext())return!1;var n=t(u.current());f=l.get(n).toArray()}},function(){c.dispose(u)})})},h.prototype.groupJoin=function(e,t,n,r,o){t=c.createLambda(t),n=c.createLambda(n),r=c.createLambda(r),o=c.createLambda(o);var i=this;return new h(function(){var a=i.getEnumerator(),u=null;return new d(function(){a=i.getEnumerator(),u=h.from(e).toLookup(n,s.Identity,o)},function(){if(a.moveNext()){var e=u.get(t(a.current()));return this.yieldReturn(r(a.current(),e))}return!1},function(){c.dispose(a)})})},h.prototype.all=function(e){e=c.createLambda(e);var t=!0;return this.forEach(function(n){if(!e(n))return t=!1,!1}),t},h.prototype.any=function(e){e=c.createLambda(e);var t=this.getEnumerator();try{if(0==arguments.length)return t.moveNext();for(;t.moveNext();)if(e(t.current()))return!0;return!1}finally{c.dispose(t)}},h.prototype.isEmpty=function(){return!this.any()},h.prototype.concat=function(){var e=this;if(1==arguments.length){var t=arguments[0];return new h(function(){var n,r;return new d(function(){n=e.getEnumerator()},function(){if(null==r){if(n.moveNext())return this.yieldReturn(n.current());r=h.from(t).getEnumerator()}return!!r.moveNext()&&this.yieldReturn(r.current())},function(){try{c.dispose(n)}finally{c.dispose(r)}})})}var n=arguments;return new h(function(){var t;return new d(function(){t=h.make(e).concat(h.from(n).select(h.from)).select(function(e){return e.getEnumerator()}).toArray()},function(){for(;t.length>0;){var e=t[0];if(e.moveNext())return this.yieldReturn(e.current());e.dispose(),t.splice(0,1)}return this.yieldBreak()},function(){h.from(t).forEach(c.dispose)})})},h.prototype.insert=function(e,t){var n=this;return new h(function(){var r,o,i=0,a=!1;return new d(function(){r=n.getEnumerator(),o=h.from(t).getEnumerator()},function(){return i==e&&o.moveNext()?(a=!0,this.yieldReturn(o.current())):r.moveNext()?(i++,this.yieldReturn(r.current())):!(a||!o.moveNext())&&this.yieldReturn(o.current())},function(){try{c.dispose(r)}finally{c.dispose(o)}})})},h.prototype.alternate=function(e){var t=this;return new h(function(){var n,r,o,i;return new d(function(){o=e instanceof Array||null!=e.getEnumerator?h.from(h.from(e).toArray()):h.make(e),r=t.getEnumerator(),r.moveNext()&&(n=r.current())},function(){for(;;){if(null!=i){if(i.moveNext())return this.yieldReturn(i.current());i=null}{if(null!=n||!r.moveNext()){if(null!=n){var e=n;return n=null,this.yieldReturn(e)}return this.yieldBreak()}n=r.current(),i=o.getEnumerator()}}},function(){try{c.dispose(r)}finally{c.dispose(i)}})})},h.prototype.contains=function(e,t){t=c.createLambda(t);var n=this.getEnumerator();try{for(;n.moveNext();)if(t(n.current())===e)return!0;return!1}finally{c.dispose(n)}},h.prototype.defaultIfEmpty=function(e){var t=this;return e===a&&(e=null),new h(function(){var n,r=!0;return new d(function(){n=t.getEnumerator()},function(){return n.moveNext()?(r=!1,this.yieldReturn(n.current())):!!r&&(r=!1,this.yieldReturn(e))},function(){c.dispose(n)})})},h.prototype.distinct=function(e){return this.except(h.empty(),e)},h.prototype.distinctUntilChanged=function(e){e=c.createLambda(e);var t=this;return new h(function(){var n,r,o;return new d(function(){n=t.getEnumerator()},function(){for(;n.moveNext();){var t=e(n.current());if(o)return o=!1,r=t,this.yieldReturn(n.current());if(r!==t)return r=t,this.yieldReturn(n.current())}return this.yieldBreak()},function(){c.dispose(n)})})},h.prototype.except=function(e,t){t=c.createLambda(t);var n=this;return new h(function(){var r,o;return new d(function(){r=n.getEnumerator(),o=new w(t),h.from(e).forEach(function(e){o.add(e)})},function(){for(;r.moveNext();){var e=r.current();if(!o.contains(e))return o.add(e),this.yieldReturn(e)}return!1},function(){c.dispose(r)})})},h.prototype.intersect=function(e,t){t=c.createLambda(t);var n=this;return new h(function(){var r,o,i;return new d(function(){r=n.getEnumerator(),o=new w(t),h.from(e).forEach(function(e){o.add(e)}),i=new w(t)},function(){for(;r.moveNext();){var e=r.current();if(!i.contains(e)&&o.contains(e))return i.add(e),this.yieldReturn(e)}return!1},function(){c.dispose(r)})})},h.prototype.sequenceEqual=function(e,t){t=c.createLambda(t);var n=this.getEnumerator();try{var r=h.from(e).getEnumerator();try{for(;n.moveNext();)if(!r.moveNext()||t(n.current())!==t(r.current()))return!1;return!r.moveNext()}finally{c.dispose(r)}}finally{c.dispose(n)}},h.prototype.union=function(e,t){t=c.createLambda(t);var n=this;return new h(function(){var r,o,i;return new d(function(){r=n.getEnumerator(),i=new w(t)},function(){var t;if(o===a){for(;r.moveNext();)if(t=r.current(),!i.contains(t))return i.add(t),this.yieldReturn(t);o=h.from(e).getEnumerator()}for(;o.moveNext();)if(t=o.current(),!i.contains(t))return i.add(t),this.yieldReturn(t);return!1},function(){try{c.dispose(r)}finally{c.dispose(o)}})})},h.prototype.orderBy=function(e){return new m(this,e,(!1)); -},h.prototype.orderByDescending=function(e){return new m(this,e,(!0))},h.prototype.reverse=function(){var e=this;return new h(function(){var t,n;return new d(function(){t=e.toArray(),n=t.length},function(){return n>0&&this.yieldReturn(t[--n])},s.Blank)})},h.prototype.shuffle=function(){var e=this;return new h(function(){var t;return new d(function(){t=e.toArray()},function(){if(t.length>0){var e=Math.floor(Math.random()*t.length);return this.yieldReturn(t.splice(e,1)[0])}return!1},s.Blank)})},h.prototype.weightedSample=function(e){e=c.createLambda(e);var t=this;return new h(function(){var n,r=0;return new d(function(){n=t.choose(function(t){var n=e(t);return n<=0?null:(r+=n,{value:t,bound:r})}).toArray()},function(){if(n.length>0){for(var e=Math.floor(Math.random()*r)+1,t=-1,o=n.length;o-t>1;){var i=Math.floor((t+o)/2);n[i].bound>=e?o=i:t=i}return this.yieldReturn(n[o].value)}return this.yieldBreak()},s.Blank)})},h.prototype.groupBy=function(e,t,n,r){var o=this;return e=c.createLambda(e),t=c.createLambda(t),null!=n&&(n=c.createLambda(n)),r=c.createLambda(r),new h(function(){var i;return new d(function(){i=o.toLookup(e,t,r).toEnumerable().getEnumerator()},function(){for(;i.moveNext();)return null==n?this.yieldReturn(i.current()):this.yieldReturn(n(i.current().key(),i.current()));return!1},function(){c.dispose(i)})})},h.prototype.partitionBy=function(e,t,n,r){var o=this;e=c.createLambda(e),t=c.createLambda(t),r=c.createLambda(r);var i;return null==n?(i=!1,n=function(e,t){return new x(e,t)}):(i=!0,n=c.createLambda(n)),new h(function(){var a,s,u,l=[];return new d(function(){a=o.getEnumerator(),a.moveNext()&&(s=e(a.current()),u=r(s),l.push(t(a.current())))},function(){for(var o;1==(o=a.moveNext())&&u===r(e(a.current()));)l.push(t(a.current()));if(l.length>0){var c=i?n(s,h.from(l)):n(s,l);return o?(s=e(a.current()),u=r(s),l=[t(a.current())]):l=[],this.yieldReturn(c)}return!1},function(){c.dispose(a)})})},h.prototype.buffer=function(e){var t=this;return new h(function(){var n;return new d(function(){n=t.getEnumerator()},function(){for(var t=[],r=0;n.moveNext();)if(t.push(n.current()),++r>=e)return this.yieldReturn(t);return t.length>0&&this.yieldReturn(t)},function(){c.dispose(n)})})},h.prototype.aggregate=function(e,t,n){return(n=c.createLambda(n))(this.scan(e,t,n).last())},h.prototype.average=function(e){e=c.createLambda(e);var t=0,n=0;return this.forEach(function(r){t+=e(r),++n}),t/n},h.prototype.count=function(e){e=null==e?s.True:c.createLambda(e);var t=0;return this.forEach(function(n,r){e(n,r)&&++t}),t},h.prototype.max=function(e){return null==e&&(e=s.Identity),this.select(e).aggregate(function(e,t){return e>t?e:t})},h.prototype.min=function(e){return null==e&&(e=s.Identity),this.select(e).aggregate(function(e,t){return ee(n)?t:n})},h.prototype.minBy=function(e){return e=c.createLambda(e),this.aggregate(function(t,n){return e(t)")})},h.prototype.force=function(){var e=this.getEnumerator();try{for(;e.moveNext(););}finally{c.dispose(e)}},h.prototype.letBind=function(e){e=c.createLambda(e);var t=this;return new h(function(){var n;return new d(function(){n=h.from(e(t)).getEnumerator()},function(){return!!n.moveNext()&&this.yieldReturn(n.current())},function(){c.dispose(n)})})},h.prototype.share=function(){var e,t=this,n=!1;return new y(function(){return new d(function(){null==e&&(e=t.getEnumerator())},function(){if(n)throw new Error("enumerator is disposed");return!!e.moveNext()&&this.yieldReturn(e.current())},s.Blank)},function(){n=!0,c.dispose(e)})},h.prototype.memoize=function(){var e,t,n=this,r=!1;return new y(function(){var o=-1;return new d(function(){null==t&&(t=n.getEnumerator(),e=[])},function(){if(r)throw new Error("enumerator is disposed");return o++,e.length<=o?!!t.moveNext()&&this.yieldReturn(e[o]=t.current()):this.yieldReturn(e[o])},s.Blank)},function(){r=!0,c.dispose(t),e=null})},h.prototype.catchError=function(e){e=c.createLambda(e);var t=this;return new h(function(){var n;return new d(function(){n=t.getEnumerator()},function(){try{return!!n.moveNext()&&this.yieldReturn(n.current())}catch(t){return e(t),!1}},function(){c.dispose(n)})})},h.prototype.finallyAction=function(e){e=c.createLambda(e);var t=this;return new h(function(){var n;return new d(function(){n=t.getEnumerator()},function(){return!!n.moveNext()&&this.yieldReturn(n.current())},function(){try{c.dispose(n)}finally{e()}})})},h.prototype.log=function(e){return e=c.createLambda(e),this.doAction(function(t){typeof console!==u.Undefined&&console.log(e(t))})},h.prototype.trace=function(e,t){return null==e&&(e="Trace"),t=c.createLambda(t),this.doAction(function(n){typeof console!==u.Undefined&&console.log(e,t(n))})};var m=function(e,t,n,r){this.source=e,this.keySelector=c.createLambda(t),this.descending=n,this.parent=r};m.prototype=new h,m.prototype.createOrderedEnumerable=function(e,t){return new m(this.source,e,t,this)},m.prototype.thenBy=function(e){return this.createOrderedEnumerable(e,!1)},m.prototype.thenByDescending=function(e){return this.createOrderedEnumerable(e,!0)},m.prototype.getEnumerator=function(){var e,t,n=this,r=0;return new d(function(){e=[],t=[],n.source.forEach(function(n,r){e.push(n),t.push(r)});var r=v.create(n,null);r.GenerateKeys(e),t.sort(function(e,t){return r.compare(e,t)})},function(){return r0:h.prototype.any.apply(this,arguments)},g.prototype.count=function(e){return null==e?this.getSource().length:h.prototype.count.apply(this,arguments)},g.prototype.elementAt=function(e){var t=this.getSource();return 0<=e&&e0?t[0]:h.prototype.first.apply(this,arguments)},g.prototype.firstOrDefault=function(e,t){if(t===a&&(t=null),null!=e)return h.prototype.firstOrDefault.apply(this,arguments);var n=this.getSource();return n.length>0?n[0]:t},g.prototype.last=function(e){var t=this.getSource();return null==e&&t.length>0?t[t.length-1]:h.prototype.last.apply(this,arguments)},g.prototype.lastOrDefault=function(e,t){if(t===a&&(t=null),null!=e)return h.prototype.lastOrDefault.apply(this,arguments);var n=this.getSource();return n.length>0?n[n.length-1]:t},g.prototype.skip=function(e){var t=this.getSource();return new h(function(){var n;return new d(function(){n=e<0?0:e},function(){return n0&&this.yieldReturn(e[--t])},s.Blank)})},g.prototype.sequenceEqual=function(e,t){return(!(e instanceof g||e instanceof Array)||null!=t||h.from(e).count()==this.count())&&h.prototype.sequenceEqual.apply(this,arguments)},g.prototype.toJoinedString=function(e,t){var n=this.getSource();return null==t&&n instanceof Array?(null==e&&(e=""),n.join(e)):h.prototype.toJoinedString.apply(this,arguments)},g.prototype.getEnumerator=function(){var e=this.getSource(),t=-1;return{current:function(){return e[t]},moveNext:function(){return++t";for(t.style.display="none",n(876).appendChild(t),t.src="javascript:",e=t.contentWindow.document,e.open(),e.write(" - + diff --git a/publish.sh b/publish.sh new file mode 100755 index 0000000..a57ad06 --- /dev/null +++ b/publish.sh @@ -0,0 +1,4 @@ +#! /bin/bash + +npm run build +npm publish