-1&&e%1==0&&r>=e}var r=9007199254740991;e.exports=n},function(e,t){function n(e){return!!e&&"object"==typeof e}e.exports=n},function(e,t){var n=Array.isArray;e.exports=n},function(e,t,n){function r(e,t,n){var r=-1,h=o,p=e.length,d=!0,f=[],v=f;if(n)d=!1,h=s;else if(p>=u){var m=t?null:l(e);if(m)return c(m);d=!1,h=a,v=new i}else v=t?[]:f;e:for(;++rn)return!1;var r=e.length-1;return n==r?e.pop():s.call(e,n,1),!0}var i=n(141),o=Array.prototype,s=o.splice;e.exports=r},function(e,t,n){function r(e,t){for(var n=e.length;n--;)if(i(e[n][0],t))return n;return-1}var i=n(142);e.exports=r},function(e,t){function n(e,t){return e===t||e!==e&&t!==t}e.exports=n},function(e,t,n){function r(e,t){return i(e,t)&&delete e[t]}var i=n(144);e.exports=r},function(e,t,n){function r(e,t){return i?void 0!==e[t]:s.call(e,t)}var i=n(131),o=Object.prototype,s=o.hasOwnProperty;e.exports=r},function(e,t){function n(e){var t=typeof e;return"number"==t||"boolean"==t||"string"==t&&"__proto__"!=e||null==e}e.exports=n},function(e,t,n){function r(e){var t=this.__data__;return a(e)?s("string"==typeof e?t.string:t.hash,e):i?t.map.get(e):o(t.map,e)}var i=n(135),o=n(147),s=n(148),a=n(145);e.exports=r},function(e,t,n){function r(e,t){var n=i(e,t);return 0>n?void 0:e[n][1]}var i=n(141);e.exports=r},function(e,t,n){function r(e,t){if(i){var n=e[t];return n===o?void 0:n}return a.call(e,t)?e[t]:void 0}var i=n(131),o="__lodash_hash_undefined__",s=Object.prototype,a=s.hasOwnProperty;e.exports=r},function(e,t,n){function r(e){var t=this.__data__;return a(e)?s("string"==typeof e?t.string:t.hash,e):i?t.map.has(e):o(t.map,e)}var i=n(135),o=n(150),s=n(144),a=n(145);e.exports=r},function(e,t,n){function r(e,t){return i(e,t)>-1}var i=n(141);e.exports=r},function(e,t,n){function r(e,t){var n=this.__data__;return a(e)?s("string"==typeof e?n.string:n.hash,e,t):i?n.map.set(e,t):o(n.map,e,t),this}var i=n(135),o=n(152),s=n(153),a=n(145);e.exports=r},function(e,t,n){function r(e,t,n){var r=i(e,t);0>r?e.push([t,n]):e[r][1]=n}var i=n(141);e.exports=r},function(e,t,n){function r(e,t,n){e[t]=i&&void 0===n?o:n}var i=n(131),o="__lodash_hash_undefined__";e.exports=r},function(e,t,n){function r(e){var t=this.__data__;if(i(e)){var n=t.__data__,r="string"==typeof e?n.string:n.hash;r[e]=o}else t.set(e,o)}var i=n(145),o="__lodash_hash_undefined__";e.exports=r},function(e,t,n){function r(e,t){return!!e.length&&i(e,t,0)>-1}var i=n(156);e.exports=r},function(e,t,n){function r(e,t,n){if(t!==t)return i(e,n);for(var r=n-1,o=e.length;++re?-1:1;return t*s}var n=e%1;return e===e?n?e-n:e:0}var i=n(166),o=1/0,s=1.7976931348623157e308;e.exports=r},function(e,t,n){function r(e){if(o(e)){var t=i(e.valueOf)?e.valueOf():e;e=o(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(a,"");var n=c.test(e);return n||u.test(e)?h(e.slice(2),n?2:8):l.test(e)?s:+e}var i=n(121),o=n(122),s=NaN,a=/^\s+|\s+$/g,l=/^[-+]0x[0-9a-f]+$/i,c=/^0b[01]+$/i,u=/^0o[0-7]+$/i,h=parseInt;e.exports=r},function(e,t,n){"use strict";var r=n(96),i=n(168),o=n(103);n(173),e.exports=r.createClass({displayName:"SiteIcon",getDefaultProps:function(){return{imgSize:120,size:32}},propTypes:{imgSize:r.PropTypes.number,site:r.PropTypes.object,size:r.PropTypes.number},imgSizeParam:function(e){return e&&-1===e.indexOf("gravatar.com")?"w":"s"},getIconSrcURL:function(e){var t=i.parse(e,!0,!0),n=this.imgSizeParam(t.host);return t.query[n]=this.props.imgSize,i.format(t)},render:function(){var e,t,n,i;return e=this.props.site&&this.props.site.icon?this.getIconSrcURL(this.props.site.icon.img):null,t=o({"site-icon":!0,"is-blank":!e}),n={height:this.props.size,width:this.props.size,lineHeight:this.props.size+"px"},i={color:"#fff",fontSize:this.props.size/1.2+"px",lineHeight:this.props.size+"px",width:this.props.size},r.createElement("div",{className:t,style:n},e?r.createElement("img",{className:"site-icon__img",src:e}):r.createElement("span",{className:"noticon noticon-website",style:i}))}})},function(e,t,n){function r(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}function i(e,t,n){if(e&&c(e)&&e instanceof r)return e;var i=new r;return i.parse(e,t,n),i}function o(e){return l(e)&&(e=i(e)),e instanceof r?e.format():r.prototype.format.call(e)}function s(e,t){return i(e,!1,!0).resolve(t)}function a(e,t){return e?i(e,!1,!0).resolveObject(t):t}function l(e){return"string"==typeof e}function c(e){return"object"==typeof e&&null!==e}function u(e){return null===e}function h(e){return null==e}var p=n(169);t.parse=i,t.resolve=s,t.resolveObject=a,t.format=o,t.Url=r;var d=/^([a-z0-9.+-]+:)/i,f=/:[0-9]*$/,v=["<",">",'"',"`"," ","\r","\n"," "],m=["{","}","|","\\","^","`"].concat(v),g=["'"].concat(m),y=["%","/","?",";","#"].concat(g),w=["/","?","#"],b=255,x=/^[a-z0-9A-Z_-]{0,63}$/,E=/^([a-z0-9A-Z_-]{0,63})(.*)$/,C={javascript:!0,"javascript:":!0},k={javascript:!0,"javascript:":!0},S={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},z=n(170);r.prototype.parse=function(e,t,n){if(!l(e))throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var r=e;r=r.trim();var i=d.exec(r);if(i){i=i[0];var o=i.toLowerCase();this.protocol=o,r=r.substr(i.length)}if(n||i||r.match(/^\/\/[^@\/]+@[^@\/]+/)){var s="//"===r.substr(0,2);!s||i&&k[i]||(r=r.substr(2),this.slashes=!0)}if(!k[i]&&(s||i&&!S[i])){for(var a=-1,c=0;cu)&&(a=u)}var h,f;f=-1===a?r.lastIndexOf("@"):r.lastIndexOf("@",a),-1!==f&&(h=r.slice(0,f),r=r.slice(f+1),this.auth=decodeURIComponent(h)),a=-1;for(var c=0;cu)&&(a=u)}-1===a&&(a=r.length),this.host=r.slice(0,a),r=r.slice(a),this.parseHost(),this.hostname=this.hostname||"";var v="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!v)for(var m=this.hostname.split(/\./),c=0,M=m.length;M>c;c++){var T=m[c];if(T&&!T.match(x)){for(var N="",L=0,P=T.length;P>L;L++)N+=T.charCodeAt(L)>127?"x":T[L];if(!N.match(x)){var F=m.slice(0,c),O=m.slice(c+1),A=T.match(E);A&&(F.push(A[1]),O.unshift(A[2])),O.length&&(r="/"+O.join(".")+r),this.hostname=F.join(".");break}}}if(this.hostname.length>b?this.hostname="":this.hostname=this.hostname.toLowerCase(),!v){for(var D=this.hostname.split("."),V=[],c=0;cc;c++){var B=g[c],j=encodeURIComponent(B);j===B&&(j=escape(B)),r=r.split(B).join(j)}var R=r.indexOf("#");-1!==R&&(this.hash=r.substr(R),r=r.slice(0,R));var W=r.indexOf("?");if(-1!==W?(this.search=r.substr(W),this.query=r.substr(W+1),t&&(this.query=z.parse(this.query)),r=r.slice(0,W)):t&&(this.search="",this.query={}),r&&(this.pathname=r),S[o]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var _=this.pathname||"",I=this.search||"";this.path=_+I}return this.href=this.format(),this},r.prototype.format=function(){var e=this.auth||"";e&&(e=encodeURIComponent(e),e=e.replace(/%3A/i,":"),e+="@");var t=this.protocol||"",n=this.pathname||"",r=this.hash||"",i=!1,o="";this.host?i=e+this.host:this.hostname&&(i=e+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(i+=":"+this.port)),this.query&&c(this.query)&&Object.keys(this.query).length&&(o=z.stringify(this.query));var s=this.search||o&&"?"+o||"";return t&&":"!==t.substr(-1)&&(t+=":"),this.slashes||(!t||S[t])&&i!==!1?(i="//"+(i||""),n&&"/"!==n.charAt(0)&&(n="/"+n)):i||(i=""),r&&"#"!==r.charAt(0)&&(r="#"+r),s&&"?"!==s.charAt(0)&&(s="?"+s),n=n.replace(/[?#]/g,function(e){return encodeURIComponent(e)}),s=s.replace("#","%23"),t+i+n+s+r},r.prototype.resolve=function(e){return this.resolveObject(i(e,!1,!0)).format()},r.prototype.resolveObject=function(e){if(l(e)){var t=new r;t.parse(e,!1,!0),e=t}var n=new r;if(Object.keys(this).forEach(function(e){n[e]=this[e]},this),n.hash=e.hash,""===e.href)return n.href=n.format(),n;if(e.slashes&&!e.protocol)return Object.keys(e).forEach(function(t){"protocol"!==t&&(n[t]=e[t])}),S[n.protocol]&&n.hostname&&!n.pathname&&(n.path=n.pathname="/"),n.href=n.format(),n;if(e.protocol&&e.protocol!==n.protocol){if(!S[e.protocol])return Object.keys(e).forEach(function(t){n[t]=e[t]}),n.href=n.format(),n;if(n.protocol=e.protocol,e.host||k[e.protocol])n.pathname=e.pathname;else{for(var i=(e.pathname||"").split("/");i.length&&!(e.host=i.shift()););e.host||(e.host=""),e.hostname||(e.hostname=""),""!==i[0]&&i.unshift(""),i.length<2&&i.unshift(""),n.pathname=i.join("/")}if(n.search=e.search,n.query=e.query,n.host=e.host||"",n.auth=e.auth,n.hostname=e.hostname||e.host,n.port=e.port,n.pathname||n.search){var o=n.pathname||"",s=n.search||"";n.path=o+s}return n.slashes=n.slashes||e.slashes,n.href=n.format(),n}var a=n.pathname&&"/"===n.pathname.charAt(0),c=e.host||e.pathname&&"/"===e.pathname.charAt(0),p=c||a||n.host&&e.pathname,d=p,f=n.pathname&&n.pathname.split("/")||[],i=e.pathname&&e.pathname.split("/")||[],v=n.protocol&&!S[n.protocol];if(v&&(n.hostname="",n.port=null,n.host&&(""===f[0]?f[0]=n.host:f.unshift(n.host)),n.host="",e.protocol&&(e.hostname=null,e.port=null,e.host&&(""===i[0]?i[0]=e.host:i.unshift(e.host)),e.host=null),p=p&&(""===i[0]||""===f[0])),c)n.host=e.host||""===e.host?e.host:n.host,n.hostname=e.hostname||""===e.hostname?e.hostname:n.hostname,n.search=e.search,n.query=e.query,f=i;else if(i.length)f||(f=[]),f.pop(),f=f.concat(i),n.search=e.search,n.query=e.query;else if(!h(e.search)){if(v){n.hostname=n.host=f.shift();var m=n.host&&n.host.indexOf("@")>0?n.host.split("@"):!1;m&&(n.auth=m.shift(),n.host=n.hostname=m.shift())}return n.search=e.search,n.query=e.query,u(n.pathname)&&u(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.href=n.format(),n}if(!f.length)return n.pathname=null,n.search?n.path="/"+n.search:n.path=null,n.href=n.format(),n;for(var g=f.slice(-1)[0],y=(n.host||e.host)&&("."===g||".."===g)||""===g,w=0,b=f.length;b>=0;b--)g=f[b],"."==g?f.splice(b,1):".."===g?(f.splice(b,1),w++):w&&(f.splice(b,1),w--);if(!p&&!d)for(;w--;w)f.unshift("..");!p||""===f[0]||f[0]&&"/"===f[0].charAt(0)||f.unshift(""),y&&"/"!==f.join("/").substr(-1)&&f.push("");var x=""===f[0]||f[0]&&"/"===f[0].charAt(0);if(v){n.hostname=n.host=x?"":f.length?f.shift():"";var m=n.host&&n.host.indexOf("@")>0?n.host.split("@"):!1;m&&(n.auth=m.shift(),n.host=n.hostname=m.shift())}return p=p||n.host&&f.length,p&&!x&&f.unshift(""),f.length?n.pathname=f.join("/"):(n.pathname=null,n.path=null),u(n.pathname)&&u(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.auth=e.auth||n.auth,n.slashes=n.slashes||e.slashes,n.href=n.format(),n},r.prototype.parseHost=function(){var e=this.host,t=f.exec(e);t&&(t=t[0],":"!==t&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)}},function(e,t,n){var r;(function(e,i){!function(o){function s(e){throw RangeError(F[e])}function a(e,t){for(var n=e.length,r=[];n--;)r[n]=t(e[n]);return r}function l(e,t){var n=e.split("@"),r="";n.length>1&&(r=n[0]+"@",e=n[1]),e=e.replace(P,".");var i=e.split("."),o=a(i,t).join(".");return r+o}function c(e){for(var t,n,r=[],i=0,o=e.length;o>i;)t=e.charCodeAt(i++),t>=55296&&56319>=t&&o>i?(n=e.charCodeAt(i++),56320==(64512&n)?r.push(((1023&t)<<10)+(1023&n)+65536):(r.push(t),i--)):r.push(t);return r}function u(e){return a(e,function(e){var t="";return e>65535&&(e-=65536,t+=D(e>>>10&1023|55296),e=56320|1023&e),t+=D(e)}).join("")}function h(e){return 10>e-48?e-22:26>e-65?e-65:26>e-97?e-97:x}function p(e,t){return e+22+75*(26>e)-((0!=t)<<5)}function d(e,t,n){var r=0;for(e=n?A(e/S):e>>1,e+=A(e/t);e>O*C>>1;r+=x)e=A(e/O);return A(r+(O+1)*e/(e+k))}function f(e){var t,n,r,i,o,a,l,c,p,f,v=[],m=e.length,g=0,y=M,w=z;for(n=e.lastIndexOf(T),0>n&&(n=0),r=0;n>r;++r)e.charCodeAt(r)>=128&&s("not-basic"),v.push(e.charCodeAt(r));for(i=n>0?n+1:0;m>i;){for(o=g,a=1,l=x;i>=m&&s("invalid-input"),c=h(e.charCodeAt(i++)),(c>=x||c>A((b-g)/a))&&s("overflow"),g+=c*a,p=w>=l?E:l>=w+C?C:l-w,!(p>c);l+=x)f=x-p,a>A(b/f)&&s("overflow"),a*=f;t=v.length+1,w=d(g-o,t,0==o),A(g/t)>b-y&&s("overflow"),y+=A(g/t),g%=t,v.splice(g++,0,y)}return u(v)}function v(e){var t,n,r,i,o,a,l,u,h,f,v,m,g,y,w,k=[];for(e=c(e),m=e.length,t=M,n=0,o=z,a=0;m>a;++a)v=e[a],128>v&&k.push(D(v));for(r=i=k.length,i&&k.push(T);m>r;){for(l=b,a=0;m>a;++a)v=e[a],v>=t&&l>v&&(l=v);for(g=r+1,l-t>A((b-n)/g)&&s("overflow"),n+=(l-t)*g,t=l,a=0;m>a;++a)if(v=e[a],t>v&&++n>b&&s("overflow"),v==t){for(u=n,h=x;f=o>=h?E:h>=o+C?C:h-o,!(f>u);h+=x)w=u-f,y=x-f,k.push(D(p(f+w%y,0))),u=A(w/y);k.push(D(p(u,0))),o=d(n,g,r==i),n=0,++r}++n,++t}return k.join("")}function m(e){return l(e,function(e){return N.test(e)?f(e.slice(4).toLowerCase()):e})}function g(e){return l(e,function(e){return L.test(e)?"xn--"+v(e):e})}var y=("object"==typeof t&&t&&!t.nodeType&&t,"object"==typeof e&&e&&!e.nodeType&&e,"object"==typeof i&&i);y.global!==y&&y.window!==y&&y.self!==y||(o=y);var w,b=2147483647,x=36,E=1,C=26,k=38,S=700,z=72,M=128,T="-",N=/^xn--/,L=/[^\x20-\x7E]/,P=/[\x2E\u3002\uFF0E\uFF61]/g,F={
-overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},O=x-E,A=Math.floor,D=String.fromCharCode;w={version:"1.3.2",ucs2:{decode:c,encode:u},decode:f,encode:v,toASCII:g,toUnicode:m},r=function(){return w}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))}(this)}).call(t,n(137)(e),function(){return this}())},function(e,t,n){"use strict";t.decode=t.parse=n(171),t.encode=t.stringify=n(172)},function(e,t){"use strict";function n(e,t){return Object.prototype.hasOwnProperty.call(e,t)}e.exports=function(e,t,r,i){t=t||"&",r=r||"=";var o={};if("string"!=typeof e||0===e.length)return o;var s=/\+/g;e=e.split(t);var a=1e3;i&&"number"==typeof i.maxKeys&&(a=i.maxKeys);var l=e.length;a>0&&l>a&&(l=a);for(var c=0;l>c;++c){var u,h,p,d,f=e[c].replace(s,"%20"),v=f.indexOf(r);v>=0?(u=f.substr(0,v),h=f.substr(v+1)):(u=f,h=""),p=decodeURIComponent(u),d=decodeURIComponent(h),n(o,p)?Array.isArray(o[p])?o[p].push(d):o[p]=[o[p],d]:o[p]=d}return o}},function(e,t){"use strict";var n=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};e.exports=function(e,t,r,i){return t=t||"&",r=r||"=",null===e&&(e=void 0),"object"==typeof e?Object.keys(e).map(function(i){var o=encodeURIComponent(n(i))+r;return Array.isArray(e[i])?e[i].map(function(e){return o+encodeURIComponent(n(e))}).join(t):o+encodeURIComponent(n(e[i]))}).join(t):i?encodeURIComponent(n(i))+r+encodeURIComponent(n(e)):""}},97,97,function(e,t,n){"use strict";var r=n(96),i=n(103),o=n(167);n(176),e.exports=r.createClass({displayName:"Site",getDefaultProps:function(){return{onSelect:function(){},href:null,indicator:null,isSelected:!1}},propTypes:{href:r.PropTypes.string,indicator:r.PropTypes.bool,onSelect:r.PropTypes.func,isSelected:r.PropTypes.bool,site:r.PropTypes.object.isRequired},onSelect:function(e){this.props.onSelect(e)},render:function(){var e,t=this.props.site;return e=i({site:!0,"is-jetpack":t.jetpack,"is-primary":t.primary,"is-private":t.is_private,"is-redirect":t.options&&t.options.is_redirect,"is-selected":this.props.isSelected}),r.createElement("div",{className:e},r.createElement("a",{className:"site__content",href:this.props.href,onClick:this.onSelect,onTouchTap:this.onSelect},r.createElement(o,{site:t}),r.createElement("div",{className:"site__info"},r.createElement("div",{className:"site__title"},t.title),r.createElement("div",{className:"site__domain"},t.domain))))}})},97,97,function(e,t,n){"use strict";var r=n(96),i=(n(103),n(179)),o=n(184),s=n(186);e.exports=r.createClass({displayName:"MySitesSidebar",isItemLinkSelected:function(e){return Array.isArray(e)||(e=[e]),e.some(function(e){return i(this.props.path,e)},this)},isSingle:function(){return this.props.sites.selected||1===this.props.sites.get().length},getSelectedSite:function(){return 1===this.props.sites.get().length?this.props.sites.get().shift():this.props.sites.getSelectedSite()},siteSuffix:function(){return this.isSingle()?"/"+this.getSingleSiteDomain():""},render:function(){return r.createElement("ul",{className:"navigation-sidebar sidebar"},this.props.enableSiteSwitcher&&r.createElement(o,{addNewString:this.props.addNewString,addNewPath:this.props.addNewPath,sites:this.props.sites,siteCount:this.props.sites.get().length,onSwitchClick:this.props.onSwitchClick}),r.createElement(s,{path:this.props.path,navigation:this.props.navigation}))}})},function(e,t,n){function r(e,t,n){return e=s(e),n=i(o(n),0,e.length),e.lastIndexOf(t,n)==n}var i=n(180),o=n(165),s=n(181);e.exports=r},function(e,t){function n(e,t,n){return e===e&&(void 0!==n&&(e=n>=e?e:n),void 0!==t&&(e=e>=t?e:t)),e}e.exports=n},function(e,t,n){function r(e){if("string"==typeof e)return e;if(null==e)return"";if(o(e))return i?l.call(e):"";var t=e+"";return"0"==t&&1/e==-s?"-0":t}var i=n(182),o=n(183),s=1/0,a=i?i.prototype:void 0,l=i?a.toString:void 0;e.exports=r},function(e,t,n){var r=n(136),i=r.Symbol;e.exports=i},function(e,t,n){function r(e){return"symbol"==typeof e||i(e)&&a.call(e)==o}var i=n(124),o="[object Symbol]",s=Object.prototype,a=s.toString;e.exports=r},function(e,t,n){"use strict";var r=n(96),i=n(110),o=n(111),s=n(175);n(185),e.exports=r.createClass({displayName:"CurrentSite",mixins:[i],propTypes:{sites:r.PropTypes.object.isRequired,siteCount:r.PropTypes.number.isRequired},getSelectedSite:function(){return 1===this.props.sites.get().length?this.props.sites.get().shift():this.props.sites.getSelectedSite()},render:function(){var e,t=1===this.props.siteCount;return this.props.sites.initialized?(this.props.sites.selected&&(e=this.props.sites.getSelectedSite()),r.createElement("div",{className:"current-site"},this.props.sites.selected?r.createElement(s,{site:e}):r.createElement(o,{sites:this.props.sites}),t?r.createElement("a",{className:"current-site__add-new-wordpress",href:this.props.addNewPath,target:"_blank"},this.props.addNewString):r.createElement("span",{className:"current-site__switch-sites",onClick:this.props.onSwitchClick},this.translate("Switch Site")))):r.createElement("div",{className:"current-site is-loading"},r.createElement("div",{className:"site"},r.createElement("a",{className:"site__content"},r.createElement("div",{className:"site-icon"}),r.createElement("div",{className:"site__info"},r.createElement("span",{className:"site__title"},this.translate("Loading My Sites…"))))),t?r.createElement("a",{className:"current-site__add-new-wordpress",href:this.props.addNewPath,target:"_blank"},this.props.addNewString):r.createElement("span",{className:"current-site__switch-sites"}))}})},97,function(e,t,n){"use strict";var r=n(96),i=n(103),o=n(187);n(243),e.exports=r.createClass({displayName:"Navigation",propTypes:{navigation:r.PropTypes.array.isRequired,path:r.PropTypes.string.isRequired},isSection:function(e,t){var n=o(e.paths,function(e){return e.test(t)});return"undefined"!=typeof n},renderLink:function(e,t){var n=i({selected:this.isSection(e,this.props.path)},e.icon);return r.createElement("li",{className:n,key:t},r.createElement("a",{href:e.url},r.createElement("span",{className:"menu-link-text"},e.title)))},renderSection:function(e,t){return r.createElement("div",{className:"navigation-container sidebar-menu",key:t},r.createElement("h3",{className:"sidebar-heading"},e.title),r.createElement("ul",null,e.items.map(this.renderLink)))},render:function(){return r.createElement("div",{className:"navigation-container sidebar"},this.props.navigation.map(this.renderSection))}})},function(e,t,n){function r(e,t){if(t=a(t,3),l(e)){var n=s(e,t);return n>-1?e[n]:void 0}return o(e,t,i)}var i=n(188),o=n(201),s=n(202),a=n(203),l=n(125);e.exports=r},function(e,t,n){var r=n(189),i=n(200),o=i(r);e.exports=o},function(e,t,n){function r(e,t){return e&&i(e,t,o)}var i=n(190),o=n(192);e.exports=r},function(e,t,n){var r=n(191),i=r();e.exports=i},function(e,t){function n(e){return function(t,n,r){for(var i=-1,o=Object(t),s=r(t),a=s.length;a--;){var l=s[e?a:++i];if(n(o[l],l,o)===!1)break}return t}}e.exports=n},function(e,t,n){function r(e){var t=c(e);if(!t&&!a(e))return o(e);var n=s(e),r=!!n,u=n||[],h=u.length;for(var p in e)!i(e,p)||r&&("length"==p||l(p,h))||t&&"constructor"==p||u.push(p);return u}var i=n(193),o=n(194),s=n(195),a=n(118),l=n(198),c=n(199);e.exports=r},function(e,t){function n(e,t){return i.call(e,t)||"object"==typeof e&&t in e&&null===o(e)}var r=Object.prototype,i=r.hasOwnProperty,o=Object.getPrototypeOf;e.exports=n},function(e,t){function n(e){return r(Object(e))}var r=Object.keys;e.exports=n},function(e,t,n){function r(e){var t=e?e.length:void 0;return a(t)&&(s(e)||l(e)||o(e))?i(t,String):null}var i=n(196),o=n(116),s=n(125),a=n(123),l=n(197);e.exports=r},function(e,t){function n(e,t){for(var n=-1,r=Array(e);++n-1&&e%1==0&&t>e}var r=9007199254740991,i=/^(?:0|[1-9]\d*)$/;e.exports=n},function(e,t){function n(e){var t=e&&e.constructor,n="function"==typeof t&&t.prototype||r;return e===n}var r=Object.prototype;e.exports=n},function(e,t,n){function r(e,t){return function(n,r){if(null==n)return n;if(!i(n))return e(n,r);for(var o=n.length,s=t?o:-1,a=Object(n);(t?s--:++sp))return!1;var f=l.get(e);if(f)return f==t;var v=!0;for(l.set(e,t);++cn;)e=e[t[n++]];return n&&n==r?e:void 0}var i=n(231),o=n(233);e.exports=r},function(e,t,n){function r(e){return i(e)?e:o(e)}var i=n(125),o=n(232);e.exports=r},function(e,t,n){function r(e){var t=[];return i(e).replace(o,function(e,n,r,i){t.push(r?i.replace(s,"$1"):n||e)}),t}var i=n(181),o=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]/g,s=/\\(\\)?/g;e.exports=r},function(e,t,n){function r(e,t){return"number"==typeof e?!0:!i(e)&&(s.test(e)||!o.test(e)||null!=t&&e in Object(t))}var i=n(125),o=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,s=/^\w*$/;e.exports=r},function(e,t,n){function r(e,t){return o(e,t,i)}var i=n(235),o=n(236);e.exports=r},function(e,t){function n(e,t){return t in Object(e)}e.exports=n},function(e,t,n){function r(e,t,n){if(null==e)return!1;var r=n(e,t);r||l(t)||(t=i(t),e=p(e,t),null!=e&&(t=h(t),r=n(e,t)));var d=e?e.length:void 0;return r||!!d&&c(d)&&a(t,d)&&(s(e)||u(e)||o(e))}var i=n(231),o=n(116),s=n(125),a=n(198),l=n(233),c=n(123),u=n(197),h=n(237),p=n(238);e.exports=r},function(e,t){function n(e){var t=e?e.length:0;return t?e[t-1]:void 0}e.exports=n},function(e,t,n){function r(e,t){return 1==t.length?e:o(e,i(t,0,-1))}var i=n(239),o=n(229);e.exports=r},function(e,t){function n(e,t,n){var r=-1,i=e.length;0>t&&(t=-t>i?0:i+t),n=n>i?i:n,0>n&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var o=Array(i);++rbo&&setTimeout(function(){l.display.input.reset(!0)},20),Rt(this),Yi(),bt(this),this.curOp.forceUpdate=!0,Xr(this,i),r.autofocus&&!No||l.hasFocus()?setTimeout(_i(gn,this),20):yn(this);for(var u in es)es.hasOwnProperty(u)&&es[u](this,r[u],ts);E(this),r.finishInit&&r.finishInit(this);for(var h=0;hbo&&(r.gutters.style.zIndex=-1,r.scroller.style.paddingRight=0),xo||mo&&No||(r.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(r.wrapper):e(r.wrapper)),r.viewFrom=r.viewTo=t.first,r.reportedViewFrom=r.reportedViewTo=t.first,r.view=[],r.renderedView=null,r.externalMeasured=null,r.viewOffset=0,r.lastWrapHeight=r.lastWrapWidth=0,r.updateLineNumbers=null,r.nativeBarWidth=r.barHeight=r.barWidth=0,r.scrollbarsClipped=!1,r.lineNumWidth=r.lineNumInnerWidth=r.lineNumChars=null,r.alignWidgets=!1,r.cachedCharWidth=r.cachedTextHeight=r.cachedPaddingH=null,r.maxLine=null,r.maxLineLength=0,r.maxLineChanged=!1,r.wheelDX=r.wheelDY=r.wheelStartX=r.wheelStartY=null,r.shift=!1,r.selForContextMenu=null,r.activeTouch=null,n.init(r)}function n(t){t.doc.mode=e.getMode(t.options,t.doc.modeOption),r(t)}function r(e){e.doc.iter(function(e){e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null)}),e.doc.frontier=e.doc.first,He(e,100),e.state.modeGen++,e.curOp&&Dt(e)}function i(e){e.options.lineWrapping?(Zs(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(Xs(e.display.wrapper,"CodeMirror-wrap"),p(e)),s(e),Dt(e),at(e),setTimeout(function(){y(e)},100)}function o(e){var t=yt(e.display),n=e.options.lineWrapping,r=n&&Math.max(5,e.display.scroller.clientWidth/wt(e.display)-3);return function(i){if(Er(e.doc,i))return 0;var o=0;if(i.widgets)for(var s=0;st.maxLineLength&&(t.maxLineLength=n,t.maxLine=e)})}function d(e){var t=Oi(e.gutters,"CodeMirror-linenumbers");-1==t&&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 f(e){var t=e.display,n=t.gutters.offsetWidth,r=Math.round(e.doc.height+qe(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+Ue(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:n}}function v(e,t,n){this.cm=n;var r=this.vert=Ri("div",[Ri("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),i=this.horiz=Ri("div",[Ri("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");e(r),e(i),Ns(r,"scroll",function(){r.clientHeight&&t(r.scrollTop,"vertical")}),Ns(i,"scroll",function(){i.clientWidth&&t(i.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,wo&&8>bo&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")}function m(){}function g(t){t.display.scrollbars&&(t.display.scrollbars.clear(),t.display.scrollbars.addClass&&Xs(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),Ns(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&&Zs(t.display.wrapper,t.display.scrollbars.addClass)}function y(e,t){t||(t=f(e));var n=e.display.barWidth,r=e.display.barHeight;w(e,t);for(var i=0;4>i&&n!=e.display.barWidth||r!=e.display.barHeight;i++)n!=e.display.barWidth&&e.options.lineWrapping&&P(e),w(e,f(e)),n=e.display.barWidth,r=e.display.barHeight}function w(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-We(e));var i=n&&null!=n.bottom?n.bottom:r+e.wrapper.clientHeight,o=ni(t,r),s=ni(t,i);if(n&&n.ensure){var a=n.ensure.from.line,l=n.ensure.to.line;o>a?(o=a,s=ni(t,ri(Zr(t,a))+e.wrapper.clientHeight)):Math.min(l,t.lastLine())>=s&&(o=ni(t,ri(Zr(t,l))-e.wrapper.clientHeight),s=l)}return{from:o,to:Math.max(s,o+1)}}function x(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,i=t.gutters.offsetWidth,o=r+"px",s=0;s=n.viewFrom&&t.visible.to<=n.viewTo&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo)&&n.renderedView==n.view&&0==jt(e))return!1;E(e)&&(It(e),t.dims=O(e));var i=r.first+r.size,o=Math.max(t.visible.from-e.options.viewportMargin,r.first),s=Math.min(i,t.visible.to+e.options.viewportMargin);n.viewFroms&&n.viewTo-s<20&&(s=Math.min(i,n.viewTo)),Vo&&(o=br(e.doc,o),s=xr(e.doc,s));var a=o!=n.viewFrom||s!=n.viewTo||n.lastWrapHeight!=t.wrapperHeight||n.lastWrapWidth!=t.wrapperWidth;Bt(e,o,s),n.viewOffset=ri(Zr(e.doc,n.viewFrom)),e.display.mover.style.top=n.viewOffset+"px";var l=jt(e);if(!a&&0==l&&!t.force&&n.renderedView==n.view&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo))return!1;var c=Gi();return l>4&&(n.lineDiv.style.display="none"),A(e,n.updateLineNumbers,t.dims),l>4&&(n.lineDiv.style.display=""),n.renderedView=n.view,c&&Gi()!=c&&c.offsetHeight&&c.focus(),Wi(n.cursorDiv),Wi(n.selectionDiv),n.gutters.style.height=n.sizer.style.minHeight=0,a&&(n.lastWrapHeight=t.wrapperHeight,n.lastWrapWidth=t.wrapperWidth,He(e,400)),n.updateLineNumbers=null,!0}function T(e,t){for(var n=t.viewport,r=!0;(r&&e.options.lineWrapping&&t.oldDisplayWidth!=Ke(e)||(n&&null!=n.top&&(n={top:Math.min(e.doc.height+qe(e.display)-$e(e),n.top)}),t.visible=b(e.display,e.doc,n),!(t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)))&&M(e,t);r=!1){P(e);var i=f(e);Ae(e),y(e,i),L(e,i)}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 N(e,t){var n=new S(e,t);if(M(e,n)){P(e),T(e,n);var r=f(e);Ae(e),y(e,r),L(e,r),n.finish()}}function L(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+Ue(e)+"px"}function P(e){for(var t=e.display,n=t.lineDiv.offsetTop,r=0;rbo){var s=o.node.offsetTop+o.node.offsetHeight;i=s-n,n=s}else{var a=o.node.getBoundingClientRect();i=a.bottom-a.top}var l=o.line.height-i;if(2>i&&(i=yt(t)),(l>.001||-.001>l)&&(ei(o.line,i),F(o.line),o.rest))for(var c=0;c=t&&h.lineNumber;h.changes&&(Oi(h.changes,"gutter")>-1&&(p=!1),D(e,h,c,n)),p&&(Wi(h.lineNumber),h.lineNumber.appendChild(document.createTextNode(C(e.options,c)))),a=h.node.nextSibling}else{var d=W(e,h,c,n);s.insertBefore(d,a)}c+=h.size}for(;a;)a=r(a)}function D(e,t,n,r){for(var i=0;ibo&&(e.node.style.zIndex=2)),e.node}function I(e){var t=e.bgClass?e.bgClass+" "+(e.line.bgClass||""):e.line.bgClass;if(t&&(t+=" CodeMirror-linebackground"),e.background)t?e.background.className=t:(e.background.parentNode.removeChild(e.background),e.background=null);else if(t){var n=V(e);e.background=n.insertBefore(Ri("div",null,t),n.firstChild)}}function _(e,t){var n=e.display.externalMeasured;return n&&n.line==t.line?(e.display.externalMeasured=null,t.measure=n.measure,n.built):_r(e,t)}function H(e,t){var n=t.text.className,r=_(e,t);t.text==t.node&&(t.node=r.pre),t.text.parentNode.replaceChild(r.pre,t.text),t.text=r.pre,r.bgClass!=t.bgClass||r.textClass!=t.textClass?(t.bgClass=r.bgClass,t.textClass=r.textClass,B(t)):n&&(t.text.className=n)}function B(e){I(e),e.line.wrapClass?V(e).className=e.line.wrapClass:e.node!=e.text&&(e.node.className="");var t=e.textClass?e.textClass+" "+(e.line.textClass||""):e.line.textClass;e.text.className=t||""}function j(e,t,n,r){if(t.gutter&&(t.node.removeChild(t.gutter),t.gutter=null),t.gutterBackground&&(t.node.removeChild(t.gutterBackground),t.gutterBackground=null),t.line.gutterClass){var i=V(t);t.gutterBackground=Ri("div",null,"CodeMirror-gutter-background "+t.line.gutterClass,"left: "+(e.options.fixedGutter?r.fixedPos:-r.gutterTotalWidth)+"px; width: "+r.gutterTotalWidth+"px"),i.insertBefore(t.gutterBackground,t.text)}var o=t.line.gutterMarkers;if(e.options.lineNumbers||o){var i=V(t),s=t.gutter=Ri("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?r.fixedPos:-r.gutterTotalWidth)+"px");if(e.display.input.setUneditable(s),i.insertBefore(s,t.text),t.line.gutterClass&&(s.className+=" "+t.line.gutterClass),!e.options.lineNumbers||o&&o["CodeMirror-linenumbers"]||(t.lineNumber=s.appendChild(Ri("div",C(e.options,n),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+r.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+e.display.lineNumInnerWidth+"px"))),o)for(var a=0;a1)if(Ho&&Ho.join("\n")==t){if(r.ranges.length%Ho.length==0){l=[];for(var c=0;c=0;c--){var u=r.ranges[c],h=u.from(),p=u.to();u.empty()&&(n&&n>0?h=Io(h.line,h.ch-n):e.state.overwrite&&!s&&(p=Io(p.line,Math.min(Zr(o,p.line).text.length,p.ch+Fi(a).length))));var d=e.curOp.updateInput,f={from:h,to:p,text:l?l[c%l.length]:a,origin:i||(s?"paste":e.state.cutIncoming?"cut":"+input")};zn(e.doc,f),ki(e,"inputRead",e,f)}t&&!s&&Q(e,t),_n(e),e.curOp.updateInput=d,e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=!1}function J(e,t){var n=e.clipboardData&&e.clipboardData.getData("text/plain");return n?(e.preventDefault(),t.isReadOnly()||t.options.disableInput||Nt(t,function(){Z(t,n,0,null,"paste")}),!0):void 0}function Q(e,t){if(e.options.electricChars&&e.options.smartIndent)for(var n=e.doc.sel,r=n.ranges.length-1;r>=0;r--){var i=n.ranges[r];if(!(i.head.ch>100||r&&n.ranges[r-1].head.line==i.head.line)){var o=e.getModeAt(i.head),s=!1;if(o.electricChars){for(var a=0;a-1){s=Bn(e,i.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(Zr(e.doc,i.head.line).text.slice(0,i.head.ch))&&(s=Bn(e,i.head.line,"smart"));s&&ki(e,"electricInput",e,i.head.line)}}}function ee(e){for(var t=[],n=[],r=0;ri?c.map:u[i],s=0;si?e.line:e.rest[i]),h=o[s]+r;return(0>r||a!=t)&&(h=o[s+(r?1:0)]),Io(l,h)}}}var i=e.text.firstChild,o=!1;if(!t||!Ks(i,t))return se(Io(ti(e.line),0),!0);if(t==i&&(o=!0,t=i.childNodes[n],n=0,!t)){var s=e.rest?Fi(e.rest):e.line;return se(Io(ti(s),s.text.length),o)}var a=3==t.nodeType?t:null,l=t;for(a||1!=t.childNodes.length||3!=t.firstChild.nodeType||(a=t.firstChild,n&&(n=a.nodeValue.length));l.parentNode!=i;)l=l.parentNode;var c=e.measure,u=c.maps,h=r(a,l,n);if(h)return se(h,o);for(var p=l.nextSibling,d=a?a.nodeValue.length-n:0;p;p=p.nextSibling){if(h=r(p,p.firstChild,0))return se(Io(h.line,h.ch-d),o);d+=p.textContent.length}for(var f=l.previousSibling,d=n;f;f=f.previousSibling){if(h=r(f,f.firstChild,-1))return se(Io(h.line,h.ch+d),o);d+=p.textContent.length}}function ce(e,t,n,r,i){function o(e){return function(t){return t.id==e}}function s(t){if(1==t.nodeType){var n=t.getAttribute("cm-text");if(null!=n)return""==n&&(n=t.textContent.replace(/\u200b/g,"")),void(a+=n);var u,h=t.getAttribute("cm-marker");if(h){var p=e.findMarks(Io(r,0),Io(i+1,0),o(+h));return void(p.length&&(u=p[0].find())&&(a+=Jr(e.doc,u.from,u.to).join(c)))}if("false"==t.getAttribute("contenteditable"))return;for(var d=0;d=0){var s=Y(o.from(),i.from()),a=$(o.to(),i.to()),l=o.empty()?i.from()==i.head:o.from()==o.head;t>=r&&--t,e.splice(--r,2,new he(l?a:s,l?s:a))}}return new ue(e,t)}function de(e,t){return new ue([new he(e,t||e)],0)}function fe(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function ve(e,t){if(t.linen?Io(n,Zr(e,n).text.length):me(t,Zr(e,t.line).text.length)}function me(e,t){var n=e.ch;return null==n||n>t?Io(e.line,t):0>n?Io(e.line,0):e}function ge(e,t){return t>=e.first&&t=t.ch:a.to>t.ch))){if(i&&(Fs(l,"beforeCursorEnter"),l.explicitlyCleared)){if(o.markedSpans){--s;continue}break}if(!l.atomic)continue;if(n){var c,u=l.find(0>r?1:-1);if((0>r?l.inclusiveRight:l.inclusiveLeft)&&(u=Oe(e,u,-r,u&&u.line==t.line?o:null)),u&&u.line==t.line&&(c=_o(u,n))&&(0>r?0>c:c>0))return Pe(e,u,t,r,i)}var h=l.find(0>r?-1:1);return(0>r?l.inclusiveLeft:l.inclusiveRight)&&(h=Oe(e,h,r,h.line==t.line?o:null)),h?Pe(e,h,t,r,i):null}}return t}function Fe(e,t,n,r,i){var o=r||1,s=Pe(e,t,n,o,i)||!i&&Pe(e,t,n,o,!0)||Pe(e,t,n,-o,i)||!i&&Pe(e,t,n,-o,!0);return s?s:(e.cantEdit=!0,Io(e.first,0))}function Oe(e,t,n,r){return 0>n&&0==t.ch?t.line>e.first?ve(e,Io(t.line-1)):null:n>0&&t.ch==(r||Zr(e,t.line)).text.length?t.line=e.display.viewTo||a.to().linet&&(t=0),t=Math.round(t),r=Math.round(r),a.appendChild(Ri("div",null,"CodeMirror-selected","position: absolute; left: "+e+"px; top: "+t+"px; width: "+(null==n?u-e:n)+"px; height: "+(r-t)+"px"))}function i(t,n,i){function o(n,r){return pt(e,Io(t,n),"div",h,r)}var a,l,h=Zr(s,t),p=h.text.length;return eo(ii(h),n||0,null==i?p:i,function(e,t,s){var h,d,f,v=o(e,"left");if(e==t)h=v,d=f=v.left;else{if(h=o(t-1,"right"),"rtl"==s){var m=v;v=h,h=m}d=v.left,f=h.right}null==n&&0==e&&(d=c),h.top-v.top>3&&(r(d,v.top,null,v.bottom),d=c,v.bottoml.bottom||h.bottom==l.bottom&&h.right>l.right)&&(l=h),c+1>d&&(d=c),r(d,h.top,f-d,h.bottom)}),{start:a,end:l}}var o=e.display,s=e.doc,a=document.createDocumentFragment(),l=Ge(e.display),c=l.left,u=Math.max(o.sizerWidth,Ke(e)-o.sizer.offsetLeft)-l.right,h=t.from(),p=t.to();if(h.line==p.line)i(h.line,h.ch,p.ch);else{var d=Zr(s,h.line),f=Zr(s,p.line),v=yr(d)==yr(f),m=i(h.line,h.ch,v?d.text.length+1:null).end,g=i(p.line,v?0:null,p.ch).start;v&&(m.top0?t.blinker=setInterval(function(){t.cursorDiv.style.visibility=(n=!n)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function He(e,t){e.doc.mode.startState&&e.doc.frontier=e.display.viewTo)){var n=+new Date+e.options.workTime,r=as(t.mode,Re(e,t.frontier)),i=[];t.iter(t.frontier,Math.min(t.first+t.size,e.display.viewTo+500),function(o){if(t.frontier>=e.display.viewFrom){var s=o.styles,a=o.text.length>e.options.maxHighlightLength,l=Ar(e,o,a?as(t.mode,r):r,!0);o.styles=l.styles;var c=o.styleClasses,u=l.classes;u?o.styleClasses=u:c&&(o.styleClasses=null);for(var h=!s||s.length!=o.styles.length||c!=u&&(!c||!u||c.bgClass!=u.bgClass||c.textClass!=u.textClass),p=0;!h&&pn?(He(e,e.options.workDelay),!0):void 0}),i.length&&Nt(e,function(){for(var t=0;ts;--a){if(a<=o.first)return o.first;var l=Zr(o,a-1);if(l.stateAfter&&(!n||a<=o.frontier))return a;var c=Hs(l.text,null,e.options.tabSize);(null==i||r>c)&&(i=a-1,r=c)}return i}function Re(e,t,n){var r=e.doc,i=e.display;if(!r.mode.startState)return!0;var o=je(e,t,n),s=o>r.first&&Zr(r,o-1).stateAfter;return s=s?as(r.mode,s):ls(r.mode),r.iter(o,t,function(n){Vr(e,n.text,s);var a=o==t-1||o%5==0||o>=i.viewFrom&&o2&&o.push((l.bottom+c.top)/2-n.top)}}o.push(n.bottom-n.top)}}function Xe(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 Ze(e,t){t=yr(t);var n=ti(t),r=e.display.externalMeasured=new Ot(e.doc,t,n);r.lineN=n;var i=r.built=_r(e,r);return r.text=i.pre,qi(e.display.lineMeasure,i.pre),r}function Je(e,t,n,r){return tt(e,et(e,t),n,r)}function Qe(e,t){if(t>=e.display.viewFrom&&t=n.lineN&&tt?(i=0,o=1,s="left"):c>t?(i=t-l,o=i+1):(a==e.length-3||t==c&&e[a+3]>t)&&(o=c-l,i=o-1,t>=c&&(s="right")),null!=i){if(r=e[a+2],l==c&&n==(r.insertLeft?"left":"right")&&(s=n),"left"==n&&0==i)for(;a&&e[a-2]==e[a-3]&&e[a-1].insertLeft;)r=e[(a-=3)+2],s="left";if("right"==n&&i==c-l)for(;au;u++){for(;a&&ji(t.line.text.charAt(o.coverStart+a));)--a;for(;o.coverStart+lbo&&0==a&&l==o.coverEnd-o.coverStart)i=s.parentNode.getBoundingClientRect();else if(wo&&e.options.lineWrapping){var h=Ws(s,a,l).getClientRects();i=h.length?h["right"==r?h.length-1:0]:Wo}else i=Ws(s,a,l).getBoundingClientRect()||Wo;if(i.left||i.right||0==a)break;l=a,a-=1,c="right"}wo&&11>bo&&(i=it(e.display.measure,i))}else{a>0&&(c=r="right");var h;i=e.options.lineWrapping&&(h=s.getClientRects()).length>1?h["right"==r?h.length-1:0]:s.getBoundingClientRect()}if(wo&&9>bo&&!a&&(!i||!i.left&&!i.right)){var p=s.parentNode.getClientRects()[0];i=p?{left:p.left,right:p.left+wt(e.display),top:p.top,bottom:p.bottom}:Wo}for(var d=i.top-t.rect.top,f=i.bottom-t.rect.top,v=(d+f)/2,m=t.view.measure.heights,u=0;un.from?s(e-1):s(e,r)}r=r||Zr(e.doc,t.line),i||(i=et(e,r));var l=ii(r),c=t.ch;if(!l)return s(c);var u=co(l,c),h=a(c,u);return null!=oa&&(h.other=a(c,oa)),h}function ft(e,t){var n=0,t=ve(e.doc,t);e.options.lineWrapping||(n=wt(e.display)*t.ch);var r=Zr(e.doc,t.line),i=ri(r)+We(e.display);return{left:n,right:n,top:i,bottom:i+r.height}}function vt(e,t,n,r){var i=Io(e,t);return i.xRel=r,n&&(i.outside=!0),i}function mt(e,t,n){var r=e.doc;if(n+=e.display.viewOffset,0>n)return vt(r.first,0,!0,-1);var i=ni(r,n),o=r.first+r.size-1;if(i>o)return vt(r.first+r.size-1,Zr(r,o).text.length,!0,1);0>t&&(t=0);for(var s=Zr(r,i);;){var a=gt(e,s,i,t,n),l=mr(s),c=l&&l.find(0,!0);if(!l||!(a.ch>c.from.ch||a.ch==c.from.ch&&a.xRel>0))return a;i=ti(s=c.to.line)}}function gt(e,t,n,r,i){function o(r){var i=dt(e,Io(n,r),"line",t,c);return a=!0,s>i.bottom?i.left-l:sm)return vt(n,d,g,1);for(;;){if(u?d==p||d==ho(t,p,1):1>=d-p){for(var y=f>r||m-r>=r-f?p:d,w=r-(y==p?f:m);ji(t.text.charAt(y));)++y;var b=vt(n,y,y==p?v:g,-1>w?-1:w>1?1:0);return b}var x=Math.ceil(h/2),E=p+x;if(u){E=p;for(var C=0;x>C;++C)E=ho(t,E,1)}var k=o(E);k>r?(d=E,m=k,(g=a)&&(m+=1e3),h=x):(p=E,f=k,v=a,h-=x)}}function yt(e){if(null!=e.cachedTextHeight)return e.cachedTextHeight;if(null==Bo){Bo=Ri("pre");for(var t=0;49>t;++t)Bo.appendChild(document.createTextNode("x")),Bo.appendChild(Ri("br"));Bo.appendChild(document.createTextNode("x"))}qi(e.measure,Bo);var n=Bo.offsetHeight/50;return n>3&&(e.cachedTextHeight=n),Wi(e.measure),n||1}function wt(e){if(null!=e.cachedCharWidth)return e.cachedCharWidth;var t=Ri("span","xxxxxxxxxx"),n=Ri("pre",[t]);qi(e.measure,n);var r=t.getBoundingClientRect(),i=(r.right-r.left)/10;return i>2&&(e.cachedCharWidth=i),i||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:++Go},qo?qo.ops.push(e.curOp):e.curOp.ownsGroup=qo={ops:[e.curOp],delayedCallbacks:[]}}function xt(e){var t=e.delayedCallbacks,n=0;do{for(;n=n.viewTo)||n.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new S(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function St(e){e.updatedDisplay=e.mustUpdate&&M(e.cm,e.update)}function zt(e){var t=e.cm,n=t.display;e.updatedDisplay&&P(t),e.barMeasure=f(t),n.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=Je(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+Ue(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+e.adjustWidthTo-Ke(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=n.input.prepareSelection())}function Mt(e){var t=e.cm;null!=e.adjustWidthTo&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLefto;o=r){var s=new Ot(e.doc,Zr(e.doc,o),o);r=o+s.size,i.push(s)}return i}function Dt(e,t,n,r){null==t&&(t=e.doc.first),null==n&&(n=e.doc.first+e.doc.size),r||(r=0);var i=e.display;if(r&&nt)&&(i.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=i.viewTo)Vo&&br(e.doc,t)i.viewFrom?It(e):(i.viewFrom+=r,i.viewTo+=r);else if(t<=i.viewFrom&&n>=i.viewTo)It(e);else if(t<=i.viewFrom){var o=Ht(e,n,n+r,1);o?(i.view=i.view.slice(o.index),i.viewFrom=o.lineN,i.viewTo+=r):It(e)}else if(n>=i.viewTo){var o=Ht(e,t,t,-1);o?(i.view=i.view.slice(0,o.index),i.viewTo=o.lineN):It(e)}else{var s=Ht(e,t,t,-1),a=Ht(e,n,n+r,1);s&&a?(i.view=i.view.slice(0,s.index).concat(At(e,s.lineN,a.lineN)).concat(i.view.slice(a.index)),i.viewTo+=r):It(e)}var l=i.externalMeasured;l&&(n=i.lineN&&t=r.viewTo)){var o=r.view[_t(e,t)];if(null!=o.node){var s=o.changes||(o.changes=[]);-1==Oi(s,n)&&s.push(n)}}}function It(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function _t(e,t){if(t>=e.display.viewTo)return null;if(t-=e.display.viewFrom,0>t)return null;for(var n=e.display.view,r=0;rt)return r}function Ht(e,t,n,r){var i,o=_t(e,t),s=e.display.view;if(!Vo||n==e.doc.first+e.doc.size)return{index:o,lineN:n};for(var a=0,l=e.display.viewFrom;o>a;a++)l+=s[a].size;if(l!=t){if(r>0){if(o==s.length-1)return null;i=l+s[o].size-t,o++}else i=l-t;t+=i,n+=i}for(;br(e.doc,n)!=n;){if(o==(0>r?0:s.length-1))return null;n+=r*s[o-(0>r?1:0)].size,o+=r}return{index:o,lineN:n}}function Bt(e,t,n){var r=e.display,i=r.view;0==i.length||t>=r.viewTo||n<=r.viewFrom?(r.view=At(e,t,n),r.viewFrom=t):(r.viewFrom>t?r.view=At(e,t,r.viewFrom).concat(r.view):r.viewFromn&&(r.view=r.view.slice(0,_t(e,n)))),r.viewTo=n}function jt(e){for(var t=e.display.view,n=0,r=0;r400}var i=e.display;Ns(i.scroller,"mousedown",Lt(e,Kt)),wo&&11>bo?Ns(i.scroller,"dblclick",Lt(e,function(t){if(!zi(e,t)){var n=Ut(e,t);if(n&&!Jt(e,t)&&!Gt(e.display,t)){zs(t);var r=e.findWordAt(n);be(e.doc,r.anchor,r.head)}}})):Ns(i.scroller,"dblclick",function(t){zi(e,t)||zs(t)}),Ao||Ns(i.scroller,"contextmenu",function(t){wn(e,t)});var o,s={end:0};Ns(i.scroller,"touchstart",function(t){if(!zi(e,t)&&!n(t)){clearTimeout(o);var r=+new Date;i.activeTouch={start:r,moved:!1,prev:r-s.end<=300?s:null},1==t.touches.length&&(i.activeTouch.left=t.touches[0].pageX,i.activeTouch.top=t.touches[0].pageY)}}),Ns(i.scroller,"touchmove",function(){i.activeTouch&&(i.activeTouch.moved=!0)}),Ns(i.scroller,"touchend",function(n){var o=i.activeTouch;if(o&&!Gt(i,n)&&null!=o.left&&!o.moved&&new Date-o.start<300){var s,a=e.coordsChar(i.activeTouch,"page");s=!o.prev||r(o,o.prev)?new he(a,a):!o.prev.prev||r(o,o.prev.prev)?e.findWordAt(a):new he(Io(a.line,0),ve(e.doc,Io(a.line+1,0))),e.setSelection(s.anchor,s.head),e.focus(),zs(n)}t()}),Ns(i.scroller,"touchcancel",t),Ns(i.scroller,"scroll",function(){i.scroller.clientHeight&&(rn(e,i.scroller.scrollTop),on(e,i.scroller.scrollLeft,!0),Fs(e,"scroll",e))}),Ns(i.scroller,"mousewheel",function(t){sn(e,t)}),Ns(i.scroller,"DOMMouseScroll",function(t){sn(e,t)}),Ns(i.wrapper,"scroll",function(){i.wrapper.scrollTop=i.wrapper.scrollLeft=0}),i.dragFunctions={enter:function(t){zi(e,t)||Ts(t)},over:function(t){zi(e,t)||(tn(e,t),Ts(t))},start:function(t){en(e,t)},drop:Lt(e,Qt),leave:function(t){zi(e,t)||nn(e)}};var a=i.input.getField();Ns(a,"keyup",function(t){fn.call(e,t)}),Ns(a,"keydown",Lt(e,pn)),Ns(a,"keypress",Lt(e,vn)),Ns(a,"focus",_i(gn,e)),Ns(a,"blur",_i(yn,e))}function Wt(t,n,r){var i=r&&r!=e.Init;if(!n!=!i){var o=t.display.dragFunctions,s=n?Ns:Ps;s(t.display.scroller,"dragstart",o.start),s(t.display.scroller,"dragenter",o.enter),s(t.display.scroller,"dragover",o.over),s(t.display.scroller,"dragleave",o.leave),s(t.display.scroller,"drop",o.drop)}}function qt(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 Gt(e,t){for(var n=xi(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 Ut(e,t,n,r){var i=e.display;if(!n&&"true"==xi(t).getAttribute("cm-not-content"))return null;var o,s,a=i.lineSpace.getBoundingClientRect();try{o=t.clientX-a.left,s=t.clientY-a.top}catch(t){return null}var l,c=mt(e,o,s);if(r&&1==c.xRel&&(l=Zr(e.doc,c.line).text).length==c.ch){var u=Hs(l,l.length,e.options.tabSize)-l.length;c=Io(c.line,Math.max(0,Math.round((o-Ge(e.display).left)/wt(e.display))-u))}return c}function Kt(e){var t=this,n=t.display;if(!(zi(t,e)||n.activeTouch&&n.input.supportsTouch())){if(n.shift=e.shiftKey,Gt(n,e))return void(xo||(n.scroller.draggable=!1,setTimeout(function(){n.scroller.draggable=!0},100)));if(!Jt(t,e)){var r=Ut(t,e);switch(window.focus(),Ei(e)){case 1:t.state.selectingText?t.state.selectingText(e):r?$t(t,e,r):xi(e)==n.scroller&&zs(e);break;case 2:xo&&(t.state.lastMiddleDown=+new Date),r&&be(t.doc,r),setTimeout(function(){n.input.focus()},20),zs(e);break;case 3:Ao?wn(t,e):mn(t)}}}}function $t(e,t,n){wo?setTimeout(_i(X,e),0):e.curOp.focus=Gi();var r,i=+new Date;Ro&&Ro.time>i-400&&0==_o(Ro.pos,n)?r="triple":jo&&jo.time>i-400&&0==_o(jo.pos,n)?(r="double",Ro={time:i,pos:n}):(r="single",jo={time:i,pos:n});var o,s=e.doc.sel,a=Lo?t.metaKey:t.ctrlKey;e.options.dragDrop&&Qs&&!e.isReadOnly()&&"single"==r&&(o=s.contains(n))>-1&&(_o((o=s.ranges[o]).from(),n)<0||n.xRel>0)&&(_o(o.to(),n)>0||n.xRel<0)?Yt(e,t,n,a):Xt(e,t,n,r,a)}function Yt(e,t,n,r){var i=e.display,o=+new Date,s=Lt(e,function(a){xo&&(i.scroller.draggable=!1),e.state.draggingText=!1,Ps(document,"mouseup",s),Ps(i.scroller,"drop",s),Math.abs(t.clientX-a.clientX)+Math.abs(t.clientY-a.clientY)<10&&(zs(a),!r&&+new Date-200=f;f++){var g=Zr(c,f).text,y=Bs(g,l,o);l==d?i.push(new he(Io(f,y),Io(f,y))):g.length>y&&i.push(new he(Io(f,y),Io(f,Bs(g,d,o))))}i.length||i.push(new he(n,n)),ze(c,pe(p.ranges.slice(0,h).concat(i),h),{origin:"*mouse",scroll:!1}),e.scrollIntoView(t)}else{var w=u,b=w.anchor,x=t;if("single"!=r){if("double"==r)var E=e.findWordAt(t);else var E=new he(Io(t.line,0),ve(c,Io(t.line+1,0)));_o(E.anchor,b)>0?(x=E.head,b=Y(w.from(),E.anchor)):(x=E.anchor,b=$(w.to(),E.head))}var i=p.ranges.slice(0);i[h]=new he(ve(c,b),x),ze(c,pe(i,h),Is)}}function s(t){var n=++y,i=Ut(e,t,!0,"rect"==r);if(i)if(0!=_o(i,m)){e.curOp.focus=Gi(),o(i);var a=b(l,c);(i.line>=a.to||i.lineg.bottom?20:0;u&&setTimeout(Lt(e,function(){y==n&&(l.scroller.scrollTop+=u,s(t))}),50)}}function a(t){e.state.selectingText=!1,y=1/0,zs(t),l.input.focus(),Ps(document,"mousemove",w),Ps(document,"mouseup",x),c.history.lastSelOrigin=null}var l=e.display,c=e.doc;zs(t);var u,h,p=c.sel,d=p.ranges;if(i&&!t.shiftKey?(h=c.sel.contains(n),u=h>-1?d[h]:new he(n,n)):(u=c.sel.primary(),h=c.sel.primIndex),t.altKey)r="rect",i||(u=new he(n,n)),n=Ut(e,t,!0,!0),h=-1;else if("double"==r){var f=e.findWordAt(n);u=e.display.shift||c.extend?we(c,u,f.anchor,f.head):f}else if("triple"==r){var v=new he(Io(n.line,0),ve(c,Io(n.line+1,0)));u=e.display.shift||c.extend?we(c,u,v.anchor,v.head):v}else u=we(c,u,n);i?-1==h?(h=d.length,ze(c,pe(d.concat([u]),h),{scroll:!1,origin:"*mouse"})):d.length>1&&d[h].empty()&&"single"==r&&!t.shiftKey?(ze(c,pe(d.slice(0,h).concat(d.slice(h+1)),0),{scroll:!1,origin:"*mouse"}),p=c.sel):Ee(c,h,u,Is):(h=0,ze(c,new ue([u],0),Is),p=c.sel);var m=n,g=l.wrapper.getBoundingClientRect(),y=0,w=Lt(e,function(e){Ei(e)?s(e):a(e)}),x=Lt(e,a);e.state.selectingText=x,Ns(document,"mousemove",w),Ns(document,"mouseup",x)}function Zt(e,t,n,r){try{var i=t.clientX,o=t.clientY}catch(t){return!1}if(i>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;r&&zs(t);var s=e.display,a=s.lineDiv.getBoundingClientRect();if(o>a.bottom||!Ti(e,n))return bi(t);o-=a.top-s.viewOffset;for(var l=0;l=i){var u=ni(e.doc,o),h=e.options.gutters[l];return Fs(e,n,e,u,h,t),bi(t)}}}function Jt(e,t){return Zt(e,t,"gutterClick",!0)}function Qt(e){var t=this;if(nn(t),!zi(t,e)&&!Gt(t.display,e)){zs(e),wo&&(Uo=+new Date);var n=Ut(t,e,!0),r=e.dataTransfer.files;if(n&&!t.isReadOnly())if(r&&r.length&&window.FileReader&&window.File)for(var i=r.length,o=Array(i),s=0,a=function(e,r){if(!t.options.allowDropFileTypes||-1!=Oi(t.options.allowDropFileTypes,e.type)){var a=new FileReader;a.onload=Lt(t,function(){var e=a.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(e)&&(e=""),o[r]=e,++s==i){n=ve(t.doc,n);var l={from:n,to:n,text:t.doc.splitLines(o.join(t.doc.lineSeparator())),origin:"paste"};zn(t.doc,l),Se(t.doc,de(n,Jo(l)))}}),a.readAsText(e)}},l=0;i>l;++l)a(r[l],l);else{if(t.state.draggingText&&t.doc.sel.contains(n)>-1)return t.state.draggingText(e),void setTimeout(function(){t.display.input.focus()},20);try{var o=e.dataTransfer.getData("Text");if(o){if(t.state.draggingText&&!(Lo?e.altKey:e.ctrlKey))var c=t.listSelections();if(Me(t.doc,de(n,n)),c)for(var l=0;ls.clientWidth,l=s.scrollHeight>s.clientHeight;if(r&&a||i&&l){if(i&&Lo&&xo)e:for(var c=t.target,u=o.view;c!=s;c=c.parentNode)for(var h=0;hp?d=Math.max(0,d+p-50):f=Math.min(e.doc.height,f+p+50),N(e,{top:d,bottom:f})}20>Ko&&(null==o.wheelStartX?(o.wheelStartX=s.scrollLeft,o.wheelStartY=s.scrollTop,o.wheelDX=r,o.wheelDY=i,setTimeout(function(){if(null!=o.wheelStartX){var e=s.scrollLeft-o.wheelStartX,t=s.scrollTop-o.wheelStartY,n=t&&o.wheelDY&&t/o.wheelDY||e&&o.wheelDX&&e/o.wheelDX;o.wheelStartX=o.wheelStartY=null,n&&($o=($o*Ko+n)/(Ko+1),++Ko)}},200)):(o.wheelDX+=r,o.wheelDY+=i))}}function an(e,t,n){if("string"==typeof t&&(t=cs[t],!t))return!1;e.display.input.ensurePolled();var r=e.display.shift,i=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),n&&(e.display.shift=!1),i=t(e)!=Ds}finally{e.display.shift=r,e.state.suppressEdits=!1}return i}function ln(e,t,n){for(var r=0;rbo&&27==e.keyCode&&(e.returnValue=!1);var n=e.keyCode;t.display.shift=16==n||e.shiftKey;var r=un(t,e);ko&&(Zo=r?n:null,!r&&88==n&&!na&&(Lo?e.metaKey:e.ctrlKey)&&t.replaceSelection("",null,"cut")),18!=n||/\bCodeMirror-crosshair\b/.test(t.display.lineDiv.className)||dn(t)}}function dn(e){function t(e){18!=e.keyCode&&e.altKey||(Xs(n,"CodeMirror-crosshair"),Ps(document,"keyup",t),Ps(document,"mouseover",t))}var n=e.display.lineDiv;Zs(n,"CodeMirror-crosshair"),Ns(document,"keyup",t),Ns(document,"mouseover",t)}function fn(e){16==e.keyCode&&(this.doc.sel.shift=!1),zi(this,e)}function vn(e){var t=this;if(!(Gt(t.display,e)||zi(t,e)||e.ctrlKey&&!e.altKey||Lo&&e.metaKey)){var n=e.keyCode,r=e.charCode;if(ko&&n==Zo)return Zo=null,void zs(e);if(!ko||e.which&&!(e.which<10)||!un(t,e)){var i=String.fromCharCode(null==r?n:r);hn(t,e,i)||t.display.input.onKeyPress(e)}}}function mn(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,yn(e))},100)}function gn(e){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),"nocursor"!=e.options.readOnly&&(e.state.focused||(Fs(e,"focus",e),e.state.focused=!0,Zs(e.display.wrapper,"CodeMirror-focused"),e.curOp||e.display.selForContextMenu==e.doc.sel||(e.display.input.reset(),xo&&setTimeout(function(){e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),_e(e))}function yn(e){e.state.delayingBlurEvent||(e.state.focused&&(Fs(e,"blur",e),e.state.focused=!1,Xs(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150))}function wn(e,t){Gt(e.display,t)||bn(e,t)||zi(e,t,"contextmenu")||e.display.input.onContextMenu(t)}function bn(e,t){return Ti(e,"gutterContextMenu")?Zt(e,t,"gutterContextMenu",!1):!1}function xn(e,t){if(_o(e,t.from)<0)return e;if(_o(e,t.to)<=0)return Jo(t);var n=e.line+t.text.length-(t.to.line-t.from.line)-1,r=e.ch;return e.line==t.to.line&&(r+=Jo(t).ch-t.to.ch),Io(n,r)}function En(e,t){for(var n=[],r=0;r=0;--i)Mn(e,{from:r[i].from,to:r[i].to,text:i?[""]:t.text});else Mn(e,t)}}function Mn(e,t){if(1!=t.text.length||""!=t.text[0]||0!=_o(t.from,t.to)){var n=En(e,t);ci(e,t,n,e.cm?e.cm.curOp.id:NaN),Ln(e,t,n,or(e,t));var r=[];Yr(e,function(e,n){n||-1!=Oi(r,e.history)||(wi(e.history,t),r.push(e.history)),Ln(e,t,null,or(e,t))})}}function Tn(e,t,n){if(!e.cm||!e.cm.state.suppressEdits){for(var r,i=e.history,o=e.sel,s="undo"==t?i.done:i.undone,a="undo"==t?i.undone:i.done,l=0;l=0;--l){var h=r.changes[l];if(h.origin=t,u&&!Sn(e,h,!1))return void(s.length=0);c.push(si(e,h));var p=l?En(e,h):Fi(s);Ln(e,h,p,ar(e,h)),!l&&e.cm&&e.cm.scrollIntoView({from:h.from,to:Jo(h)});var d=[];Yr(e,function(e,t){t||-1!=Oi(d,e.history)||(wi(e.history,h),d.push(e.history)),Ln(e,h,null,ar(e,h))})}}}}function Nn(e,t){if(0!=t&&(e.first+=t,e.sel=new ue(Ai(e.sel.ranges,function(e){return new he(Io(e.anchor.line+t,e.anchor.ch),Io(e.head.line+t,e.head.ch))}),e.sel.primIndex),e.cm)){Dt(e.cm,e.first,e.first-t,t);for(var n=e.cm.display,r=n.viewFrom;re.lastLine())){if(t.from.lineo&&(t={from:t.from,to:Io(o,Zr(e,o).text.length),text:[t.text[0]],origin:t.origin}),t.removed=Jr(e,t.from,t.to),n||(n=En(e,t)),e.cm?Pn(e.cm,t,r):Ur(e,t,r),Me(e,n,Vs)}}function Pn(e,t,n){var r=e.doc,i=e.display,s=t.from,a=t.to,l=!1,c=s.line;e.options.lineWrapping||(c=ti(yr(Zr(r,s.line))),r.iter(c,a.line+1,function(e){return e==i.maxLine?(l=!0,!0):void 0})),r.sel.contains(t.from,t.to)>-1&&Mi(e),Ur(r,t,n,o(e)),e.options.lineWrapping||(r.iter(c,s.line+t.text.length,function(e){var t=h(e);t>i.maxLineLength&&(i.maxLine=e,i.maxLineLength=t,i.maxLineChanged=!0,l=!1)}),l&&(e.curOp.updateMaxLine=!0)),r.frontier=Math.min(r.frontier,s.line),He(e,400);var u=t.text.length-(a.line-s.line)-1;t.full?Dt(e):s.line!=a.line||1!=t.text.length||Gr(e.doc,t)?Dt(e,s.line,a.line+1,u):Vt(e,s.line,"text");var p=Ti(e,"changes"),d=Ti(e,"change");if(d||p){var f={from:s,to:a,text:t.text,removed:t.removed,origin:t.origin};d&&ki(e,"change",e,f),p&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(f)}e.display.selForContextMenu=null}function Fn(e,t,n,r,i){if(r||(r=n),_o(r,n)<0){var o=r;r=n,n=o}"string"==typeof t&&(t=e.splitLines(t)),zn(e,{from:n,to:r,text:t,origin:i})}function On(e,t){if(!zi(e,"scrollCursorIntoView")){var n=e.display,r=n.sizer.getBoundingClientRect(),i=null;if(t.top+r.top<0?i=!0:t.bottom+r.top>(window.innerHeight||document.documentElement.clientHeight)&&(i=!1),null!=i&&!Mo){var o=Ri("div","",null,"position: absolute; top: "+(t.top-n.viewOffset-We(e.display))+"px; height: "+(t.bottom-t.top+Ue(e)+n.barHeight)+"px; left: "+t.left+"px; width: 2px;");e.display.lineSpace.appendChild(o),o.scrollIntoView(i),e.display.lineSpace.removeChild(o)}}}function An(e,t,n,r){null==r&&(r=0);for(var i=0;5>i;i++){var o=!1,s=dt(e,t),a=n&&n!=t?dt(e,n):s,l=Vn(e,Math.min(s.left,a.left),Math.min(s.top,a.top)-r,Math.max(s.left,a.left),Math.max(s.bottom,a.bottom)+r),c=e.doc.scrollTop,u=e.doc.scrollLeft;if(null!=l.scrollTop&&(rn(e,l.scrollTop),Math.abs(e.doc.scrollTop-c)>1&&(o=!0)),null!=l.scrollLeft&&(on(e,l.scrollLeft),Math.abs(e.doc.scrollLeft-u)>1&&(o=!0)),!o)break}return s}function Dn(e,t,n,r,i){var o=Vn(e,t,n,r,i);null!=o.scrollTop&&rn(e,o.scrollTop),null!=o.scrollLeft&&on(e,o.scrollLeft)}function Vn(e,t,n,r,i){var o=e.display,s=yt(e.display);0>n&&(n=0);var a=e.curOp&&null!=e.curOp.scrollTop?e.curOp.scrollTop:o.scroller.scrollTop,l=$e(e),c={};i-n>l&&(i=n+l);var u=e.doc.height+qe(o),h=s>n,p=i>u-s;if(a>n)c.scrollTop=h?0:n;else if(i>a+l){var d=Math.min(n,(p?u:i)-l);d!=a&&(c.scrollTop=d)}var f=e.curOp&&null!=e.curOp.scrollLeft?e.curOp.scrollLeft:o.scroller.scrollLeft,v=Ke(e)-(e.options.fixedGutter?o.gutters.offsetWidth:0),m=r-t>v;return m&&(r=t+v),10>t?c.scrollLeft=0:f>t?c.scrollLeft=Math.max(0,t-(m?0:10)):r>v+f-3&&(c.scrollLeft=r+(m?0:10)-v),c}function In(e,t,n){null==t&&null==n||Hn(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 _n(e){Hn(e);var t=e.getCursor(),n=t,r=t;e.options.lineWrapping||(n=t.ch?Io(t.line,t.ch-1):t,r=Io(t.line,t.ch+1)),e.curOp.scrollToPos={from:n,to:r,margin:e.options.cursorScrollMargin,isCursor:!0}}function Hn(e){var t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null;var n=ft(e,t.from),r=ft(e,t.to),i=Vn(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(i.scrollLeft,i.scrollTop)}}function Bn(e,t,n,r){var i,o=e.doc;null==n&&(n="add"),"smart"==n&&(o.mode.indent?i=Re(e,t):n="prev");var s=e.options.tabSize,a=Zr(o,t),l=Hs(a.text,null,s);a.stateAfter&&(a.stateAfter=null);var c,u=a.text.match(/^\s*/)[0];if(r||/\S/.test(a.text)){if("smart"==n&&(c=o.mode.indent(i,a.text.slice(u.length),a.text),c==Ds||c>150)){if(!r)return;n="prev"}}else c=0,n="not";"prev"==n?c=t>o.first?Hs(Zr(o,t-1).text,null,s):0:"add"==n?c=l+e.options.indentUnit:"subtract"==n?c=l-e.options.indentUnit:"number"==typeof n&&(c=l+n),c=Math.max(0,c);var h="",p=0;if(e.options.indentWithTabs)for(var d=Math.floor(c/s);d;--d)p+=s,h+=" ";if(c>p&&(h+=Pi(c-p)),h!=u)return Fn(o,h,Io(t,0),Io(t,u.length),"+input"),a.stateAfter=null,!0;for(var d=0;d=0;t--)Fn(e.doc,"",r[t].from,r[t].to,"+delete");_n(e)})}function Wn(e,t,n,r,i){function o(){var t=a+n;return t=e.first+e.size?!1:(a=t,u=Zr(e,t))}function s(e){var t=(i?ho:po)(u,l,n,!0);if(null==t){if(e||!o())return!1;l=i?(0>n?io:ro)(u):0>n?u.text.length:0}else l=t;return!0}var a=t.line,l=t.ch,c=n,u=Zr(e,a);if("char"==r)s();else if("column"==r)s(!0);else if("word"==r||"group"==r)for(var h=null,p="group"==r,d=e.cm&&e.cm.getHelper(t,"wordChars"),f=!0;!(0>n)||s(!f);f=!1){var v=u.text.charAt(l)||"\n",m=Hi(v,d)?"w":p&&"\n"==v?"n":!p||/\s/.test(v)?null:"p";if(!p||f||m||(m="s"),h&&h!=m){0>n&&(n=1,s());break}if(m&&(h=m),n>0&&!s(!f))break}var g=Fe(e,Io(a,l),t,c,!0);return _o(t,g)||(g.hitSide=!0),g}function qn(e,t,n,r){var i,o=e.doc,s=t.left;if("page"==r){var a=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight);i=t.top+n*(a-(0>n?1.5:.5)*yt(e.display))}else"line"==r&&(i=n>0?t.bottom+3:t.top-3);for(;;){var l=mt(e,s,i);if(!l.outside)break;if(0>n?0>=i:i>=o.height){l.hitSide=!0;break}i+=5*n}return l}function Gn(t,n,r,i){e.defaults[t]=n,r&&(es[t]=i?function(e,t,n){n!=ts&&r(e,t,n)}:r)}function Un(e){for(var t,n,r,i,o=e.split(/-(?!$)/),e=o[o.length-1],s=0;s0||0==s&&o.clearWhenEmpty!==!1)return o;if(o.replacedWith&&(o.collapsed=!0,o.widgetNode=Ri("span",[o.replacedWith],"CodeMirror-widget"),r.handleMouseEvents||o.widgetNode.setAttribute("cm-ignore-events","true"),r.insertLeft&&(o.widgetNode.insertLeft=!0)),o.collapsed){if(gr(e,t.line,t,n,o)||t.line!=n.line&&gr(e,n.line,t,n,o))throw new Error("Inserting collapsed marker partially overlapping an existing one");Vo=!0}o.addToHistory&&ci(e,{from:t,to:n,origin:"markText"},e.sel,NaN);var a,l=t.line,c=e.cm;if(e.iter(l,n.line+1,function(e){c&&o.collapsed&&!c.options.lineWrapping&&yr(e)==c.display.maxLine&&(a=!0),o.collapsed&&l!=t.line&&ei(e,0),nr(e,new Qn(o,l==t.line?t.ch:null,l==n.line?n.ch:null)),++l}),o.collapsed&&e.iter(t.line,n.line+1,function(t){Er(e,t)&&ei(t,0)}),o.clearOnEnter&&Ns(o,"beforeCursorEnter",function(){o.clear()}),o.readOnly&&(Do=!0,(e.history.done.length||e.history.undone.length)&&e.clearHistory()),o.collapsed&&(o.id=++vs,o.atomic=!0),c){if(a&&(c.curOp.updateMaxLine=!0),o.collapsed)Dt(c,t.line,n.line+1);else if(o.className||o.title||o.startStyle||o.endStyle||o.css)for(var u=t.line;u<=n.line;u++)Vt(c,u,"text");o.atomic&&Ne(c.doc),ki(c,"markerAdded",c,o)}return o}function Yn(e,t,n,r,i){r=Ii(r),r.shared=!1;var o=[$n(e,t,n,r,i)],s=o[0],a=r.widgetNode;return Yr(e,function(e){a&&(r.widgetNode=a.cloneNode(!0)),o.push($n(e,ve(e,t),ve(e,n),r,i));for(var l=0;l=t:o.to>t);(r||(r=[])).push(new Qn(s,o.from,l?null:o.to))}}return r}function ir(e,t,n){if(e)for(var r,i=0;i=t:o.to>t);if(a||o.from==t&&"bookmark"==s.type&&(!n||o.marker.insertLeft)){var l=null==o.from||(s.inclusiveLeft?o.from<=t:o.from0&&a)for(var h=0;hh;++h)f.push(v);f.push(l)}return f}function sr(e){for(var t=0;t0)){var u=[l,1],h=_o(c.from,a.from),p=_o(c.to,a.to);(0>h||!s.inclusiveLeft&&!h)&&u.push({from:c.from,to:a.from}),(p>0||!s.inclusiveRight&&!p)&&u.push({from:a.to,to:c.to}),i.splice.apply(i,u),l+=u.length-1}}return i}function cr(e){var t=e.markedSpans;if(t){for(var n=0;n=0&&0>=h||0>=u&&h>=0)&&(0>=u&&(_o(c.to,n)>0||l.marker.inclusiveRight&&i.inclusiveLeft)||u>=0&&(_o(c.from,r)<0||l.marker.inclusiveLeft&&i.inclusiveRight)))return!0;
-}}}function yr(e){for(var t;t=vr(e);)e=t.find(-1,!0).line;return e}function wr(e){for(var t,n;t=mr(e);)e=t.find(1,!0).line,(n||(n=[])).push(e);return n}function br(e,t){var n=Zr(e,t),r=yr(n);return n==r?t:ti(r)}function xr(e,t){if(t>e.lastLine())return t;var n,r=Zr(e,t);if(!Er(e,r))return t;for(;n=mr(r);)r=n.find(1,!0).line;return ti(r)+1}function Er(e,t){var n=Vo&&t.markedSpans;if(n)for(var r,i=0;io;o++){i&&(i[0]=e.innerMode(t,r).mode);var s=t.token(n,r);if(n.pos>n.start)return s}throw new Error("Mode "+t.name+" failed to advance stream.")}function Fr(e,t,n,r){function i(e){return{start:h.start,end:h.pos,string:h.current(),type:o||null,state:e?as(s.mode,u):u}}var o,s=e.doc,a=s.mode;t=ve(s,t);var l,c=Zr(s,t.line),u=Re(e,t.line,n),h=new fs(c.text,e.options.tabSize);for(r&&(l=[]);(r||h.pose.options.maxHighlightLength?(a=!1,s&&Vr(e,t,r,h.pos),h.pos=t.length,l=null):l=Nr(Pr(n,h,r,p),o),p){var d=p[0].name;d&&(l="m-"+(l?d+" "+l:d))}if(!a||u!=l){for(;cc;){var r=i[l];r>e&&i.splice(l,1,e,i[l+1],r),l+=2,c=Math.min(e,r)}if(t)if(a.opaque)i.splice(n,l-n,e,"cm-overlay "+t),l=n+2;else for(;l>n;n+=2){var o=i[n+1];i[n+1]=(o?o+" ":"")+"cm-overlay "+t}},o)}return{styles:i,classes:o.bgClass||o.textClass?o:null}}function Dr(e,t,n){if(!t.styles||t.styles[0]!=e.state.modeGen){var r=Re(e,ti(t)),i=Ar(e,t,t.text.length>e.options.maxHighlightLength?as(e.doc.mode,r):r);t.stateAfter=r,t.styles=i.styles,i.classes?t.styleClasses=i.classes:t.styleClasses&&(t.styleClasses=null),n===e.doc.frontier&&e.doc.frontier++}return t.styles}function Vr(e,t,n,r){var i=e.doc.mode,o=new fs(t,e.options.tabSize);for(o.start=o.pos=r||0,""==t&&Lr(i,n);!o.eol();)Pr(i,o,n),o.start=o.pos}function Ir(e,t){if(!e||/^\s*$/.test(e))return null;var n=t.addModeClass?xs:bs;return n[e]||(n[e]=e.replace(/\S+/g,"cm-$&"))}function _r(e,t){var n=Ri("span",null,null,xo?"padding-right: .1px":null),r={pre:Ri("pre",[n],"CodeMirror-line"),content:n,col:0,pos:0,cm:e,splitSpaces:(wo||xo)&&e.getOption("lineWrapping")};t.measure={};for(var i=0;i<=(t.rest?t.rest.length:0);i++){var o,s=i?t.rest[i-1]:t.line;r.pos=0,r.addToken=Br,Ji(e.display.measure)&&(o=ii(s))&&(r.addToken=Rr(r.addToken,o)),r.map=[];var a=t!=e.display.externalMeasured&&ti(s);qr(s,r,Dr(e,s,a)),s.styleClasses&&(s.styleClasses.bgClass&&(r.bgClass=Ki(s.styleClasses.bgClass,r.bgClass||"")),s.styleClasses.textClass&&(r.textClass=Ki(s.styleClasses.textClass,r.textClass||""))),0==r.map.length&&r.map.push(0,0,r.content.appendChild(Zi(e.display.measure))),0==i?(t.measure.map=r.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(r.map),(t.measure.caches||(t.measure.caches=[])).push({}))}return xo&&/\bcm-tab\b/.test(r.content.lastChild.className)&&(r.content.className="cm-tab-wrap-hack"),Fs(e,"renderLine",e,t.line,r.pre),r.pre.className&&(r.textClass=Ki(r.pre.className,r.textClass||"")),r}function Hr(e){var t=Ri("span","•","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function Br(e,t,n,r,i,o,s){if(t){var a=e.splitSpaces?t.replace(/ {3,}/g,jr):t,l=e.cm.state.specialChars,c=!1;if(l.test(t))for(var u=document.createDocumentFragment(),h=0;;){l.lastIndex=h;var p=l.exec(t),d=p?p.index-h:t.length-h;if(d){var f=document.createTextNode(a.slice(h,h+d));wo&&9>bo?u.appendChild(Ri("span",[f])):u.appendChild(f),e.map.push(e.pos,e.pos+d,f),e.col+=d,e.pos+=d}if(!p)break;if(h+=d+1," "==p[0]){var v=e.cm.options.tabSize,m=v-e.col%v,f=u.appendChild(Ri("span",Pi(m),"cm-tab"));f.setAttribute("role","presentation"),f.setAttribute("cm-text"," "),e.col+=m}else if("\r"==p[0]||"\n"==p[0]){var f=u.appendChild(Ri("span","\r"==p[0]?"␍":"","cm-invalidchar"));f.setAttribute("cm-text",p[0]),e.col+=1}else{var f=e.cm.options.specialCharPlaceholder(p[0]);f.setAttribute("cm-text",p[0]),wo&&9>bo?u.appendChild(Ri("span",[f])):u.appendChild(f),e.col+=1}e.map.push(e.pos,e.pos+1,f),e.pos++}else{e.col+=t.length;var u=document.createTextNode(a);e.map.push(e.pos,e.pos+t.length,u),wo&&9>bo&&(c=!0),e.pos+=t.length}if(n||r||i||c||s){var g=n||"";r&&(g+=r),i&&(g+=i);var y=Ri("span",[u],g,s);return o&&(y.title=o),e.content.appendChild(y)}e.content.appendChild(u)}}function jr(e){for(var t=" ",n=0;nc&&p.from<=c)break}if(p.to>=u)return e(n,r,i,o,s,a,l);e(n,r.slice(0,p.to-c),i,o,null,a,l),o=null,r=r.slice(p.to-c),c=p.to}}}function Wr(e,t,n,r){var i=!r&&n.widgetNode;i&&e.map.push(e.pos,e.pos+t,i),!r&&e.cm.display.input.needsContentAttribute&&(i||(i=e.content.appendChild(document.createElement("span"))),i.setAttribute("cm-marker",n.id)),i&&(e.cm.display.input.setUneditable(i),e.content.appendChild(i)),e.pos+=t}function qr(e,t,n){var r=e.markedSpans,i=e.text,o=0;if(r)for(var s,a,l,c,u,h,p,d=i.length,f=0,v=1,m="",g=0;;){if(g==f){l=c=u=h=a="",p=null,g=1/0;for(var y,w=[],b=0;bf||E.collapsed&&x.to==f&&x.from==f)?(null!=x.to&&x.to!=f&&g>x.to&&(g=x.to,c=""),E.className&&(l+=" "+E.className),E.css&&(a=(a?a+";":"")+E.css),E.startStyle&&x.from==f&&(u+=" "+E.startStyle),E.endStyle&&x.to==g&&(y||(y=[])).push(E.endStyle,x.to),E.title&&!h&&(h=E.title),E.collapsed&&(!p||dr(p.marker,E)<0)&&(p=x)):x.from>f&&g>x.from&&(g=x.from)}if(y)for(var b=0;b=d)break;for(var C=Math.min(d,g);;){if(m){var k=f+m.length;if(!p){var S=k>C?m.slice(0,C-f):m;t.addToken(t,S,s?s+l:l,u,f+S.length==g?c:"",h,a)}if(k>=C){m=m.slice(C-f),f=C;break}f=k,u=""}m=i.slice(o,o=n[v++]),s=Ir(n[v++],t.cm.options)}}else for(var v=1;vn;++n)o.push(new ws(c[n],i(n),r));return o}var a=t.from,l=t.to,c=t.text,u=Zr(e,a.line),h=Zr(e,l.line),p=Fi(c),d=i(c.length-1),f=l.line-a.line;if(t.full)e.insert(0,s(0,c.length)),e.remove(c.length,e.size-c.length);else if(Gr(e,t)){var v=s(0,c.length-1);o(h,h.text,d),f&&e.remove(a.line,f),v.length&&e.insert(a.line,v)}else if(u==h)if(1==c.length)o(u,u.text.slice(0,a.ch)+p+u.text.slice(l.ch),d);else{var v=s(1,c.length-1);v.push(new ws(p+u.text.slice(l.ch),d,r)),o(u,u.text.slice(0,a.ch)+c[0],i(0)),e.insert(a.line+1,v)}else if(1==c.length)o(u,u.text.slice(0,a.ch)+c[0]+h.text.slice(l.ch),i(0)),e.remove(a.line+1,f);else{o(u,u.text.slice(0,a.ch)+c[0],i(0)),o(h,p+h.text.slice(l.ch),d);var v=s(1,c.length-1);f>1&&e.remove(a.line+1,f-1),e.insert(a.line+1,v)}ki(e,"change",e,t)}function Kr(e){this.lines=e,this.parent=null;for(var t=0,n=0;tt||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var n=e;!n.lines;)for(var r=0;;++r){var i=n.children[r],o=i.chunkSize();if(o>t){n=i;break}t-=o}return n.lines[t]}function Jr(e,t,n){var r=[],i=t.line;return e.iter(t.line,n.line+1,function(e){var o=e.text;i==n.line&&(o=o.slice(0,n.ch)),i==t.line&&(o=o.slice(t.ch)),r.push(o),++i}),r}function Qr(e,t,n){var r=[];return e.iter(t,n,function(e){r.push(e.text)}),r}function ei(e,t){var n=t-e.height;if(n)for(var r=e;r;r=r.parent)r.height+=n}function ti(e){if(null==e.parent)return null;for(var t=e.parent,n=Oi(t.lines,e),r=t.parent;r;t=r,r=r.parent)for(var i=0;r.children[i]!=t;++i)n+=r.children[i].chunkSize();return n+t.first}function ni(e,t){var n=e.first;e:do{for(var r=0;rt){e=i;continue e}t-=o,n+=i.chunkSize()}return n}while(!e.lines);for(var r=0;rt)break;t-=a}return n+r}function ri(e){e=yr(e);for(var t=0,n=e.parent,r=0;r1&&!e.done[e.done.length-2].ranges?(e.done.pop(),Fi(e.done)):void 0}function ci(e,t,n,r){var i=e.history;i.undone.length=0;var o,s=+new Date;if((i.lastOp==r||i.lastOrigin==t.origin&&t.origin&&("+"==t.origin.charAt(0)&&e.cm&&i.lastModTime>s-e.cm.options.historyEventDelay||"*"==t.origin.charAt(0)))&&(o=li(i,i.lastOp==r))){var a=Fi(o.changes);0==_o(t.from,t.to)&&0==_o(t.from,a.to)?a.to=Jo(t):o.changes.push(si(e,t))}else{var l=Fi(i.done);for(l&&l.ranges||pi(e.sel,i.done),o={changes:[si(e,t)],generation:i.generation},i.done.push(o);i.done.length>i.undoDepth;)i.done.shift(),i.done[0].ranges||i.done.shift()}i.done.push(n),i.generation=++i.maxGeneration,i.lastModTime=i.lastSelTime=s,i.lastOp=i.lastSelOp=r,i.lastOrigin=i.lastSelOrigin=t.origin,a||Fs(e,"historyAdded")}function ui(e,t,n,r){var i=t.charAt(0);return"*"==i||"+"==i&&n.ranges.length==r.ranges.length&&n.somethingSelected()==r.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function hi(e,t,n,r){var i=e.history,o=r&&r.origin;n==i.lastSelOp||o&&i.lastSelOrigin==o&&(i.lastModTime==i.lastSelTime&&i.lastOrigin==o||ui(e,o,Fi(i.done),t))?i.done[i.done.length-1]=t:pi(t,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=o,i.lastSelOp=n,r&&r.clearRedo!==!1&&ai(i.undone)}function pi(e,t){var n=Fi(t);n&&n.ranges&&n.equals(e)||t.push(e)}function di(e,t,n,r){var i=t["spans_"+e.id],o=0;e.iter(Math.max(e.first,n),Math.min(e.first+e.size,r),function(n){n.markedSpans&&((i||(i=t["spans_"+e.id]={}))[o]=n.markedSpans),++o})}function fi(e){if(!e)return null;for(var t,n=0;n-1&&(Fi(a)[h]=u[h],delete u[h])}}}return i}function gi(e,t,n,r){n0?r.slice():Ls:r||Ls}function ki(e,t){function n(e){return function(){e.apply(null,o)}}var r=Ci(e,t,!1);if(r.length){var i,o=Array.prototype.slice.call(arguments,2);qo?i=qo.delayedCallbacks:Os?i=Os:(i=Os=[],setTimeout(Si,0));for(var s=0;s0}function Ni(e){e.prototype.on=function(e,t){Ns(this,e,t)},e.prototype.off=function(e,t){Ps(this,e,t)}}function Li(){this.id=null}function Pi(e){for(;js.length<=e;)js.push(Fi(js)+" ");return js[e]}function Fi(e){return e[e.length-1]}function Oi(e,t){for(var n=0;n-1&&Gs(e)?!0:t.test(e):Gs(e)}function Bi(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}function ji(e){return e.charCodeAt(0)>=768&&Us.test(e)}function Ri(e,t,n,r){var i=document.createElement(e);if(n&&(i.className=n),r&&(i.style.cssText=r),"string"==typeof t)i.appendChild(document.createTextNode(t));else if(t)for(var o=0;o0;--t)e.removeChild(e.firstChild);return e}function qi(e,t){return Wi(e).appendChild(t)}function Gi(){for(var e=document.activeElement;e&&e.root&&e.root.activeElement;)e=e.root.activeElement;return e}function Ui(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}function Ki(e,t){for(var n=e.split(" "),r=0;r2&&!(wo&&8>bo))}var n=$s?Ri("span",""):Ri("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return n.setAttribute("cm-text",""),n}function Ji(e){if(null!=Ys)return Ys;var t=qi(e,document.createTextNode("AخA")),n=Ws(t,0,1).getBoundingClientRect();if(!n||n.left==n.right)return!1;var r=Ws(t,1,2).getBoundingClientRect();return Ys=r.right-n.right<3}function Qi(e){if(null!=ra)return ra;var t=qi(e,Ri("span","x")),n=t.getBoundingClientRect(),r=Ws(t,0,1).getBoundingClientRect();return ra=Math.abs(n.left-r.left)>1}function eo(e,t,n,r){if(!e)return r(t,n,"ltr");for(var i=!1,o=0;ot||t==n&&s.to==t)&&(r(Math.max(s.from,t),Math.min(s.to,n),1==s.level?"rtl":"ltr"),i=!0)}i||r(t,n,"ltr")}function to(e){return e.level%2?e.to:e.from}function no(e){return e.level%2?e.from:e.to}function ro(e){var t=ii(e);return t?to(t[0]):0}function io(e){var t=ii(e);return t?no(Fi(t)):e.text.length}function oo(e,t){var n=Zr(e.doc,t),r=yr(n);r!=n&&(t=ti(r));var i=ii(r),o=i?i[0].level%2?io(r):ro(r):0;return Io(t,o)}function so(e,t){for(var n,r=Zr(e.doc,t);n=mr(r);)r=n.find(1,!0).line,t=null;var i=ii(r),o=i?i[0].level%2?ro(r):io(r):r.text.length;return Io(null==t?ti(r):t,o)}function ao(e,t){var n=oo(e,t.line),r=Zr(e.doc,n.line),i=ii(r);if(!i||0==i[0].level){var o=Math.max(0,r.text.search(/\S/)),s=t.line==n.line&&t.ch<=o&&t.ch;return Io(n.line,s?0:o)}return n}function lo(e,t,n){var r=e[0].level;return t==r?!0:n==r?!1:n>t}function co(e,t){oa=null;for(var n,r=0;rt)return r;if(i.from==t||i.to==t){if(null!=n)return lo(e,i.level,e[n].level)?(i.from!=i.to&&(oa=n),r):(i.from!=i.to&&(oa=r),n);n=r}}return n}function uo(e,t,n,r){if(!r)return t+n;do t+=n;while(t>0&&ji(e.text.charAt(t)));return t}function ho(e,t,n,r){var i=ii(e);if(!i)return po(e,t,n,r);for(var o=co(i,t),s=i[o],a=uo(e,t,s.level%2?-n:n,r);;){if(a>s.from&&a0==s.level%2?s.to:s.from);if(s=i[o+=n],!s)return null;a=n>0==s.level%2?uo(e,s.to,-1,r):uo(e,s.from,1,r)}}function po(e,t,n,r){var i=t+n;if(r)for(;i>0&&ji(e.text.charAt(i));)i+=n;return 0>i||i>e.text.length?null:i}var fo=navigator.userAgent,vo=navigator.platform,mo=/gecko\/\d/i.test(fo),go=/MSIE \d/.test(fo),yo=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(fo),wo=go||yo,bo=wo&&(go?document.documentMode||6:yo[1]),xo=/WebKit\//.test(fo),Eo=xo&&/Qt\/\d+\.\d+/.test(fo),Co=/Chrome\//.test(fo),ko=/Opera\//.test(fo),So=/Apple Computer/.test(navigator.vendor),zo=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(fo),Mo=/PhantomJS/.test(fo),To=/AppleWebKit/.test(fo)&&/Mobile\/\w+/.test(fo),No=To||/Android|webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(fo),Lo=To||/Mac/.test(vo),Po=/win/i.test(vo),Fo=ko&&fo.match(/Version\/(\d*\.\d*)/);Fo&&(Fo=Number(Fo[1])),Fo&&Fo>=15&&(ko=!1,xo=!0);var Oo=Lo&&(Eo||ko&&(null==Fo||12.11>Fo)),Ao=mo||wo&&bo>=9,Do=!1,Vo=!1;v.prototype=Ii({update:function(e){var t=e.scrollWidth>e.clientWidth+1,n=e.scrollHeight>e.clientHeight+1,r=e.nativeBarWidth;if(n){this.vert.style.display="block",this.vert.style.bottom=t?r+"px":"0";var i=e.viewHeight-(t?r:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+i)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=n?r+"px":"0",this.horiz.style.left=e.barLeft+"px";var o=e.viewWidth-e.barLeft-(n?r:0);this.horiz.firstChild.style.width=e.scrollWidth-e.clientWidth+o+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(0==r&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:n?r:0,bottom:t?r:0}},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=Lo&&!zo?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new Li,this.disableVert=new Li},enableZeroWidthBar:function(e,t){function n(){var r=e.getBoundingClientRect(),i=document.elementFromPoint(r.left+1,r.bottom-1);i!=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)}},v.prototype),m.prototype=Ii({update:function(){return{bottom:0,right:0}},setScrollLeft:function(){},setScrollTop:function(){},clear:function(){}},m.prototype),e.scrollbarModel={"native":v,"null":m},S.prototype.signal=function(e,t){Ti(e,t)&&this.events.push(arguments)},S.prototype.finish=function(){for(var e=0;e=9&&n.hasSelection&&(n.hasSelection=null),n.poll()}),Ns(o,"paste",function(e){zi(r,e)||J(e,r)||(r.state.pasteIncoming=!0,n.fastPoll())}),Ns(o,"cut",t),Ns(o,"copy",t),Ns(e.scroller,"paste",function(t){Gt(e,t)||zi(r,t)||(r.state.pasteIncoming=!0,n.focus())}),Ns(e.lineSpace,"selectstart",function(t){Gt(e,t)||zs(t)}),Ns(o,"compositionstart",function(){var e=r.getCursor("from");n.composing&&n.composing.range.clear(),n.composing={start:e,range:r.markText(e,r.getCursor("to"),{className:"CodeMirror-composing"})}}),Ns(o,"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=De(e);if(e.options.moveInputWithCursor){var i=dt(e,n.sel.primary().head,"div"),o=t.wrapper.getBoundingClientRect(),s=t.lineDiv.getBoundingClientRect();r.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,i.top+s.top-o.top)),r.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,i.left+s.left-o.left))}return r},showSelection:function(e){var t=this.cm,n=t.display;qi(n.cursorDiv,e.cursors),qi(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,i=r.doc;if(r.somethingSelected()){this.prevInput="";var o=i.sel.primary();t=na&&(o.to().line-o.from().line>100||(n=r.getSelection()).length>1e3);var s=t?"-":n||r.getSelection();this.textarea.value=s,r.state.focused&&Rs(this.textarea),wo&&bo>=9&&(this.hasSelection=s)}else e||(this.prevInput=this.textarea.value="",wo&&bo>=9&&(this.hasSelection=null));this.inaccurateSelection=t}},getField:function(){return this.textarea},supportsTouch:function(){return!1},focus:function(){if("nocursor"!=this.cm.options.readOnly&&(!No||Gi()!=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||ta(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(wo&&bo>=9&&this.hasSelection===r||Lo&&/[\uf700-\uf7ff]/.test(r))return e.display.input.reset(),!1;if(e.doc.sel==e.display.selForContextMenu){var i=r.charCodeAt(0);if(8203!=i||n||(n=""),8666==i)return this.reset(),this.cm.execCommand("undo")}for(var o=0,s=Math.min(n.length,r.length);s>o&&n.charCodeAt(o)==r.charCodeAt(o);)++o;var a=this;return Nt(e,function(){Z(e,r.slice(o),n.length-o,null,a.composing?"*compose":null),r.length>1e3||r.indexOf("\n")>-1?t.value=a.prevInput="":a.prevInput=r,a.composing&&(a.composing.range.clear(),a.composing.range=e.markText(a.composing.start,e.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},ensurePolled:function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},onKeyPress:function(){wo&&bo>=9&&(this.hasSelection=null),this.fastPoll()},onContextMenu:function(e){function t(){if(null!=s.selectionStart){var e=i.somethingSelected(),t=""+(e?s.value:"");s.value="⇚",s.value=t,r.prevInput=e?"":"",s.selectionStart=1,s.selectionEnd=t.length,o.selForContextMenu=i.doc.sel}}function n(){if(r.contextMenuPending=!1,r.wrapper.style.cssText=h,s.style.cssText=u,wo&&9>bo&&o.scrollbars.setScrollTop(o.scroller.scrollTop=l),null!=s.selectionStart){(!wo||wo&&9>bo)&&t();var e=0,n=function(){o.selForContextMenu==i.doc.sel&&0==s.selectionStart&&s.selectionEnd>0&&""==r.prevInput?Lt(i,cs.selectAll)(i):e++<10?o.detectingSelectAll=setTimeout(n,500):o.input.reset()};o.detectingSelectAll=setTimeout(n,200)}}var r=this,i=r.cm,o=i.display,s=r.textarea,a=Ut(i,e),l=o.scroller.scrollTop;if(a&&!ko){var c=i.options.resetSelectionOnContextMenu;c&&-1==i.doc.sel.contains(a)&&Lt(i,ze)(i.doc,de(a),Vs);var u=s.style.cssText,h=r.wrapper.style.cssText;r.wrapper.style.cssText="position: absolute";var p=r.wrapper.getBoundingClientRect();if(s.style.cssText="position: absolute; width: 30px; height: 30px; top: "+(e.clientY-p.top-5)+"px; left: "+(e.clientX-p.left-5)+"px; z-index: 1000; background: "+(wo?"rgba(255, 255, 255, .05)":"transparent")+"; outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);",xo)var d=window.scrollY;if(o.input.focus(),xo&&window.scrollTo(null,d),o.input.reset(),i.somethingSelected()||(s.value=r.prevInput=" "),r.contextMenuPending=!0,o.selForContextMenu=i.doc.sel,clearTimeout(o.detectingSelectAll),wo&&bo>=9&&t(),Ao){Ts(e);var f=function(){Ps(window,"mouseup",f),setTimeout(n,20)};Ns(window,"mouseup",f)}else setTimeout(n,50)}},readOnlyChanged:function(e){e||this.reset()},setUneditable:Di,needsContentAttribute:!1},ne.prototype),ie.prototype=Ii({init:function(e){function t(e){if(!zi(r,e)){if(r.somethingSelected())Ho=r.getSelections(),"cut"==e.type&&r.replaceSelection("",null,"cut");else{if(!r.options.lineWiseCopyCut)return;var t=ee(r);Ho=t.text,"cut"==e.type&&r.operation(function(){r.setSelections(t.ranges,0,Vs),r.replaceSelection("",null,"cut")})}if(e.clipboardData&&!To)e.preventDefault(),e.clipboardData.clearData(),e.clipboardData.setData("text/plain",Ho.join("\n"));else{var n=re(),i=n.firstChild;r.display.lineSpace.insertBefore(n,r.display.lineSpace.firstChild),i.value=Ho.join("\n");var o=document.activeElement;Rs(i),setTimeout(function(){r.display.lineSpace.removeChild(n),o.focus()},50)}}}var n=this,r=n.cm,i=n.div=e.lineDiv;te(i),Ns(i,"paste",function(e){zi(r,e)||J(e,r)}),Ns(i,"compositionstart",function(e){var t=e.data;if(n.composing={sel:r.doc.sel,data:t,startData:t},t){var i=r.doc.sel.primary(),o=r.getLine(i.head.line),s=o.indexOf(t,Math.max(0,i.head.ch-t.length));s>-1&&s<=i.head.ch&&(n.composing.sel=de(Io(i.head.line,s),Io(i.head.line,s+t.length)))}}),Ns(i,"compositionupdate",function(e){n.composing.data=e.data}),Ns(i,"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))}),Ns(i,"touchstart",function(){n.forceCompositionEnd()}),Ns(i,"input",function(){n.composing||!r.isReadOnly()&&n.pollContent()||Nt(n.cm,function(){Dt(r)})}),Ns(i,"copy",t),Ns(i,"cut",t)},prepareSelection:function(){var e=De(this.cm,!1);return e.focus=this.cm.state.focused,e},showSelection:function(e){e&&this.cm.display.view.length&&(e.focus&&this.showPrimarySelection(),this.showMultipleSelections(e))},showPrimarySelection:function(){var e=window.getSelection(),t=this.cm.doc.sel.primary(),n=ae(this.cm,e.anchorNode,e.anchorOffset),r=ae(this.cm,e.focusNode,e.focusOffset);if(!n||n.bad||!r||r.bad||0!=_o(Y(n,r),t.from())||0!=_o($(n,r),t.to())){var i=oe(this.cm,t.from()),o=oe(this.cm,t.to());if(i||o){var s=this.cm.display.view,a=e.rangeCount&&e.getRangeAt(0);if(i){if(!o){var l=s[s.length-1].measure,c=l.maps?l.maps[l.maps.length-1]:l.map;o={node:c[c.length-1],offset:c[c.length-2]-c[c.length-3]}}}else i={node:s[0].measure.map[2],offset:0};try{var u=Ws(i.node,i.offset,o.offset,o.node)}catch(h){}u&&(!mo&&this.cm.state.focused?(e.collapse(i.node,i.offset),u.collapsed||e.addRange(u)):(e.removeAllRanges(),e.addRange(u)),a&&null==e.anchorNode?e.addRange(a):mo&&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){qi(this.cm.display.cursorDiv,e.cursors),qi(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 Ks(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():Nt(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=ae(t,e.anchorNode,e.anchorOffset),r=ae(t,e.focusNode,e.focusOffset);n&&r&&Nt(t,function(){ze(t.doc,de(n,r),Vs),(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(),i=n.to();if(r.linet.viewTo-1)return!1;var o;if(r.line==t.viewFrom||0==(o=_t(e,r.line)))var s=ti(t.view[0].line),a=t.view[0].node;else var s=ti(t.view[o].line),a=t.view[o-1].node.nextSibling;var l=_t(e,i.line);if(l==t.view.length-1)var c=t.viewTo-1,u=t.lineDiv.lastChild;else var c=ti(t.view[l+1].line)-1,u=t.view[l+1].node.previousSibling;for(var h=e.doc.splitLines(ce(e,a,u,s,c)),p=Jr(e.doc,Io(s,0),Io(c,Zr(e.doc,c).text.length));h.length>1&&p.length>1;)if(Fi(h)==Fi(p))h.pop(),p.pop(),c--;else{if(h[0]!=p[0])break;h.shift(),p.shift(),s++}for(var d=0,f=0,v=h[0],m=p[0],g=Math.min(v.length,m.length);g>d&&v.charCodeAt(d)==m.charCodeAt(d);)++d;for(var y=Fi(h),w=Fi(p),b=Math.min(y.length-(1==h.length?d:0),w.length-(1==p.length?d:0));b>f&&y.charCodeAt(y.length-f-1)==w.charCodeAt(w.length-f-1);)++f;h[h.length-1]=y.slice(0,y.length-f),h[0]=h[0].slice(d);var x=Io(s,d),E=Io(c,p.length?Fi(p).length-f:0);return h.length>1||h[0]||_o(x,E)?(Fn(e.doc,h,x,E,"+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()?Lt(this.cm,Dt)(this.cm):e.data&&e.data!=e.startData&&Lt(this.cm,Z)(this.cm,e.data,0,e.sel)},setUneditable:function(e){e.contentEditable="false"},onKeyPress:function(e){e.preventDefault(),this.cm.isReadOnly()||Lt(this.cm,Z)(this.cm,String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),0)},readOnlyChanged:function(e){this.div.contentEditable=String("nocursor"!=e)},onContextMenu:Di,resetPosition:Di,needsContentAttribute:!0},ie.prototype),e.inputStyles={textarea:ne,contenteditable:ie},ue.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&&_o(e,r.to())<=0)return n}return-1}},he.prototype={from:function(){return Y(this.anchor,this.head)},to:function(){return $(this.anchor,this.head)},empty:function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch}};var Bo,jo,Ro,Wo={left:0,right:0,top:0,bottom:0},qo=null,Go=0,Uo=0,Ko=0,$o=null;wo?$o=-.53:mo?$o=15:Co?$o=-.7:So&&($o=-1/3);var Yo=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=Yo(e);return t.x*=$o,t.y*=$o,t};var Xo=new Li,Zo=null,Jo=e.changeEnd=function(e){return e.text?Io(e.from.line+e.text.length-1,Fi(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,es.hasOwnProperty(e)&&Lt(this,es[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"](Kn(e))},removeKeyMap:function(e){for(var t=this.state.keyMaps,n=0;nn&&(Bn(this,i.head.line,e,!0),n=i.head.line,r==this.doc.sel.primIndex&&_n(this));else{var o=i.from(),s=i.to(),a=Math.max(n,o.line);n=Math.min(this.lastLine(),s.line-(s.ch?0:1))+1;for(var l=a;n>l;++l)Bn(this,l,e);var c=this.doc.sel.ranges;0==o.ch&&t.length==c.length&&c[r].from().ch>0&&Ee(this.doc,r,new he(o,c[r].to()),Vs)}}}),getTokenAt:function(e,t){return Fr(this,e,t)},getLineTokens:function(e,t){return Fr(this,Io(e),t,!0)},getTokenTypeAt:function(e){e=ve(this.doc,e);var t,n=Dr(this,Zr(this.doc,e.line)),r=0,i=(n.length-1)/2,o=e.ch;if(0==o)t=n[2];else for(;;){var s=r+i>>1;if((s?n[2*s-1]:0)>=o)i=s;else{if(!(n[2*s+1]a?t:0==a?null:t.slice(0,a-1)},getModeAt:function(t){var n=this.doc.mode;return n.innerMode?e.innerMode(n,this.getTokenAt(t).state).mode:n},getHelper:function(e,t){return this.getHelpers(e,t)[0]},getHelpers:function(e,t){var n=[];if(!ss.hasOwnProperty(t))return n;var r=ss[t],i=this.getModeAt(e);if("string"==typeof i[t])r[i[t]]&&n.push(r[i[t]]);else if(i[t])for(var o=0;oi&&(e=i,r=!0),n=Zr(this.doc,e)}else n=e;return ut(this,n,{top:0,left:0},t||"page").top+(r?this.doc.height-ri(n):0)},defaultTextHeight:function(){return yt(this.display)},defaultCharWidth:function(){return wt(this.display)},setGutterMarker:Pt(function(e,t,n){return jn(this.doc,e,"gutter",function(e){var r=e.gutterMarkers||(e.gutterMarkers={});return r[t]=n,!n&&Bi(r)&&(e.gutterMarkers=null),!0})}),clearGutter:Pt(function(e){var t=this,n=t.doc,r=n.first;n.iter(function(n){n.gutterMarkers&&n.gutterMarkers[e]&&(n.gutterMarkers[e]=null,Vt(t,r,"gutter"),Bi(n.gutterMarkers)&&(n.gutterMarkers=null)),++r})}),lineInfo:function(e){if("number"==typeof e){if(!ge(this.doc,e))return null;var t=e;if(e=Zr(this.doc,e),!e)return null}else{var t=ti(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,i){var o=this.display;e=dt(this,ve(this.doc,e));var s=e.bottom,a=e.left;if(t.style.position="absolute",t.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(t),o.sizer.appendChild(t),"over"==r)s=e.top;else if("above"==r||"near"==r){var l=Math.max(o.wrapper.clientHeight,this.doc.height),c=Math.max(o.sizer.clientWidth,o.lineSpace.clientWidth);("above"==r||e.bottom+t.offsetHeight>l)&&e.top>t.offsetHeight?s=e.top-t.offsetHeight:e.bottom+t.offsetHeight<=l&&(s=e.bottom),a+t.offsetWidth>c&&(a=c-t.offsetWidth)}t.style.top=s+"px",t.style.left=t.style.right="","right"==i?(a=o.sizer.clientWidth-t.offsetWidth,t.style.right="0px"):("left"==i?a=0:"middle"==i&&(a=(o.sizer.clientWidth-t.offsetWidth)/2),t.style.left=a+"px"),n&&Dn(this,a,s,a+t.offsetWidth,s+t.offsetHeight)},triggerOnKeyDown:Pt(pn),triggerOnKeyPress:Pt(vn),triggerOnKeyUp:fn,execCommand:function(e){return cs.hasOwnProperty(e)?cs[e].call(null,this):void 0},triggerElectric:Pt(function(e){Q(this,e)}),findPosH:function(e,t,n,r){var i=1;0>t&&(i=-1,t=-t);for(var o=0,s=ve(this.doc,e);t>o&&(s=Wn(this.doc,s,i,n,r),!s.hitSide);++o);return s},moveH:Pt(function(e,t){var n=this;n.extendSelectionsBy(function(r){return n.display.shift||n.doc.extend||r.empty()?Wn(n.doc,r.head,e,t,n.options.rtlMoveVisually):0>e?r.from():r.to()},_s)}),deleteH:Pt(function(e,t){var n=this.doc.sel,r=this.doc;n.somethingSelected()?r.replaceSelection("",null,"+delete"):Rn(this,function(n){var i=Wn(r,n.head,e,t,!1);return 0>e?{from:i,to:n.head}:{from:n.head,to:i}})}),findPosV:function(e,t,n,r){var i=1,o=r;0>t&&(i=-1,t=-t);for(var s=0,a=ve(this.doc,e);t>s;++s){var l=dt(this,a,"div");if(null==o?o=l.left:l.left=o,a=qn(this,l,i,n),a.hitSide)break}return a},moveV:Pt(function(e,t){var n=this,r=this.doc,i=[],o=!n.display.shift&&!r.extend&&r.sel.somethingSelected();if(r.extendSelectionsBy(function(s){if(o)return 0>e?s.from():s.to();var a=dt(n,s.head,"div");null!=s.goalColumn&&(a.left=s.goalColumn),i.push(a.left);var l=qn(n,a,e,t);return"page"==t&&s==r.sel.primary()&&In(n,null,pt(n,l,"div").top-a.top),l},_s),i.length)for(var s=0;s0&&a(n.charAt(r-1));)--r;for(;i.5)&&s(this),Fs(this,"refresh",this)}),swapDoc:Pt(function(e){var t=this.doc;return t.cm=null,Xr(this,e),at(this),this.display.input.reset(),this.scrollTo(e.scrollLeft,e.scrollTop),this.curOp.forceScroll=!0,ki(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}},Ni(e);var Qo=e.defaults={},es=e.optionHandlers={},ts=e.Init={toString:function(){return"CodeMirror.Init"}};Gn("value","",function(e,t){e.setValue(t)},!0),Gn("mode",null,function(e,t){e.doc.modeOption=t,n(e)},!0),Gn("indentUnit",2,n,!0),Gn("indentWithTabs",!1),Gn("smartIndent",!0),Gn("tabSize",4,function(e){r(e),at(e),Dt(e)},!0),Gn("lineSeparator",null,function(e,t){if(e.doc.lineSep=t,t){var n=[],r=e.doc.first;e.doc.iter(function(e){for(var i=0;;){var o=e.text.indexOf(t,i);if(-1==o)break;i=o+t.length,n.push(Io(r,o))}r++});for(var i=n.length-1;i>=0;i--)Fn(e.doc,t,n[i],Io(n[i].line,n[i].ch+t.length))}}),Gn("specialChars",/[\t\u0000-\u0019\u00ad\u200b-\u200f\u2028\u2029\ufeff]/g,function(t,n,r){t.state.specialChars=new RegExp(n.source+(n.test(" ")?"":"| "),"g"),r!=e.Init&&t.refresh()}),Gn("specialCharPlaceholder",Hr,function(e){e.refresh()},!0),Gn("electricChars",!0),Gn("inputStyle",No?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),Gn("rtlMoveVisually",!Po),Gn("wholeLineUpdateBefore",!0),Gn("theme","default",function(e){a(e),l(e)},!0),Gn("keyMap","default",function(t,n,r){var i=Kn(n),o=r!=e.Init&&Kn(r);o&&o.detach&&o.detach(t,i),i.attach&&i.attach(t,o||null)}),Gn("extraKeys",null),Gn("lineWrapping",!1,i,!0),Gn("gutters",[],function(e){d(e.options),l(e)},!0),Gn("fixedGutter",!0,function(e,t){e.display.gutters.style.left=t?k(e.display)+"px":"0",e.refresh()},!0),Gn("coverGutterNextToScrollbar",!1,function(e){y(e)},!0),Gn("scrollbarStyle","native",function(e){g(e),y(e),e.display.scrollbars.setScrollTop(e.doc.scrollTop),e.display.scrollbars.setScrollLeft(e.doc.scrollLeft)},!0),Gn("lineNumbers",!1,function(e){d(e.options),l(e)},!0),Gn("firstLineNumber",1,l,!0),Gn("lineNumberFormatter",function(e){return e},l,!0),Gn("showCursorWhenSelecting",!1,Ae,!0),Gn("resetSelectionOnContextMenu",!0),Gn("lineWiseCopyCut",!0),Gn("readOnly",!1,function(e,t){"nocursor"==t?(yn(e),e.display.input.blur(),e.display.disabled=!0):e.display.disabled=!1,e.display.input.readOnlyChanged(t)}),Gn("disableInput",!1,function(e,t){t||e.display.input.reset()},!0),Gn("dragDrop",!0,Wt),Gn("allowDropFileTypes",null),Gn("cursorBlinkRate",530),Gn("cursorScrollMargin",0),Gn("cursorHeight",1,Ae,!0),Gn("singleCursorHeightPerLine",!0,Ae,!0),Gn("workTime",100),Gn("workDelay",100),Gn("flattenSpans",!0,r,!0),Gn("addModeClass",!1,r,!0),Gn("pollInterval",100),Gn("undoDepth",200,function(e,t){e.doc.history.undoDepth=t}),Gn("historyEventDelay",1250),Gn("viewportMargin",10,function(e){e.refresh()},!0),Gn("maxHighlightLength",1e4,r,!0),Gn("moveInputWithCursor",!0,function(e,t){t||e.display.input.resetPosition()}),Gn("tabindex",null,function(e,t){e.display.input.getField().tabIndex=t||""}),Gn("autofocus",null);var ns=e.modes={},rs=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)),ns[t]=n},e.defineMIME=function(e,t){rs[e]=t},e.resolveMode=function(t){if("string"==typeof t&&rs.hasOwnProperty(t))t=rs[t];else if(t&&"string"==typeof t.name&&rs.hasOwnProperty(t.name)){var n=rs[t.name];"string"==typeof n&&(n={name:n}),t=Vi(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=ns[n.name];if(!r)return e.getMode(t,"text/plain");var i=r(t,n);if(is.hasOwnProperty(n.name)){var o=is[n.name];for(var s in o)o.hasOwnProperty(s)&&(i.hasOwnProperty(s)&&(i["_"+s]=i[s]),i[s]=o[s])}if(i.name=n.name,n.helperType&&(i.helperType=n.helperType),n.modeProps)for(var s in n.modeProps)i[s]=n.modeProps[s];return i},e.defineMode("null",function(){return{token:function(e){e.skipToEnd()}}}),e.defineMIME("text/plain","null");var is=e.modeExtensions={};e.extendMode=function(e,t){var n=is.hasOwnProperty(e)?is[e]:is[e]={};Ii(t,n)},e.defineExtension=function(t,n){e.prototype[t]=n},e.defineDocExtension=function(e,t){Cs.prototype[e]=t},e.defineOption=Gn;var os=[];e.defineInitHook=function(e){os.push(e)};var ss=e.helpers={};e.registerHelper=function(t,n,r){ss.hasOwnProperty(t)||(ss[t]=e[t]={_global:[]}),ss[t][n]=r},e.registerGlobalHelper=function(t,n,r,i){e.registerHelper(t,n,i),ss[t]._global.push({pred:r,val:i})};var as=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 i=t[r];i instanceof Array&&(i=i.concat([])),n[r]=i}return n},ls=e.startState=function(e,t,n){return e.startState?e.startState(t,n):!0};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 cs=e.commands={selectAll:function(e){e.setSelection(Io(e.firstLine(),0),Io(e.lastLine()),Vs)},singleSelection:function(e){e.setSelection(e.getCursor("anchor"),e.getCursor("head"),Vs)},killLine:function(e){Rn(e,function(t){if(t.empty()){var n=Zr(e.doc,t.head.line).text.length;return t.head.ch==n&&t.head.line0)i=new Io(i.line,i.ch+1),e.replaceRange(o.charAt(i.ch-1)+o.charAt(i.ch-2),Io(i.line,i.ch-2),i,"+transpose");else if(i.line>e.doc.first){var s=Zr(e.doc,i.line-1).text;s&&e.replaceRange(o.charAt(0)+e.doc.lineSeparator()+s.charAt(s.length-1),Io(i.line-1,s.length-1),Io(i.line,1),"+transpose")}n.push(new he(i,i))}e.setSelections(n)})},newlineAndIndent:function(e){Nt(e,function(){for(var t=e.listSelections().length,n=0;t>n;n++){var r=e.listSelections()[n];e.replaceRange(e.doc.lineSeparator(),r.anchor,r.head,"+input"),e.indentLine(r.from().line+1,null,!0)}_n(e)})},toggleOverwrite:function(e){e.toggleOverwrite()}},us=e.keyMap={};us.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},us.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},us.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Alt-F":"goWordRight","Alt-B":"goWordLeft","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-D":"delWordAfter","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars"},us.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},us["default"]=Lo?us.macDefault:us.pcDefault,e.normalizeKeyMap=function(e){var t={};for(var n in e)if(e.hasOwnProperty(n)){var r=e[n];if(/^(name|fallthrough|(de|at)tach)$/.test(n))continue;if("..."==r){delete e[n];continue}for(var i=Ai(n.split(" "),Un),o=0;o=this.string.length},sol:function(){return this.pos==this.lineStart},peek:function(){return this.string.charAt(this.pos)||void 0},next:function(){return 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);return t>-1?(this.pos=t,!0):void 0},backUp:function(e){this.pos-=e},column:function(){return this.lastColumnPos0?null:(r&&t!==!1&&(this.pos+=r[0].length),r)}var i=function(e){return n?e.toLowerCase():e},o=this.string.substr(this.pos,e.length);return i(o)==i(e)?(t!==!1&&(this.pos+=e.length),!0):void 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 vs=0,ms=e.TextMarker=function(e,t){this.lines=[],this.type=t,this.doc=e,this.id=++vs};Ni(ms),ms.prototype.clear=function(){if(!this.explicitlyCleared){var e=this.doc.cm,t=e&&!e.curOp;if(t&&bt(e),Ti(this,"clear")){var n=this.find();n&&ki(this,"clear",n.from,n.to)}for(var r=null,i=null,o=0;oe.display.maxLineLength&&(e.display.maxLine=l,e.display.maxLineLength=c,e.display.maxLineChanged=!0)}null!=r&&e&&this.collapsed&&Dt(e,r,i+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&Ne(e.doc)),e&&ki(e,"markerCleared",e,this),t&&Et(e),this.parent&&this.parent.clear()}},ms.prototype.find=function(e,t){null==e&&"bookmark"==this.type&&(e=1);for(var n,r,i=0;in;++n){var i=this.lines[n];this.height-=i.height,Tr(i),ki(i,"delete")}this.lines.splice(e,t)},collapse:function(e){e.push.apply(e,this.lines)},insertInner:function(e,t,n){
-this.height+=n,this.lines=this.lines.slice(0,e).concat(t).concat(this.lines.slice(e));for(var r=0;re;++e)if(n(this.lines[e]))return!0}},$r.prototype={chunkSize:function(){return this.size},removeInner:function(e,t){this.size-=t;for(var n=0;ne){var o=Math.min(t,i-e),s=r.height;if(r.removeInner(e,o),this.height-=s-r.height,i==o&&(this.children.splice(n--,1),r.parent=null),0==(t-=o))break;e=0}else e-=i}if(this.size-t<25&&(this.children.length>1||!(this.children[0]instanceof Kr))){var a=[];this.collapse(a),this.children=[new Kr(a)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t=e){if(i.insertInner(e,t,n),i.lines&&i.lines.length>50){for(;i.lines.length>50;){var s=i.lines.splice(i.lines.length-25,25),a=new Kr(s);i.height-=a.height,this.children.splice(r+1,0,a),a.parent=this}this.maybeSpill()}break}e-=o}},maybeSpill:function(){if(!(this.children.length<=10)){var e=this;do{var t=e.children.splice(e.children.length-5,5),n=new $r(t);if(e.parent){e.size-=n.size,e.height-=n.height;var r=Oi(e.parent.children,e);e.parent.children.splice(r+1,0,n)}else{var i=new $r(e.children);i.parent=e,e.children=[i,n],e=i}n.parent=e.parent}while(e.children.length>10);e.parent.maybeSpill()}},iterN:function(e,t,n){for(var r=0;re){var s=Math.min(t,o-e);if(i.iterN(e,s,n))return!0;if(0==(t-=s))break;e=0}else e-=o}}};var Es=0,Cs=e.Doc=function(e,t,n,r){if(!(this instanceof Cs))return new Cs(e,t,n,r);null==n&&(n=0),$r.call(this,[new Kr([new ws("",null)])]),this.first=n,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.frontier=n;var i=Io(n,0);this.sel=de(i),this.history=new oi(null),this.id=++Es,this.modeOption=t,this.lineSep=r,this.extend=!1,"string"==typeof e&&(e=this.splitLines(e)),Ur(this,{from:i,to:i,text:e}),ze(this,de(i),Vs)};Cs.prototype=Vi($r.prototype,{constructor:Cs,iter:function(e,t,n){n?this.iterN(e-this.first,t-e,n):this.iterN(this.first,this.first+this.size,e)},insert:function(e,t){for(var n=0,r=0;r=0;o--)zn(this,r[o]);a?Se(this,a):this.cm&&_n(this.cm)}),undo:Ft(function(){Tn(this,"undo")}),redo:Ft(function(){Tn(this,"redo")}),undoSelection:Ft(function(){Tn(this,"undo",!0)}),redoSelection:Ft(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(i.marker.parent||i.marker)}return t},findMarks:function(e,t,n){e=ve(this,e),t=ve(this,t);var r=[],i=e.line;return this.iter(e.line,t.line+1,function(o){var s=o.markedSpans;if(s)for(var a=0;al.to||null==l.from&&i!=e.line||null!=l.from&&i==t.line&&l.from>t.ch||n&&!n(l.marker)||r.push(l.marker.parent||l.marker)}++i}),r},getAllMarks:function(){var e=[];return this.iter(function(t){var n=t.markedSpans;if(n)for(var r=0;re?(t=e,!0):(e-=i,void++n)}),ve(this,Io(n,t))},indexFromPos:function(e){e=ve(this,e);var t=e.ch;return e.linet&&(t=e.from),null!=e.to&&e.toa||a>=t)return s+(t-o);s+=a-o,s+=n-s%n,o=a+1}},Bs=e.findColumn=function(e,t,n){for(var r=0,i=0;;){var o=e.indexOf(" ",r);-1==o&&(o=e.length);var s=o-r;if(o==e.length||i+s>=t)return r+Math.min(s,t-i);if(i+=o-r,i+=n-i%n,r=o+1,i>=t)return r}},js=[""],Rs=function(e){e.select()};To?Rs=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:wo&&(Rs=function(e){try{e.select()}catch(t){}});var Ws,qs=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/,Gs=e.isWordChar=function(e){return/\w/.test(e)||e>""&&(e.toUpperCase()!=e.toLowerCase()||qs.test(e))},Us=/[\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]/;Ws=document.createRange?function(e,t,n,r){var i=document.createRange();return i.setEnd(r||e,n),i.setStart(e,t),i}:function(e,t,n){var r=document.body.createTextRange();try{r.moveToElementText(e.parentNode)}catch(i){return r}return r.collapse(!0),r.moveEnd("character",n),r.moveStart("character",t),r};var Ks=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)};wo&&11>bo&&(Gi=function(){try{return document.activeElement}catch(e){return document.body}});var $s,Ys,Xs=e.rmClass=function(e,t){var n=e.className,r=Ui(t).exec(n);if(r){var i=n.slice(r.index+r[0].length);e.className=n.slice(0,r.index)+(i?r[1]+i:"")}},Zs=e.addClass=function(e,t){var n=e.className;Ui(t).test(n)||(e.className+=(n?" ":"")+t)},Js=!1,Qs=function(){if(wo&&9>bo)return!1;var e=Ri("div");return"draggable"in e||"dragDrop"in e}(),ea=e.splitLines=3!="\n\nb".split(/\n/).length?function(e){for(var t=0,n=[],r=e.length;r>=t;){var i=e.indexOf("\n",t);-1==i&&(i=e.length);var o=e.slice(t,"\r"==e.charAt(i-1)?i-1:i),s=o.indexOf("\r");-1!=s?(n.push(o.slice(0,s)),t+=s+1):(n.push(o),t=i+1)}return n}:function(e){return e.split(/\r\n?|\n/)},ta=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):!1},na=function(){var e=Ri("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),"function"==typeof e.oncopy)}(),ra=null,ia=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;10>e;e++)ia[e+48]=ia[e+96]=String(e);for(var e=65;90>=e;e++)ia[e]=String.fromCharCode(e);for(var e=1;12>=e;e++)ia[e+111]=ia[e+63235]="F"+e}();var oa,sa=function(){function e(e){return 247>=e?n.charAt(e):e>=1424&&1524>=e?"R":e>=1536&&1773>=e?r.charAt(e-1536):e>=1774&&2220>=e?"r":e>=8192&&8203>=e?"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",i=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,o=/[stwN]/,s=/[LRr]/,a=/[Lb1n]/,l=/[1n]/,c="L";return function(n){if(!i.test(n))return!1;for(var r,u=n.length,h=[],p=0;u>p;++p)h.push(r=e(n.charCodeAt(p)));for(var p=0,d=c;u>p;++p){var r=h[p];"m"==r?h[p]=d:d=r}for(var p=0,f=c;u>p;++p){var r=h[p];"1"==r&&"r"==f?h[p]="n":s.test(r)&&(f=r,"r"==r&&(h[p]="R"))}for(var p=1,d=h[0];u-1>p;++p){var r=h[p];"+"==r&&"1"==d&&"1"==h[p+1]?h[p]="1":","!=r||d!=h[p+1]||"1"!=d&&"n"!=d||(h[p]=d),d=r}for(var p=0;u>p;++p){var r=h[p];if(","==r)h[p]="N";else if("%"==r){for(var v=p+1;u>v&&"%"==h[v];++v);for(var m=p&&"!"==h[p-1]||u>v&&"1"==h[v]?"1":"N",g=p;v>g;++g)h[g]=m;p=v-1}}for(var p=0,f=c;u>p;++p){var r=h[p];"L"==f&&"1"==r?h[p]="L":s.test(r)&&(f=r)}for(var p=0;u>p;++p)if(o.test(h[p])){for(var v=p+1;u>v&&o.test(h[v]);++v);for(var y="L"==(p?h[p-1]:c),w="L"==(u>v?h[v]:c),m=y||w?"L":"R",g=p;v>g;++g)h[g]=m;p=v-1}for(var b,x=[],p=0;u>p;)if(a.test(h[p])){var E=p;for(++p;u>p&&a.test(h[p]);++p);x.push(new t(0,E,p))}else{var C=p,k=x.length;for(++p;u>p&&"L"!=h[p];++p);for(var g=C;p>g;)if(l.test(h[g])){g>C&&x.splice(k,0,new t(1,C,g));var S=g;for(++g;p>g&&l.test(h[g]);++g);x.splice(k,0,new t(2,S,g)),C=g}else++g;p>C&&x.splice(k,0,new t(1,C,p))}return 1==x[0].level&&(b=n.match(/^\s+/))&&(x[0].from=b[0].length,x.unshift(new t(0,0,b[0].length))),1==Fi(x).level&&(b=n.match(/\s+$/))&&(Fi(x).to-=b[0].length,x.push(new t(0,u-b[0].length,u))),2==x[0].level&&x.unshift(new t(1,x[0].to,x[0].to)),x[0].level!=Fi(x).level&&x.push(new t(x[0].level,u,u)),x}}();return e.version="5.13.2",e})},function(e,t,n){!function(e){e(n(247))}(function(e){"use strict";var t={autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0},n={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,caseFold:!1};e.defineMode("xml",function(r,i){function o(e,t){function n(n){return t.tokenize=n,n(e,t)}var r=e.next();if("<"==r)return e.eat("!")?e.eat("[")?e.match("CDATA[")?n(l("atom","]]>")):null:e.match("--")?n(l("comment","-->")):e.match("DOCTYPE",!0,!0)?(e.eatWhile(/[\w\._\-]/),n(c(1))):null:e.eat("?")?(e.eatWhile(/[\w\._\-]/),t.tokenize=l("meta","?>"),"meta"):(z=e.eat("/")?"closeTag":"openTag",t.tokenize=s,"tag bracket");if("&"==r){var i;return i=e.eat("#")?e.eat("x")?e.eatWhile(/[a-fA-F\d]/)&&e.eat(";"):e.eatWhile(/[\d]/)&&e.eat(";"):e.eatWhile(/[\w\.\-:]/)&&e.eat(";"),i?"atom":"error"}return e.eatWhile(/[^&<]/),null}function s(e,t){var n=e.next();if(">"==n||"/"==n&&e.eat(">"))return t.tokenize=o,z=">"==n?"endTag":"selfcloseTag","tag bracket";if("="==n)return z="equals",null;if("<"==n){t.tokenize=o,t.state=d,t.tagName=t.tagStart=null;var r=t.tokenize(e,t);return r?r+" tag error":"tag error"}return/[\'\"]/.test(n)?(t.tokenize=a(n),t.stringStartCol=e.column(),t.tokenize(e,t)):(e.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function a(e){var t=function(t,n){for(;!t.eol();)if(t.next()==e){n.tokenize=s;break}return"string"};return t.isInAttribute=!0,t}function l(e,t){return function(n,r){for(;!n.eol();){if(n.match(t)){r.tokenize=o;break}n.next()}return e}}function c(e){return function(t,n){for(var r;null!=(r=t.next());){if("<"==r)return n.tokenize=c(e+1),n.tokenize(t,n);if(">"==r){if(1==e){n.tokenize=o;break}return n.tokenize=c(e-1),n.tokenize(t,n)}}return"meta"}}function u(e,t,n){this.prev=e.context,this.tagName=t,this.indent=e.indented,this.startOfLine=n,(C.doNotIndent.hasOwnProperty(t)||e.context&&e.context.noIndent)&&(this.noIndent=!0)}function h(e){e.context&&(e.context=e.context.prev)}function p(e,t){for(var n;;){if(!e.context)return;if(n=e.context.tagName,!C.contextGrabbers.hasOwnProperty(n)||!C.contextGrabbers[n].hasOwnProperty(t))return;h(e)}}function d(e,t,n){return"openTag"==e?(n.tagStart=t.column(),f):"closeTag"==e?v:d}function f(e,t,n){return"word"==e?(n.tagName=t.current(),M="tag",y):(M="error",f)}function v(e,t,n){if("word"==e){var r=t.current();return n.context&&n.context.tagName!=r&&C.implicitlyClosed.hasOwnProperty(n.context.tagName)&&h(n),n.context&&n.context.tagName==r||C.matchClosing===!1?(M="tag",m):(M="tag error",g)}return M="error",g}function m(e,t,n){return"endTag"!=e?(M="error",m):(h(n),d)}function g(e,t,n){return M="error",m(e,t,n)}function y(e,t,n){if("word"==e)return M="attribute",w;if("endTag"==e||"selfcloseTag"==e){var r=n.tagName,i=n.tagStart;return n.tagName=n.tagStart=null,"selfcloseTag"==e||C.autoSelfClosers.hasOwnProperty(r)?p(n,r):(p(n,r),n.context=new u(n,r,i==n.indented)),d}return M="error",y}function w(e,t,n){return"equals"==e?b:(C.allowMissing||(M="error"),y(e,t,n))}function b(e,t,n){return"string"==e?x:"word"==e&&C.allowUnquoted?(M="string",y):(M="error",y(e,t,n))}function x(e,t,n){return"string"==e?x:y(e,t,n)}var E=r.indentUnit,C={},k=i.htmlMode?t:n;for(var S in k)C[S]=k[S];for(var S in i)C[S]=i[S];var z,M;return o.isInText=!0,{startState:function(e){var t={tokenize:o,state:d,indented:e||0,tagName:null,tagStart:null,context:null};return null!=e&&(t.baseIndent=e),t},token:function(e,t){if(!t.tagName&&e.sol()&&(t.indented=e.indentation()),e.eatSpace())return null;z=null;var n=t.tokenize(e,t);return(n||z)&&"comment"!=n&&(M=null,t.state=t.state(z||n,e,t),M&&(n="error"==M?n+" error":M)),n},indent:function(t,n,r){var i=t.context;if(t.tokenize.isInAttribute)return t.tagStart==t.indented?t.stringStartCol+1:t.indented+E;if(i&&i.noIndent)return e.Pass;if(t.tokenize!=s&&t.tokenize!=o)return r?r.match(/^(\s*)/)[0].length:0;if(t.tagName)return C.multilineTagIndentPastTag!==!1?t.tagStart+t.tagName.length+2:t.tagStart+E*(C.multilineTagIndentFactor||1);if(C.alignCDATA&&/$/,blockCommentStart:"",configuration:C.htmlMode?"html":"xml",helperType:C.htmlMode?"html":"xml",skipAttribute:function(e){e.state==b&&(e.state=y)}}}),e.defineMIME("text/xml","xml"),e.defineMIME("application/xml","xml"),e.mimeModes.hasOwnProperty("text/html")||e.defineMIME("text/html",{name:"xml",htmlMode:!0})})},function(e,t,n){!function(e){e(n(247))}(function(e){"use strict";function t(e,t,n){return/^(?:operator|sof|keyword c|case|new|[\[{}\(,;:]|=>)$/.test(t.lastType)||"quasi"==t.lastType&&/\{\s*$/.test(e.string.slice(0,e.pos-(n||0)))}e.defineMode("javascript",function(n,r){function i(e){for(var t,n=!1,r=!1;null!=(t=e.next());){if(!n){if("/"==t&&!r)return;"["==t?r=!0:r&&"]"==t&&(r=!1)}n=!n&&"\\"==t}}function o(e,t,n){return be=e,xe=n,t}function s(e,n){var r=e.next();if('"'==r||"'"==r)return n.tokenize=a(r),n.tokenize(e,n);if("."==r&&e.match(/^\d+(?:[eE][+\-]?\d+)?/))return o("number","number");if("."==r&&e.match(".."))return o("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(r))return o(r);if("="==r&&e.eat(">"))return o("=>","operator");if("0"==r&&e.eat(/x/i))return e.eatWhile(/[\da-f]/i),o("number","number");if("0"==r&&e.eat(/o/i))return e.eatWhile(/[0-7]/i),o("number","number");if("0"==r&&e.eat(/b/i))return e.eatWhile(/[01]/i),o("number","number");if(/\d/.test(r))return e.match(/^\d*(?:\.\d*)?(?:[eE][+\-]?\d+)?/),o("number","number");if("/"==r)return e.eat("*")?(n.tokenize=l,l(e,n)):e.eat("/")?(e.skipToEnd(),o("comment","comment")):t(e,n,1)?(i(e),e.match(/^\b(([gimyu])(?![gimyu]*\2))+\b/),o("regexp","string-2")):(e.eatWhile(Ne),o("operator","operator",e.current()));if("`"==r)return n.tokenize=c,c(e,n);if("#"==r)return e.skipToEnd(),o("error","error");if(Ne.test(r))return e.eatWhile(Ne),o("operator","operator",e.current());if(Me.test(r)){e.eatWhile(Me);var s=e.current(),u=Te.propertyIsEnumerable(s)&&Te[s];return u&&"."!=n.lastType?o(u.type,u.style,s):o("variable","variable",s)}}function a(e){return function(t,n){var r,i=!1;if(ke&&"@"==t.peek()&&t.match(Le))return n.tokenize=s,o("jsonld-keyword","meta");for(;null!=(r=t.next())&&(r!=e||i);)i=!i&&"\\"==r;return i||(n.tokenize=s),o("string","string")}}function l(e,t){for(var n,r=!1;n=e.next();){if("/"==n&&r){t.tokenize=s;break}r="*"==n}return o("comment","comment")}function c(e,t){for(var n,r=!1;null!=(n=e.next());){if(!r&&("`"==n||"$"==n&&e.eat("{"))){t.tokenize=s;break}r=!r&&"\\"==n}return o("quasi","string-2",e.current())}function u(e,t){t.fatArrowAt&&(t.fatArrowAt=null);var n=e.string.indexOf("=>",e.start);if(!(0>n)){for(var r=0,i=!1,o=n-1;o>=0;--o){var s=e.string.charAt(o),a=Pe.indexOf(s);if(a>=0&&3>a){if(!r){++o;break}if(0==--r)break}else if(a>=3&&6>a)++r;else if(Me.test(s))i=!0;else{if(/["'\/]/.test(s))return;if(i&&!r){++o;break}}}i&&!r&&(t.fatArrowAt=o)}}function h(e,t,n,r,i,o){this.indented=e,this.column=t,this.type=n,this.prev=i,this.info=o,null!=r&&(this.align=r)}function p(e,t){for(var n=e.localVars;n;n=n.next)if(n.name==t)return!0;for(var r=e.context;r;r=r.prev)for(var n=r.vars;n;n=n.next)if(n.name==t)return!0}function d(e,t,n,r,i){var o=e.cc;for(Oe.state=e,Oe.stream=i,Oe.marked=null,Oe.cc=o,Oe.style=t,e.lexical.hasOwnProperty("align")||(e.lexical.align=!0);;){var s=o.length?o.pop():Se?C:E;if(s(n,r)){for(;o.length&&o[o.length-1].lex;)o.pop()();return Oe.marked?Oe.marked:"variable"==n&&p(e,r)?"variable-2":t}}}function f(){for(var e=arguments.length-1;e>=0;e--)Oe.cc.push(arguments[e])}function v(){return f.apply(null,arguments),!0}function m(e){function t(t){for(var n=t;n;n=n.next)if(n.name==e)return!0;return!1}var n=Oe.state;if(Oe.marked="def",n.context){if(t(n.localVars))return;n.localVars={name:e,next:n.localVars}}else{if(t(n.globalVars))return;r.globalVars&&(n.globalVars={name:e,next:n.globalVars})}}function g(){Oe.state.context={prev:Oe.state.context,vars:Oe.state.localVars},Oe.state.localVars=Ae}function y(){Oe.state.localVars=Oe.state.context.vars,Oe.state.context=Oe.state.context.prev}function w(e,t){var n=function(){var n=Oe.state,r=n.indented;if("stat"==n.lexical.type)r=n.lexical.indented;else for(var i=n.lexical;i&&")"==i.type&&i.align;i=i.prev)r=i.indented;n.lexical=new h(r,Oe.stream.column(),e,null,n.lexical,t)};return n.lex=!0,n}function b(){var e=Oe.state;e.lexical.prev&&(")"==e.lexical.type&&(e.indented=e.lexical.indented),e.lexical=e.lexical.prev)}function x(e){function t(n){return n==e?v():";"==e?f():v(t)}return t}function E(e,t){return"var"==e?v(w("vardef",t.length),$,x(";"),b):"keyword a"==e?v(w("form"),C,E,b):"keyword b"==e?v(w("form"),E,b):"{"==e?v(w("}"),q,b):";"==e?v():"if"==e?("else"==Oe.state.lexical.info&&Oe.state.cc[Oe.state.cc.length-1]==b&&Oe.state.cc.pop()(),v(w("form"),C,E,b,Q)):"function"==e?v(oe):"for"==e?v(w("form"),ee,E,b):"variable"==e?v(w("stat"),I):"switch"==e?v(w("form"),C,w("}","switch"),x("{"),q,b,b):"case"==e?v(C,x(":")):"default"==e?v(x(":")):"catch"==e?v(w("form"),g,x("("),se,x(")"),E,b,y):"class"==e?v(w("form"),ae,b):"export"==e?v(w("stat"),he,b):"import"==e?v(w("stat"),pe,b):"module"==e?v(w("form"),Y,w("}"),x("{"),q,b,b):f(w("stat"),C,x(";"),b)}function C(e){return S(e,!1)}function k(e){return S(e,!0)}function S(e,t){if(Oe.state.fatArrowAt==Oe.stream.start){var n=t?O:F;if("("==e)return v(g,w(")"),R(Y,")"),b,x("=>"),n,y);if("variable"==e)return f(g,Y,x("=>"),n,y)}var r=t?N:T;return Fe.hasOwnProperty(e)?v(r):"function"==e?v(oe,r):"keyword c"==e?v(t?M:z):"("==e?v(w(")"),z,ye,x(")"),b,r):"operator"==e||"spread"==e?v(t?k:C):"["==e?v(w("]"),me,b,r):"{"==e?W(H,"}",null,r):"quasi"==e?f(L,r):"new"==e?v(A(t)):v()}function z(e){return e.match(/[;\}\)\],]/)?f():f(C)}function M(e){return e.match(/[;\}\)\],]/)?f():f(k)}function T(e,t){return","==e?v(C):N(e,t,!1)}function N(e,t,n){var r=0==n?T:N,i=0==n?C:k;return"=>"==e?v(g,n?O:F,y):"operator"==e?/\+\+|--/.test(t)?v(r):"?"==t?v(C,x(":"),i):v(i):"quasi"==e?f(L,r):";"!=e?"("==e?W(k,")","call",r):"."==e?v(_,r):"["==e?v(w("]"),z,x("]"),b,r):void 0:void 0}function L(e,t){return"quasi"!=e?f():"${"!=t.slice(t.length-2)?v(L):v(C,P)}function P(e){return"}"==e?(Oe.marked="string-2",Oe.state.tokenize=c,v(L)):void 0}function F(e){return u(Oe.stream,Oe.state),f("{"==e?E:C)}function O(e){return u(Oe.stream,Oe.state),f("{"==e?E:k)}function A(e){return function(t){return"."==t?v(e?V:D):f(e?k:C)}}function D(e,t){return"target"==t?(Oe.marked="keyword",v(T)):void 0}function V(e,t){return"target"==t?(Oe.marked="keyword",v(N)):void 0}function I(e){return":"==e?v(b,E):f(T,x(";"),b)}function _(e){return"variable"==e?(Oe.marked="property",v()):void 0}function H(e,t){return"variable"==e||"keyword"==Oe.style?(Oe.marked="property",v("get"==t||"set"==t?B:j)):"number"==e||"string"==e?(Oe.marked=ke?"property":Oe.style+" property",v(j)):"jsonld-keyword"==e?v(j):"modifier"==e?v(H):"["==e?v(C,x("]"),j):"spread"==e?v(C):void 0}function B(e){return"variable"!=e?f(j):(Oe.marked="property",v(oe))}function j(e){return":"==e?v(k):"("==e?f(oe):void 0}function R(e,t){function n(r){if(","==r){var i=Oe.state.lexical;return"call"==i.info&&(i.pos=(i.pos||0)+1),v(e,n)}return r==t?v():v(x(t))}return function(r){return r==t?v():f(e,n)}}function W(e,t,n){for(var r=3;r!?|~^]/,Le=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/,Pe="([{}])",Fe={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,"this":!0,"jsonld-keyword":!0},Oe={state:null,column:null,marked:null,cc:null},Ae={name:"this",next:{name:"arguments"}};return b.lex=!0,{startState:function(e){var t={tokenize:s,lastType:"sof",cc:[],lexical:new h((e||0)-Ee,0,"block",!1),localVars:r.localVars,context:r.localVars&&{vars:r.localVars},indented:e||0};return r.globalVars&&"object"==typeof r.globalVars&&(t.globalVars=r.globalVars),t},token:function(e,t){if(e.sol()&&(t.lexical.hasOwnProperty("align")||(t.lexical.align=!1),t.indented=e.indentation(),u(e,t)),t.tokenize!=l&&e.eatSpace())return null;var n=t.tokenize(e,t);return"comment"==be?n:(t.lastType="operator"!=be||"++"!=xe&&"--"!=xe?be:"incdec",d(t,n,be,xe,e))},indent:function(t,n){if(t.tokenize==l)return e.Pass;if(t.tokenize!=s)return 0;var i=n&&n.charAt(0),o=t.lexical;if(!/^\s*else\b/.test(n))for(var a=t.cc.length-1;a>=0;--a){var c=t.cc[a];if(c==b)o=o.prev;else if(c!=Q)break}"stat"==o.type&&"}"==i&&(o=o.prev),Ce&&")"==o.type&&"stat"==o.prev.type&&(o=o.prev);var u=o.type,h=i==u;return"vardef"==u?o.indented+("operator"==t.lastType||","==t.lastType?o.info+1:0):"form"==u&&"{"==i?o.indented:"form"==u?o.indented+Ee:"stat"==u?o.indented+(we(t,n)?Ce||Ee:0):"switch"!=o.info||h||0==r.doubleIndentSwitch?o.align?o.column+(h?0:1):o.indented+(h?0:Ee):o.indented+(/^(?:case|default)\b/.test(n)?Ee:2*Ee)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:Se?null:"/*",blockCommentEnd:Se?null:"*/",lineComment:Se?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:Se?"json":"javascript",jsonldMode:ke,jsonMode:Se,expressionAllowed:t,skipExpression:function(e){var t=e.cc[e.cc.length-1];t!=C&&t!=k||e.cc.pop()}}}),e.registerHelper("wordChars","javascript",/[\w$]/),e.defineMIME("text/javascript","javascript"),e.defineMIME("text/ecmascript","javascript"),e.defineMIME("application/javascript","javascript"),e.defineMIME("application/x-javascript","javascript"),e.defineMIME("application/ecmascript","javascript"),e.defineMIME("application/json",{name:"javascript",json:!0}),e.defineMIME("application/x-json",{name:"javascript",json:!0}),e.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),e.defineMIME("text/typescript",{name:"javascript",typescript:!0}),e.defineMIME("application/typescript",{name:"javascript",typescript:!0})})},function(e,t,n){"use strict";var r=n(96);n(251);var i=r.createClass({displayName:"Col",render:function(){var e=this.props.left?"dops-col-left":"dops-col-right";return r.createElement("div",{key:"",className:e},this.props.children)}});e.exports=i},97,function(e,t){e.exports='var Modal = Demo.require( \'./modal\' );\n\nvar DemoModal = React.createClass( {\n\n handleOpenModal: function ( e ) {\n e.preventDefault();\n this.setState( {showModal: true} );\n },\n\n handleCloseModal: function() {\n this.setState( {showModal: false} );\n },\n\n getInitialState: function() {\n return {\n showModal: false\n };\n },\n\n render: function() {\n return (\n \n
open modal\n {this.state.showModal && (\n
\n Hi there!
\n \n )}\n
\n );\n }\n} );\n\nReact.render(\n React.createElement( DemoModal, {} ), document.getElementById( Demo.domId )\n);'},function(e,t,n){"use strict";function r(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function i(){h=!0}function o(){h=!1}var s=Object.assign||function(e){for(var t=1;t1?n[o-1]:void 0,a=o>2?n[2]:void 0;for(s="function"==typeof s?(o--,s):void 0,a&&i(n[0],n[1],a)&&(s=3>o?void 0:s,o=1),t=Object(t);++rl;l++)t=a[l],r=t.tabIndex,0>r||"INPUT"===t.tagName&&"hidden"===t.type||"A"===t.tagName&&!t.href&&!t.tabIndex||t.disabled||n(t)||(0===r?i.push(t):o.push({tabIndex:r,node:t}));var u=o.sort(function(e,t){return e.tabIndex-t.tabIndex}).map(function(e){return e.node});return Array.prototype.push.apply(u,i),u};var r={},i=1},97,function(e,t){e.exports="var PasswordBox = Demo.require( './password-box' );\n\nvar DemoPasswordBox = React.createClass( {\n\n render: function() {\n return (\n \n );\n }\n} );\n\nReact.render(\n React.createElement( DemoPasswordBox, {} ), document.getElementById( Demo.domId )\n);"},function(e,t,n){"use strict";var r=n(96),i=n(103),o=n(266),s=n(271);n(273);var a=r.createClass({displayName:"PasswordBox",propTypes:{value:r.PropTypes.any.isRequired,hideLabel:r.PropTypes.any,showLabel:r.PropTypes.any},getDefaultProps:function(){return{hideLabel:"hide",showLabel:"show",ariaLabel:""}},getInitialState:function(){return{hidePassword:!0}},togglePasswordVisibility:function(){this.setState({hidePassword:!this.state.hidePassword})},hidden:function(){return!!this.state.hidePassword},render:function(){var e=i({"dops-password-box":!0,"dops-password-box--hidden":this.hidden()});return this.hidden()?r.createElement("div",{className:e},r.createElement("span",{className:"dops-text-input","aria-hidden":!0},"************"),r.createElement("button",{className:"dops-password-box__toggle-visibility",onClick:this.togglePasswordVisibility,"aria-live":"assertive"},r.createElement(o,{icon:"visible"}),r.createElement(s,null,this.props.showLabel))):r.createElement("div",{className:e},r.createElement("input",{id:this.props.id,className:"dops-text-input",type:"text",value:this.props.value,"aria-label":this.props.ariaLabel}),r.createElement("button",{className:"dops-password-box__toggle-visibility",onClick:this.togglePasswordVisibility,"aria-live":"assertive"},r.createElement(o,{icon:"not-visible"}),r.createElement(s,null,this.props.hideLabel)))}});e.exports=a},function(e,t,n){"use strict";var r=n(96),i=n(267),o=n(103);n(270);var s=r.createClass({displayName:"Gridicon",mixins:[i],getDefaultProps:function(){return{className:"",size:24}},propTypes:{icon:r.PropTypes.string.isRequired,size:r.PropTypes.number,onClick:r.PropTypes.func,className:r.PropTypes.string},needsOffset:function(e,t){var n=["gridicons-add-outline","gridicons-add","gridicons-align-image-center","gridicons-align-image-left","gridicons-align-image-none","gridicons-align-image-right","gridicons-attachment","gridicons-backspace","gridicons-bold","gridicons-bookmark-outline","gridicons-bookmark","gridicons-calendar","gridicons-cart","gridicons-create","gridicons-custom-post-type","gridicons-external","gridicons-folder","gridicons-heading","gridicons-help-outline","gridicons-help","gridicons-history","gridicons-info-outline","gridicons-info","gridicons-italic","gridicons-layout-blocks","gridicons-link-break","gridicons-link","gridicons-list-checkmark","gridicons-list-ordered","gridicons-list-unordered","gridicons-menus","gridicons-minus","gridicons-my-sites","gridicons-notice-outline","gridicons-notice","gridicons-plus-small","gridicons-plus","gridicons-popout","gridicons-posts","gridicons-scheduled","gridicons-share-ios","gridicons-star-outline","gridicons-star","gridicons-stats","gridicons-status","gridicons-thumbs-up","gridicons-textcolor","gridicons-time","gridicons-trophy","gridicons-user-circle"];return n.indexOf(e)>=0?t%18===0:!1},needsOffsetX:function(e,t){var n=["gridicons-arrow-down","gridicons-arrow-up","gridicons-comment","gridicons-clear-formatting","gridicons-flag","gridicons-menu","gridicons-reader","gridicons-strikethrough"];return n.indexOf(e)>=0?t%18===0:!1},needsOffsetY:function(e,t){var n=["gridicons-align-center","gridicons-align-justify","gridicons-align-left","gridicons-align-right","gridicons-arrow-left","gridicons-arrow-right","gridicons-house","gridicons-indent-left","gridicons-indent-right","gridicons-minus-small","gridicons-print","gridicons-sign-out","gridicons-stats-alt","gridicons-trash","gridicons-underline","gridicons-video-camera"];return n.indexOf(e)>=0?t%18===0:!1},render:function(){var e,t,n="gridicons-"+this.props.icon,i=this.needsOffset(n,this.props.size),s=this.needsOffsetX(n,this.props.size),a=this.needsOffsetY(n,this.props.size);switch(t=o("gridicon",n,this.props.className,{"needs-offset":i,"needs-offset-x":s,"needs-offset-y":a}),n){default:e=r.createElement("svg",{height:this.props.size,width:this.props.size});break;case"gridicons-add-image":e=r.createElement("svg",{className:t,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},r.createElement("g",null,r.createElement("path",{d:"M23 4v2h-3v3h-2V6h-3V4h3V1h2v3h3zm-8.5 7c.828 0 1.5-.672 1.5-1.5S15.328 8 14.5 8 13 8.672 13 9.5s.672 1.5 1.5 1.5zm3.5 3.234l-.513-.57c-.794-.885-2.18-.885-2.976 0l-.655.73L9 9l-3 3.333V6h7V4H6c-1.105 0-2 .895-2 2v12c0 1.105.895 2 2 2h12c1.105 0 2-.895 2-2v-7h-2v3.234z"})));break;case"gridicons-add-outline":e=r.createElement("svg",{className:t,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},r.createElement("g",null,r.createElement("path",{d:"M12 4c4.41 0 8 3.59 8 8s-3.59 8-8 8-8-3.59-8-8 3.59-8 8-8m0-2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zm5 9h-4V7h-2v4H7v2h4v4h2v-4h4v-2z"})));break;case"gridicons-add":e=r.createElement("svg",{className:t,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},r.createElement("g",null,r.createElement("path",{d:"M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zm5 11h-4v4h-2v-4H7v-2h4V7h2v4h4v2z"})));break;case"gridicons-align-center":e=r.createElement("svg",{className:t,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},r.createElement("g",null,r.createElement("path",{d:"M4 19h16v-2H4v2zm13-6H7v2h10v-2zM4 9v2h16V9H4zm13-4H7v2h10V5z"})));break;case"gridicons-align-image-center":e=r.createElement("svg",{className:t,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},r.createElement("g",null,r.createElement("path",{d:"M3 5h18v2H3V5zm0 14h18v-2H3v2zm5-4h8V9H8v6z"})));break;case"gridicons-align-image-left":e=r.createElement("svg",{className:t,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},r.createElement("g",null,r.createElement("path",{d:"M3 5h18v2H3V5zm0 14h18v-2H3v2zm0-4h8V9H3v6zm10 0h8v-2h-8v2zm0-4h8V9h-8v2z"})));break;case"gridicons-align-image-none":e=r.createElement("svg",{className:t,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},r.createElement("g",null,r.createElement("path",{d:"M21 7H3V5h18v2zm0 10H3v2h18v-2zM11 9H3v6h8V9z"})));break;case"gridicons-align-image-right":e=r.createElement("svg",{className:t,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},r.createElement("g",null,r.createElement("path",{d:"M21 7H3V5h18v2zm0 10H3v2h18v-2zm0-8h-8v6h8V9zm-10 4H3v2h8v-2zm0-4H3v2h8V9z"})));break;case"gridicons-align-justify":e=r.createElement("svg",{className:t,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},r.createElement("g",null,r.createElement("path",{d:"M4 19h16v-2H4v2zm16-6H4v2h16v-2zM4 9v2h16V9H4zm16-4H4v2h16V5z"})));break;case"gridicons-align-left":e=r.createElement("svg",{className:t,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},r.createElement("g",null,r.createElement("path",{d:"M4 19h16v-2H4v2zm10-6H4v2h10v-2zM4 9v2h16V9H4zm10-4H4v2h10V5z"})));break;case"gridicons-align-right":e=r.createElement("svg",{className:t,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},r.createElement("g",null,r.createElement("path",{d:"M20 17H4v2h16v-2zm-10-2h10v-2H10v2zM4 9v2h16V9H4zm6-2h10V5H10v2z"})));break;case"gridicons-arrow-down":e=r.createElement("svg",{className:t,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},r.createElement("g",null,r.createElement("path",{d:"M11 4v12.17l-5.59-5.59L4 12l8 8 8-8-1.41-1.41L13 16.17V4h-2z"})));break;case"gridicons-arrow-left":e=r.createElement("svg",{className:t,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},r.createElement("g",null,r.createElement("path",{d:"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z"})));break;case"gridicons-arrow-right":e=r.createElement("svg",{className:t,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},r.createElement("g",null,r.createElement("path",{d:"M12 4l-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8-8-8z"})));break;case"gridicons-arrow-up":e=r.createElement("svg",{className:t,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},r.createElement("g",null,r.createElement("path",{d:"M13 20V7.83l5.59 5.59L20 12l-8-8-8 8 1.41 1.41L11 7.83V20h2z"})));break;case"gridicons-aside":e=r.createElement("svg",{className:t,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},r.createElement("g",null,r.createElement("path",{d:"M14 20l6-6V6c0-1.105-.895-2-2-2H6c-1.105 0-2 .895-2 2v12c0 1.105.895 2 2 2h8zM6 6h12v6h-4c-1.105 0-2 .895-2 2v4H6V6zm10 4H8V8h8v2z"})));break;case"gridicons-attachment":e=r.createElement("svg",{className:t,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},r.createElement("g",null,r.createElement("path",{d:"M14 1c-2.762 0-5 2.238-5 5v10c0 1.657 1.343 3 3 3s2.99-1.343 2.99-3V6H13v10c0 .553-.447 1-1 1-.553 0-1-.447-1-1V6c0-1.657 1.343-3 3-3s3 1.343 3 3v10.125C17 18.887 14.762 21 12 21s-5-2.238-5-5v-5H5v5c0 3.866 3.134 7 7 7s6.99-3.134 6.99-7V6c0-2.762-2.228-5-4.99-5z"})));break;case"gridicons-audio":e=r.createElement("svg",{className:t,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},r.createElement("g",null,r.createElement("path",{d:"M8 4v10.184C7.686 14.072 7.353 14 7 14c-1.657 0-3 1.343-3 3s1.343 3 3 3 3-1.343 3-3V7h7v4.184c-.314-.112-.647-.184-1-.184-1.657 0-3 1.343-3 3s1.343 3 3 3 3-1.343 3-3V4H8z"})));break;case"gridicons-backspace":e=r.createElement("svg",{className:t,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},r.createElement("g",null,r.createElement("path",{d:"M19 7H8l-5 5 5 5h11c1.104 0 2-.896 2-2V9c0-1.104-.896-2-2-2zm-.647 6.646l-.707.707L16 12.707l-1.647 1.647-.707-.707L15.293 12l-1.647-1.646.707-.707L16 11.293l1.646-1.647.707.707L16.707 12l1.646 1.646z"})));break;case"gridicons-bell":e=r.createElement("svg",{className:t,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},r.createElement("g",null,r.createElement("path",{d:"M6.14 14.97l2.828 2.827c-.362.362-.862.586-1.414.586-1.105 0-2-.895-2-2 0-.552.224-1.052.586-1.414zm8.867 5.324L14.3 21 3 9.7l.706-.707 1.102.157c.754.108 1.69-.122 2.077-.51l3.885-3.884c2.34-2.34 6.135-2.34 8.475 0s2.34 6.135 0 8.475l-3.885 3.886c-.388.388-.618 1.323-.51 2.077l.157 1.1z"})));break;case"gridicons-block":e=r.createElement("svg",{className:t,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},r.createElement("g",null,r.createElement("path",{d:"M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zM4 12c0-4.418 3.582-8 8-8 1.848 0 3.545.633 4.9 1.686L5.686 16.9C4.633 15.545 4 13.848 4 12zm8 8c-1.848 0-3.546-.633-4.9-1.686L18.314 7.1C19.367 8.455 20 10.152 20 12c0 4.418-3.582 8-8 8z"})));break;case"gridicons-bold":e=r.createElement("svg",{className:t,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},r.createElement("g",null,r.createElement("path",{d:"M7 5.01h4.547c2.126 0 3.67.302 4.632.906.96.605 1.44 1.567 1.44 2.887 0 .896-.21 1.63-.63 2.205-.42.574-.98.92-1.678 1.036v.103c.95.212 1.637.608 2.057 1.19.42.58.63 1.35.63 2.315 0 1.367-.494 2.434-1.482 3.2-.99.765-2.332 1.148-4.027 1.148H7V5.01zm3 5.936h2.027c.862 0 1.486-.133 1.872-.4.386-.267.578-.708.578-1.323 0-.574-.21-.986-.63-1.236-.42-.25-1.087-.374-1.996-.374H10v3.333zm0 2.523v3.905h2.253c.876 0 1.52-.167 1.94-.502.416-.335.625-.848.625-1.54 0-1.243-.89-1.864-2.668-1.864H10z"})));break;case"gridicons-book":e=r.createElement("svg",{className:t,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},r.createElement("g",null,r.createElement("path",{d:"M4 3h2v18H4zM18 3H7v18h11c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 6h-6V8h6v1zm0-2h-6V6h6v1z"})));break;case"gridicons-bookmark-outline":e=r.createElement("svg",{className:t,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},r.createElement("g",null,r.createElement("path",{d:"M17 5v12.554l-5-2.857-5 2.857V5h10m0-2H7c-1.105 0-2 .896-2 2v16l7-4 7 4V5c0-1.104-.896-2-2-2z"})));break;case"gridicons-bookmark":e=r.createElement("svg",{className:t,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},r.createElement("g",null,r.createElement("path",{d:"M17 3H7c-1.105 0-2 .896-2 2v16l7-4 7 4V5c0-1.104-.896-2-2-2z"})));break;case"gridicons-briefcase":e=r.createElement("svg",{className:t,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},r.createElement("g",null,r.createElement("path",{d:"M21 6h-4V3c0-.5-.5-1-1-1H8c-.5 0-1 .5-1 1v3H3c-.6 0-1 .4-1 1v5h20V7c0-.6-.4-1-1-1zm-6 0H9V4h6v2zM14 15h-4v-2H2v8c0 .6.4 1 1 1h18c.6 0 1-.4 1-1v-8h-8v2z"})));break;case"gridicons-calendar":e=r.createElement("svg",{className:t,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},r.createElement("g",null,r.createElement("path",{d:"M19 4h-1V2h-2v2H8V2H6v2H5c-1.105 0-2 .896-2 2v13c0 1.104.895 2 2 2h14c1.104 0 2-.896 2-2V6c0-1.104-.896-2-2-2zm0 15H5V8h14v11z"})));break;case"gridicons-camera":e=r.createElement("svg",{className:t,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},r.createElement("g",null,r.createElement("path",{d:"M17 12c0 1.7-1.3 3-3 3s-3-1.3-3-3 1.3-3 3-3 3 1.3 3 3zm5-5v11c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V7c0-1.1.9-2 2-2V4h4v1h2l1-2h6l1 2h2c1.1 0 2 .9 2 2zM7.5 9c0-.8-.7-1.5-1.5-1.5S4.5 8.2 4.5 9s.7 1.5 1.5 1.5S7.5 9.8 7.5 9zM19 12c0-2.8-2.2-5-5-5s-5 2.2-5 5 2.2 5 5 5 5-2.2 5-5z"})));break;case"gridicons-cart":e=r.createElement("svg",{className:t,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},r.createElement("g",null,r.createElement("path",{d:"M9 20c0 1.1-.9 2-2 2s-1.99-.9-1.99-2S5.9 18 7 18s2 .9 2 2zm8-2c-1.1 0-1.99.9-1.99 2s.89 2 1.99 2 2-.9 2-2-.9-2-2-2zm.396-5c.937 0 1.75-.65 1.952-1.566L21 5H7V4c0-1.105-.895-2-2-2H3v2h2v11c0 1.105.895 2 2 2h12c0-1.105-.895-2-2-2H7v-2h10.396z"})));break;case"gridicons-checkmark-circle":e=r.createElement("svg",{className:t,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},r.createElement("g",null,r.createElement("path",{d:"M11 17.768l-4.884-4.884 1.768-1.768L11 14.232l8.658-8.658C17.823 3.39 15.075 2 12 2 6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10c0-1.528-.353-2.97-.966-4.266L11 17.768z"})));break;case"gridicons-checkmark":e=r.createElement("svg",{className:t,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},r.createElement("g",null,r.createElement("path",{d:"M9 19.414l-6.707-6.707 1.414-1.414L9 16.586 20.293 5.293l1.414 1.414"})));break;case"gridicons-chevron-down":e=r.createElement("svg",{className:t,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},r.createElement("g",null,r.createElement("path",{d:"M20 9l-8 8-8-8 1.414-1.414L12 14.172l6.586-6.586"})));break;case"gridicons-chevron-left":e=r.createElement("svg",{className:t,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},r.createElement("g",null,r.createElement("path",{d:"M14 20l-8-8 8-8 1.414 1.414L8.828 12l6.586 6.586"})));break;case"gridicons-chevron-right":e=r.createElement("svg",{className:t,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},r.createElement("g",null,r.createElement("path",{d:"M10 20l8-8-8-8-1.414 1.414L15.172 12l-6.586 6.586"})));break;case"gridicons-chevron-up":e=r.createElement("svg",{className:t,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},r.createElement("g",null,r.createElement("path",{d:"M4 15l8-8 8 8-1.414 1.414L12 9.828l-6.586 6.586"})));break;case"gridicons-clear-formatting":e=r.createElement("svg",{className:t,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},r.createElement("g",null,r.createElement("path",{d:"M10.837 10.163l-4.6 4.6L10 4h4l.777 2.223-2.144 2.144-.627-2.092-1.17 3.888zm5.495.506L19.244 19H15.82l-1.05-3.5H11.5L5 22l-1.5-1.5 17-17L22 5l-5.668 5.67zm-2.31 2.31l-.032.03.032-.01v-.02z"})));break;case"gridicons-clipboard":e=r.createElement("svg",{className:t,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},r.createElement("g",null,r.createElement("path",{d:"M16 18H8v-2h8v2zm0-6H8v2h8v-2zm2-9h-2v2h2v15H6V5h2V3H6c-1.105 0-2 .895-2 2v15c0 1.105.895 2 2 2h12c1.105 0 2-.895 2-2V5c0-1.105-.895-2-2-2zm-4 2V4c0-1.105-.895-2-2-2s-2 .895-2 2v1c-1.105 0-2 .895-2 2v1h8V7c0-1.105-.895-2-2-2z"})));break;case"gridicons-cloud-download":e=r.createElement("svg",{className:t,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},r.createElement("g",null,r.createElement("path",{d:"M18 9c-.01 0-.017.002-.025.003C17.72 5.646 14.922 3 11.5 3 7.91 3 5 5.91 5 9.5c0 .524.07 1.03.186 1.52C5.123 11.015 5.064 11 5 11c-2.21 0-4 1.79-4 4 0 1.202.54 2.267 1.38 3h18.593C22.196 17.09 23 15.643 23 14c0-2.76-2.24-5-5-5zm-6 7l-4-5h3V8h2v3h3l-4 5z"})));break;case"gridicons-cloud-outline":e=r.createElement("svg",{className:t,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},r.createElement("g",null,r.createElement("path",{d:"M11.5 5c2.336 0 4.304 1.825 4.48 4.154l.142 1.86 1.867-.012h.092C19.698 11.043 21 12.37 21 14c0 .748-.28 1.452-.783 2H3.28c-.156-.256-.28-.59-.28-1 0-1.074.85-1.953 1.915-1.998.06.007.118.012.178.015l2.66.124-.622-2.587C7.044 10.186 7 9.843 7 9.5 7 7.02 9.02 5 11.5 5m0-2C7.91 3 5 5.91 5 9.5c0 .524.07 1.03.186 1.52C5.123 11.015 5.064 11 5 11c-2.21 0-4 1.79-4 4 0 1.202.54 2.267 1.38 3h18.593C22.196 17.09 23 15.643 23 14c0-2.76-2.24-5-5-5l-.025.002C17.72 5.646 14.922 3 11.5 3z"})));break;case"gridicons-cloud-upload":e=r.createElement("svg",{className:t,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},r.createElement("g",null,r.createElement("path",{d:"M18 9c-.01 0-.017.002-.025.003C17.72 5.646 14.922 3 11.5 3 7.91 3 5 5.91 5 9.5c0 .524.07 1.03.186 1.52C5.123 11.015 5.064 11 5 11c-2.21 0-4 1.79-4 4 0 1.202.54 2.267 1.38 3h18.593C22.196 17.09 23 15.643 23 14c0-2.76-2.24-5-5-5zm-5 4v3h-2v-3H8l4-5 4 5h-3z"
-})));break;case"gridicons-cloud":e=r.createElement("svg",{className:t,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},r.createElement("g",null,r.createElement("path",{d:"M18 9c-.01 0-.017.002-.025.003C17.72 5.646 14.922 3 11.5 3 7.91 3 5 5.91 5 9.5c0 .524.07 1.03.186 1.52C5.123 11.015 5.064 11 5 11c-2.21 0-4 1.79-4 4 0 1.202.54 2.267 1.38 3h18.593C22.196 17.09 23 15.643 23 14c0-2.76-2.24-5-5-5z"})));break;case"gridicons-code":e=r.createElement("svg",{className:t,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},r.createElement("g",null,r.createElement("path",{d:"M4.83 12l4.58 4.59L8 18l-6-6 6-6 1.41 1.41L4.83 12zm9.76 4.59L16 18l6-6-6-6-1.41 1.41L19.17 12l-4.58 4.59z"})));break;case"gridicons-cog":e=r.createElement("svg",{className:t,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},r.createElement("g",null,r.createElement("path",{d:"M20 12c0-.568-.06-1.122-.174-1.656l1.834-1.612-2-3.464-2.322.786c-.82-.736-1.787-1.308-2.86-1.657L14 2h-4l-.48 2.396c-1.07.35-2.04.92-2.858 1.657L4.34 5.268l-2 3.464 1.834 1.612C4.06 10.878 4 11.432 4 12s.06 1.122.174 1.656L2.34 15.268l2 3.464 2.322-.786c.82.736 1.787 1.308 2.86 1.657L10 22h4l.48-2.396c1.07-.35 2.038-.92 2.858-1.657l2.322.786 2-3.464-1.834-1.613c.113-.535.174-1.09.174-1.657zm-8 4c-2.21 0-4-1.79-4-4s1.79-4 4-4 4 1.79 4 4-1.79 4-4 4z"})));break;case"gridicons-comment":e=r.createElement("svg",{className:t,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},r.createElement("g",null,r.createElement("path",{d:"M3 6v9c0 1.105.895 2 2 2h9v5l5.325-3.804c1.05-.75 1.675-1.963 1.675-3.254V6c0-1.105-.895-2-2-2H5c-1.105 0-2 .895-2 2z"})));break;case"gridicons-computer":e=r.createElement("svg",{className:t,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},r.createElement("g",null,r.createElement("path",{d:"M20 2H4c-1.104 0-2 .896-2 2v12c0 1.104.896 2 2 2h6v2H7v2h10v-2h-3v-2h6c1.104 0 2-.896 2-2V4c0-1.104-.896-2-2-2zm0 14H4V4h16v12z"})));break;case"gridicons-create":e=r.createElement("svg",{className:t,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},r.createElement("g",null,r.createElement("path",{d:"M21 11v8c0 1.105-.895 2-2 2H5c-1.105 0-2-.895-2-2V5c0-1.105.895-2 2-2h8l-2 2H5v14h14v-6l2-2zM7 17h3l7.5-7.5-3-3L7 14v3zm9.94-12.94L15.5 5.5l3 3 1.44-1.44c.585-.585.585-1.535 0-2.12l-.88-.88c-.585-.585-1.535-.585-2.12 0z"})));break;case"gridicons-credit-card":e=r.createElement("svg",{className:t,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},r.createElement("g",null,r.createElement("path",{d:"M20 4H4c-1.105 0-2 .895-2 2v12c0 1.105.895 2 2 2h16c1.105 0 2-.895 2-2V6c0-1.105-.895-2-2-2zm0 2v2H4V6h16zM4 18v-6h16v6H4zm2-4h7v2H6v-2zm9 0h3v2h-3v-2z"})));break;case"gridicons-crop":e=r.createElement("svg",{className:t,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},r.createElement("g",null,r.createElement("path",{d:"M22 16h-4V8c0-1.105-.895-2-2-2H8V2H6v4H2v2h4v8c0 1.105.895 2 2 2h8v4h2v-4h4v-2zM8 16V8h8v8H8z"})));break;case"gridicons-cross-small":e=r.createElement("svg",{className:t,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},r.createElement("g",null,r.createElement("path",{d:"M17.705 7.705l-1.41-1.41L12 10.59 7.705 6.295l-1.41 1.41L10.59 12l-4.295 4.295 1.41 1.41L12 13.41l4.295 4.295 1.41-1.41L13.41 12l4.295-4.295z"})));break;case"gridicons-cross":e=r.createElement("svg",{className:t,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},r.createElement("g",null,r.createElement("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"})));break;case"gridicons-custom-post-type":e=r.createElement("svg",{className:t,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},r.createElement("g",null,r.createElement("path",{d:"M19 3H5c-1.105 0-2 .895-2 2v14c0 1.105.895 2 2 2h14c1.105 0 2-.895 2-2V5c0-1.105-.895-2-2-2zM6 6h5v5H6V6zm4.5 13C9.12 19 8 17.88 8 16.5S9.12 14 10.5 14s2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5zm3-6l3-5 3 5h-6z"})));break;case"gridicons-customize":e=r.createElement("svg",{className:t,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},r.createElement("g",null,r.createElement("path",{d:"M2 6c0-1.505.78-3.08 2-4 0 .845.69 2 2 2 1.657 0 3 1.343 3 3 0 .386-.08.752-.212 1.09.74.594 1.476 1.19 2.19 1.81L8.9 11.98c-.62-.716-1.214-1.454-1.807-2.192C6.753 9.92 6.387 10 6 10c-2.21 0-4-1.79-4-4zm12.152 6.848l1.34-1.34c.607.304 1.283.492 2.008.492 2.485 0 4.5-2.015 4.5-4.5 0-.725-.188-1.4-.493-2.007L18 9l-2-2 3.507-3.507C18.9 3.188 18.225 3 17.5 3 15.015 3 13 5.015 13 7.5c0 .725.188 1.4.493 2.007L3 20l2 2 6.848-6.848c1.885 1.928 3.874 3.753 5.977 5.45l1.425 1.148 1.5-1.5-1.15-1.425c-1.695-2.103-3.52-4.092-5.448-5.977z"})));break;case"gridicons-dropdown":e=r.createElement("svg",{className:t,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},r.createElement("g",null,r.createElement("path",{d:"M7 10l5 5 5-5"})));break;case"gridicons-ellipsis":e=r.createElement("svg",{className:t,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},r.createElement("g",null,r.createElement("path",{d:"M7 12c0 1.104-.896 2-2 2s-2-.896-2-2 .896-2 2-2 2 .896 2 2zm12-2c-1.104 0-2 .896-2 2s.896 2 2 2 2-.896 2-2-.896-2-2-2zm-7 0c-1.104 0-2 .896-2 2s.896 2 2 2 2-.896 2-2-.896-2-2-2z"})));break;case"gridicons-external":e=r.createElement("svg",{className:t,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},r.createElement("g",null,r.createElement("path",{d:"M19 13v6c0 1.105-.895 2-2 2H5c-1.105 0-2-.895-2-2V7c0-1.105.895-2 2-2h6v2H5v12h12v-6h2zM13 3v2h4.586l-7.793 7.793 1.414 1.414L19 6.414V11h2V3h-8z"})));break;case"gridicons-flag":e=r.createElement("svg",{className:t,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},r.createElement("g",null,r.createElement("path",{d:"M15 6c0-1.105-.895-2-2-2H5v17h2v-7h5c0 1.105.895 2 2 2h6V6h-5z"})));break;case"gridicons-flip-horizontal":e=r.createElement("svg",{className:t,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},r.createElement("g",null,r.createElement("path",{d:"M20 18v-5h3v-2h-3V6c0-1.105-.895-2-2-2H6c-1.105 0-2 .895-2 2v5H1v2h3v5c0 1.105.895 2 2 2h12c1.105 0 2-.895 2-2zM6 6h12v5H6V6z"})));break;case"gridicons-flip-vertical":e=r.createElement("svg",{className:t,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},r.createElement("g",null,r.createElement("path",{d:"M18 4h-5V1h-2v3H6c-1.105 0-2 .895-2 2v12c0 1.105.895 2 2 2h5v3h2v-3h5c1.105 0 2-.895 2-2V6c0-1.105-.895-2-2-2zM6 18V6h5v12H6z"})));break;case"gridicons-folder-multiple":e=r.createElement("svg",{className:t,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},r.createElement("g",null,r.createElement("path",{d:"M4 8c-1.105 0-2 .895-2 2v10c0 1.1.9 2 2 2h14c1.105 0 2-.895 2-2H4V8zm16 10H8c-1.105 0-2-.895-2-2V6c0-1.105.895-2 2-2h3c1.105 0 2 .895 2 2h7c1.105 0 2 .895 2 2v8c0 1.105-.895 2-2 2z"})));break;case"gridicons-folder":e=r.createElement("svg",{className:t,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},r.createElement("g",null,r.createElement("path",{d:"M18 19H6c-1.1 0-2-.9-2-2V7c0-1.1.9-2 2-2h3c1.1 0 2 .9 2 2h7c1.1 0 2 .9 2 2v8c0 1.1-.9 2-2 2z"})));break;case"gridicons-globe":e=r.createElement("svg",{className:t,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},r.createElement("g",null,r.createElement("path",{d:"M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zm0 18l2-2 1-1v-2h-2v-1l-1-1H9v3l2 2v1.93c-3.94-.494-7-3.858-7-7.93l1 1h2v-2h2l3-3V6h-2L9 5v-.41C9.927 4.21 10.94 4 12 4s2.073.212 3 .59V6l-1 1v2l1 1 3.13-3.13c.752.897 1.304 1.964 1.606 3.13H18l-2 2v2l1 1h2l.286.286C18.03 18.06 15.24 20 12 20z"})));break;case"gridicons-grid":e=r.createElement("svg",{className:t,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},r.createElement("g",null,r.createElement("path",{d:"M8 8H4V4h4v4zm6-4h-4v4h4V4zm6 0h-4v4h4V4zM8 10H4v4h4v-4zm6 0h-4v4h4v-4zm6 0h-4v4h4v-4zM8 16H4v4h4v-4zm6 0h-4v4h4v-4zm6 0h-4v4h4v-4z"})));break;case"gridicons-heading":e=r.createElement("svg",{className:t,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},r.createElement("g",null,r.createElement("path",{d:"M18 20h-3v-6H9v6H6V5.01h3V11h6V5.01h3V20z"})));break;case"gridicons-heart-outline":e=r.createElement("svg",{className:t,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},r.createElement("g",null,r.createElement("path",{d:"M16.5 4.5c2.206 0 4 1.794 4 4 0 4.67-5.543 8.94-8.5 11.023C9.043 17.44 3.5 13.17 3.5 8.5c0-2.206 1.794-4 4-4 1.298 0 2.522.638 3.273 1.706L12 7.953l1.227-1.746c.75-1.07 1.975-1.707 3.273-1.707m0-1.5c-1.862 0-3.505.928-4.5 2.344C11.005 3.928 9.362 3 7.5 3 4.462 3 2 5.462 2 8.5c0 5.72 6.5 10.438 10 12.85 3.5-2.412 10-7.13 10-12.85C22 5.462 19.538 3 16.5 3z"})));break;case"gridicons-heart":e=r.createElement("svg",{className:t,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},r.createElement("g",null,r.createElement("path",{d:"M16.5 3c-1.862 0-3.505.928-4.5 2.344C11.005 3.928 9.362 3 7.5 3 4.462 3 2 5.462 2 8.5c0 5.72 6.5 10.438 10 12.85 3.5-2.412 10-7.13 10-12.85C22 5.462 19.538 3 16.5 3z"})));break;case"gridicons-help-outline":e=r.createElement("svg",{className:t,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},r.createElement("g",null,r.createElement("path",{d:"M12 4c4.41 0 8 3.59 8 8s-3.59 8-8 8-8-3.59-8-8 3.59-8 8-8m0-2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zm1 13h-2v2h2v-2zm-1.962-2v-.528c0-.4.082-.74.246-1.017.163-.276.454-.546.87-.808.333-.21.572-.397.717-.565.146-.168.22-.36.22-.577 0-.172-.078-.308-.234-.41-.156-.1-.358-.15-.608-.15-.62 0-1.34.22-2.168.658l-.854-1.67c1.02-.58 2.084-.872 3.194-.872.913 0 1.63.202 2.15.603.52.4.78.948.78 1.64 0 .495-.116.924-.347 1.287-.23.362-.6.705-1.11 1.03-.43.278-.7.48-.807.61-.108.13-.163.282-.163.458V13h-1.885z"})));break;case"gridicons-help":e=r.createElement("svg",{className:t,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},r.createElement("g",null,r.createElement("path",{d:"M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zm1 15h-2v-2h2v2zm2.003-6.41c-.23.36-.6.704-1.108 1.028-.43.28-.7.482-.808.61-.108.13-.163.283-.163.46V13H11.04v-.528c0-.4.08-.74.245-1.017.163-.276.454-.546.872-.808.332-.21.57-.397.716-.565.145-.168.217-.36.217-.577 0-.172-.077-.308-.233-.41-.156-.1-.358-.15-.608-.15-.62 0-1.342.22-2.17.658l-.854-1.67c1.02-.58 2.084-.872 3.194-.872.913 0 1.63.202 2.15.603.52.4.78.948.78 1.64 0 .495-.116.924-.347 1.286z"})));break;case"gridicons-history":e=r.createElement("svg",{className:t,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},r.createElement("g",null,r.createElement("path",{d:"M2.12 13.526c.742 4.78 4.902 8.47 9.88 8.47 5.5 0 10-4.5 10-9.998S17.5 2 12 2C8.704 2 5.802 3.6 4 6V2H2.003L2 9h7V7H5.8c1.4-1.8 3.702-3 6.202-3C16.4 4 20 7.6 20 11.998s-3.6 8-8 8c-3.877 0-7.13-2.795-7.848-6.472H2.12z"}),r.createElement("path",{d:"M11.002 7v5.3l3.2 4.298 1.6-1.197-2.8-3.7V7"})));break;case"gridicons-house":e=r.createElement("svg",{className:t,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},r.createElement("g",null,r.createElement("path",{d:"M22 9L12 1 2 9v2h2v10h5v-4c0-1.657 1.343-3 3-3s3 1.343 3 3v4h5V11h2V9z"})));break;case"gridicons-image-multiple":e=r.createElement("svg",{className:t,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},r.createElement("g",null,r.createElement("path",{d:"M15 7.5c0-.828.672-1.5 1.5-1.5s1.5.672 1.5 1.5S17.328 9 16.5 9 15 8.328 15 7.5zM4 20h14c0 1.105-.895 2-2 2H4c-1.1 0-2-.9-2-2V8c0-1.105.895-2 2-2v14zM22 4v12c0 1.105-.895 2-2 2H8c-1.105 0-2-.895-2-2V4c0-1.105.895-2 2-2h12c1.105 0 2 .895 2 2zM8 4v6.333L11 7l4.855 5.395.656-.73c.796-.886 2.183-.886 2.977 0l.513.57V4H8z"})));break;case"gridicons-image":e=r.createElement("svg",{className:t,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},r.createElement("g",null,r.createElement("path",{d:"M13 9.5c0-.828.672-1.5 1.5-1.5s1.5.672 1.5 1.5-.672 1.5-1.5 1.5-1.5-.672-1.5-1.5zM22 6v12c0 1.105-.895 2-2 2H4c-1.105 0-2-.895-2-2V6c0-1.105.895-2 2-2h16c1.105 0 2 .895 2 2zm-2 0H4v7.444L8 9l5.895 6.55 1.587-1.85c.798-.932 2.24-.932 3.037 0L20 15.426V6z"})));break;case"gridicons-indent-left":e=r.createElement("svg",{className:t,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},r.createElement("g",null,r.createElement("path",{d:"M18 20h2V4h-2v16zM2 11h10.172l-2.086-2.086L11.5 7.5 16 12l-4.5 4.5-1.414-1.414L12.172 13H2v-2z"})));break;case"gridicons-indent-right":e=r.createElement("svg",{className:t,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},r.createElement("g",null,r.createElement("path",{d:"M6 4H4v16h2V4zm16 9H11.828l2.086 2.086L12.5 16.5 8 12l4.5-4.5 1.414 1.414L11.828 11H22v2z"})));break;case"gridicons-info-outline":e=r.createElement("svg",{className:t,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},r.createElement("g",null,r.createElement("path",{d:"M13 9h-2V7h2v2zm0 2h-2v6h2v-6zm-1-7c-4.41 0-8 3.59-8 8s3.59 8 8 8 8-3.59 8-8-3.59-8-8-8m0-2c5.523 0 10 4.477 10 10s-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2z"})));break;case"gridicons-info":e=r.createElement("svg",{className:t,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},r.createElement("g",null,r.createElement("path",{d:"M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z"})));break;case"gridicons-ink":e=r.createElement("svg",{className:t,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},r.createElement("g",null,r.createElement("path",{d:"M5 15c0 3.866 3.134 7 7 7s7-3.134 7-7c0-1.387-.41-2.677-1.105-3.765h.007L12 2l-5.903 9.235h.007C5.41 12.323 5 13.613 5 15z"})));break;case"gridicons-institution":e=r.createElement("svg",{className:t,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},r.createElement("g",null,r.createElement("path",{d:"M2 19h20v3H2zM12 2L2 6v2h20V6M17 10h3v7h-3zM10.5 10h3v7h-3zM4 10h3v7H4z"})));break;case"gridicons-italic":e=r.createElement("svg",{className:t,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},r.createElement("g",null,r.createElement("path",{d:"M10.536 5l-.427 2h1.5L9.262 18h-1.5l-.427 2h6.128l.426-2h-1.5l2.347-11h1.5l.427-2"})));break;case"gridicons-layout-blocks":e=r.createElement("svg",{className:t,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},r.createElement("g",null,r.createElement("path",{d:"M21 7h-2V3c0-1.105-.895-2-2-2H7c-1.105 0-2 .895-2 2v2H3c-1.105 0-2 .895-2 2v4c0 1.105.895 2 2 2h2v8c0 1.105.895 2 2 2h10c1.105 0 2-.895 2-2v-2h2c1.105 0 2-.895 2-2V9c0-1.105-.895-2-2-2zm-4 14H7v-8h2c1.105 0 2-.895 2-2V7c0-1.105-.895-2-2-2H7V3h10v4h-2c-1.105 0-2 .895-2 2v8c0 1.105.895 2 2 2h2v2zm4-4h-6V9h6v8z"})));break;case"gridicons-layout":e=r.createElement("svg",{className:t,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},r.createElement("g",null,r.createElement("path",{d:"M8 20H5c-1.105 0-2-.895-2-2V6c0-1.105.895-2 2-2h3c1.105 0 2 .895 2 2v12c0 1.105-.895 2-2 2zm8-10h4c1.105 0 2-.895 2-2V5c0-1.105-.895-2-2-2h-4c-1.105 0-2 .895-2 2v3c0 1.105.895 2 2 2zm5 10v-6c0-1.105-.895-2-2-2h-5c-1.105 0-2 .895-2 2v6c0 1.105.895 2 2 2h5c1.105 0 2-.895 2-2z"})));break;case"gridicons-link-break":e=r.createElement("svg",{className:t,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},r.createElement("g",null,r.createElement("path",{d:"M10 11l-2 2H7v-2h3zm9.64-3.64L22 5l-1.5-1.5-17 17L5 22l9-9h3v-2h-1l2-2c1.103 0 2 .897 2 2v2c0 1.103-.897 2-2 2h-4.977c.913 1.208 2.347 2 3.977 2h1c2.21 0 4-1.79 4-4v-2c0-1.623-.97-3.013-2.36-3.64zM4.36 16.64L6 15c-1.103 0-2-.897-2-2v-2c0-1.103.897-2 2-2h4.977C10.065 7.792 8.63 7 7 7H6c-2.21 0-4 1.79-4 4v2c0 1.623.97 3.013 2.36 3.64z"})));break;case"gridicons-link":e=r.createElement("svg",{className:t,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},r.createElement("g",null,r.createElement("path",{d:"M17 13H7v-2h10v2zm1-6h-1c-1.63 0-3.065.792-3.977 2H18c1.103 0 2 .897 2 2v2c0 1.103-.897 2-2 2h-4.977c.913 1.208 2.347 2 3.977 2h1c2.21 0 4-1.79 4-4v-2c0-2.21-1.79-4-4-4zM2 11v2c0 2.21 1.79 4 4 4h1c1.63 0 3.065-.792 3.977-2H6c-1.103 0-2-.897-2-2v-2c0-1.103.897-2 2-2h4.977C10.065 7.792 8.63 7 7 7H6c-2.21 0-4 1.79-4 4z"})));break;case"gridicons-list-checkmark":e=r.createElement("svg",{className:t,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},r.createElement("g",null,r.createElement("path",{d:"M9.5 15.5L5 20l-2.5-2.5 1.06-1.06L5 17.88l3.44-3.44L9.5 15.5zM10 5v2h11V5H10zm0 14h11v-2H10v2zm0-6h11v-2H10v2zM8.44 8.44L5 11.88l-1.44-1.44L2.5 11.5 5 14l4.5-4.5-1.06-1.06zm0-6L5 5.88 3.56 4.44 2.5 5.5 5 8l4.5-4.5-1.06-1.06z"})));break;case"gridicons-list-ordered":e=r.createElement("svg",{className:t,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},r.createElement("g",null,r.createElement("path",{d:"M8 19h13v-2H8v2zm0-6h13v-2H8v2zm0-8v2h13V5H8zm-4.425.252c.107-.096.197-.188.27-.275-.013.228-.02.48-.02.756V8h1.176V3.717H3.96L2.487 4.915l.6.738.487-.4zm.334 7.764c.474-.426.784-.715.93-.867.145-.153.26-.298.35-.436.087-.138.152-.278.194-.42.042-.143.063-.298.063-.466 0-.225-.06-.427-.18-.608s-.29-.32-.507-.417c-.218-.1-.465-.148-.742-.148-.22 0-.42.022-.596.067s-.34.11-.49.195c-.15.085-.337.226-.558.423l.636.744c.174-.15.33-.264.467-.34.138-.078.274-.117.41-.117.13 0 .232.032.304.097.073.064.11.152.11.264 0 .09-.02.176-.055.258-.036.082-.1.18-.192.294-.092.114-.287.328-.586.64L2.42 13.238V14h3.11v-.955H3.91v-.03zm.53 4.746v-.018c.306-.086.54-.225.702-.414.162-.19.243-.42.243-.685 0-.31-.126-.55-.378-.727-.252-.176-.6-.264-1.043-.264-.307 0-.58.033-.816.1s-.47.178-.696.334l.48.773c.293-.183.576-.274.85-.274.147 0 .263.027.35.082s.13.14.13.252c0 .3-.294.45-.882.45h-.27v.87h.264c.217 0 .393.017.527.05.136.03.233.08.294.143.06.064.09.154.09.27 0 .153-.057.265-.173.337-.115.07-.3.106-.554.106-.164 0-.343-.022-.538-.07-.194-.044-.385-.115-.573-.21v.96c.228.088.44.148.637.182.196.033.41.05.64.05.56 0 .998-.114 1.314-.343.315-.228.473-.542.473-.94.002-.585-.356-.923-1.07-1.013z"})));break;case"gridicons-list-unordered":e=r.createElement("svg",{className:t,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},r.createElement("g",null,r.createElement("path",{d:"M9 19h12v-2H9v2zm0-6h12v-2H9v2zm0-8v2h12V5H9zm-4-.5c-.828 0-1.5.672-1.5 1.5S4.172 7.5 5 7.5 6.5 6.828 6.5 6 5.828 4.5 5 4.5zm0 6c-.828 0-1.5.672-1.5 1.5s.672 1.5 1.5 1.5 1.5-.672 1.5-1.5-.672-1.5-1.5-1.5zm0 6c-.828 0-1.5.672-1.5 1.5s.672 1.5 1.5 1.5 1.5-.672 1.5-1.5-.672-1.5-1.5-1.5z"})));break;case"gridicons-location":e=r.createElement("svg",{className:t,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},r.createElement("g",null,r.createElement("path",{d:"M19 9c0-3.866-3.134-7-7-7S5 5.134 5 9c0 1.387.41 2.677 1.105 3.765h-.008C8.457 16.46 12 22 12 22l5.903-9.235h-.007C18.59 11.677 19 10.387 19 9zm-7 3c-1.657 0-3-1.343-3-3s1.343-3 3-3 3 1.343 3 3-1.343 3-3 3z"})));break;case"gridicons-lock":e=r.createElement("svg",{className:t,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},r.createElement("g",null,r.createElement("path",{d:"M18 8h-1V7c0-2.757-2.243-5-5-5S7 4.243 7 7v1H6c-1.105 0-2 .895-2 2v10c0 1.105.895 2 2 2h12c1.105 0 2-.895 2-2V10c0-1.105-.895-2-2-2zM9 7c0-1.654 1.346-3 3-3s3 1.346 3 3v1H9V7zm4 8.723V18h-2v-2.277c-.595-.346-1-.984-1-1.723 0-1.105.895-2 2-2s2 .895 2 2c0 .738-.405 1.376-1 1.723z"})));break;case"gridicons-mail":e=r.createElement("svg",{className:t,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},r.createElement("g",null,r.createElement("path",{d:"M20 4H4c-1.105 0-2 .895-2 2v12c0 1.105.895 2 2 2h16c1.105 0 2-.895 2-2V6c0-1.105-.895-2-2-2zm0 4.236l-8 4.882-8-4.882V6h16v2.236z"})));break;case"gridicons-mention":e=r.createElement("svg",{className:t,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},r.createElement("g",null,r.createElement("path",{d:"M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10v-2c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8v.5c0 .827-.673 1.5-1.5 1.5s-1.5-.673-1.5-1.5V12c0-2.76-2.24-5-5-5s-5 2.24-5 5 2.24 5 5 5c1.65 0 3.102-.81 4.013-2.043C16.648 15.6 17.527 16 18.5 16c1.93 0 3.5-1.57 3.5-3.5V12c0-5.523-4.477-10-10-10zm0 13c-1.654 0-3-1.346-3-3s1.346-3 3-3 3 1.346 3 3-1.346 3-3 3z"})));break;case"gridicons-menu":e=r.createElement("svg",{className:t,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},r.createElement("g",null,r.createElement("path",{d:"M21 6v2H3V6h18zM3 18h18v-2H3v2zm0-5h18v-2H3v2z"})));break;case"gridicons-menus":e=r.createElement("svg",{className:t,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},r.createElement("g",null,r.createElement("path",{d:"M9 19h10v-2H9v2zm0-6h6v-2H9v2zm0-8v2h12V5H9zm-4-.5c-.828 0-1.5.672-1.5 1.5S4.172 7.5 5 7.5 6.5 6.828 6.5 6 5.828 4.5 5 4.5zm0 6c-.828 0-1.5.672-1.5 1.5s.672 1.5 1.5 1.5 1.5-.672 1.5-1.5-.672-1.5-1.5-1.5zm0 6c-.828 0-1.5.672-1.5 1.5s.672 1.5 1.5 1.5 1.5-.672 1.5-1.5-.672-1.5-1.5-1.5z"})));break;case"gridicons-microphone":e=r.createElement("svg",{className:t,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},r.createElement("g",null,r.createElement("path",{d:"M12 13c1.104 0 2-.896 2-2V6c0-1.104-.896-2-2-2-1.105 0-2 .896-2 2v5c0 1.104.895 2 2 2zm4-2c0 2.21-1.79 4-4 4s-4-1.79-4-4H6c0 2.972 2.164 5.433 5 5.91V20h2v-3.09c2.836-.478 5-2.94 5-5.91h-2z"})));break;case"gridicons-minus-small":e=r.createElement("svg",{className:t,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},r.createElement("g",null,r.createElement("path",{d:"M6 11h12v2H6z"})));break;case"gridicons-minus":e=r.createElement("svg",{className:t,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},r.createElement("g",null,r.createElement("path",{d:"M3 11h18v2H3z"})));break;case"gridicons-my-sites-horizon":e=r.createElement("svg",{className:t,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},r.createElement("g",null,r.createElement("path",{d:"M10.986 13.928l.762-2.284-1.324-3.63c-.458-.026-.892-.08-.892-.08-.458-.027-.405-.727.054-.7 0 0 1.403.107 2.24.107.888 0 2.265-.107 2.265-.107.46-.027.513.646.055.7 0 0-.46.055-.973.082l2.006 5.966c-.875-.034-1.74-.053-2.6-.06l-.428-1.177-.403 1.17c-.252.002-.508.01-.76.015zm-7.156.393c-.21-.737-.33-1.514-.33-2.32 0-1.232.264-2.402.736-3.46l2.036 5.58c.85-.06 1.69-.104 2.526-.138L6.792 8.015c.512-.027.973-.08.973-.08.458-.055.404-.728-.055-.702 0 0-1.376.108-2.265.108-.16 0-.347-.003-.547-.01C6.418 5.025 9.03 3.5 12 3.5c2.213 0 4.228.846 5.74 2.232-.036-.002-.072-.007-.11-.007-.835 0-1.427.727-1.427 1.51 0 .7.404 1.292.835 1.993.323.566.7 1.293.7 2.344 0 .674-.244 1.463-.572 2.51.3.02.604.043.907.066l.798-2.307c.486-1.212.647-2.18.647-3.043 0-.313-.02-.603-.057-.874.662 1.21 1.04 2.6 1.04 4.077 0 .807-.128 1.58-.34 2.32.5.05 1.006.112 1.51.17.205-.798.33-1.628.33-2.49 0-5.523-4.477-10-10-10S2 6.477 2 12c0 .862.125 1.692.33 2.49.5-.057 1.003-.12 1.5-.17zm14.638 3.168C16.676 19.672 14.118 20.5 12 20.5c-1.876 0-4.55-.697-6.463-3.012-.585.048-1.174.1-1.77.16C5.572 20.272 8.578 22 12 22c3.422 0 6.43-1.73 8.232-4.35-.593-.063-1.18-.114-1.764-.162zM12 15.01c-3.715 0-7.368.266-10.958.733.18.41.35.825.506 1.247 3.427-.43 6.91-.68 10.452-.68s7.025.25 10.452.68c.156-.422.327-.836.506-1.246-3.59-.467-7.243-.734-10.958-.734z"})));break;case"gridicons-my-sites":e=r.createElement("svg",{className:t,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},r.createElement("g",null,r.createElement("path",{d:"M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zM3.5 12c0-1.232.264-2.402.736-3.46L8.29 19.65C5.456 18.272 3.5 15.365 3.5 12zm8.5 8.5c-.834 0-1.64-.12-2.4-.345l2.55-7.41 2.613 7.157c.017.042.038.08.06.117-.884.31-1.833.48-2.823.48zm1.172-12.485c.512-.027.973-.08.973-.08.458-.055.404-.728-.054-.702 0 0-1.376.108-2.265.108-.835 0-2.24-.107-2.24-.107-.458-.026-.51.674-.053.7 0 0 .434.055.892.082l1.324 3.63-1.86 5.578-3.096-9.208c.512-.027.973-.08.973-.08.458-.055.403-.728-.055-.702 0 0-1.376.108-2.265.108-.16 0-.347-.003-.547-.01C6.418 5.025 9.03 3.5 12 3.5c2.213 0 4.228.846 5.74 2.232-.037-.002-.072-.007-.11-.007-.835 0-1.427.727-1.427 1.51 0 .7.404 1.292.835 1.993.323.566.7 1.293.7 2.344 0 .727-.28 1.572-.646 2.748l-.848 2.833-3.072-9.138zm3.1 11.332l2.597-7.506c.484-1.212.645-2.18.645-3.044 0-.313-.02-.603-.057-.874.664 1.21 1.042 2.6 1.042 4.078 0 3.136-1.7 5.874-4.227 7.347z"})));break;case"gridicons-not-visible":e=r.createElement("svg",{className:t,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},r.createElement("g",null,r.createElement("path",{d:"M1 12s4.188-6 11-6c.947 0 1.84.12 2.678.322L8.36 12.64C8.133 12.14 8 11.586 8 11c0-.937.335-1.787.875-2.47C6.483 9.344 4.66 10.917 3.62 12c.68.707 1.696 1.62 2.98 2.398L5.15 15.85C2.498 14.13 1 12 1 12zm22 0s-4.188 6-11 6c-.946 0-1.836-.124-2.676-.323L5 22l-1.5-1.5 17-17L22 5l-3.147 3.147C21.5 9.87 23 12 23 12zm-2.615.006c-.678-.708-1.697-1.624-2.987-2.403L16 11c0 2.21-1.79 4-4 4l-.947.947c.31.03.624.053.947.053 3.978 0 6.943-2.478 8.385-3.994z"})));break;case"gridicons-notice-outline":e=r.createElement("svg",{className:t,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},r.createElement("g",null,r.createElement("path",{d:"M12 4c4.41 0 8 3.59 8 8s-3.59 8-8 8-8-3.59-8-8 3.59-8 8-8m0-2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zm1 13h-2v2h2v-2zm-2-2h2l.5-6h-3l.5 6z"})));break;case"gridicons-notice":e=r.createElement("svg",{className:t,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},r.createElement("g",null,r.createElement("path",{d:"M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zm1 15h-2v-2h2v2zm0-4h-2l-.5-6h3l-.5 6z"})));break;case"gridicons-pages":e=r.createElement("svg",{className:t,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},r.createElement("g",null,r.createElement("path",{d:"M16 8H8V6h8v2zm0 2H8v2h8v-2zm4-6v12l-6 6H6c-1.105 0-2-.895-2-2V4c0-1.105.895-2 2-2h12c1.105 0 2 .895 2 2zm-2 10V4H6v16h6v-4c0-1.105.895-2 2-2h4z"})));break;case"gridicons-pencil":e=r.createElement("svg",{className:t,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},r.createElement("g",null,r.createElement("path",{d:"M13 6l5 5-9.507 9.507c-.686-.686-.69-1.794-.012-2.485l-.002-.003c-.69.676-1.8.673-2.485-.013-.677-.677-.686-1.762-.036-2.455l-.008-.008c-.694.65-1.78.64-2.456-.036L13 6zm7.586-.414l-2.172-2.172c-.78-.78-2.047-.78-2.828 0L14 5l5 5 1.586-1.586c.78-.78.78-2.047 0-2.828zM3 18v3h3c0-1.657-1.343-3-3-3z"})));break;case"gridicons-phone":e=r.createElement("svg",{className:t,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},r.createElement("g",null,r.createElement("path",{d:"M16 2H8c-1.104 0-2 .896-2 2v16c0 1.104.896 2 2 2h8c1.104 0 2-.896 2-2V4c0-1.104-.896-2-2-2zm-3 19h-2v-1h2v1zm3-2H8V5h8v14z"})));break;case"gridicons-plugins":e=r.createElement("svg",{className:t,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},r.createElement("g",null,r.createElement("path",{d:"M16 8V3c0-.552-.448-1-1-1s-1 .448-1 1v5h-4V3c0-.552-.448-1-1-1s-1 .448-1 1v5H5v4c0 2.79 1.637 5.193 4 6.317V22h6v-3.683c2.363-1.124 4-3.527 4-6.317V8h-3z"})));break;case"gridicons-plus-small":e=r.createElement("svg",{className:t,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},r.createElement("g",null,r.createElement("path",{d:"M18 11h-5V6h-2v5H6v2h5v5h2v-5h5"})));break;case"gridicons-plus":e=r.createElement("svg",{className:t,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},r.createElement("g",null,r.createElement("path",{d:"M20 13h-7v7h-2v-7H4v-2h7V4h2v7h7v2z"})));break;case"gridicons-popout":e=r.createElement("svg",{className:t,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},r.createElement("g",null,r.createElement("path",{
-d:"M6 7V5c0-1.105.895-2 2-2h11c1.105 0 2 .895 2 2v14c0 1.105-.895 2-2 2H8c-1.105 0-2-.895-2-2v-2h2v2h11V5H8v2H6zm5.5-.5l-1.414 1.414L13.172 11H3v2h10.172l-3.086 3.086L11.5 17.5 17 12l-5.5-5.5z"})));break;case"gridicons-posts":e=r.createElement("svg",{className:t,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},r.createElement("g",null,r.createElement("path",{d:"M16 19H3v-2h13v2zm5-10H3v2h18V9zM3 5v2h11V5H3zm14 0v2h4V5h-4zm-6 8v2h10v-2H11zm-8 0v2h5v-2H3z"})));break;case"gridicons-print":e=r.createElement("svg",{className:t,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},r.createElement("g",null,r.createElement("path",{d:"M9 16h6v2H9v-2zm13 1h-3v3c0 1.105-.895 2-2 2H7c-1.105 0-2-.895-2-2v-3H2V9c0-1.105.895-2 2-2h1V5c0-1.105.895-2 2-2h10c1.105 0 2 .895 2 2v2h1c1.105 0 2 .895 2 2v8zM7 7h10V5H7v2zm10 7H7v6h10v-6zm3-3.5c0-.828-.672-1.5-1.5-1.5s-1.5.672-1.5 1.5.672 1.5 1.5 1.5 1.5-.672 1.5-1.5z"})));break;case"gridicons-quote":e=r.createElement("svg",{className:t,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},r.createElement("g",null,r.createElement("path",{d:"M11.192 15.757c0-.88-.23-1.618-.69-2.217-.326-.412-.768-.683-1.327-.812-.55-.128-1.07-.137-1.54-.028-.16-.95.1-1.956.76-3.022.66-1.065 1.515-1.867 2.558-2.403L9.373 5c-.8.396-1.56.898-2.26 1.505-.71.607-1.34 1.305-1.9 2.094s-.98 1.68-1.25 2.69-.346 2.04-.217 3.1c.168 1.4.62 2.52 1.356 3.35.735.84 1.652 1.26 2.748 1.26.965 0 1.766-.29 2.4-.878.628-.576.94-1.365.94-2.368l.002.003zm9.124 0c0-.88-.23-1.618-.69-2.217-.326-.42-.77-.692-1.327-.817-.56-.124-1.074-.13-1.54-.022-.16-.94.09-1.95.75-3.02.66-1.06 1.514-1.86 2.557-2.4L18.49 5c-.8.396-1.555.898-2.26 1.505-.708.607-1.34 1.305-1.894 2.094-.556.79-.97 1.68-1.24 2.69-.273 1-.345 2.04-.217 3.1.165 1.4.615 2.52 1.35 3.35.732.833 1.646 1.25 2.742 1.25.967 0 1.768-.29 2.402-.876.627-.576.942-1.365.942-2.368v.01z"})));break;case"gridicons-reader":e=r.createElement("svg",{className:t,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},r.createElement("g",null,r.createElement("path",{d:"M3 4v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V4H3zm7 11H5v-1h5v1zm2-2H5v-1h7v1zm0-2H5v-1h7v1zm7 4h-5v-5h5v5zm0-7H5V6h14v2z"})));break;case"gridicons-reblog":e=r.createElement("svg",{className:t,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},r.createElement("g",null,r.createElement("path",{d:"M22.086 9.914L20 7.828V18c0 1.105-.895 2-2 2h-7v-2h7V7.828l-2.086 2.086L14.5 8.5 19 4l4.5 4.5-1.414 1.414zM6 16.172V6h7V4H6c-1.105 0-2 .895-2 2v10.172l-2.086-2.086L.5 15.5 5 20l4.5-4.5-1.414-1.414L6 16.172z"})));break;case"gridicons-redo":e=r.createElement("svg",{className:t,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},r.createElement("g",null,r.createElement("path",{d:"M18 6v3.586L14.343 5.93C13.17 4.756 11.636 4.17 10.1 4.17s-3.07.585-4.242 1.757c-2.343 2.342-2.343 6.14 0 8.484l5.364 5.364 1.414-1.414L7.272 13c-1.56-1.56-1.56-4.097 0-5.657.755-.755 1.76-1.172 2.828-1.172 1.068 0 2.073.417 2.828 1.173L16.586 11H13v2h7V6h-2z"})));break;case"gridicons-refresh":e=r.createElement("svg",{className:t,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},r.createElement("g",null,r.createElement("path",{d:"M17.91 14c-.478 2.833-2.943 5-5.91 5-3.308 0-6-2.692-6-6s2.692-6 6-6h2.172l-2.086 2.086L13.5 10.5 18 6l-4.5-4.5-1.414 1.414L14.172 5H12c-4.418 0-8 3.582-8 8s3.582 8 8 8c4.08 0 7.438-3.055 7.93-7h-2.02z"})));break;case"gridicons-reply":e=r.createElement("svg",{className:t,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},r.createElement("g",null,r.createElement("path",{d:"M14 8H6.828l2.586-2.586L8 4 3 9l5 5 1.414-1.414L6.828 10H14c2.206 0 4 1.794 4 4s-1.794 4-4 4h-2v2h2c3.314 0 6-2.686 6-6s-2.686-6-6-6z"})));break;case"gridicons-rotate":e=r.createElement("svg",{className:t,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},r.createElement("g",null,r.createElement("path",{d:"M18 14v6c0 1.105-.895 2-2 2H6c-1.105 0-2-.895-2-2v-6c0-1.105.895-2 2-2h10c1.105 0 2 .895 2 2zM13.914 2.914L11.828 5H14c4.418 0 8 3.582 8 8h-2c0-3.308-2.692-6-6-6h-2.172l2.086 2.086L12.5 10.5 8 6l1.414-1.414L12.5 1.5l1.414 1.414z"})));break;case"gridicons-scheduled":e=r.createElement("svg",{className:t,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},r.createElement("g",null,r.createElement("path",{d:"M10.498 18l-3.705-3.704 1.415-1.415 2.294 2.295 5.293-5.293 1.415 1.415L10.498 18zM21 6v13c0 1.104-.896 2-2 2H5c-1.104 0-2-.896-2-2V6c0-1.104.896-2 2-2h1V2h2v2h8V2h2v2h1c1.104 0 2 .896 2 2zm-2 2H5v11h14V8z"})));break;case"gridicons-search":e=r.createElement("svg",{className:t,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},r.createElement("g",null,r.createElement("path",{d:"M21 19l-5.154-5.154C16.574 12.742 17 11.42 17 10c0-3.866-3.134-7-7-7s-7 3.134-7 7 3.134 7 7 7c1.42 0 2.742-.426 3.846-1.154L19 21l2-2zM5 10c0-2.757 2.243-5 5-5s5 2.243 5 5-2.243 5-5 5-5-2.243-5-5z"})));break;case"gridicons-share-ios":e=r.createElement("svg",{className:t,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},r.createElement("g",null,r.createElement("path",{d:"M17 8h2c1.105 0 2 .895 2 2v9c0 1.105-.895 2-2 2H5c-1.105 0-2-.895-2-2v-9c0-1.105.895-2 2-2h2v2H5v9h14v-9h-2V8zM6.5 5.5l1.414 1.414L11 3.828V14h2V3.828l3.086 3.086L17.5 5.5 12 0 6.5 5.5z"})));break;case"gridicons-share":e=r.createElement("svg",{className:t,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},r.createElement("g",null,r.createElement("path",{d:"M18 16c-.788 0-1.5.31-2.034.807L8.91 12.7c.05-.23.09-.46.09-.7s-.04-.47-.09-.7l7.05-4.11c.54.5 1.25.81 2.04.81 1.66 0 3-1.34 3-3s-1.34-3-3-3-3 1.34-3 3c0 .24.04.47.09.7L8.04 9.81C7.5 9.31 6.79 9 6 9c-1.66 0-3 1.34-3 3s1.34 3 3 3c.79 0 1.5-.31 2.04-.81l7.048 4.118c-.053.223-.088.453-.088.692 0 1.657 1.343 3 3 3s3-1.343 3-3-1.343-3-3-3z"})));break;case"gridicons-sign-out":e=r.createElement("svg",{className:t,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},r.createElement("g",null,r.createElement("path",{d:"M16 17v2c0 1.105-.895 2-2 2H5c-1.105 0-2-.895-2-2V5c0-1.105.895-2 2-2h9c1.105 0 2 .895 2 2v2h-2V5H5v14h9v-2h2zm2.5-10.5l-1.414 1.414L20.172 11H10v2h10.172l-3.086 3.086L18.5 17.5 24 12l-5.5-5.5z"})));break;case"gridicons-spam":e=r.createElement("svg",{className:t,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},r.createElement("g",null,r.createElement("path",{d:"M17 2H7L2 7v10l5 5h10l5-5V7l-5-5zm-4 15h-2v-2h2v2zm0-4h-2l-.5-6h3l-.5 6z"})));break;case"gridicons-speaker":e=r.createElement("svg",{className:t,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},r.createElement("g",null,r.createElement("path",{d:"M19 8v6c1.7 0 3-1.3 3-3s-1.3-3-3-3zM11 7H4c-1.1 0-2 .9-2 2v4c0 1.1.9 2 2 2h1v3c0 1.1.9 2 2 2h2v-5h2l4 4h2V3h-2l-4 4z"})));break;case"gridicons-special-character":e=r.createElement("svg",{className:t,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},r.createElement("g",null,r.createElement("path",{d:"M12.005 7.418c-1.237 0-2.19.376-2.86 1.128s-1.005 1.812-1.005 3.18c0 1.387.226 2.513.677 3.377.45.865 1.135 1.543 2.05 2.036V20H5v-2.666h3.12c-1.04-.636-1.842-1.502-2.405-2.6-.564-1.097-.846-2.322-.846-3.676 0-1.258.29-2.363.875-3.317.585-.952 1.417-1.685 2.497-2.198s2.334-.77 3.763-.77c2.18 0 3.915.572 5.204 1.713s1.932 2.673 1.932 4.594c0 1.353-.283 2.57-.852 3.65-.567 1.08-1.38 1.947-2.44 2.603H19V20h-5.908v-2.86c.95-.493 1.65-1.18 2.102-2.062s.677-2.006.677-3.374c0-1.36-.336-2.415-1.01-3.164-.672-.747-1.624-1.122-2.855-1.122z"})));break;case"gridicons-star-outline":e=r.createElement("svg",{className:t,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},r.createElement("g",null,r.createElement("path",{d:"M12 6.308l1.176 3.167.347.936.997.042 3.374.14-2.647 2.09-.784.62.27.963.91 3.25-2.813-1.872-.83-.553-.83.552-2.814 1.87.91-3.248.27-.962-.783-.62-2.648-2.092 3.374-.14.996-.04.347-.936L12 6.308M12 2L9.418 8.953 2 9.257l5.822 4.602L5.82 21 12 16.89 18.18 21l-2.002-7.14L22 9.256l-7.418-.305L12 2z"})));break;case"gridicons-star":e=r.createElement("svg",{className:t,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},r.createElement("g",null,r.createElement("path",{d:"M12 2l2.582 6.953L22 9.257l-5.822 4.602L18.18 21 12 16.89 5.82 21l2.002-7.14L2 9.256l7.418-.304"})));break;case"gridicons-stats-alt":e=r.createElement("svg",{className:t,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},r.createElement("g",null,r.createElement("path",{d:"M21 21H3v-2h18v2zM8 10H4v7h4v-7zm6-7h-4v14h4V3zm6 3h-4v11h4V6z"})));break;case"gridicons-stats":e=r.createElement("svg",{className:t,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},r.createElement("g",null,r.createElement("path",{d:"M19 3H5c-1.105 0-2 .895-2 2v14c0 1.105.895 2 2 2h14c1.105 0 2-.895 2-2V5c0-1.105-.895-2-2-2zm0 16H5V5h14v14zM9 17H7v-5h2v5zm4 0h-2V7h2v10zm4 0h-2v-7h2v7z"})));break;case"gridicons-status":e=r.createElement("svg",{className:t,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},r.createElement("g",null,r.createElement("path",{d:"M12 4c4.41 0 8 3.59 8 8s-3.59 8-8 8-8-3.59-8-8 3.59-8 8-8m0-2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zM7.55 13c-.02.166-.05.33-.05.5 0 2.485 2.015 4.5 4.5 4.5s4.5-2.015 4.5-4.5c0-.17-.032-.334-.05-.5h-8.9zM10 10V8c0-.552-.448-1-1-1s-1 .448-1 1v2c0 .552.448 1 1 1s1-.448 1-1zm6 0V8c0-.552-.448-1-1-1s-1 .448-1 1v2c0 .552.448 1 1 1s1-.448 1-1z"})));break;case"gridicons-strikethrough":e=r.createElement("svg",{className:t,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},r.createElement("g",null,r.createElement("path",{d:"M14.348 12H21v2h-4.613c.24.515.368 1.094.368 1.748 0 1.317-.474 2.355-1.423 3.114-.947.76-2.266 1.138-3.956 1.138-1.557 0-2.934-.293-4.132-.878v-2.874c.985.44 1.818.75 2.5.928.682.18 1.306.27 1.872.27.68 0 1.2-.13 1.562-.39.363-.26.545-.644.545-1.158 0-.285-.08-.54-.24-.763-.16-.222-.394-.437-.704-.643-.18-.12-.483-.287-.88-.49H3v-2H14.347zm-3.528-2c-.073-.077-.143-.155-.193-.235-.126-.202-.19-.44-.19-.713 0-.44.157-.795.47-1.068.313-.273.762-.41 1.348-.41.492 0 .993.064 1.502.19.51.127 1.153.35 1.93.67l1-2.405c-.753-.327-1.473-.58-2.16-.76-.69-.18-1.414-.27-2.173-.27-1.544 0-2.753.37-3.628 1.108-.874.738-1.312 1.753-1.312 3.044 0 .302.036.58.088.848h3.318z"})));break;case"gridicons-sync":e=r.createElement("svg",{className:t,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},r.createElement("g",null,r.createElement("path",{d:"M23.5 13.5l-3.086 3.086L19 18l-4.5-4.5 1.414-1.414L18 14.172V12c0-3.308-2.692-6-6-6V4c4.418 0 8 3.582 8 8v2.172l2.086-2.086L23.5 13.5zM6 12V9.828l2.086 2.086L9.5 10.5 5 6 3.586 7.414.5 10.5l1.414 1.414L4 9.828V12c0 4.418 3.582 8 8 8v-2c-3.308 0-6-2.692-6-6z"})));break;case"gridicons-tablet":e=r.createElement("svg",{className:t,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},r.createElement("g",null,r.createElement("path",{d:"M18 2H6c-1.104 0-2 .896-2 2v16c0 1.104.896 2 2 2h12c1.104 0 2-.896 2-2V4c0-1.104-.896-2-2-2zm-5 19h-2v-1h2v1zm5-2H6V5h12v14z"})));break;case"gridicons-tag":e=r.createElement("svg",{className:t,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},r.createElement("g",null,r.createElement("path",{d:"M20 2.007h-7.087c-.53 0-1.04.21-1.414.586L2.592 11.5c-.78.78-.78 2.046 0 2.827l7.086 7.086c.78.78 2.046.78 2.827 0l8.906-8.906c.376-.374.587-.883.587-1.413V4.007c0-1.105-.895-2-2-2zM17.007 9c-1.105 0-2-.895-2-2s.895-2 2-2 2 .895 2 2-.895 2-2 2z"})));break;case"gridicons-text-color":e=r.createElement("svg",{className:t,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},r.createElement("g",null,r.createElement("path",{d:"M3 19h18v3H3v-3zM15.82 17h3.424L14 3h-4L4.756 17H8.18l1.067-3.5h5.506L15.82 17zm-1.952-6h-3.73l1.868-5.725L13.868 11z"})));break;case"gridicons-themes":e=r.createElement("svg",{className:t,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},r.createElement("g",null,r.createElement("path",{d:"M4 6c-1.105 0-2 .895-2 2v12c0 1.1.9 2 2 2h12c1.105 0 2-.895 2-2H4V6zm16-4H8c-1.105 0-2 .895-2 2v12c0 1.105.895 2 2 2h12c1.105 0 2-.895 2-2V4c0-1.105-.895-2-2-2zm-5 14H8V9h7v7zm5 0h-3V9h3v7zm0-9H8V4h12v3z"})));break;case"gridicons-thumbs-up":e=r.createElement("svg",{className:t,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},r.createElement("g",null,r.createElement("path",{d:"M6.7 22H2v-9h2l2.7 9zM20 9h-6V5c0-1.657-1.343-3-3-3h-1v4L7.1 9.625c-.712.89-1.1 1.996-1.1 3.135V14l2.1 7h8.337c1.836 0 3.435-1.25 3.88-3.03l1.622-6.485C22.254 10.223 21.3 9 20 9z"})));break;case"gridicons-time":e=r.createElement("svg",{className:t,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},r.createElement("g",null,r.createElement("path",{d:"M12 4c4.41 0 8 3.59 8 8s-3.59 8-8 8-8-3.59-8-8 3.59-8 8-8m0-2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zm3.8 13.4L13 11.667V7h-2v5.333l3.2 4.266 1.6-1.2z"})));break;case"gridicons-trash":e=r.createElement("svg",{className:t,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},r.createElement("g",null,r.createElement("path",{d:"M6.187 8h11.625l-.695 11.125C17.05 20.18 16.177 21 15.12 21H8.88c-1.057 0-1.93-.82-1.997-1.875L6.187 8zM19 5v2H5V5h3V4c0-1.105.895-2 2-2h4c1.105 0 2 .895 2 2v1h3zm-9 0h4V4h-4v1z"})));break;case"gridicons-trophy":e=r.createElement("svg",{className:t,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},r.createElement("g",null,r.createElement("path",{d:"M18 5.062V3H6v2.062H2V8c0 2.525 1.89 4.598 4.324 4.932.7 2.058 2.485 3.61 4.676 3.978V18c0 1.105-.895 2-2 2H8v2h8v-2h-1c-1.105 0-2-.895-2-2v-1.09c2.19-.368 3.976-1.92 4.676-3.978C20.11 12.598 22 10.525 22 8V5.062h-4zM4 8v-.938h2v3.766C4.836 10.416 4 9.304 4 8zm16 0c0 1.304-.836 2.416-2 2.83V7.06h2V8z"})));break;case"gridicons-types":e=r.createElement("svg",{className:t,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},r.createElement("g",null,r.createElement("path",{d:"M22 17c0 2.76-2.24 5-5 5s-5-2.24-5-5 2.24-5 5-5 5 2.24 5 5zM6.5 6.5h3.8L7 1 1 11h5.5V6.5zm9.5 4.085V8H8v8h2.585c.433-2.783 2.632-4.982 5.415-5.415z"})));break;case"gridicons-underline":e=r.createElement("svg",{className:t,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},r.createElement("g",null,r.createElement("path",{d:"M4 19v2h16v-2H4zM18 3v8c0 3.314-2.686 6-6 6s-6-2.686-6-6V3h3v8c0 1.654 1.346 3 3 3s3-1.346 3-3V3h3z"})));break;case"gridicons-undo":e=r.createElement("svg",{className:t,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},r.createElement("g",null,r.createElement("path",{d:"M18.142 5.93C16.97 4.756 15.435 4.17 13.9 4.17s-3.072.586-4.244 1.757L6 9.585V6H4v7h7v-2H7.414l3.657-3.657c.756-.755 1.76-1.172 2.83-1.172 1.067 0 2.072.417 2.827 1.173 1.56 1.56 1.56 4.097 0 5.657l-5.364 5.364 1.414 1.414 5.364-5.364c2.345-2.343 2.345-6.142.002-8.485z"})));break;case"gridicons-user-circle":e=r.createElement("svg",{className:t,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},r.createElement("g",null,r.createElement("path",{d:"M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zm0 18.5c-4.694 0-8.5-3.806-8.5-8.5S7.306 3.5 12 3.5s8.5 3.806 8.5 8.5-3.806 8.5-8.5 8.5zm0-8c-3.038 0-5.5 1.728-5.5 3.5s2.462 3.5 5.5 3.5 5.5-1.728 5.5-3.5-2.462-3.5-5.5-3.5zm0-.5c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3z"})));break;case"gridicons-user":e=r.createElement("svg",{className:t,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},r.createElement("g",null,r.createElement("path",{d:"M12 4c2.21 0 4 1.79 4 4s-1.79 4-4 4-4-1.79-4-4 1.79-4 4-4zm0 16s8 0 8-2c0-2.4-3.9-5-8-5s-8 2.6-8 5c0 2 8 2 8 2z"})));break;case"gridicons-video-camera":e=r.createElement("svg",{className:t,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},r.createElement("g",null,r.createElement("path",{d:"M17 9V7c0-1.105-.895-2-2-2H4c-1.105 0-2 .895-2 2v10c0 1.105.895 2 2 2h11c1.105 0 2-.895 2-2v-2l5 4V5l-5 4z"})));break;case"gridicons-video":e=r.createElement("svg",{className:t,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},r.createElement("g",null,r.createElement("path",{d:"M20 4v2h-2V4H6v2H4V4c-1.105 0-2 .895-2 2v12c0 1.105.895 2 2 2v-2h2v2h12v-2h2v2c1.105 0 2-.895 2-2V6c0-1.105-.895-2-2-2zM6 16H4v-3h2v3zm0-5H4V8h2v3zm4 4V9l4.5 3-4.5 3zm10 1h-2v-3h2v3zm0-5h-2V8h2v3z"})));break;case"gridicons-visible":e=r.createElement("svg",{className:t,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},r.createElement("g",null,r.createElement("path",{d:"M12 6C5.188 6 1 12 1 12s4.188 6 11 6 11-6 11-6-4.188-6-11-6zm0 10c-3.943 0-6.926-2.484-8.38-4 1.04-1.085 2.863-2.657 5.255-3.47C8.335 9.214 8 10.064 8 11c0 2.21 1.79 4 4 4s4-1.79 4-4c0-.937-.335-1.787-.875-2.47 2.393.813 4.216 2.386 5.254 3.47-1.456 1.518-4.438 4-8.38 4z"})))}return e}});e.exports=s},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}t.__esModule=!0;var i=n(268),o=r(i);t["default"]={shouldComponentUpdate:o["default"]},e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){return!(0,s["default"])(this.props,e)||!(0,s["default"])(this.state,t)}t.__esModule=!0,t["default"]=i;var o=n(269),s=r(o);e.exports=t["default"]},function(e,t){"use strict";function n(e,t){if(e===t)return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(var i=Object.prototype.hasOwnProperty.bind(t),o=0;o\n \n \n Click me: \n \n\n \n You can put anything you want in here
\n \n\n \n Puts the title above the content
\n \n\n\n \n some action\n \n \n\n \n No good can come of this.\n \n \n );\n }\n} );\n\nReact.render(\n React.createElement( DemoCard, {} ), document.getElementById( Demo.domId )\n);'},function(e,t,n){"use strict";function r(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}var i=Object.assign||function(e){for(var t=1;t\n \n {this._renderTabs( "horizontal" )}\n \n\n \n {this._renderTabs( "vertical" )}\n \n \n );\n },\n\n _renderTabs: function( layout ) {\n return (\n \n \n Tab A
\n \n\n \n Tab B
\n \n\n \n Tab C
\n \n \n );\n }\n} );\n\nReact.render(\n React.createElement( DemoTabs, {} ), document.getElementById( Demo.domId )\n);'},function(e,t){e.exports='var AlertBox = Demo.require( \'./alert-box\' ),\n TimeoutTransitionGroup = Demo.require( \'./timeout-transition-group\' );\n\nvar DemoAlertBox = React.createClass( {\n\n handleToggleAlert: function ( e ) {\n e.preventDefault();\n this.setState( {showAlert: !this.state.showAlert} );\n },\n\n handleToggleAnimatedAlert: function ( e ) {\n e.preventDefault();\n this.setState( {showAnimatedAlert: !this.state.showAnimatedAlert} );\n },\n\n handleToggleErrorAlert: function ( e ) {\n e.preventDefault();\n this.setState( {showErrorAlert: !this.state.showErrorAlert} );\n },\n\n getInitialState: function() {\n return {\n showAlert: false,\n showAnimatedAlert: false,\n showErrorAlert: false\n };\n },\n\n render: function() {\n return (\n \n
click me default\n {this.state.showAlert && (\n
\n Oh no! Please don\'t go!\n \n \n )}\n
\n
click me error\n {this.state.showErrorAlert && (\n
\n Oh no! Please don\'t go!\n \n \n )}\n
\n
click me with animation\n
\n {this.state.showAnimatedAlert && (\n \n
\n Oh no! Please don\'t go!\n \n \n
\n )}\n \n
\n );\n }\n} );\n\nReact.render(\n React.createElement( DemoAlertBox, {} ), document.getElementById( Demo.domId )\n);'},function(e,t,n){"use strict";var r=n(96),i=n(280),o=r.createClass({displayName:"AlertBox",propTypes:{title:r.PropTypes.any,status:r.PropTypes.string,style:r.PropTypes.object},styles:{alertBox:{padding:"15px 20px",position:"relative"},error:{backgroundColor:"#ee6c5b",color:"#fff"},title:{borderBottom:"1px solid rgba(255, 255, 255, 0.5)",color:"#fff",paddingBottom:15,marginBottom:15}},render:function(){var e="error"===this.props.status;return r.createElement("div",{style:i(this.styles.alertBox,e&&this.styles.error,this.props.style)},this.props.title&&r.createElement("h2",{style:this.styles.title},this.props.title),this.props.children)}});e.exports=o},function(e,t){"use strict";e.exports=function(){for(var e={},t=0;t-1}function o(e,t){return e.classList?e.classList.add(t):i(e,t)||(e.className=e.className+" "+t),e}function s(e,t){return i(t)&&(e.classList?e.classList.remove(t):e.className=(" "+e.className+" ").replace(" "+t+" "," ").trim()),e}var a=Object.assign||function(e){for(var t=1;t\n wordpress:
\n website:
\n key:
\n \n );\n }\n} );\n\nReact.render(\n React.createElement( DemoIcon, {} ), document.getElementById( Demo.domId )\n);'},function(e,t){e.exports="var HoverIcon = Demo.require( './hover-icon' );\n\nvar DemoHoverIcon = React.createClass( {\n \n render: function() {\n return (\n \n
hover over me: This is a tooltip
\n
\n );\n }\n} );\n\nReact.render(\n React.createElement( DemoHoverIcon, {} ), document.getElementById( Demo.domId )\n);"},function(e,t,n){"use strict";var r=n(96),i=n(254);n(285);var o=r.createClass({displayName:"HoverIcon",propTypes:{name:r.PropTypes.string.isRequired,type:r.PropTypes.oneOf(["dark","transparent","light"])},getDefaultProps:function(){return{type:"dark"}},getInitialState:function(){return{hover:!1}},handleMouseOver:function(){this.setState({hover:!0})},handleMouseOut:function(){this.setState({hover:!1})},render:function(){var e="dops-hovericon dops-hovericon-"+this.props.type;return r.createElement(i,{name:this.props.name,style:{position:"relative"},onMouseOver:this.handleMouseOver,
-onMouseOut:this.handleMouseOut},r.createElement("span",{className:e},this.props.children))}});e.exports=o},97,function(e,t){e.exports='var Wizard = Demo.require( \'./wizard\' );\n\nvar DemoWizard = React.createClass( {\n\n handleNext: function( e ) {\n e.preventDefault();\n this.refs.wizard.next();\n },\n\n handlePrev: function( e ) {\n e.preventDefault();\n this.refs.wizard.prev();\n },\n\n handleStart: function( e ) {\n e.preventDefault();\n this.refs.wizard.setStep( 0 );\n },\n\n render: function() {\n return (\n \n \n \n \n \n );\n },\n} );\n\nReact.render(\n React.createElement( DemoWizard, {} ), document.getElementById( Demo.domId )\n);'},function(e,t,n){"use strict";var r=n(96),i=n(281);n(288);var o=r.createClass({displayName:"Wizard",getInitialState:function(){return{step:0,transitionType:"slideRTL"}},next:function(){this.setStep(this.state.step+1)},prev:function(){this.setStep(this.state.step-1)},setStep:function(e){e\n {this.state.message}
\n \n \n \n \n \n \n \n \n );\n }\n} );\n\nReact.render(\n React.createElement( DemoButton, {} ), document.getElementById( Demo.domId )\n);'},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(96),o=r(i),s=n(255),a=r(s),l=n(103),c=r(l),u=n(105),h=r(u);n(291),t["default"]=o["default"].createClass({displayName:"Button",propTypes:{disabled:o["default"].PropTypes.bool,compact:o["default"].PropTypes.bool,primary:o["default"].PropTypes.bool,scary:o["default"].PropTypes.bool,type:o["default"].PropTypes.string,href:o["default"].PropTypes.string,onClick:o["default"].PropTypes.func,borderless:o["default"].PropTypes.bool},getDefaultProps:function(){return{disabled:!1,type:"button",onClick:h["default"],borderless:!1}},render:function(){var e=this.props.href?"a":"button",t=(0,c["default"])({"dops-button":!0,"is-compact":this.props.compact,"is-primary":this.props.primary,"is-scary":this.props.scary,"is-borderless":this.props.borderless}),n=(0,a["default"])({},this.props,{className:(0,c["default"])(this.props.className,t)});return o["default"].createElement(e,n,this.props.children)}}),e.exports=t["default"]},97,function(e,t){e.exports='var Form = Demo.require( \'./form\' );\n\nvar DemoForm = React.createClass( {\n\n render: function() {\n return (\n Submit to Validate\n \n Input without label:
\n \n\n \n\n \n\n \n\n \n\n \n \n \n \n My Custom Control\n \n \n\n \n \n\n \n\n \n \n\n \n \n \n\n \n Label above
\n \n \n \n \n \n\n Inline label
\n \n \n \n \n \n \n\n Submit to Validate\n \n );\n }\n} );\n\nReact.render(\n React.createElement( DemoForm, {} ), document.getElementById( Demo.domId )\n);'},function(e,t,n){"use strict";function r(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}var i=Object.assign||function(e){for(var t=1;t12&&x(t))}),a.addValidationRule("isArray",function(e,t){return s(t)}),b.ActionBar=l,b.Section=c,b.Row=u,b.Label=h,b.TextInput=p,b.RadioInput=d,b.CheckboxInput=f,b.MultiCheckboxInput=v,b.SelectInput=m,b.CountrySelect=g,b.HiddenInput=y,b.Submit=w,e.exports=b},function(e,t,n){(function(t){"use strict";var r=Object.assign||function(e){for(var t=1;t=i}};e.exports=i},function(e,t){e.exports=function(e){return Object.keys(e).reduce(function(t,n){var r=n.match(/[^\[]*/i),i=n.match(/\[.*?\]/g)||[];i=[r[0]].concat(i).map(function(e){return e.replace(/\[|\]/g,"")});for(var o=t;i.length;){var s=i.shift();s in o?o=o[s]:(o[s]=i.length?isNaN(i[0])?{}:[]:e[n],o=o[s])}return t},{})}},function(e,t){"use strict";e.exports={arraysDiffer:function(e,t){var n=!1;return e.length!==t.length?n=!0:e.forEach(function(e,r){this.isSame(e,t[r])||(n=!0)},this),n},objectsDiffer:function(e,t){var n=!1;return Object.keys(e).length!==Object.keys(t).length?n=!0:Object.keys(e).forEach(function(r){this.isSame(e[r],t[r])||(n=!0)},this),n},isSame:function(e,t){return typeof e!=typeof t?!1:Array.isArray(e)?!this.arraysDiffer(e,t):"object"==typeof e&&null!==e&&null!==t?!this.objectsDiffer(e,t):e===t}}},function(e,t,n){(function(t){"use strict";var r=n(297),i=t.React||n(96),o=function(e){return"string"==typeof e?e.split(/\,(?![^{\[]*[}\]])/g).reduce(function(e,t){var n=t.split(":"),r=n.shift();if(n=n.map(function(e){try{return JSON.parse(e)}catch(t){return e}}),n.length>1)throw new Error("Formsy does not support multiple args on string validations. Use object format of validations instead.");return e[r]=n.length?n[0]:!0,e},{}):e||{}};e.exports={getInitialState:function(){return{_value:this.props.value,_isRequired:!1,_isValid:!0,_isPristine:!0,_pristineValue:this.props.value,_validationError:[],_externalError:null,_formSubmitted:!1}},contextTypes:{formsy:i.PropTypes.object},getDefaultProps:function(){return{validationError:"",validationErrors:{}}},componentWillMount:function(){var e=function(){this.setValidations(this.props.validations,this.props.required),this.context.formsy.attachToForm(this)}.bind(this);if(!this.props.name)throw new Error("Form Input requires a name property when used");e()},componentWillReceiveProps:function(e){this.setValidations(e.validations,e.required)},componentDidUpdate:function(e){r.isSame(this.props.value,e.value)||this.setValue(this.props.value),r.isSame(this.props.validations,e.validations)&&r.isSame(this.props.required,e.required)||this.context.formsy.validate(this)},componentWillUnmount:function(){this.context.formsy.detachFromForm(this)},setValidations:function(e,t){this._validations=o(e)||{},this._requiredValidations=t===!0?{isDefaultRequiredValue:!0}:o(t)},setValue:function(e){this.setState({_value:e,_isPristine:!1},function(){this.context.formsy.validate(this)}.bind(this))},resetValue:function(){this.setState({_value:this.state._pristineValue,_isPristine:!0},function(){this.context.formsy.validate(this)})},getValue:function(){return this.state._value},hasValue:function(){return""!==this.state._value},getErrorMessage:function(){var e=this.getErrorMessages();return e.length?e[0]:null},getErrorMessages:function(){return!this.isValid()||this.showRequired()?this.state._externalError||this.state._validationError||[]:[]},isFormDisabled:function(){return this.context.formsy.isFormDisabled()},isValid:function(){return this.state._isValid},isPristine:function(){return this.state._isPristine},isFormSubmitted:function(){return this.state._formSubmitted},isRequired:function(){return!!this.props.required},showRequired:function(){return this.state._isRequired},showError:function(){return!this.showRequired()&&!this.isValid()},isValidValue:function(e){return this.context.formsy.isValidValue.call(null,this,e)}}}).call(t,function(){return this}())},function(e,t,n){(function(t){"use strict";var r=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}var o=Object.assign||function(e){for(var t=1;t0:!1,animating:this.props.value?this.props.value.length>0:!1}},componentDidMount:function(){var e=this.refs.input.getDOMNode();switch(this.props.formatter){case"cardNumber":c.formatCardNumber(e);break;case"cardExpiry":c.formatCardExpiry(e);break;case"cardCVV":case"cardCVC":c.formatCardCVC(e)}},focus:function(){s.findDOMNode(this.refs.input).focus()},getDefaultProps:function(){return{type:"text"}},changeValue:function(e){var t=e.target.value;if(this.setValue(t),this.props.onChange&&this.props.onChange(e),this.props.floatingLabel){if(!t.length)return void this.setState({floated:!1,animating:!1});this.setState({animating:!0}),requestAnimationFrame(function(){this.setState({floated:!0})}.bind(this))}},render:function(){var e,t=this.props,n=t.style,o=t.labelSuffix,a=t.label,c=t.className,h=i(t,["style","labelSuffix","label","className"]);return c=l("dops-field","dops-field-"+this.props.name,c),this.props.floatingLabel&&(c+=" dops-floating-label-input",e=l({floating:!0,"floating--floated":this.state.animating,"floating--floated-active":this.state.floated})),this.props.label?s.createElement(u,{className:c,labelClassName:e,style:n,label:a,labelSuffix:o,htmlFor:this.state.uniqueId,required:this.props.required,description:this.props.description},this._renderInput.apply(this,[this.props.label,null,null].concat(r(h)))):this._renderInput.apply(this,[this.props.name,n,c].concat(r(h)))},_renderInput:function(e,t,n){var r;t=t||{},this.isPristine()||(r=this.showError()?this.getErrorMessage():null,r||(r=this.showRequired()?d(this.props.label||this.props.placeholder||""):null));for(var i=l({"dops-form-text":!0,"dops-form-error":r}),a=arguments.length,c=Array(a>3?a-3:0),u=3;a>u;u++)c[u-3]=arguments[u];return s.createElement("div",{className:i,style:t},s.createElement("input",o({ref:"input",className:"dops-form-input",type:this.props.type,id:this.state.uniqueId},c,{placeholder:this.props.placeholder,onChange:this.changeValue,onClick:this.props.onClick,value:this.getValue()})),this.props.children,s.createElement("div",{className:"clear"}),s.createElement("div",{role:"alert"},r&&s.createElement(p,{text:r,isError:!0})))}})},function(e,t,n){var r,r;!function(t){e.exports=t()}(function(){var e;return function t(e,n,i){function o(a,l){if(!n[a]){if(!e[a]){var c="function"==typeof r&&r;if(!l&&c)return r(a,!0);if(s)return s(a,!0);throw new Error("Cannot find module '"+a+"'")}var u=n[a]={exports:{}};e[a][0].call(u.exports,function(t){var n=e[a][1][t];return o(n?n:t)},u,u.exports,t,e,n,i)}return n[a].exports}for(var s="function"==typeof r&&r,a=0;a1?e.value=t:(n=e.value,"string"==typeof n?n.replace(i,""):null===n?"":n)},r.preventDefault=function(e){return"function"==typeof e.preventDefault?void e.preventDefault():(e.returnValue=!1,!1)},r.normalizeEvent=function(e){var t;return t=e,e={which:null!=t.which?t.which:void 0,target:t.target||t.srcElement,preventDefault:function(){return r.preventDefault(t)},originalEvent:t,data:t.data||t.detail},null==e.which&&(e.which=null!=t.charCode?t.charCode:t.keyCode),e},r.on=function(e,t,n){var i,o,s,a,l,c,u,h;if(e.length)for(a=0,c=e.length;c>a;a++)i=e[a],r.on(i,t,n);else{if(!t.match(" "))return s=n,n=function(e){return e=r.normalizeEvent(e),s(e)},e.addEventListener?e.addEventListener(t,n,!1):e.attachEvent?(t="on"+t,e.attachEvent(t,n)):void(e["on"+t]=n);for(h=t.split(" "),l=0,u=h.length;u>l;l++)o=h[l],r.on(e,o,n)}},r.addClass=function(e,t){var n;return e.length?function(){var i,o,s;for(s=[],i=0,o=e.length;o>i;i++)n=e[i],s.push(r.addClass(n,t));return s}():e.classList?e.classList.add(t):e.className+=" "+t},r.hasClass=function(e,t){var n,i,o,s;if(e.length){for(i=!0,o=0,s=e.length;s>o;o++)n=e[o],i=i&&r.hasClass(n,t);return i}return e.classList?e.classList.contains(t):new RegExp("(^| )"+t+"( |$)","gi").test(e.className)},r.removeClass=function(e,t){var n,i,o,s,a,l;if(e.length)return function(){var n,o,s;for(s=[],n=0,o=e.length;o>n;n++)i=e[n],s.push(r.removeClass(i,t));return s}();if(e.classList){for(a=t.split(" "),l=[],o=0,s=a.length;s>o;o++)n=a[o],l.push(e.classList.remove(n));return l}return e.className=e.className.replace(new RegExp("(^|\\b)"+t.split(" ").join("|")+"(\\b|$)","gi")," ")},r.toggleClass=function(e,t,n){var i;return e.length?function(){var o,s,a;for(a=[],o=0,s=e.length;s>o;o++)i=e[o],a.push(r.toggleClass(i,t,n));return a}():n?r.hasClass(e,t)?void 0:r.addClass(e,t):r.removeClass(e,t);
-},r.append=function(e,t){var n;return e.length?function(){var i,o,s;for(s=[],i=0,o=e.length;o>i;i++)n=e[i],s.push(r.append(n,t));return s}():e.insertAdjacentHTML("beforeend",t)},r.find=function(e,t){return(e instanceof NodeList||e instanceof Array)&&(e=e[0]),e.querySelectorAll(t)},r.trigger=function(e,t,n){var r,i;try{i=new CustomEvent(t,{detail:n})}catch(o){r=o,i=document.createEvent("CustomEvent"),i.initCustomEvent?i.initCustomEvent(t,!0,!0,n):i.initEvent(t,!0,!0,n)}return e.dispatchEvent(i)},t.exports=r},{}]},{},[1])(1)})}).call(this,"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],2:[function(e,t,n){(function(n){var r,i,o,s,a,l,c,u,h,p,d,f,v,m,g,y,w,b,x,E,C=[].indexOf||function(e){for(var t=0,n=this.length;n>t;t++)if(t in this&&this[t]===e)return t;return-1};i=e("qj"),l=/(\d{1,4})/g,a=[{type:"amex",pattern:/^3[47]/,format:/(\d{1,4})(\d{1,6})?(\d{1,5})?/,length:[15],cvcLength:[4],luhn:!0},{type:"dankort",pattern:/^5019/,format:l,length:[16],cvcLength:[3],luhn:!0},{type:"dinersclub",pattern:/^(36|38|30[0-5])/,format:l,length:[14],cvcLength:[3],luhn:!0},{type:"discover",pattern:/^(6011|65|64[4-9]|622)/,format:l,length:[16],cvcLength:[3],luhn:!0},{type:"jcb",pattern:/^35/,format:l,length:[16],cvcLength:[3],luhn:!0},{type:"laser",pattern:/^(6706|6771|6709)/,format:l,length:[16,17,18,19],cvcLength:[3],luhn:!0},{type:"maestro",pattern:/^(5018|5020|5038|6304|6703|6759|676[1-3])/,format:l,length:[12,13,14,15,16,17,18,19],cvcLength:[3],luhn:!0},{type:"mastercard",pattern:/^5[1-5]/,format:l,length:[16],cvcLength:[3],luhn:!0},{type:"unionpay",pattern:/^62/,format:l,length:[16,17,18,19],cvcLength:[3],luhn:!1},{type:"visaelectron",pattern:/^4(026|17500|405|508|844|91[37])/,format:l,length:[16],cvcLength:[3],luhn:!0},{type:"visa",pattern:/^4/,format:l,length:[13,14,15,16],cvcLength:[3],luhn:!0}],o=function(e){var t,n,r;for(e=(e+"").replace(/\D/g,""),n=0,r=a.length;r>n;n++)if(t=a[n],t.pattern.test(e))return t},s=function(e){var t,n,r;for(n=0,r=a.length;r>n;n++)if(t=a[n],t.type===e)return t},m=function(e){var t,n,r,i,o,s;for(r=!0,i=0,n=(e+"").split("").reverse(),o=0,s=n.length;s>o;o++)t=n[o],t=parseInt(t,10),(r=!r)&&(t*=2),t>9&&(t-=9),i+=t;return i%10===0},v=function(e){var t;return null!=e.selectionStart&&e.selectionStart!==e.selectionEnd?!0:!(null==("undefined"!=typeof document&&null!==document&&null!=(t=document.selection)?t.createRange:void 0)||!document.selection.createRange().text)},g=function(e){return setTimeout(function(t){return function(){var t,n;return t=e.target,n=i.val(t),n=r.fns.formatCardNumber(n),i.val(t,n)}}(this))},h=function(e){var t,n,r,s,a,l,c;return n=String.fromCharCode(e.which),!/^\d+$/.test(n)||(a=e.target,c=i.val(a),t=o(c+n),r=(c.replace(/\D/g,"")+n).length,l=16,t&&(l=t.length[t.length.length-1]),r>=l||null!=a.selectionStart&&a.selectionStart!==c.length)?void 0:(s=t&&"amex"===t.type?/^(\d{4}|\d{4}\s\d{6})$/:/(?:^|\s)(\d{4})$/,s.test(c)?(e.preventDefault(),i.val(a,c+" "+n)):s.test(c+n)?(e.preventDefault(),i.val(a,c+n+" ")):void 0)},c=function(e){var t,n;return t=e.target,n=i.val(t),e.meta||8!==e.which||null!=t.selectionStart&&t.selectionStart!==n.length?void 0:/\d\s$/.test(n)?(e.preventDefault(),i.val(t,n.replace(/\d\s$/,""))):/\s\d?$/.test(n)?(e.preventDefault(),i.val(t,n.replace(/\s\d?$/,""))):void 0},p=function(e){var t,n,r;return t=String.fromCharCode(e.which),/^\d+$/.test(t)?(n=e.target,r=i.val(n)+t,/^\d$/.test(r)&&"0"!==r&&"1"!==r?(e.preventDefault(),i.val(n,"0"+r+" / ")):/^\d\d$/.test(r)?(e.preventDefault(),i.val(n,""+r+" / ")):void 0):void 0},d=function(e){var t,n,r;return t=String.fromCharCode(e.which),/^\d+$/.test(t)?(n=e.target,r=i.val(n),/^\d\d$/.test(r)?i.val(n,""+r+" / "):void 0):void 0},f=function(e){var t,n,r;return t=String.fromCharCode(e.which),"/"===t?(n=e.target,r=i.val(n),/^\d$/.test(r)&&"0"!==r?i.val(n,"0"+r+" / "):void 0):void 0},u=function(e){var t,n;if(!e.metaKey&&(t=e.target,n=i.val(t),8===e.which&&(null==t.selectionStart||t.selectionStart===n.length)))return/\d(\s|\/)+$/.test(n)?(e.preventDefault(),i.val(t,n.replace(/\d(\s|\/)*$/,""))):/\s\/\s?\d?$/.test(n)?(e.preventDefault(),i.val(t,n.replace(/\s\/\s?\d?$/,""))):void 0},x=function(e){var t;return e.metaKey||e.ctrlKey?!0:32===e.which?e.preventDefault():0===e.which?!0:e.which<33?!0:(t=String.fromCharCode(e.which),/[\d\s]/.test(t)?void 0:e.preventDefault())},w=function(e){var t,n,r,s;if(r=e.target,n=String.fromCharCode(e.which),/^\d+$/.test(n)&&!v(r))if(s=(i.val(r)+n).replace(/\D/g,""),t=o(s)){if(!(s.length<=t.length[t.length.length-1]))return e.preventDefault()}else if(!(s.length<=16))return e.preventDefault()},b=function(e){var t,n,r;return n=e.target,t=String.fromCharCode(e.which),/^\d+$/.test(t)&&!v(n)?(r=i.val(n)+t,r=r.replace(/\D/g,""),r.length>6?e.preventDefault():void 0):void 0},y=function(e){var t,n,r;return n=e.target,t=String.fromCharCode(e.which),/^\d+$/.test(t)?(r=i.val(n)+t,r.length<=4?void 0:e.preventDefault()):void 0},E=function(e){var t,n,o,s,l;return s=e.target,l=i.val(s),o=r.fns.cardType(l)||"unknown",i.hasClass(s,o)?void 0:(t=function(){var e,t,r;for(r=[],e=0,t=a.length;t>e;e++)n=a[e],r.push(n.type);return r}(),i.removeClass(s,"unknown"),i.removeClass(s,t.join(" ")),i.addClass(s,o),i.toggleClass(s,"identified","unknown"!==o),i.trigger(s,"payment.cardType",o))},r=function(){function e(){}return e.fns={cardExpiryVal:function(e){var t,n,r,i;return e=e.replace(/\s/g,""),i=e.split("/",2),t=i[0],r=i[1],2===(null!=r?r.length:void 0)&&/^\d+$/.test(r)&&(n=(new Date).getFullYear(),n=n.toString().slice(0,2),r=n+r),t=parseInt(t,10),r=parseInt(r,10),{month:t,year:r}},validateCardNumber:function(e){var t,n;return e=(e+"").replace(/\s+|-/g,""),/^\d+$/.test(e)?(t=o(e),t?(n=e.length,C.call(t.length,n)>=0&&(t.luhn===!1||m(e))):!1):!1},validateCardExpiry:function(e,t){var n,r,o,s;return"object"==typeof e&&"month"in e&&(s=e,e=s.month,t=s.year),e&&t?(e=i.trim(e),t=i.trim(t),/^\d+$/.test(e)&&/^\d+$/.test(t)&&parseInt(e,10)<=12?(2===t.length&&(o=(new Date).getFullYear(),o=o.toString().slice(0,2),t=o+t),r=new Date(t,e),n=new Date,r.setMonth(r.getMonth()-1),r.setMonth(r.getMonth()+1,1),r>n):!1):!1},validateCardCVC:function(e,t){var n,r;return e=i.trim(e),/^\d+$/.test(e)?t&&s(t)?(n=e.length,C.call(null!=(r=s(t))?r.cvcLength:void 0,n)>=0):e.length>=3&&e.length<=4:!1},cardType:function(e){var t;return e?(null!=(t=o(e))?t.type:void 0)||null:null},formatCardNumber:function(e){var t,n,r,i;return(t=o(e))?(r=t.length[t.length.length-1],e=e.replace(/\D/g,""),e=e.slice(0,+r+1||9e9),t.format.global?null!=(i=e.match(t.format))?i.join(" "):void 0:(n=t.format.exec(e),null!=n&&n.shift(),null!=n?n.join(" "):void 0)):e}},e.restrictNumeric=function(e){return i.on(e,"keypress",x)},e.cardExpiryVal=function(t){return e.fns.cardExpiryVal(i.val(t))},e.formatCardCVC=function(t){return e.restrictNumeric(t),i.on(t,"keypress",y),t},e.formatCardExpiry=function(t){return e.restrictNumeric(t),i.on(t,"keypress",b),i.on(t,"keypress",p),i.on(t,"keypress",f),i.on(t,"keypress",d),i.on(t,"keydown",u),t},e.formatCardNumber=function(t){return e.restrictNumeric(t),i.on(t,"keypress",w),i.on(t,"keypress",h),i.on(t,"keydown",c),i.on(t,"keyup",E),i.on(t,"paste",g),t},e.getCardArray=function(){return a},e.setCardArray=function(e){return a=e,!0},e.addToCardArray=function(e){return a.push(e)},e.removeFromCardArray=function(e){var t,n;for(t in a)n=a[t],n.type===e&&a.splice(t,1);return!0},e}(),t.exports=r,n.Payment=r}).call(this,"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{qj:1}]},{},[2])(2)})},function(e,t){"use strict";var n=0;e.exports=function(){return"formId-"+n++}},function(e,t,n){"use strict";var r=n(96),i=n(103);n(309),e.exports=r.createClass({displayName:"FormInputValidation",getDefaultProps:function(){return{isError:!1}},render:function(){var e=i({"form-input-validation":!0,"is-error":this.props.isError});return r.createElement("div",{className:e},r.createElement("span",null,this.props.text))}})},97,function(e,t){"use strict";e.exports=function(e){return e+" is required"}},function(e,t,n){"use strict";var r=n(96),i=n(103),o=n(294),s=n(304),a=n(307),l=n(308),c=n(310),u=r.createClass({displayName:"Radios",propTypes:{name:r.PropTypes.string,choices:r.PropTypes.array,selected:r.PropTypes.any,uniqueId:r.PropTypes.string,changeValue:r.PropTypes.func},getDefaultProps:function(){return{choices:[]}},onChange:function(e){this.props.changeValue(e)},render:function(){var e=this.props.uniqueId,t=this.props.choices.map(function(t,n){var i=this.props.selected===t.value;return r.createElement("div",{className:"dops-form-checkbox",key:n},r.createElement(s,{inline:!0,label:t.label,htmlFor:e+n},r.createElement("input",{type:"radio",id:e+n,value:t.value,name:this.props.name,checked:i,onChange:this.onChange})))}.bind(this));return r.createElement("fieldset",null,t)}});e.exports=r.createClass({displayName:"RadioInput",mixins:[o.Mixin],propTypes:{name:r.PropTypes.string.isRequired,description:r.PropTypes.string,choices:r.PropTypes.any,selected:r.PropTypes.any,required:r.PropTypes.any,validations:r.PropTypes.string,validationError:r.PropTypes.string},getInitialState:function(){return{uniqueId:a(),selectedItem:this.props.selected}},componentWillMount:function(){this.setValue(this.props.selected)},getDefaultProps:function(){return{required:!1}},changeValue:function(e){this.setState({selectedItem:e.target.value}),this.setValue(e.target.value)},render:function(){var e;this.isPristine()||(e=this.showError()?this.getErrorMessage():null,e||(e=this.showRequired()?c(this.props.label||this.props.placeholder||""):null));var t=i({"dops-field":!0,"dops-form-radio":!0,"dops-form-error":e},this.props.className);return r.createElement("div",{className:t},r.createElement(u,{name:this.props.name,uniqueId:this.state.uniqueId,choices:this.props.choices,changeValue:this.changeValue,selected:this.state.selectedItem}),e&&r.createElement(l,{text:e,isError:!0}))}})},function(e,t,n){"use strict";function r(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}var i=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}var i=Object.assign||function(e){for(var t=1;t\n \n \n Red\n Green\n Blue\n \n \n \n \n \n Red\n Green\n Blue\n \n \n\n \n \n Red\n Green\n Blue\n \n \n\n \n \n Red\n Green\n Blue\n \n \n \n \n \n Red\n Green
\n \n Blue\n Yellow
\n \n \n \n\n \n \n Red\n Green
\n \n Blue\n Yellow
\n \n \n \n \n );\n },\n} );\n\nReact.render(\n React.createElement( DemoView, {} ), document.getElementById( Demo.domId )\n);";
-},function(e,t,n){"use strict";function r(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function o(e){var t={},n=e.stretch?1:0,r=e.grow?e.grow:n,i=e.shrink?e.shrink:n,o=e.column?"column":"row",s="auto";return"number"==typeof e.width?r=e.width:e.width&&(t.width=e.width),e.height&&(t.height=e.height),t.flexBasis=s,t.flexGrow=r,t.flexShrink=i,t.flexDirection=o,t}var s=Object.assign||function(e){for(var t=1;tt?a.cloneElement(r,{style:l(r.props.style,i)}):r},this)},render:function(){var e=this.props,t=e.row,n=e.column,u=e.width,h=e.height,p=e.auto,d=e.style,f=e.stretch,v=e.child,m=i(e,["row","column","width","height","auto","style","stretch","child"]),g={row:t,column:n,width:u,height:h,auto:p,style:d,stretch:f,child:v},y=o(g);d=d||{};var w=this.props.child?l.apply(void 0,[y].concat(r(d))):l.apply(void 0,[c,y].concat(r(d)));return a.createElement("div",s({},m,{style:w}),this._childrenWithPadding())}});e.exports=u},function(e,t){e.exports="var Face = Demo.require( './face' );\n\nvar DemoFace = React.createClass( {\n\n render: function() {\n return (\n \n
Sad
\n \n Okay
\n \n Happy
\n \n Sad and huge
\n \n Happy and tiny
\n \n
\n );\n }\n} );\n\nReact.render(\n React.createElement( DemoFace, {} ), document.getElementById( Demo.domId )\n);"},function(e,t,n){"use strict";var r=n(96),i=n(328),o=r.createClass({displayName:"Face",propTypes:{happiness:r.PropTypes.number,size:r.PropTypes.number},getDefaultProps:function(){return{happiness:100,size:100}},style:{eyeWrapperStyle:{position:"absolute",top:"30%",left:"50%"}},_wrapperStyle:function(){var e=i().rgb(255,255,0).lighten(1-this.props.happiness/100);return{position:"relative",width:this.props.size,height:this.props.size,background:e.hexString(),borderRadius:this.props.size,boxShadow:"0px 0px 2px #000"}},_eyeStyle:function(){return{position:"absolute",top:0,width:0,height:0,border:.07*this.props.size+"px solid #171717",borderRadius:.07*this.props.size}},_leftEyeStyle:function(){var e=this._eyeStyle();return e.left=this.props.size/-4,e},_rightEyeStyle:function(){var e=this._eyeStyle();return e.right=this.props.size/-4,e},_mouthStyle:function(){return{position:"absolute",top:"20%",left:"50%",width:.6*this.props.size,height:.6*this.props.size,marginLeft:this.props.size*-.3,border:.05*this.props.size+"px solid #171717",borderRadius:this.props.happiness/100*this.props.size*.4,borderColor:"transparent transparent #171717 transparent"}},render:function(){return r.createElement("div",{style:this._wrapperStyle()},r.createElement("span",{style:this.style.eyeWrapperStyle},r.createElement("div",{style:this._leftEyeStyle()}),r.createElement("div",{style:this._rightEyeStyle()})),r.createElement("span",{style:this._mouthStyle()}))}});e.exports=o},function(e,t,n){var r=n(329),i=n(331),o=function(e){if(e instanceof o)return e;if(!(this instanceof o))return new o(e);if(this.values={rgb:[0,0,0],hsl:[0,0,0],hsv:[0,0,0],hwb:[0,0,0],cmyk:[0,0,0,0],alpha:1},"string"==typeof e){var t=i.getRgba(e);if(t)this.setValues("rgb",t);else if(t=i.getHsla(e))this.setValues("hsl",t);else{if(!(t=i.getHwb(e)))throw new Error('Unable to parse color from string "'+e+'"');this.setValues("hwb",t)}}else if("object"==typeof e){var t=e;if(void 0!==t.r||void 0!==t.red)this.setValues("rgb",t);else if(void 0!==t.l||void 0!==t.lightness)this.setValues("hsl",t);else if(void 0!==t.v||void 0!==t.value)this.setValues("hsv",t);else if(void 0!==t.w||void 0!==t.whiteness)this.setValues("hwb",t);else{if(void 0===t.c&&void 0===t.cyan)throw new Error("Unable to parse color from object "+JSON.stringify(e));this.setValues("cmyk",t)}}};o.prototype={rgb:function(e){return this.setSpace("rgb",arguments)},hsl:function(e){return this.setSpace("hsl",arguments)},hsv:function(e){return this.setSpace("hsv",arguments)},hwb:function(e){return this.setSpace("hwb",arguments)},cmyk:function(e){return this.setSpace("cmyk",arguments)},rgbArray:function(){return this.values.rgb},hslArray:function(){return this.values.hsl},hsvArray:function(){return this.values.hsv},hwbArray:function(){return 1!==this.values.alpha?this.values.hwb.concat([this.values.alpha]):this.values.hwb},cmykArray:function(){return this.values.cmyk},rgbaArray:function(){var e=this.values.rgb;return e.concat([this.values.alpha])},hslaArray:function(){var e=this.values.hsl;return e.concat([this.values.alpha])},alpha:function(e){return void 0===e?this.values.alpha:(this.setValues("alpha",e),this)},red:function(e){return this.setChannel("rgb",0,e)},green:function(e){return this.setChannel("rgb",1,e)},blue:function(e){return this.setChannel("rgb",2,e)},hue:function(e){return this.setChannel("hsl",0,e)},saturation:function(e){return this.setChannel("hsl",1,e)},lightness:function(e){return this.setChannel("hsl",2,e)},saturationv:function(e){return this.setChannel("hsv",1,e)},whiteness:function(e){return this.setChannel("hwb",1,e)},blackness:function(e){return this.setChannel("hwb",2,e)},value:function(e){return this.setChannel("hsv",2,e)},cyan:function(e){return this.setChannel("cmyk",0,e)},magenta:function(e){return this.setChannel("cmyk",1,e)},yellow:function(e){return this.setChannel("cmyk",2,e)},black:function(e){return this.setChannel("cmyk",3,e)},hexString:function(){return i.hexString(this.values.rgb)},rgbString:function(){return i.rgbString(this.values.rgb,this.values.alpha)},rgbaString:function(){return i.rgbaString(this.values.rgb,this.values.alpha)},percentString:function(){return i.percentString(this.values.rgb,this.values.alpha)},hslString:function(){return i.hslString(this.values.hsl,this.values.alpha)},hslaString:function(){return i.hslaString(this.values.hsl,this.values.alpha)},hwbString:function(){return i.hwbString(this.values.hwb,this.values.alpha)},keyword:function(){return i.keyword(this.values.rgb,this.values.alpha)},rgbNumber:function(){return this.values.rgb[0]<<16|this.values.rgb[1]<<8|this.values.rgb[2]},luminosity:function(){for(var e=this.values.rgb,t=[],n=0;n=r?r/12.92:Math.pow((r+.055)/1.055,2.4)}return.2126*t[0]+.7152*t[1]+.0722*t[2]},contrast:function(e){var t=this.luminosity(),n=e.luminosity();return t>n?(t+.05)/(n+.05):(n+.05)/(t+.05)},level:function(e){var t=this.contrast(e);return t>=7.1?"AAA":t>=4.5?"AA":""},dark:function(){var e=this.values.rgb,t=(299*e[0]+587*e[1]+114*e[2])/1e3;return 128>t},light:function(){return!this.dark()},negate:function(){for(var e=[],t=0;3>t;t++)e[t]=255-this.values.rgb[t];return this.setValues("rgb",e),this},lighten:function(e){return this.values.hsl[2]+=this.values.hsl[2]*e,this.setValues("hsl",this.values.hsl),this},darken:function(e){return this.values.hsl[2]-=this.values.hsl[2]*e,this.setValues("hsl",this.values.hsl),this},saturate:function(e){return this.values.hsl[1]+=this.values.hsl[1]*e,this.setValues("hsl",this.values.hsl),this},desaturate:function(e){return this.values.hsl[1]-=this.values.hsl[1]*e,this.setValues("hsl",this.values.hsl),this},whiten:function(e){return this.values.hwb[1]+=this.values.hwb[1]*e,this.setValues("hwb",this.values.hwb),this},blacken:function(e){return this.values.hwb[2]+=this.values.hwb[2]*e,this.setValues("hwb",this.values.hwb),this},greyscale:function(){var e=this.values.rgb,t=.3*e[0]+.59*e[1]+.11*e[2];return this.setValues("rgb",[t,t,t]),this},clearer:function(e){return this.setValues("alpha",this.values.alpha-this.values.alpha*e),this},opaquer:function(e){return this.setValues("alpha",this.values.alpha+this.values.alpha*e),this},rotate:function(e){var t=this.values.hsl[0];return t=(t+e)%360,t=0>t?360+t:t,this.values.hsl[0]=t,this.setValues("hsl",this.values.hsl),this},mix:function(e,t){var n=this,r=e,i=void 0!==t?t:.5,o=2*i-1,s=n.alpha()-r.alpha(),a=((o*s==-1?o:(o+s)/(1+o*s))+1)/2,l=1-a;return this.rgb(a*n.red()+l*r.red(),a*n.green()+l*r.green(),a*n.blue()+l*r.blue()).alpha(n.alpha()*i+r.alpha()*(1-i))},toJSON:function(){return this.rgb()},clone:function(){return new o(this.rgb())}},o.prototype.getValues=function(e){for(var t={},n=0;nt&&(t+=360),r=(a+l)/2,n=l==a?0:.5>=r?c/(l+a):c/(2-l-a),[t,100*n,100*r]}function i(e){var t,n,r,i=e[0],o=e[1],s=e[2],a=Math.min(i,o,s),l=Math.max(i,o,s),c=l-a;return n=0==l?0:c/l*1e3/10,l==a?t=0:i==l?t=(o-s)/c:o==l?t=2+(s-i)/c:s==l&&(t=4+(i-o)/c),t=Math.min(60*t,360),0>t&&(t+=360),r=l/255*1e3/10,[t,n,r]}function o(e){var t=e[0],r=e[1],i=e[2],o=n(e)[0],s=1/255*Math.min(t,Math.min(r,i)),i=1-1/255*Math.max(t,Math.max(r,i));return[o,100*s,100*i]}function s(e){var t,n,r,i,o=e[0]/255,s=e[1]/255,a=e[2]/255;return i=Math.min(1-o,1-s,1-a),t=(1-o-i)/(1-i)||0,n=(1-s-i)/(1-i)||0,r=(1-a-i)/(1-i)||0,[100*t,100*n,100*r,100*i]}function a(e){return X[JSON.stringify(e)]}function l(e){var t=e[0]/255,n=e[1]/255,r=e[2]/255;t=t>.04045?Math.pow((t+.055)/1.055,2.4):t/12.92,n=n>.04045?Math.pow((n+.055)/1.055,2.4):n/12.92,r=r>.04045?Math.pow((r+.055)/1.055,2.4):r/12.92;var i=.4124*t+.3576*n+.1805*r,o=.2126*t+.7152*n+.0722*r,s=.0193*t+.1192*n+.9505*r;return[100*i,100*o,100*s]}function c(e){var t,n,r,i=l(e),o=i[0],s=i[1],a=i[2];return o/=95.047,s/=100,a/=108.883,o=o>.008856?Math.pow(o,1/3):7.787*o+16/116,s=s>.008856?Math.pow(s,1/3):7.787*s+16/116,a=a>.008856?Math.pow(a,1/3):7.787*a+16/116,t=116*s-16,n=500*(o-s),r=200*(s-a),[t,n,r]}function u(e){return I(c(e))}function h(e){var t,n,r,i,o,s=e[0]/360,a=e[1]/100,l=e[2]/100;if(0==a)return o=255*l,[o,o,o];n=.5>l?l*(1+a):l+a-l*a,t=2*l-n,i=[0,0,0];for(var c=0;3>c;c++)r=s+1/3*-(c-1),0>r&&r++,r>1&&r--,o=1>6*r?t+6*(n-t)*r:1>2*r?n:2>3*r?t+(n-t)*(2/3-r)*6:t,i[c]=255*o;return i}function p(e){var t,n,r=e[0],i=e[1]/100,o=e[2]/100;return 0===o?[0,0,0]:(o*=2,i*=1>=o?o:2-o,n=(o+i)/2,t=2*i/(o+i),[r,100*t,100*n])}function d(e){return o(h(e))}function f(e){return s(h(e))}function v(e){return a(h(e))}function m(e){var t=e[0]/60,n=e[1]/100,r=e[2]/100,i=Math.floor(t)%6,o=t-Math.floor(t),s=255*r*(1-n),a=255*r*(1-n*o),l=255*r*(1-n*(1-o)),r=255*r;switch(i){case 0:return[r,l,s];case 1:return[a,r,s];case 2:return[s,r,l];case 3:return[s,a,r];case 4:return[l,s,r];case 5:return[r,s,a]}}function y(e){var t,n,r=e[0],i=e[1]/100,o=e[2]/100;return n=(2-i)*o,t=i*o,t/=1>=n?n:2-n,t=t||0,n/=2,[r,100*t,100*n]}function w(e){return o(m(e))}function x(e){return s(m(e))}function E(e){return a(m(e))}function C(e){var t,n,i,o,s=e[0]/360,a=e[1]/100,l=e[2]/100,c=a+l;switch(c>1&&(a/=c,l/=c),t=Math.floor(6*s),n=1-l,i=6*s-t,0!=(1&t)&&(i=1-i),o=a+i*(n-a),t){default:case 6:case 0:r=n,g=o,b=a;break;case 1:r=o,g=n,b=a;break;case 2:r=a,g=n,b=o;break;case 3:r=a,g=o,b=n;break;case 4:r=o,g=a,b=n;break;case 5:r=n,g=a,b=o}return[255*r,255*g,255*b]}function k(e){return n(C(e))}function S(e){return i(C(e))}function z(e){return s(C(e))}function M(e){return a(C(e))}function T(e){var t,n,r,i=e[0]/100,o=e[1]/100,s=e[2]/100,a=e[3]/100;return t=1-Math.min(1,i*(1-a)+a),n=1-Math.min(1,o*(1-a)+a),r=1-Math.min(1,s*(1-a)+a),[255*t,255*n,255*r]}function N(e){return n(T(e))}function L(e){return i(T(e))}function P(e){return o(T(e))}function F(e){return a(T(e))}function O(e){var t,n,r,i=e[0]/100,o=e[1]/100,s=e[2]/100;return t=3.2406*i+-1.5372*o+s*-.4986,n=i*-.9689+1.8758*o+.0415*s,r=.0557*i+o*-.204+1.057*s,t=t>.0031308?1.055*Math.pow(t,1/2.4)-.055:t=12.92*t,n=n>.0031308?1.055*Math.pow(n,1/2.4)-.055:n=12.92*n,r=r>.0031308?1.055*Math.pow(r,1/2.4)-.055:r=12.92*r,t=Math.min(Math.max(0,t),1),n=Math.min(Math.max(0,n),1),r=Math.min(Math.max(0,r),1),[255*t,255*n,255*r]}function A(e){var t,n,r,i=e[0],o=e[1],s=e[2];return i/=95.047,o/=100,s/=108.883,i=i>.008856?Math.pow(i,1/3):7.787*i+16/116,o=o>.008856?Math.pow(o,1/3):7.787*o+16/116,s=s>.008856?Math.pow(s,1/3):7.787*s+16/116,t=116*o-16,n=500*(i-o),r=200*(o-s),[t,n,r]}function D(e){return I(A(e))}function V(e){var t,n,r,i,o=e[0],s=e[1],a=e[2];return 8>=o?(n=100*o/903.3,i=7.787*(n/100)+16/116):(n=100*Math.pow((o+16)/116,3),i=Math.pow(n/100,1/3)),t=.008856>=t/95.047?t=95.047*(s/500+i-16/116)/7.787:95.047*Math.pow(s/500+i,3),r=.008859>=r/108.883?r=108.883*(i-a/200-16/116)/7.787:108.883*Math.pow(i-a/200,3),[t,n,r]}function I(e){var t,n,r,i=e[0],o=e[1],s=e[2];return t=Math.atan2(s,o),n=360*t/2/Math.PI,0>n&&(n+=360),r=Math.sqrt(o*o+s*s),[i,r,n]}function _(e){return O(V(e))}function H(e){var t,n,r,i=e[0],o=e[1],s=e[2];return r=s/360*2*Math.PI,t=o*Math.cos(r),n=o*Math.sin(r),[i,t,n]}function B(e){return V(H(e))}function j(e){return _(H(e))}function R(e){return Y[e]}function W(e){return n(R(e))}function q(e){return i(R(e))}function G(e){return o(R(e))}function U(e){return s(R(e))}function K(e){return c(R(e))}function $(e){return l(R(e))}e.exports={rgb2hsl:n,rgb2hsv:i,rgb2hwb:o,rgb2cmyk:s,rgb2keyword:a,rgb2xyz:l,rgb2lab:c,rgb2lch:u,hsl2rgb:h,hsl2hsv:p,hsl2hwb:d,hsl2cmyk:f,hsl2keyword:v,hsv2rgb:m,hsv2hsl:y,hsv2hwb:w,hsv2cmyk:x,hsv2keyword:E,hwb2rgb:C,hwb2hsl:k,hwb2hsv:S,hwb2cmyk:z,hwb2keyword:M,cmyk2rgb:T,cmyk2hsl:N,cmyk2hsv:L,cmyk2hwb:P,cmyk2keyword:F,keyword2rgb:R,keyword2hsl:W,keyword2hsv:q,keyword2hwb:G,keyword2cmyk:U,keyword2lab:K,keyword2xyz:$,xyz2rgb:O,xyz2lab:A,xyz2lch:D,lab2xyz:V,lab2rgb:_,lab2lch:I,lch2lab:H,lch2xyz:B,lch2rgb:j};var Y={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},X={};for(var Z in Y)X[JSON.stringify(Y[Z])]=Z},function(e,t,n){function r(e){if(e){var t=/^#([a-fA-F0-9]{3})$/,n=/^#([a-fA-F0-9]{6})$/,r=/^rgba?\(\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/,i=/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/,o=/(\D+)/,s=[0,0,0],a=1,l=e.match(t);if(l){l=l[1];for(var c=0;ct||e[3]&&e[3]<1?h(e,t):"rgb("+e[0]+", "+e[1]+", "+e[2]+")"}function h(e,t){return void 0===t&&(t=void 0!==e[3]?e[3]:1),"rgba("+e[0]+", "+e[1]+", "+e[2]+", "+t+")"}function p(e,t){if(1>t||e[3]&&e[3]<1)return d(e,t);var n=Math.round(e[0]/255*100),r=Math.round(e[1]/255*100),i=Math.round(e[2]/255*100);return"rgb("+n+"%, "+r+"%, "+i+"%)"}function d(e,t){var n=Math.round(e[0]/255*100),r=Math.round(e[1]/255*100),i=Math.round(e[2]/255*100);return"rgba("+n+"%, "+r+"%, "+i+"%, "+(t||e[3]||1)+")"}function f(e,t){return 1>t||e[3]&&e[3]<1?v(e,t):"hsl("+e[0]+", "+e[1]+"%, "+e[2]+"%)"}function v(e,t){return void 0===t&&(t=void 0!==e[3]?e[3]:1),"hsla("+e[0]+", "+e[1]+"%, "+e[2]+"%, "+t+")"}function m(e,t){return void 0===t&&(t=void 0!==e[3]?e[3]:1),"hwb("+e[0]+", "+e[1]+"%, "+e[2]+"%"+(void 0!==t&&1!==t?", "+t:"")+")"}function g(e){return x[e.slice(0,3)]}function y(e,t,n){return Math.min(Math.max(t,e),n)}function w(e){var t=e.toString(16).toUpperCase();return t.length<2?"0"+t:t}var b=n(332);e.exports={getRgba:r,getHsla:i,getRgb:s,getHsl:a,getHwb:o,getAlpha:l,hexString:c,rgbString:u,rgbaString:h,percentString:p,percentaString:d,hslString:f,hslaString:v,hwbString:m,keyword:g};var x={};for(var E in b)x[b[E]]=E},function(e,t){e.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}},function(e,t){e.exports="var Slider = Demo.require( './slider' );\n\nvar DemoSlider = React.createClass( {\n\n style: {\n handle: {\n borderRadius: 3,\n padding: 3,\n minWidth: 80,\n textAlign: 'center',\n backgroundColor: 'black',\n color: 'white'\n }\n },\n\n getInitialState: function() {\n return { \n value: 50\n };\n },\n\n handleChangeSlider: function( value ) {\n this.setState( {value: value} );\n },\n\n render: function() {\n return (\n \n Slider value is:
{this.state.value}\n
\n ${this.state.value}.00/yr
\n \n
\n );\n }\n} );\n\nReact.render(\n React.createElement( DemoSlider, {} ), document.getElementById( Demo.domId )\n);"},function(e,t,n){"use strict";function r(e){return e.stopPropagation&&e.stopPropagation(),e.preventDefault&&e.preventDefault(),e.cancelBubble=!0,e.returnValue=!1,!1}function o(e){e.stopPropagation&&e.stopPropagation(),e.cancelBubble=!0}function s(e,t,n){for(var r=(t-e)/(n-1),i=[],o=0;n>o;o++)i.push(e+r*o);return i}function a(e){return null===e?[]:Array.isArray(e)?e:[e]}function l(e){return null!==e&&1===e.length?e[0]:e}var c=n(96),u=n(271);n(335);var h=c.createClass({displayName:"ReactSlider",propTypes:{min:c.PropTypes.number,max:c.PropTypes.number,step:c.PropTypes.number,minDistance:c.PropTypes.number,defaultValue:c.PropTypes.oneOfType([c.PropTypes.number,c.PropTypes.arrayOf(c.PropTypes.number)]),value:c.PropTypes.oneOfType([c.PropTypes.number,c.PropTypes.arrayOf(c.PropTypes.number)]),skipValues:c.PropTypes.array,orientation:c.PropTypes.oneOf(["horizontal","vertical"]),className:c.PropTypes.string,handleClassName:c.PropTypes.string,handleActiveClassName:c.PropTypes.string,withBars:c.PropTypes.bool,barClassName:c.PropTypes.string,pearling:c.PropTypes.bool,disabled:c.PropTypes.bool,snapDragDisabled:c.PropTypes.bool,invert:c.PropTypes.bool,onBeforeChange:c.PropTypes.func,onChange:c.PropTypes.func,onAfterChange:c.PropTypes.func,onSliderClick:c.PropTypes.func,tabIndex:c.PropTypes.number},getDefaultProps:function(){return{min:0,max:100,step:1,tabIndex:0,"aria-label":"slider",minDistance:0,defaultValue:0,orientation:"horizontal",className:"dops-slider",handleClassName:"handle",handleActiveClassName:"active",barClassName:"bar",withBars:!1,pearling:!1,disabled:!1,snapDragDisabled:!1,invert:!1}},getInitialState:function(){var e=this._or(a(this.props.value),a(this.props.defaultValue)),t=[];this.tempArray=e.slice();for(var n=0;nt.length&&(this.state.value.length=t.length),0===this.state.upperBound&&this._handleResize()},_or:function(e,t){var n=c.Children.count(this.props.children);switch(n){case 0:return e.length>0?e:t;case e.length:return e;case t.length:return t;default:return e.length===n&&t.length===n||console.warn(this.constructor.displayName+": Number of values does not match number of children."),s(this.props.min,this.props.max,n)}},componentDidMount:function(){window.addEventListener("resize",this._handleResize),this._handleResize()},componentWillUnmount:function(){window.removeEventListener("resize",this._handleResize)},getValue:function(){return l(this.state.value)},_handleResize:function(){window.setTimeout(function(){if(this.refs.slider){var e=this.refs.slider.getDOMNode(),t=this.refs.handle0.getDOMNode(),n=e.getBoundingClientRect(),r=this._sizeKey(),i=n[this._posMaxKey()],o=n[this._posMinKey()];this.setState({upperBound:e[r]-t[r],sliderLength:Math.abs(i-o),handleSize:t[r],sliderStart:this.props.invert?i:o})}}.bind(this),0)},_calcOffset:function(e){var t=(e-this.props.min)/(this.props.max-this.props.min);return t*this.state.upperBound},_calcValue:function(e){var t=e/this.state.upperBound;return t*(this.props.max-this.props.min)+this.props.min},_buildHandleStyle:function(e,t){var n={position:"absolute",willChange:this.state.index>=0?this._posMinKey():"",zIndex:this.state.zIndices.indexOf(t)+1};return n[this._posMinKey()]=e+"px",n},_buildBarStyle:function(e,t){var n={position:"absolute",willChange:this.state.index>=0?this._posMinKey()+","+this._posMaxKey():""};return n[this._posMinKey()]=e,n[this._posMaxKey()]=t,n},_getClosestIndex:function(e){for(var t=Number.MAX_VALUE,n=-1,r=this.state.value,i=r.length,o=0;i>o;o++){var s=this._calcOffset(r[o]),a=Math.abs(e-s);t>a&&(t=a,n=o)}return n},_calcOffsetFromPosition:function(e){var t=e-this.state.sliderStart;return this.props.invert&&(t=this.state.sliderLength-t),t-=this.state.handleSize/2},_forceValueFromPosition:function(e,t){var n=this._calcOffsetFromPosition(e),r=this._getClosestIndex(n),i=this._trimAlignValue(this._calcValue(n)),o=this.state.value.slice();o[r]=i;for(var s=0;s1)){var n=this._getTouchPosition(t);this.startPosition=n,this.isScrolling=void 0,this._start(e,n[0]),this._addHandlers(this._getTouchEventMap()),o(t)}}.bind(this)},_addHandlers:function(e){for(var t in e)document.addEventListener(t,e[t],!1)},_removeHandlers:function(e){for(var t in e)document.removeEventListener(t,e[t],!1)},_start:function(e,t){document.activeElement&&document.activeElement!==document.body&&document.activeElement.blur(),this.hasMoved=!1,this._fireChangeEvent("onBeforeChange");var n=this.state.zIndices;n.splice(n.indexOf(e),1),n.push(e),this.setState({startValue:this.state.value[e],startPosition:t,index:e,zIndices:n})},_onMouseUp:function(){this._onEnd(this._getMouseEventMap())},_onTouchEnd:function(){this._onEnd(this._getTouchEventMap())},_onEnd:function(e){this._removeHandlers(e),this.setState({index:-1},this._fireChangeEvent.bind(this,"onAfterChange"))},_onMouseMove:function(e){var t=this._getMousePosition(e);this._move(t[0])},_onTouchMove:function(e){if(!(e.touches.length>1)){var t=this._getTouchPosition(e);if("undefined"==typeof this.isScrolling){var n=t[0]-this.startPosition[0],i=t[1]-this.startPosition[1];this.isScrolling=Math.abs(i)>Math.abs(n)}if(this.isScrolling)return void this.setState({index:-1});r(e),this._move(t[0])}},_move:function(e){this.hasMoved=!0;var t=this.props,n=this.state,r=n.index,i=n.value,o=i.length,s=i[r],a=e-n.startPosition;t.invert&&(a*=-1);var l=a/(n.sliderLength-n.handleSize)*(t.max-t.min),c=this._trimAlignValue(n.startValue+l),u=t.minDistance;if(!t.pearling){if(r>0){var h=i[r-1];h+u>c&&(c=h+u)}if(o-1>r){var p=i[r+1];c>p-u&&(c=p-u)}}i[r]=c,t.pearling&&o>1&&(c>s?(this._pushSucceeding(o,i,u,r),this._trimSucceeding(o,i,u,t.max)):s>c&&(this._pushPreceding(o,i,u,r),this._trimPreceding(o,i,u,t.min))),c!==s&&this.setState({value:i},this._fireChangeEvent.bind(this,"onChange"))},_pushSucceeding:function(e,t,n,r){var i,o;for(i=r,o=t[i]+n;null!==t[i+1]&&o>t[i+1];i++,o=t[i]+n)t[i+1]=this._alignValue(o)},_trimSucceeding:function(e,t,n,r){for(var i=0;e>i;i++){var o=r-i*n;t[e-1-i]>o&&(t[e-1-i]=o)}},_pushPreceding:function(e,t,n,r){var i,o;for(i=r,o=t[i]-n;null!==t[i-1]&&oi;i++){var o=r+i*n;t[i]=t.max&&(e=t.max),e},_alignValue:function(e,t){t=t||this.props;var n=(e-t.min)%t.step,r=e-n;return 2*Math.abs(n)>=t.step&&(r+=n>0?t.step:-t.step),this.props.skipValues&&this.props.skipValues.indexOf(r)>=0&&(r-t.step>=this.props.min?r-=t.step:r+=t.step),parseFloat(r.toFixed(5))},_renderHandle:function(e,t,n){for(var r=this.props.handleClassName+" "+(this.props.handleClassName+"-"+n)+" "+(this.state.index===n?this.props.handleActiveClassName:""),i=[],o=this.props.min;o<=this.props.max;o+=this.props.step)-1===this.props.skipValues.indexOf(o)&&i.push(c.createElement("option",{value:o},"$"+o+".00"));return c.createElement("div",{key:"handle"+n},c.createElement("div",{"data-index":n,ref:"handle"+n,className:r,style:e,"aria-hidden":!0,tabIndex:"0",onKeyDown:this._handleKeyDown,onMouseDown:this._createOnMouseDown(n),onTouchStart:this._createOnTouchStart(n)},t),c.createElement(u,null,c.createElement("select",{"data-index":n,onChange:this._handleShadowInput},i)))},_renderHandles:function(e){for(var t=e.length,n=this.tempArray,r=0;t>r;r++)n[r]=this._buildHandleStyle(e[r],r);var o=this.tempArray,s=this._renderHandle;if(c.Children.count(this.props.children)>0)c.Children.forEach(this.props.children,function(e,t){o[t]=s(n[t],e,t)});else for(i=0;ir;r++)t.push(this._renderBar(r+1,e[r],e[r+1]));return t.push(this._renderBar(n+1,e[n],this.state.upperBound)),t},_onSliderMouseDown:function(e){var t=this;this.props.disabled||(this.hasMoved=!1,this.props.snapDragDisabled||!function(){var n=t._getMousePosition(e);t._forceValueFromPosition(n[0],function(e){this._fireChangeEvent("onChange"),this._start(e,n[0]),this._addHandlers(this._getMouseEventMap())}.bind(t))}(),r(e))},_onSliderClick:function(e){if(!this.props.disabled&&this.props.onSliderClick&&!this.hasMoved){var t=this._getMousePosition(e),n=this._trimAlignValue(this._calcValue(this._calcOffsetFromPosition(t[0])));this.props.onSliderClick(n)}},_fireChangeEvent:function(e){this.props[e]&&this.props[e](l(this.state.value))},_stepHandle:function(e,t){var n=this.state.value,r=n[e];t?r+=this.props.step:r-=this.props.step,n[e]=this._trimAlignValue(r),this.setState({value:n},this._fireChangeEvent.bind(this,"onChange"))},_handleKeyDown:function(e){e.stopPropagation();var t=0;switch("undefined"!==e.target.dataset.index&&(t=e.target.dataset.index),e.which){case 38:case 39:this._stepHandle(t,!0);break;case 40:case 37:this._stepHandle(t,!1);break;default:return}},_handleShadowInput:function(e){e.stopPropagation();var t=0,n=this.state.value;"undefined"!==e.target.dataset.index&&(t=e.target.dataset.index);var r=n[t];r=6===parseInt(e.target.value)?0===parseInt(r)?12:0:e.target.value,n[t]=this._trimAlignValue(r),this.setState({value:n},this._fireChangeEvent.bind(this,"onChange"))},render:function(){for(var e=this.state,t=this.props,n=this.tempArray,r=e.value,i=r.length,o=0;i>o;o++)n[o]=this._calcOffset(r[o],o);var s=t.withBars?this._renderBars(n):null,a=this._renderHandles(n),l=t.className+(t.disabled?" disabled":"");return c.createElement("div",{ref:"slider",id:this.props.id,style:this.props.style,className:l,onMouseDown:this._onSliderMouseDown,onClick:this._onSliderClick},s,a)}});e.exports=h},97,function(e,t,n){"use strict";var r=n(96),i=n(275),o=n(290),s=n(293);n(337);var a=r.createClass({displayName:"Section",render:function(){return r.createElement("div",{className:"styleguide-section"},r.createElement("h2",null,this.props.title),this.props.children)}}),l=r.createClass({displayName:"Subsection",render:function(){return r.createElement("div",{className:"styleguide-subsection"},r.createElement("h3",null,this.props.title),this.props.children)}}),c=r.createClass({displayName:"SectionDemo",render:function(){return r.createElement("div",{className:"styleguide-section-demo"},this.props.children)}}),u=r.createClass({displayName:"Styleguide",render:function(){return r.createElement("div",{className:"styleguide"},r.createElement("h1",null,"Style Guide"),r.createElement(a,{title:"Cards"},r.createElement(c,null,r.createElement(i,{title:"Subscriptions"},r.createElement("strong",null,"Akismet + VaultPress Premium"),"Anti-Spam with WordPress backup")),r.createElement(l,{title:"Card Header"},"height: 50px",r.createElement("br",null),"background: #F9F9F9",r.createElement("br",null),"border-bottom: 1px solid #DDD"),r.createElement(l,{title:"Card"},"background: #FFFFFF",r.createElement("br",null),"border-bottom: 1px solid #DDD padding: 24px")),r.createElement(a,{title:"Type"},r.createElement("div",{className:"clear"},r.createElement(c,null,r.createElement("h1",null,"Quick foxes jump nightly above wizards.")),r.createElement(l,{title:"Page Title"},"Open Sans Light (300)",r.createElement("br",null),"font-size: 24px",r.createElement("br",null),"line-height: 32px",r.createElement("br",null),"color: #333")),r.createElement("div",{className:"clear"},r.createElement(c,null,r.createElement("h2",null,"Quick foxes jump nightly above wizards.")),r.createElement(l,{title:"Subtitle"},"Open Sans Light (300)",r.createElement("br",null),"font-size: 21px",r.createElement("br",null),"line-height: 32px",r.createElement("br",null),"color: #333")),r.createElement("div",{className:"clear"},r.createElement(c,null,r.createElement("p",null,"“A man who would letterspace lower case would steal sheep,” Frederic Goudy liked to say. The reason for not letterspacing lower case is that it hampers legibility. But there are some lowercase alphabets to which…")),r.createElement(l,{title:"Body Text"},"Open Sans Regular (400)",r.createElement("br",null),"font-size: 14px",r.createElement("br",null),"line-height: 21px",r.createElement("br",null),"color: #333")),r.createElement("div",{className:"clear"},r.createElement(c,null,r.createElement("p",{className:"card-label"},"views per page")),r.createElement(l,{title:"Card / Section Label"},"Open Sans Regular (400)",r.createElement("br",null),"All Caps",r.createElement("br",null),"font-size: 11px",r.createElement("br",null),"line-height: 16px",r.createElement("br",null),"color: #999"))),r.createElement(a,{title:"Buttons"},r.createElement(l,{title:"Standard Button"},r.createElement(o,null,"Label")),r.createElement(l,{title:"Primary Button"},r.createElement(o,{primary:!0},"Label"))),r.createElement(a,{title:"Dropdowns"},r.createElement(l,{title:"Default"},r.createElement(s,null,r.createElement(s.SelectInput,{name:"foo"},r.createElement("option",null,"Foo"),r.createElement("option",null,"Bar"))))))}});e.exports=u},97,97]));
\ No newline at end of file
+!function(){"use strict";function n(){for(var t=[],e=0;e6,i=1===this.getCount(),o=this.props.allSitesPath,a=this.props.siteBasePath;return t=this.state.search?this.props.sites.search(this.state.search):this.props.sites.get(),t=t.map(function(t,e){return r.createElement(c,{site:t,href:a+"/"+t.id,key:e,indicator:this.props.indicator,onSelect:this.onSiteSelect,isSelected:this.props.sites.selected===t.domain})},this),this.props.showAllSites&&!this.state.search&&o&&t.unshift(r.createElement(l,{key:"selector-all-sites",sites:this.props.sites,href:o,onSelect:this.onSiteSelect,isSelected:!this.props.sites.selected})),e=s("site-selector","sites-list",{"is-large":n,"is-single":i}),r.createElement("div",{className:e,ref:"siteSelector"},this.searchElement(),t.length?t:r.createElement("div",{className:"site-selector__no-results"},this.translate("No sites found")),this.addNewSite())}})},function(t,e,n){(function(e){"use strict";function r(t,e){if("function"==typeof t)return r("*",t);if("function"==typeof e)for(var n=new a(t),i=1;i-1)&&!n.target&&u(n.href)){var o=n.pathname+n.search+(n.hash||"");"undefined"!=typeof e&&o.match(/^\/[a-zA-Z]:\//)&&(o=o.replace(/^\/[a-zA-Z]:\//,"/"));var s=o;0===o.indexOf(y)&&(o=o.substr(y.length)),w&&(o=o.replace("#!","")),y&&s===o||(t.preventDefault(),r.show(s))}}}}function c(t){return t=t||window.event,null===t.which?t.button:t.which}function u(t){var e=v.protocol+"//"+v.hostname;return v.port&&(e+=":"+v.port),t&&0===t.indexOf(e)}var h=n(311);t.exports=r;var p,f,d="undefined"!=typeof document&&document.ontouchstart?"touchstart":"click",v="undefined"!=typeof window&&(window.history.location||window.location),m=!0,g=!0,y="",w=!1;r.callbacks=[],r.exits=[],r.current="",r.len=0,r.base=function(t){return 0===arguments.length?y:void(y=t)},r.start=function(t){if(t=t||{},!p&&(p=!0,!1===t.dispatch&&(m=!1),!1===t.decodeURLComponents&&(g=!1),!1!==t.popstate&&window.addEventListener("popstate",b,!1),!1!==t.click&&document.addEventListener(d,l,!1),!0===t.hashbang&&(w=!0),m)){var e=w&&~v.hash.indexOf("#!")?v.hash.substr(2)+v.search:v.pathname+v.search+v.hash;r.replace(e,null,!0,m)}},r.stop=function(){p&&(r.current="",r.len=0,p=!1,document.removeEventListener(d,l,!1),window.removeEventListener("popstate",b,!1))},r.show=function(t,e,n,i){var o=new s(t,e);return r.current=o.path,!1!==n&&r.dispatch(o),!1!==o.handled&&!1!==i&&o.pushState(),o},r.back=function(t,e){r.len>0?(history.back(),r.len--):t?setTimeout(function(){r.show(t,e)}):setTimeout(function(){r.show(y,e)})},r.redirect=function(t,e){"string"==typeof t&&"string"==typeof e&&r(t,function(t){setTimeout(function(){r.replace(e)},0)}),"string"==typeof t&&"undefined"==typeof e&&setTimeout(function(){r.replace(t)},0)},r.replace=function(t,e,n,i){var o=new s(t,e);return r.current=o.path,o.init=n,o.save(),!1!==i&&r.dispatch(o),o},r.dispatch=function(t){function e(){var t=r.exits[a++];return t?void t(o,e):n()}function n(){var e=r.callbacks[s++];return t.path!==r.current?void(t.handled=!1):e?void e(t,n):i(t)}var o=f,s=0,a=0;f=t,o?e():n()},r.exit=function(t,e){if("function"==typeof t)return r.exit("*",t);for(var n=new a(t),i=1;i0&&a(h)&&(n||s(h)||o(h))?e>1?r(h,e-1,n,l):i(l,h):n||(l[l.length]=h)}return l}var i=n(318),o=n(319),s=n(328),a=n(320);t.exports=r},function(t,e){function n(t,e){for(var n=-1,r=e.length,i=t.length;++n-1&&t%1==0&&t<=r}var r=9007199254740991;t.exports=n},function(t,e){function n(t){return!!t&&"object"==typeof t}t.exports=n},function(t,e){var n=Array.isArray;t.exports=n},function(t,e,n){function r(t,e,n){var r=-1,h=o,p=t.length,f=!0,d=[],v=d;if(n)f=!1,h=s;else if(p>=u){var m=e?null:l(t);if(m)return c(m);f=!1,h=a,v=new i}else v=e?[]:d;t:for(;++r-1}var i=n(344);t.exports=r},function(t,e,n){function r(t,e){var n=this.__data__;return a(t)?s("string"==typeof t?n.string:n.hash,t,e):i?n.map.set(t,e):o(n.map,t,e),this}var i=n(338),o=n(355),s=n(356),a=n(348);t.exports=r},function(t,e,n){function r(t,e,n){var r=i(t,e);r<0?t.push([e,n]):t[r][1]=n}var i=n(344);t.exports=r},function(t,e,n){function r(t,e,n){t[e]=i&&void 0===n?o:n}var i=n(334),o="__lodash_hash_undefined__";t.exports=r},function(t,e,n){function r(t){var e=this.__data__;if(i(t)){var n=e.__data__,r="string"==typeof t?n.string:n.hash;r[t]=o}else e.set(t,o)}var i=n(348),o="__lodash_hash_undefined__";t.exports=r},function(t,e,n){function r(t,e){return!!t.length&&i(t,e,0)>-1}var i=n(359);t.exports=r},function(t,e,n){function r(t,e,n){if(e!==e)return i(t,n);for(var r=n-1,o=t.length;++r",'"',"`"," ","\r","\n","\t"],m=["{","}","|","\\","^","`"].concat(v),g=["'"].concat(m),y=["%","/","?",";","#"].concat(g),w=["/","?","#"],b=255,x=/^[a-z0-9A-Z_-]{0,63}$/,E=/^([a-z0-9A-Z_-]{0,63})(.*)$/,C={javascript:!0,"javascript:":!0},k={javascript:!0,"javascript:":!0},S={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},M=n(373);r.prototype.parse=function(t,e,n){if(!l(t))throw new TypeError("Parameter 'url' must be a string, not "+typeof t);var r=t;r=r.trim();var i=f.exec(r);if(i){i=i[0];var o=i.toLowerCase();this.protocol=o,r=r.substr(i.length)}if(n||i||r.match(/^\/\/[^@\/]+@[^@\/]+/)){var s="//"===r.substr(0,2);!s||i&&k[i]||(r=r.substr(2),this.slashes=!0)}if(!k[i]&&(s||i&&!S[i])){for(var a=-1,c=0;c127?"x":T[L];if(!N.match(x)){var F=m.slice(0,c),A=m.slice(c+1),O=T.match(E);O&&(F.push(O[1]),A.unshift(O[2])),A.length&&(r="/"+A.join(".")+r),this.hostname=F.join(".");break}}}if(this.hostname.length>b?this.hostname="":this.hostname=this.hostname.toLowerCase(),!v){for(var _=this.hostname.split("."),V=[],c=0;c<_.length;++c){var I=_[c];V.push(I.match(/[^A-Za-z0-9_-]/)?"xn--"+p.encode(I):I)}this.hostname=V.join(".")}var D=this.port?":"+this.port:"",H=this.hostname||"";this.host=H+D,this.href+=this.host,v&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==r[0]&&(r="/"+r))}if(!C[o])for(var c=0,z=g.length;c0)&&n.host.split("@");m&&(n.auth=m.shift(),n.host=n.hostname=m.shift())}return n.search=t.search,n.query=t.query,u(n.pathname)&&u(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.href=n.format(),n}if(!d.length)return n.pathname=null,n.search?n.path="/"+n.search:n.path=null,n.href=n.format(),n;for(var g=d.slice(-1)[0],y=(n.host||t.host)&&("."===g||".."===g)||""===g,w=0,b=d.length;b>=0;b--)g=d[b],"."==g?d.splice(b,1):".."===g?(d.splice(b,1),w++):w&&(d.splice(b,1),w--);if(!p&&!f)for(;w--;w)d.unshift("..");!p||""===d[0]||d[0]&&"/"===d[0].charAt(0)||d.unshift(""),y&&"/"!==d.join("/").substr(-1)&&d.push("");var x=""===d[0]||d[0]&&"/"===d[0].charAt(0);if(v){n.hostname=n.host=x?"":d.length?d.shift():"";var m=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@");m&&(n.auth=m.shift(),n.host=n.hostname=m.shift())}return p=p||n.host&&d.length,p&&!x&&d.unshift(""),d.length?n.pathname=d.join("/"):(n.pathname=null,n.path=null),u(n.pathname)&&u(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.auth=t.auth||n.auth,n.slashes=n.slashes||t.slashes,n.href=n.format(),n},r.prototype.parseHost=function(){var t=this.host,e=d.exec(t);e&&(e=e[0],":"!==e&&(this.port=e.substr(1)),t=t.substr(0,t.length-e.length)),t&&(this.hostname=t)}},function(t,e,n){var r;(function(t,i){!function(o){function s(t){throw RangeError(F[t])}function a(t,e){for(var n=t.length,r=[];n--;)r[n]=e(t[n]);return r}function l(t,e){var n=t.split("@"),r="";n.length>1&&(r=n[0]+"@",t=n[1]),t=t.replace(P,".");var i=t.split("."),o=a(i,e).join(".");return r+o}function c(t){for(var e,n,r=[],i=0,o=t.length;i=55296&&e<=56319&&i65535&&(t-=65536,e+=_(t>>>10&1023|55296),t=56320|1023&t),e+=_(t)}).join("")}function h(t){return t-48<10?t-22:t-65<26?t-65:t-97<26?t-97:x}function p(t,e){return t+22+75*(t<26)-((0!=e)<<5)}function f(t,e,n){var r=0;for(t=n?O(t/S):t>>1,t+=O(t/e);t>A*C>>1;r+=x)t=O(t/A);return O(r+(A+1)*t/(t+k))}function d(t){var e,n,r,i,o,a,l,c,p,d,v=[],m=t.length,g=0,y=z,w=M;for(n=t.lastIndexOf(T),n<0&&(n=0),r=0;r=128&&s("not-basic"),v.push(t.charCodeAt(r));for(i=n>0?n+1:0;i=m&&s("invalid-input"),c=h(t.charCodeAt(i++)),(c>=x||c>O((b-g)/a))&&s("overflow"),g+=c*a,p=l<=w?E:l>=w+C?C:l-w,!(cO(b/d)&&s("overflow"),a*=d;e=v.length+1,w=f(g-o,e,0==o),O(g/e)>b-y&&s("overflow"),y+=O(g/e),g%=e,v.splice(g++,0,y)}return u(v)}function v(t){var e,n,r,i,o,a,l,u,h,d,v,m,g,y,w,k=[];for(t=c(t),m=t.length,e=z,n=0,o=M,a=0;a=e&&vO((b-n)/g)&&s("overflow"),n+=(l-e)*g,e=l,a=0;ab&&s("overflow"),v==e){for(u=n,h=x;d=h<=o?E:h>=o+C?C:h-o,!(u= 0x80 (not a basic code point)","invalid-input":"Invalid input"},A=x-E,O=Math.floor,_=String.fromCharCode;w={version:"1.3.2",ucs2:{decode:c,encode:u},decode:d,encode:v,toASCII:g,toUnicode:m},r=function(){return w}.call(e,n,e,t),!(void 0!==r&&(t.exports=r))}(this)}).call(e,n(340)(t),function(){return this}())},function(t,e,n){"use strict";e.decode=e.parse=n(374),e.encode=e.stringify=n(375)},function(t,e){"use strict";function n(t,e){return Object.prototype.hasOwnProperty.call(t,e)}t.exports=function(t,e,r,i){e=e||"&",r=r||"=";var o={};if("string"!=typeof t||0===t.length)return o;var s=/\+/g;t=t.split(e);var a=1e3;i&&"number"==typeof i.maxKeys&&(a=i.maxKeys);var l=t.length;a>0&&l>a&&(l=a);for(var c=0;c=0?(u=d.substr(0,v),h=d.substr(v+1)):(u=d,h=""),p=decodeURIComponent(u),f=decodeURIComponent(h),n(o,p)?Array.isArray(o[p])?o[p].push(f):o[p]=[o[p],f]:o[p]=f}return o}},function(t,e){"use strict";var n=function(t){switch(typeof t){case"string":return t;case"boolean":return t?"true":"false";case"number":return isFinite(t)?t:"";default:return""}};t.exports=function(t,e,r,i){return e=e||"&",r=r||"=",null===t&&(t=void 0),"object"==typeof t?Object.keys(t).map(function(i){var o=encodeURIComponent(n(i))+r;return Array.isArray(t[i])?t[i].map(function(t){return o+encodeURIComponent(n(t))}).join(e):o+encodeURIComponent(n(t[i]))}).join(e):i?encodeURIComponent(n(i))+r+encodeURIComponent(n(t)):""}},300,300,function(t,e,n){"use strict";var r=n(299),i=n(306),o=n(370);n(379),t.exports=r.createClass({displayName:"Site",getDefaultProps:function(){return{onSelect:function(){},href:null,indicator:null,isSelected:!1}},propTypes:{href:r.PropTypes.string,indicator:r.PropTypes.bool,onSelect:r.PropTypes.func,isSelected:r.PropTypes.bool,site:r.PropTypes.object.isRequired},onSelect:function(t){this.props.onSelect(t)},render:function(){var t,e=this.props.site;return t=i({site:!0,"is-jetpack":e.jetpack,"is-primary":e.primary,"is-private":e.is_private,"is-redirect":e.options&&e.options.is_redirect,"is-selected":this.props.isSelected}),r.createElement("div",{className:t},r.createElement("a",{className:"site__content",href:this.props.href,onClick:this.onSelect,onTouchTap:this.onSelect},r.createElement(o,{site:e}),r.createElement("div",{className:"site__info"},r.createElement("div",{className:"site__title"},e.title),r.createElement("div",{className:"site__domain"},e.domain))))}})},300,300,function(t,e,n){"use strict";var r=n(299),i=(n(306),n(382)),o=n(387),s=n(389);t.exports=r.createClass({displayName:"MySitesSidebar",isItemLinkSelected:function(t){return Array.isArray(t)||(t=[t]),t.some(function(t){return i(this.props.path,t)},this)},isSingle:function(){return this.props.sites.selected||1===this.props.sites.get().length},getSelectedSite:function(){return 1===this.props.sites.get().length?this.props.sites.get().shift():this.props.sites.getSelectedSite()},siteSuffix:function(){return this.isSingle()?"/"+this.getSingleSiteDomain():""},render:function(){return r.createElement("ul",{className:"navigation-sidebar sidebar"},this.props.enableSiteSwitcher&&r.createElement(o,{addNewString:this.props.addNewString,addNewPath:this.props.addNewPath,sites:this.props.sites,siteCount:this.props.sites.get().length,onSwitchClick:this.props.onSwitchClick}),r.createElement(s,{path:this.props.path,navigation:this.props.navigation}))}})},function(t,e,n){function r(t,e,n){return t=s(t),n=i(o(n),0,t.length),t.lastIndexOf(e,n)==n}var i=n(383),o=n(368),s=n(384);t.exports=r},function(t,e){function n(t,e,n){return t===t&&(void 0!==n&&(t=t<=n?t:n),void 0!==e&&(t=t>=e?t:e)),t}t.exports=n},function(t,e,n){function r(t){if("string"==typeof t)return t;if(null==t)return"";if(o(t))return i?l.call(t):"";var e=t+"";return"0"==e&&1/t==-s?"-0":e}var i=n(385),o=n(386),s=1/0,a=i?i.prototype:void 0,l=i?a.toString:void 0;t.exports=r},function(t,e,n){var r=n(339),i=r.Symbol;t.exports=i},function(t,e,n){function r(t){return"symbol"==typeof t||i(t)&&a.call(t)==o}var i=n(327),o="[object Symbol]",s=Object.prototype,a=s.toString;t.exports=r},function(t,e,n){"use strict";var r=n(299),i=n(313),o=n(314),s=n(378);n(388),t.exports=r.createClass({displayName:"CurrentSite",mixins:[i],propTypes:{sites:r.PropTypes.object.isRequired,siteCount:r.PropTypes.number.isRequired},getSelectedSite:function(){return 1===this.props.sites.get().length?this.props.sites.get().shift():this.props.sites.getSelectedSite()},render:function(){var t,e=1===this.props.siteCount;return this.props.sites.initialized?(this.props.sites.selected&&(t=this.props.sites.getSelectedSite()),r.createElement("div",{className:"current-site"},this.props.sites.selected?r.createElement(s,{site:t}):r.createElement(o,{sites:this.props.sites}),e?r.createElement("a",{className:"current-site__add-new-wordpress",href:this.props.addNewPath,target:"_blank"},this.props.addNewString):r.createElement("span",{className:"current-site__switch-sites",onClick:this.props.onSwitchClick},this.translate("Switch Site")))):r.createElement("div",{className:"current-site is-loading"},r.createElement("div",{className:"site"},r.createElement("a",{className:"site__content"},r.createElement("div",{className:"site-icon"}),r.createElement("div",{className:"site__info"},r.createElement("span",{className:"site__title"},this.translate("Loading My Sites…"))))),e?r.createElement("a",{className:"current-site__add-new-wordpress",href:this.props.addNewPath,target:"_blank"},this.props.addNewString):r.createElement("span",{className:"current-site__switch-sites"}))}})},300,function(t,e,n){"use strict";var r=n(299),i=n(306),o=n(390);n(446),t.exports=r.createClass({displayName:"Navigation",propTypes:{navigation:r.PropTypes.array.isRequired,path:r.PropTypes.string.isRequired},isSection:function(t,e){var n=o(t.paths,function(t){return t.test(e)});return"undefined"!=typeof n},renderLink:function(t,e){var n=i({selected:this.isSection(t,this.props.path)},t.icon);return r.createElement("li",{className:n,key:e},r.createElement("a",{href:t.url},r.createElement("span",{className:"menu-link-text"},t.title)))},renderSection:function(t,e){return r.createElement("div",{className:"navigation-container sidebar-menu",key:e},r.createElement("h3",{className:"sidebar-heading"},t.title),r.createElement("ul",null,t.items.map(this.renderLink)))},render:function(){return r.createElement("div",{className:"navigation-container sidebar"},this.props.navigation.map(this.renderSection))}})},function(t,e,n){function r(t,e){if(e=a(e,3),l(t)){var n=s(t,e);return n>-1?t[n]:void 0}return o(t,e,i)}var i=n(391),o=n(404),s=n(405),a=n(406),l=n(328);t.exports=r},function(t,e,n){var r=n(392),i=n(403),o=i(r);t.exports=o},function(t,e,n){function r(t,e){return t&&i(t,e,o)}var i=n(393),o=n(395);t.exports=r},function(t,e,n){var r=n(394),i=r();t.exports=i},function(t,e){function n(t){return function(e,n,r){for(var i=-1,o=Object(e),s=r(e),a=s.length;a--;){var l=s[t?a:++i];if(n(o[l],l,o)===!1)break}return e}}t.exports=n},function(t,e,n){function r(t){var e=c(t);if(!e&&!a(t))return o(t);var n=s(t),r=!!n,u=n||[],h=u.length;for(var p in t)!i(t,p)||r&&("length"==p||l(p,h))||e&&"constructor"==p||u.push(p);return u}var i=n(396),o=n(397),s=n(398),a=n(321),l=n(401),c=n(402);t.exports=r},function(t,e){function n(t,e){return i.call(t,e)||"object"==typeof t&&e in t&&null===o(t)}var r=Object.prototype,i=r.hasOwnProperty,o=Object.getPrototypeOf;t.exports=n},function(t,e){function n(t){return r(Object(t))}var r=Object.keys;t.exports=n},function(t,e,n){function r(t){var e=t?t.length:void 0;return a(e)&&(s(t)||l(t)||o(t))?i(e,String):null}var i=n(399),o=n(319),s=n(328),a=n(326),l=n(400);t.exports=r},function(t,e){function n(t,e){for(var n=-1,r=Array(t);++n-1&&t%1==0&&tp))return!1;var d=l.get(t);if(d)return d==e;var v=!0;for(l.set(t,e);++ci?0:i+e),n=n>i?i:n,n<0&&(n+=i),i=e>n?0:n-e>>>0,e>>>=0;for(var o=Array(i);++r0;--e)t.removeChild(t.firstChild);return t}function n(t,n){return e(t).appendChild(n)}function r(t,e,n,r){var i=document.createElement(t);if(n&&(i.className=n),r&&(i.style.cssText=r),"string"==typeof e)i.appendChild(document.createTextNode(e));else if(e)for(var o=0;o=e)return s+(e-o);s+=a-o,s+=n-s%n,o=a+1}}function u(){this.id=null}function h(t,e){for(var n=0;n=e)return r+Math.min(s,e-i);if(i+=o-r,i+=n-i%n,r=o+1,i>=e)return r}}function f(t){for(;Os.length<=t;)Os.push(d(Os)+" ");return Os[t]}function d(t){return t[t.length-1]}function v(t,e){for(var n=[],r=0;r""&&(t.toUpperCase()!=t.toLowerCase()||_s.test(t))}function b(t,e){return e?!!(e.source.indexOf("\\w")>-1&&w(t))||e.test(t):w(t)}function x(t){for(var e in t)if(t.hasOwnProperty(e)&&t[e])return!1;return!0}function E(t){return t.charCodeAt(0)>=768&&Vs.test(t)}function C(t,e,n){var i=this;this.input=n,i.scrollbarFiller=r("div",null,"CodeMirror-scrollbar-filler"),i.scrollbarFiller.setAttribute("cm-not-content","true"),i.gutterFiller=r("div",null,"CodeMirror-gutter-filler"),i.gutterFiller.setAttribute("cm-not-content","true"),i.lineDiv=r("div",null,"CodeMirror-code"),i.selectionDiv=r("div",null,null,"position: relative; z-index: 1"),i.cursorDiv=r("div",null,"CodeMirror-cursors"),i.measure=r("div",null,"CodeMirror-measure"),i.lineMeasure=r("div",null,"CodeMirror-measure"),i.lineSpace=r("div",[i.measure,i.lineMeasure,i.selectionDiv,i.cursorDiv,i.lineDiv],null,"position: relative; outline: none"),i.mover=r("div",[r("div",[i.lineSpace],"CodeMirror-lines")],null,"position: relative"),i.sizer=r("div",[i.mover],"CodeMirror-sizer"),i.sizerWidth=null,i.heightForcer=r("div",null,null,"position: absolute; height: "+Ns+"px; width: 1px;"),i.gutters=r("div",null,"CodeMirror-gutters"),i.lineGutter=null,i.scroller=r("div",[i.sizer,i.heightForcer,i.gutters],"CodeMirror-scroll"),i.scroller.setAttribute("tabIndex","-1"),i.wrapper=r("div",[i.scrollbarFiller,i.gutterFiller,i.scroller],"CodeMirror"),ss&&as<8&&(i.gutters.style.zIndex=-1,i.scroller.style.paddingRight=0),ls||rs&&ms||(i.scroller.draggable=!0),t&&(t.appendChild?t.appendChild(i.wrapper):t(i.wrapper)),i.viewFrom=i.viewTo=e.first,i.reportedViewFrom=i.reportedViewTo=e.first,i.view=[],i.renderedView=null,i.externalMeasured=null,i.viewOffset=0,i.lastWrapHeight=i.lastWrapWidth=0,i.updateLineNumbers=null,i.nativeBarWidth=i.barHeight=i.barWidth=0,i.scrollbarsClipped=!1,i.lineNumWidth=i.lineNumInnerWidth=i.lineNumChars=null,i.alignWidgets=!1,i.cachedCharWidth=i.cachedTextHeight=i.cachedPaddingH=null,i.maxLine=null,i.maxLineLength=0,i.maxLineChanged=!1,i.wheelDX=i.wheelDY=i.wheelStartX=i.wheelStartY=null,i.shift=!1,i.selForContextMenu=null,i.activeTouch=null,n.init(i)}function k(t,e){if(e-=t.first,e<0||e>=t.size)throw new Error("There is no line "+(e+t.first)+" in the document.");for(var n=t;!n.lines;)for(var r=0;;++r){var i=n.children[r],o=i.chunkSize();if(e=t.first&&en?F(n,k(t,n).text.length):H(e,k(t,e.line).text.length)}function H(t,e){var n=t.ch;return null==n||n>e?F(t.line,e):n<0?F(t.line,0):t}function B(t,e){for(var n=[],r=0;r=e:o.to>e);(r||(r=[])).push(new W(s,o.from,l?null:o.to))}}return r}function $(t,e,n){var r;if(t)for(var i=0;i=e:o.to>e);if(a||o.from==e&&"bookmark"==s.type&&(!n||o.marker.insertLeft)){var l=null==o.from||(s.inclusiveLeft?o.from<=e:o.from0&&a)for(var x=0;x0)){var u=[l,1],p=A(c.from,a.from),f=A(c.to,a.to);(p<0||!s.inclusiveLeft&&!p)&&u.push({from:c.from,to:a.from}),(f>0||!s.inclusiveRight&&!f)&&u.push({from:a.to,to:c.to}),i.splice.apply(i,u),l+=u.length-1}}return i}function J(t){var e=t.markedSpans;if(e){for(var n=0;n=0&&h<=0||u<=0&&h>=0)&&(u<=0&&(l.marker.inclusiveRight&&i.inclusiveLeft?A(c.to,n)>=0:A(c.to,n)>0)||u>=0&&(l.marker.inclusiveRight&&i.inclusiveLeft?A(c.from,r)<=0:A(c.from,r)<0)))return!0}}}function at(t){for(var e;e=it(t);)t=e.find(-1,!0).line;return t}function lt(t){for(var e,n;e=ot(t);)t=e.find(1,!0).line,(n||(n=[])).push(t);return n}function ct(t,e){var n=k(t,e),r=at(n);return n==r?e:T(r)}function ut(t,e){if(e>t.lastLine())return e;var n,r=k(t,e);if(!ht(t,r))return e;for(;n=ot(r);)r=n.find(1,!0).line;return T(r)+1}function ht(t,e){var n=Ds&&e.markedSpans;if(n)for(var r=void 0,i=0;ie.maxLineLength&&(e.maxLineLength=n,e.maxLine=t)})}function mt(t,e,n,r){if(!t)return r(e,n,"ltr");for(var i=!1,o=0;oe||e==n&&s.to==e)&&(r(Math.max(s.from,e),Math.min(s.to,n),1==s.level?"rtl":"ltr"),i=!0)}i||r(e,n,"ltr")}function gt(t){return t.level%2?t.to:t.from}function yt(t){return t.level%2?t.from:t.to}function wt(t){var e=Mt(t);return e?gt(e[0]):0}function bt(t){var e=Mt(t);return e?yt(d(e)):t.text.length}function xt(t,e,n){var r=t[0].level;return e==r||n!=r&&ee)return r;if(i.from==e||i.to==e){if(null!=n)return xt(t,i.level,t[n].level)?(i.from!=i.to&&(Hs=n),r):(i.from!=i.to&&(Hs=r),n);n=r}}return n}function Ct(t,e,n,r){if(!r)return e+n;do e+=n;while(e>0&&E(t.text.charAt(e)));return e}function kt(t,e,n,r){var i=Mt(t);if(!i)return St(t,e,n,r);for(var o=Et(i,e),s=i[o],a=Ct(t,e,s.level%2?-n:n,r);;){if(a>s.from&&a0==s.level%2?s.to:s.from);if(s=i[o+=n],!s)return null;a=n>0==s.level%2?Ct(t,s.to,-1,r):Ct(t,s.from,1,r)}}function St(t,e,n,r){var i=e+n;if(r)for(;i>0&&E(t.text.charAt(i));)i+=n;return i<0||i>t.text.length?null:i}function Mt(t){var e=t.order;return null==e&&(e=t.order=Bs(t.text)),e}function zt(t,e,n){var r=t._handlers&&t._handlers[e];return n?r&&r.length>0?r.slice():js:r||js}function Tt(t,e,n){if(t.removeEventListener)t.removeEventListener(e,n,!1);else if(t.detachEvent)t.detachEvent("on"+e,n);else for(var r=zt(t,e,!1),i=0;i0}function At(t){t.prototype.on=function(t,e){Rs(this,t,e)},t.prototype.off=function(t,e){Tt(this,t,e)}}function Ot(t){t.preventDefault?t.preventDefault():t.returnValue=!1}function _t(t){t.stopPropagation?t.stopPropagation():t.cancelBubble=!0}function Vt(t){return null!=t.defaultPrevented?t.defaultPrevented:0==t.returnValue}function It(t){Ot(t),_t(t)}function Dt(t){return t.target||t.srcElement}function Ht(t){var e=t.which;return null==e&&(1&t.button?e=1:2&t.button?e=3:4&t.button&&(e=2)),gs&&t.ctrlKey&&1==e&&(e=3),e}function Bt(t){if(null==zs){var e=r("span","");n(t,r("span",[e,document.createTextNode("x")])),0!=t.firstChild.offsetHeight&&(zs=e.offsetWidth<=1&&e.offsetHeight>2&&!(ss&&as<8))}var i=zs?r("span",""):r("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return i.setAttribute("cm-text",""),i}function Rt(t){if(null!=Ts)return Ts;var r=n(t,document.createTextNode("AخA")),i=xs(r,0,1).getBoundingClientRect(),o=xs(r,1,2).getBoundingClientRect();return e(t),!(!i||i.left==i.right)&&(Ts=o.right-i.right<3)}function jt(t){if(null!=Ks)return Ks;var e=n(t,r("span","x")),i=e.getBoundingClientRect(),o=xs(e,0,1).getBoundingClientRect();return Ks=Math.abs(i.left-o.left)>1}function Wt(t,e){arguments.length>2&&(e.dependencies=Array.prototype.slice.call(arguments,2)),$s[t]=e}function qt(t,e){Ys[t]=e}function Ut(t){if("string"==typeof t&&Ys.hasOwnProperty(t))t=Ys[t];else if(t&&"string"==typeof t.name&&Ys.hasOwnProperty(t.name)){var e=Ys[t.name];"string"==typeof e&&(e={name:e}),t=y(e,t),t.name=e.name}else{if("string"==typeof t&&/^[\w\-]+\/[\w\-]+\+xml$/.test(t))return Ut("application/xml");if("string"==typeof t&&/^[\w\-]+\/[\w\-]+\+json$/.test(t))return Ut("application/json")}return"string"==typeof t?{name:t}:t||{name:"null"}}function Gt(t,e){e=Ut(e);var n=$s[e.name];if(!n)return Gt(t,"text/plain");var r=n(t,e);if(Xs.hasOwnProperty(e.name)){var i=Xs[e.name];for(var o in i)i.hasOwnProperty(o)&&(r.hasOwnProperty(o)&&(r["_"+o]=r[o]),r[o]=i[o])}if(r.name=e.name,e.helperType&&(r.helperType=e.helperType),e.modeProps)for(var s in e.modeProps)r[s]=e.modeProps[s];return r}function Kt(t,e){var n=Xs.hasOwnProperty(t)?Xs[t]:Xs[t]={};l(e,n)}function $t(t,e){if(e===!0)return e;if(t.copyState)return t.copyState(e);var n={};for(var r in e){var i=e[r];i instanceof Array&&(i=i.concat([])),n[r]=i}return n}function Yt(t,e){for(var n;t.innerMode&&(n=t.innerMode(e),n&&n.mode!=t);)e=n.state,t=n.mode;return n||{mode:t,state:e}}function Xt(t,e,n){return!t.startState||t.startState(e,n)}function Zt(t,e,n,r){var i=[t.state.modeGen],o={};oe(t,e.text,t.doc.mode,n,function(t,e){return i.push(t,e)},o,r);for(var s=function(n){var r=t.state.overlays[n],s=1,a=0;oe(t,e.text,r.mode,!0,function(t,e){for(var n=s;at&&i.splice(s,1,t,i[s+1],o),s+=2,a=Math.min(t,o)}if(e)if(r.opaque)i.splice(n,s-n,t,"overlay "+e),s=n+2;else for(;nt.options.maxHighlightLength?$t(t.doc.mode,r):r);e.stateAfter=r,e.styles=i.styles,i.classes?e.styleClasses=i.classes:e.styleClasses&&(e.styleClasses=null),n===t.doc.frontier&&t.doc.frontier++}return e.styles}function Qt(t,e,n){var r=t.doc,i=t.display;if(!r.mode.startState)return!0;var o=se(t,e,n),s=o>r.first&&k(r,o-1).stateAfter;return s=s?$t(r.mode,s):Xt(r.mode),r.iter(o,e,function(n){te(t,n.text,s);var a=o==e-1||o%5==0||o>=i.viewFrom&&oe.start)return o}throw new Error("Mode "+t.name+" failed to advance stream.")}function re(t,e,n,r){var i,o=function(t){return{start:h.start,end:h.pos,string:h.current(),type:i||null,state:t?$t(s.mode,u):u}},s=t.doc,a=s.mode;e=D(s,e);var l,c=k(s,e.line),u=Qt(t,e.line,n),h=new Zs(c.text,t.options.tabSize);for(r&&(l=[]);(r||h.post.options.maxHighlightLength?(a=!1,s&&te(t,e,r,h.pos),h.pos=e.length,l=null):l=ie(ne(n,h,r,p),o),p){var f=p[0].name;f&&(l="m-"+(l?f+" "+l:f))}if(!a||u!=l){for(;cs;--a){if(a<=o.first)return o.first;var l=k(o,a-1);if(l.stateAfter&&(!n||a<=o.frontier))return a;var u=c(l.text,null,t.options.tabSize);(null==i||r>u)&&(i=a-1,r=u)}return i}function ae(t,e,n){this.text=t,Q(this,e),this.height=n?n(this):1}function le(t,e,n,r){t.text=e,t.stateAfter&&(t.stateAfter=null),t.styles&&(t.styles=null),null!=t.order&&(t.order=null),J(t),Q(t,n);var i=r?r(t):1;i!=t.height&&z(t,i)}function ce(t){t.parent=null,J(t)}function ue(t,e){if(!t||/^\s*$/.test(t))return null;var n=e.addModeClass?ta:Qs;return n[t]||(n[t]=t.replace(/\S+/g,"cm-$&"))}function he(t,e){var n=r("span",null,null,ls?"padding-right: .1px":null),i={pre:r("pre",[n],"CodeMirror-line"),content:n,col:0,pos:0,cm:t,trailingSpace:!1,splitSpaces:(ss||ls)&&t.getOption("lineWrapping")};e.measure={};for(var o=0;o<=(e.rest?e.rest.length:0);o++){var a=o?e.rest[o-1]:e.line,l=void 0;i.pos=0,i.addToken=fe,Rt(t.display.measure)&&(l=Mt(a))&&(i.addToken=ve(i.addToken,l)),i.map=[];var c=e!=t.display.externalMeasured&&T(a);ge(a,i,Jt(t,a,c)),a.styleClasses&&(a.styleClasses.bgClass&&(i.bgClass=s(a.styleClasses.bgClass,i.bgClass||"")),a.styleClasses.textClass&&(i.textClass=s(a.styleClasses.textClass,i.textClass||""))),0==i.map.length&&i.map.push(0,0,i.content.appendChild(Bt(t.display.measure))),0==o?(e.measure.map=i.map,e.measure.cache={}):((e.measure.maps||(e.measure.maps=[])).push(i.map),(e.measure.caches||(e.measure.caches=[])).push({}))}if(ls){var u=i.content.lastChild;(/\bcm-tab\b/.test(u.className)||u.querySelector&&u.querySelector(".cm-tab"))&&(i.content.className="cm-tab-wrap-hack")}return Nt(t,"renderLine",t,e.line,i.pre),i.pre.className&&(i.textClass=s(i.pre.className,i.textClass||"")),i}function pe(t){var e=r("span","•","cm-invalidchar");return e.title="\\u"+t.charCodeAt(0).toString(16),e.setAttribute("aria-label",e.title),e}function fe(t,e,n,i,o,s,a){if(e){var l,c=t.splitSpaces?de(e,t.trailingSpace):e,u=t.cm.state.specialChars,h=!1;if(u.test(e)){l=document.createDocumentFragment();for(var p=0;;){u.lastIndex=p;var d=u.exec(e),v=d?d.index-p:e.length-p;if(v){var m=document.createTextNode(c.slice(p,p+v));ss&&as<9?l.appendChild(r("span",[m])):l.appendChild(m),t.map.push(t.pos,t.pos+v,m),t.col+=v,t.pos+=v}if(!d)break;p+=v+1;var g=void 0;if("\t"==d[0]){var y=t.cm.options.tabSize,w=y-t.col%y;g=l.appendChild(r("span",f(w),"cm-tab")),g.setAttribute("role","presentation"),g.setAttribute("cm-text","\t"),t.col+=w}else"\r"==d[0]||"\n"==d[0]?(g=l.appendChild(r("span","\r"==d[0]?"␍":"","cm-invalidchar")),g.setAttribute("cm-text",d[0]),t.col+=1):(g=t.cm.options.specialCharPlaceholder(d[0]),g.setAttribute("cm-text",d[0]),ss&&as<9?l.appendChild(r("span",[g])):l.appendChild(g),t.col+=1);t.map.push(t.pos,t.pos+1,g),t.pos++}}else t.col+=e.length,l=document.createTextNode(c),t.map.push(t.pos,t.pos+e.length,l),ss&&as<9&&(h=!0),t.pos+=e.length;if(t.trailingSpace=32==c.charCodeAt(e.length-1),n||i||o||h||a){var b=n||"";i&&(b+=i),o&&(b+=o);var x=r("span",[l],b,a);return s&&(x.title=s),t.content.appendChild(x)}t.content.appendChild(l)}}function de(t,e){if(t.length>1&&!/ /.test(t))return t;for(var n=e,r="",i=0;ic&&h.from<=c));p++);if(h.to>=u)return t(n,r,i,o,s,a,l);t(n,r.slice(0,h.to-c),i,o,null,a,l),o=null,r=r.slice(h.to-c),c=h.to}}}function me(t,e,n,r){var i=!r&&n.widgetNode;i&&t.map.push(t.pos,t.pos+e,i),!r&&t.cm.display.input.needsContentAttribute&&(i||(i=t.content.appendChild(document.createElement("span"))),i.setAttribute("cm-marker",n.id)),i&&(t.cm.display.input.setUneditable(i),t.content.appendChild(i)),t.pos+=e,t.trailingSpace=!1}function ge(t,e,n){var r=t.markedSpans,i=t.text,o=0;if(r)for(var s,a,l,c,u,h,p,f=i.length,d=0,v=1,m="",g=0;;){if(g==d){l=c=u=h=a="",p=null,g=1/0;for(var y=[],w=void 0,b=0;bd||E.collapsed&&x.to==d&&x.from==d)?(null!=x.to&&x.to!=d&&g>x.to&&(g=x.to,c=""),E.className&&(l+=" "+E.className),E.css&&(a=(a?a+";":"")+E.css),E.startStyle&&x.from==d&&(u+=" "+E.startStyle),E.endStyle&&x.to==g&&(w||(w=[])).push(E.endStyle,x.to),E.title&&!h&&(h=E.title),E.collapsed&&(!p||nt(p.marker,E)<0)&&(p=x)):x.from>d&&g>x.from&&(g=x.from)}if(w)for(var C=0;C=f)break;for(var S=Math.min(f,g);;){if(m){var M=d+m.length;if(!p){var z=M>S?m.slice(0,S-d):m;e.addToken(e,z,s?s+l:l,u,d+z.length==g?c:"",h,a)}if(M>=S){m=m.slice(S-d),d=S;break}d=M,u=""}m=i.slice(o,o=n[v++]),s=ue(n[v++],e.cm.options)}}else for(var T=1;T2&&o.push((l.bottom+c.top)/2-n.top)}}o.push(n.bottom-n.top)}}function Ge(t,e,n){if(t.line==e)return{map:t.measure.map,cache:t.measure.cache};for(var r=0;rn)return{map:t.measure.maps[i],cache:t.measure.caches[i],before:!0}}function Ke(t,e){e=at(e);var r=T(e),i=t.display.externalMeasured=new ye(t.doc,e,r);i.lineN=r;var o=i.built=he(t,i);return i.text=o.pre,n(t.display.lineMeasure,o.pre),i}function $e(t,e,n,r){return Ze(t,Xe(t,e),n,r)}function Ye(t,e){if(e>=t.display.viewFrom&&e=n.lineN&&ee)&&(o=l-a,i=o-1,e>=l&&(s="right")),null!=i){if(r=t[c+2],a==l&&n==(r.insertLeft?"left":"right")&&(s=n),"left"==n&&0==i)for(;c&&t[c-2]==t[c-3]&&t[c-1].insertLeft;)r=t[(c-=3)+2],s="left";if("right"==n&&i==l-a)for(;c=0&&(n=t[i]).left==n.right;i--);return n}function tn(t,e,n,r){var i,o=Je(e.map,n,r),s=o.node,a=o.start,l=o.end,c=o.collapse;if(3==s.nodeType){for(var u=0;u<4;u++){for(;a&&E(e.line.text.charAt(o.coverStart+a));)--a;for(;o.coverStart+l0&&(c=r="right");var h;i=t.options.lineWrapping&&(h=s.getClientRects()).length>1?h["right"==r?h.length-1:0]:s.getBoundingClientRect()}if(ss&&as<9&&!a&&(!i||!i.left&&!i.right)){var p=s.parentNode.getClientRects()[0];i=p?{left:p.left,right:p.left+gn(t.display),top:p.top,bottom:p.bottom}:ra}for(var f=i.top-e.rect.top,d=i.bottom-e.rect.top,v=(f+d)/2,m=e.view.measure.heights,g=0;gn.from?s(t-1):s(t,r)}r=r||k(t.doc,e.line),i||(i=Xe(t,r));var l=Mt(r),c=e.ch;if(!l)return s(c);var u=Et(l,c),h=a(c,u);return null!=Hs&&(h.other=a(c,Hs)),h}function pn(t,e){var n=0;e=D(t.doc,e),t.options.lineWrapping||(n=gn(t.display)*e.ch);var r=k(t.doc,e.line),i=ft(r)+He(t.display);return{left:n,right:n,top:i,bottom:i+r.height}}function fn(t,e,n,r){var i=F(t,e);return i.xRel=r,n&&(i.outside=!0),i}function dn(t,e,n){var r=t.doc;if(n+=t.display.viewOffset,n<0)return fn(r.first,0,!0,-1);var i=N(r,n),o=r.first+r.size-1;if(i>o)return fn(r.first+r.size-1,k(r,o).text.length,!0,1);e<0&&(e=0);for(var s=k(r,i);;){var a=vn(t,s,i,e,n),l=ot(s),c=l&&l.find(0,!0);if(!l||!(a.ch>c.from.ch||a.ch==c.from.ch&&a.xRel>0))return a;i=T(s=c.to.line)}}function vn(t,e,n,r,i){function o(r){var i=hn(t,F(n,r),"line",e,c);return a=!0,s>i.bottom?i.left-l:sm)return fn(n,f,g,1);for(;;){if(u?f==p||f==kt(e,p,1):f-p<=1){var y=r0&&y1){var x=Ze(t,c,y,"right");s<=x.bottom&&s>=x.top&&Math.abs(r-x.right)1?1:0);return C}var k=Math.ceil(h/2),S=p+k;if(u){S=p;for(var M=0;Mr?(f=S,m=z,(g=a)&&(m+=1e3),h=k):(p=S,d=z,v=a,h-=k)}}function mn(t){if(null!=t.cachedTextHeight)return t.cachedTextHeight;if(null==Js){Js=r("pre");for(var i=0;i<49;++i)Js.appendChild(document.createTextNode("x")),Js.appendChild(r("br"));Js.appendChild(document.createTextNode("x"))}n(t.measure,Js);var o=Js.offsetHeight/50;return o>3&&(t.cachedTextHeight=o),e(t.measure),o||1}function gn(t){if(null!=t.cachedCharWidth)return t.cachedCharWidth;var e=r("span","xxxxxxxxxx"),i=r("pre",[e]);n(t.measure,i);var o=e.getBoundingClientRect(),s=(o.right-o.left)/10;return s>2&&(t.cachedCharWidth=s),s||10}function yn(t){for(var e=t.display,n={},r={},i=e.gutters.clientLeft,o=e.gutters.firstChild,s=0;o;o=o.nextSibling,++s)n[t.options.gutters[s]]=o.offsetLeft+o.clientLeft+i,r[t.options.gutters[s]]=o.clientWidth;return{fixedPos:wn(e),gutterTotalWidth:e.gutters.offsetWidth,gutterLeft:n,gutterWidth:r,wrapperWidth:e.wrapper.clientWidth}}function wn(t){return t.scroller.getBoundingClientRect().left-t.sizer.getBoundingClientRect().left}function bn(t){var e=mn(t.display),n=t.options.lineWrapping,r=n&&Math.max(5,t.display.scroller.clientWidth/gn(t.display)-3);return function(i){if(ht(t.doc,i))return 0;var o=0;if(i.widgets)for(var s=0;s=t.display.viewTo)return null;if(e-=t.display.viewFrom,e<0)return null;for(var n=t.display.view,r=0;r=t.display.viewTo||a.to().line3&&(i(f,v.top,null,v.bottom),f=u,v.bottoml.bottom||c.bottom==l.bottom&&c.right>l.right)&&(l=c),f0?e.blinker=setInterval(function(){return e.cursorDiv.style.visibility=(n=!n)?"":"hidden"},t.options.cursorBlinkRate):t.options.cursorBlinkRate<0&&(e.cursorDiv.style.visibility="hidden")}}function Nn(t){t.state.focused||(t.display.input.focus(),Pn(t))}function Ln(t){t.state.delayingBlurEvent=!0,setTimeout(function(){t.state.delayingBlurEvent&&(t.state.delayingBlurEvent=!1,Fn(t))},100)}function Pn(t,e){t.state.delayingBlurEvent&&(t.state.delayingBlurEvent=!1),"nocursor"!=t.options.readOnly&&(t.state.focused||(Nt(t,"focus",t,e),
+t.state.focused=!0,o(t.display.wrapper,"CodeMirror-focused"),t.curOp||t.display.selForContextMenu==t.doc.sel||(t.display.input.reset(),ls&&setTimeout(function(){return t.display.input.reset(!0)},20)),t.display.input.receivedFocus()),Tn(t))}function Fn(t,e){t.state.delayingBlurEvent||(t.state.focused&&(Nt(t,"blur",t,e),t.state.focused=!1,ks(t.display.wrapper,"CodeMirror-focused")),clearInterval(t.display.blinker),setTimeout(function(){t.state.focused||(t.display.shift=!1)},150))}function An(t){var e=t.display,n=e.view;if(e.alignWidgets||e.gutters.firstChild&&t.options.fixedGutter){for(var r=wn(e)-e.scroller.scrollLeft+t.doc.scrollLeft,i=e.gutters.offsetWidth,o=r+"px",s=0;s.001||l<-.001)&&(z(i.line,o),Vn(i.line),i.rest))for(var c=0;c=s&&(o=N(e,ft(k(e,l))-t.wrapper.clientHeight),s=l)}return{from:o,to:Math.max(s,o+1)}}function Dn(t,e){Math.abs(t.doc.scrollTop-e)<2||(t.doc.scrollTop=e,rs||Mr(t,{top:e}),t.display.scroller.scrollTop!=e&&(t.display.scroller.scrollTop=e),t.display.scrollbars.setScrollTop(e),rs&&Mr(t),br(t,100))}function Hn(t,e,n){(n?e==t.doc.scrollLeft:Math.abs(t.doc.scrollLeft-e)<2)||(e=Math.min(e,t.display.scroller.scrollWidth-t.display.scroller.clientWidth),t.doc.scrollLeft=e,An(t),t.display.scroller.scrollLeft!=e&&(t.display.scroller.scrollLeft=e),t.display.scrollbars.setScrollLeft(e))}function Bn(t){var e=t.wheelDeltaX,n=t.wheelDeltaY;return null==e&&t.detail&&t.axis==t.HORIZONTAL_AXIS&&(e=t.detail),null==n&&t.detail&&t.axis==t.VERTICAL_AXIS?n=t.detail:null==n&&(n=t.wheelDelta),{x:e,y:n}}function Rn(t){var e=Bn(t);return e.x*=oa,e.y*=oa,e}function jn(t,e){var n=Bn(e),r=n.x,i=n.y,o=t.display,s=o.scroller,a=s.scrollWidth>s.clientWidth,l=s.scrollHeight>s.clientHeight;if(r&&a||i&&l){if(i&&gs&&ls)t:for(var c=e.target,u=o.view;c!=s;c=c.parentNode)for(var h=0;h(window.innerHeight||document.documentElement.clientHeight)&&(o=!1),null!=o&&!ds){var s=r("div","",null,"position: absolute;\n top: "+(e.top-n.viewOffset-He(t.display))+"px;\n height: "+(e.bottom-e.top+je(t)+n.barHeight)+"px;\n left: "+e.left+"px; width: 2px;");t.display.lineSpace.appendChild(s),s.scrollIntoView(o),t.display.lineSpace.removeChild(s)}}}function Xn(t,e,n,r){null==r&&(r=0);for(var i,o=0;o<5;o++){var s=!1;i=hn(t,e);var a=n&&n!=e?hn(t,n):i,l=Jn(t,Math.min(i.left,a.left),Math.min(i.top,a.top)-r,Math.max(i.left,a.left),Math.max(i.bottom,a.bottom)+r),c=t.doc.scrollTop,u=t.doc.scrollLeft;if(null!=l.scrollTop&&(Dn(t,l.scrollTop),Math.abs(t.doc.scrollTop-c)>1&&(s=!0)),null!=l.scrollLeft&&(Hn(t,l.scrollLeft),Math.abs(t.doc.scrollLeft-u)>1&&(s=!0)),!s)break}return i}function Zn(t,e,n,r,i){var o=Jn(t,e,n,r,i);null!=o.scrollTop&&Dn(t,o.scrollTop),null!=o.scrollLeft&&Hn(t,o.scrollLeft)}function Jn(t,e,n,r,i){var o=t.display,s=mn(t.display);n<0&&(n=0);var a=t.curOp&&null!=t.curOp.scrollTop?t.curOp.scrollTop:o.scroller.scrollTop,l=qe(t),c={};i-n>l&&(i=n+l);var u=t.doc.height+Be(o),h=nu-s;if(na+l){var f=Math.min(n,(p?u:i)-l);f!=a&&(c.scrollTop=f)}var d=t.curOp&&null!=t.curOp.scrollLeft?t.curOp.scrollLeft:o.scroller.scrollLeft,v=We(t)-(t.options.fixedGutter?o.gutters.offsetWidth:0),m=r-e>v;return m&&(r=e+v),e<10?c.scrollLeft=0:ev+d-3&&(c.scrollLeft=r+(m?0:10)-v),c}function Qn(t,e,n){null==e&&null==n||er(t),null!=e&&(t.curOp.scrollLeft=(null==t.curOp.scrollLeft?t.doc.scrollLeft:t.curOp.scrollLeft)+e),null!=n&&(t.curOp.scrollTop=(null==t.curOp.scrollTop?t.doc.scrollTop:t.curOp.scrollTop)+n)}function tr(t){er(t);var e=t.getCursor(),n=e,r=e;t.options.lineWrapping||(n=e.ch?F(e.line,e.ch-1):e,r=F(e.line,e.ch+1)),t.curOp.scrollToPos={from:n,to:r,margin:t.options.cursorScrollMargin,isCursor:!0}}function er(t){var e=t.curOp.scrollToPos;if(e){t.curOp.scrollToPos=null;var n=pn(t,e.from),r=pn(t,e.to),i=Jn(t,Math.min(n.left,r.left),Math.min(n.top,r.top)-e.margin,Math.max(n.right,r.right),Math.max(n.bottom,r.bottom)+e.margin);t.scrollTo(i.scrollLeft,i.scrollTop)}}function nr(t){t.curOp={cm:t,viewChanged:!1,startHeight:t.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:++aa},be(t.curOp)}function rr(t){var e=t.curOp;Ee(e,function(t){for(var e=0;e=n.viewTo)||n.maxLineChanged&&e.options.lineWrapping,t.update=t.mustUpdate&&new Er(e,t.mustUpdate&&{top:t.scrollTop,ensure:t.scrollToPos},t.forceUpdate)}function sr(t){t.updatedDisplay=t.mustUpdate&&kr(t.cm,t.update)}function ar(t){var e=t.cm,n=e.display;t.updatedDisplay&&_n(e),t.barMeasure=Wn(e),n.maxLineChanged&&!e.options.lineWrapping&&(t.adjustWidthTo=$e(e,n.maxLine,n.maxLine.text.length).left+3,e.display.sizerWidth=t.adjustWidthTo,t.barMeasure.scrollWidth=Math.max(n.scroller.clientWidth,n.sizer.offsetLeft+t.adjustWidthTo+je(e)+e.display.barWidth),t.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+t.adjustWidthTo-We(e))),(t.updatedDisplay||t.selectionChanged)&&(t.preparedSelection=n.input.prepareSelection(t.focus))}function lr(t){var e=t.cm;null!=t.adjustWidthTo&&(e.display.sizer.style.minWidth=t.adjustWidthTo+"px",t.maxScrollLefte)&&(i.updateLineNumbers=e),t.curOp.viewChanged=!0,e>=i.viewTo)Ds&&ct(t.doc,e)i.viewFrom?mr(t):(i.viewFrom+=r,i.viewTo+=r);else if(e<=i.viewFrom&&n>=i.viewTo)mr(t);else if(e<=i.viewFrom){var o=gr(t,n,n+r,1);o?(i.view=i.view.slice(o.index),i.viewFrom=o.lineN,i.viewTo+=r):mr(t)}else if(n>=i.viewTo){var s=gr(t,e,e,-1);s?(i.view=i.view.slice(0,s.index),i.viewTo=s.lineN):mr(t)}else{var a=gr(t,e,e,-1),l=gr(t,n,n+r,1);a&&l?(i.view=i.view.slice(0,a.index).concat(we(t,a.lineN,l.lineN)).concat(i.view.slice(l.index)),i.viewTo+=r):mr(t)}var c=i.externalMeasured;c&&(n=i.lineN&&e=r.viewTo)){var o=r.view[Cn(t,e)];if(null!=o.node){var s=o.changes||(o.changes=[]);h(s,n)==-1&&s.push(n)}}}function mr(t){t.display.viewFrom=t.display.viewTo=t.doc.first,t.display.view=[],t.display.viewOffset=0}function gr(t,e,n,r){var i,o=Cn(t,e),s=t.display.view;if(!Ds||n==t.doc.first+t.doc.size)return{index:o,lineN:n};for(var a=t.display.viewFrom,l=0;l0){if(o==s.length-1)return null;i=a+s[o].size-e,o++}else i=a-e;e+=i,n+=i}for(;ct(t.doc,n)!=n;){if(o==(r<0?0:s.length-1))return null;n+=r*s[o-(r<0?1:0)].size,o+=r}return{index:o,lineN:n}}function yr(t,e,n){var r=t.display,i=r.view;0==i.length||e>=r.viewTo||n<=r.viewFrom?(r.view=we(t,e,n),r.viewFrom=e):(r.viewFrom>e?r.view=we(t,e,r.viewFrom).concat(r.view):r.viewFromn&&(r.view=r.view.slice(0,Cn(t,n)))),r.viewTo=n}function wr(t){for(var e=t.display.view,n=0,r=0;r=t.display.viewTo)){var n=+new Date+t.options.workTime,r=$t(e.mode,Qt(t,e.frontier)),i=[];e.iter(e.frontier,Math.min(e.first+e.size,t.display.viewTo+500),function(o){if(e.frontier>=t.display.viewFrom){var s=o.styles,a=o.text.length>t.options.maxHighlightLength,l=Zt(t,o,a?$t(e.mode,r):r,!0);o.styles=l.styles;var c=o.styleClasses,u=l.classes;u?o.styleClasses=u:c&&(o.styleClasses=null);for(var h=!s||s.length!=o.styles.length||c!=u&&(!c||!u||c.bgClass!=u.bgClass||c.textClass!=u.textClass),p=0;!h&&pn)return br(t,t.options.workDelay),!0}),i.length&&ur(t,function(){for(var e=0;e=r.viewFrom&&n.visible.to<=r.viewTo&&(null==r.updateLineNumbers||r.updateLineNumbers>=r.viewTo)&&r.renderedView==r.view&&0==wr(t))return!1;On(t)&&(mr(t),n.dims=yn(t));var o=i.first+i.size,s=Math.max(n.visible.from-t.options.viewportMargin,i.first),a=Math.min(o,n.visible.to+t.options.viewportMargin);r.viewFroma&&r.viewTo-a<20&&(a=Math.min(o,r.viewTo)),Ds&&(s=ct(t.doc,s),a=ut(t.doc,a));var l=s!=r.viewFrom||a!=r.viewTo||r.lastWrapHeight!=n.wrapperHeight||r.lastWrapWidth!=n.wrapperWidth;yr(t,s,a),r.viewOffset=ft(k(t.doc,r.viewFrom)),t.display.mover.style.top=r.viewOffset+"px";var c=wr(t);if(!l&&0==c&&!n.force&&r.renderedView==r.view&&(null==r.updateLineNumbers||r.updateLineNumbers>=r.viewTo))return!1;var u=Ss();return c>4&&(r.lineDiv.style.display="none"),zr(t,r.updateLineNumbers,n.dims),c>4&&(r.lineDiv.style.display=""),r.renderedView=r.view,u&&Ss()!=u&&u.offsetHeight&&u.focus(),e(r.cursorDiv),e(r.selectionDiv),r.gutters.style.height=r.sizer.style.minHeight=0,l&&(r.lastWrapHeight=n.wrapperHeight,r.lastWrapWidth=n.wrapperWidth,br(t,400)),r.updateLineNumbers=null,!0}function Sr(t,e){for(var n=e.viewport,r=!0;(r&&t.options.lineWrapping&&e.oldDisplayWidth!=We(t)||(n&&null!=n.top&&(n={top:Math.min(t.doc.height+Be(t.display)-qe(t),n.top)}),e.visible=In(t.display,t.doc,n),!(e.visible.from>=t.display.viewFrom&&e.visible.to<=t.display.viewTo)))&&kr(t,e);r=!1){_n(t);var i=Wn(t);kn(t),Gn(t,i),Nr(t,i)}e.signal(t,"update",t),t.display.viewFrom==t.display.reportedViewFrom&&t.display.viewTo==t.display.reportedViewTo||(e.signal(t,"viewportChange",t,t.display.viewFrom,t.display.viewTo),t.display.reportedViewFrom=t.display.viewFrom,t.display.reportedViewTo=t.display.viewTo)}function Mr(t,e){var n=new Er(t,e);if(kr(t,n)){_n(t),Sr(t,n);var r=Wn(t);kn(t),Gn(t,r),Nr(t,r),n.finish()}}function zr(t,n,r){function i(e){var n=e.nextSibling;return ls&&gs&&t.display.currentWheelTarget==e?e.style.display="none":e.parentNode.removeChild(e),n}for(var o=t.display,s=t.options.lineNumbers,a=o.lineDiv,l=a.firstChild,c=o.view,u=o.viewFrom,p=0;p-1&&(d=!1),Se(t,f,u,r)),d&&(e(f.lineNumber),f.lineNumber.appendChild(document.createTextNode(P(t.options,u)))),l=f.node.nextSibling}else{var v=Ae(t,f,u,r);a.insertBefore(v,l)}u+=f.size}for(;l;)l=i(l)}function Tr(t){var e=t.display.gutters.offsetWidth;t.display.sizer.style.marginLeft=e+"px"}function Nr(t,e){t.display.sizer.style.minHeight=e.docHeight+"px",t.display.heightForcer.style.top=e.docHeight+"px",t.display.gutters.style.height=e.docHeight+t.display.barHeight+je(t)+"px"}function Lr(t){var n=t.display.gutters,i=t.options.gutters;e(n);for(var o=0;o-1&&!t.lineNumbers&&(t.gutters=t.gutters.slice(0),t.gutters.splice(e,1))}function Fr(t,e){this.ranges=t,this.primIndex=e}function Ar(t,e){this.anchor=t,this.head=e}function Or(t,e){var n=t[e];t.sort(function(t,e){return A(t.from(),e.from())}),e=h(t,n);for(var r=1;r=0){var s=V(o.from(),i.from()),a=_(o.to(),i.to()),l=o.empty()?i.from()==i.head:o.from()==o.head;r<=e&&--e,t.splice(--r,2,new Ar(l?a:s,l?s:a))}}return new Fr(t,e)}function _r(t,e){return new Fr([new Ar(t,e||t)],0)}function Vr(t){return t.text?F(t.from.line+t.text.length-1,d(t.text).length+(1==t.text.length?t.from.ch:0)):t.to}function Ir(t,e){if(A(t,e.from)<0)return t;if(A(t,e.to)<=0)return Vr(e);var n=t.line+e.text.length-(e.to.line-e.from.line)-1,r=t.ch;return t.line==e.to.line&&(r+=Vr(e).ch-e.to.ch),F(n,r)}function Dr(t,e){for(var n=[],r=0;r1&&t.remove(a.line+1,v-1),t.insert(a.line+1,y)}Ce(t,"change",t,e)}function Ur(t,e,n){function r(t,i,o){if(t.linked)for(var s=0;s1&&!t.done[t.done.length-2].ranges?(t.done.pop(),d(t.done)):void 0}function Zr(t,e,n,r){var i=t.history;i.undone.length=0;var o,s,a=+new Date;if((i.lastOp==r||i.lastOrigin==e.origin&&e.origin&&("+"==e.origin.charAt(0)&&t.cm&&i.lastModTime>a-t.cm.options.historyEventDelay||"*"==e.origin.charAt(0)))&&(o=Xr(i,i.lastOp==r)))s=d(o.changes),0==A(e.from,e.to)&&0==A(e.from,s.to)?s.to=Vr(e):o.changes.push($r(t,e));else{var l=d(i.done);for(l&&l.ranges||ti(t.sel,i.done),o={changes:[$r(t,e)],generation:i.generation},i.done.push(o);i.done.length>i.undoDepth;)i.done.shift(),i.done[0].ranges||i.done.shift()}i.done.push(n),i.generation=++i.maxGeneration,i.lastModTime=i.lastSelTime=a,i.lastOp=i.lastSelOp=r,i.lastOrigin=i.lastSelOrigin=e.origin,s||Nt(t,"historyAdded")}function Jr(t,e,n,r){var i=e.charAt(0);return"*"==i||"+"==i&&n.ranges.length==r.ranges.length&&n.somethingSelected()==r.somethingSelected()&&new Date-t.history.lastSelTime<=(t.cm?t.cm.options.historyEventDelay:500)}function Qr(t,e,n,r){var i=t.history,o=r&&r.origin;n==i.lastSelOp||o&&i.lastSelOrigin==o&&(i.lastModTime==i.lastSelTime&&i.lastOrigin==o||Jr(t,o,d(i.done),e))?i.done[i.done.length-1]=e:ti(e,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=o,i.lastSelOp=n,r&&r.clearRedo!==!1&&Yr(i.undone)}function ti(t,e){var n=d(e);n&&n.ranges&&n.equals(t)||e.push(t)}function ei(t,e,n,r){var i=e["spans_"+t.id],o=0;t.iter(Math.max(t.first,n),Math.min(t.first+t.size,r),function(n){n.markedSpans&&((i||(i=e["spans_"+t.id]={}))[o]=n.markedSpans),++o})}function ni(t){if(!t)return null;for(var e,n=0;n-1&&(d(a)[p]=c[p],delete c[p])}}}return r}function si(t,e,n,r){if(t.cm&&t.cm.display.shift||t.extend){var i=e.anchor;if(r){var o=A(n,i)<0;o!=A(r,i)<0?(i=n,n=r):o!=A(n,r)<0&&(n=r)}return new Ar(i,n)}return new Ar(r||n,n)}function ai(t,e,n,r){fi(t,new Fr([si(t,t.sel.primary(),e,n)],0),r)}function li(t,e,n){for(var r=[],i=0;i=e.ch:a.to>e.ch))){if(i&&(Nt(l,"beforeCursorEnter"),l.explicitlyCleared)){if(o.markedSpans){--s;continue}break}if(!l.atomic)continue;if(n){var c=l.find(r<0?1:-1),u=void 0;if((r<0?l.inclusiveRight:l.inclusiveLeft)&&(c=bi(t,c,-r,c&&c.line==e.line?o:null)),c&&c.line==e.line&&(u=A(c,n))&&(r<0?u<0:u>0))return yi(t,c,e,r,i)}var h=l.find(r<0?-1:1);return(r<0?l.inclusiveLeft:l.inclusiveRight)&&(h=bi(t,h,r,h.line==e.line?o:null)),h?yi(t,h,e,r,i):null}}return e}function wi(t,e,n,r,i){var o=r||1,s=yi(t,e,n,o,i)||!i&&yi(t,e,n,o,!0)||yi(t,e,n,-o,i)||!i&&yi(t,e,n,-o,!0);return s?s:(t.cantEdit=!0,F(t.first,0))}function bi(t,e,n,r){return n<0&&0==e.ch?e.line>t.first?D(t,F(e.line-1)):null:n>0&&e.ch==(r||k(t,e.line)).text.length?e.line