From 832a9ef5260365dc64003ee69619a4824e32bf6f Mon Sep 17 00:00:00 2001 From: its-a-feature Date: Mon, 7 Nov 2022 15:12:29 -0800 Subject: [PATCH] updating to version 0.0.74 with features for tabs --- mythic-react-docker/mythic/public/asset-manifest.json | 6 +++--- mythic-react-docker/mythic/public/index.html | 2 +- .../public/static/js/{main.1b0f370d.js => main.2325586a.js} | 6 +++--- ...1b0f370d.js.LICENSE.txt => main.2325586a.js.LICENSE.txt} | 0 .../js/{main.1b0f370d.js.map => main.2325586a.js.map} | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) rename mythic-react-docker/mythic/public/static/js/{main.1b0f370d.js => main.2325586a.js} (62%) rename mythic-react-docker/mythic/public/static/js/{main.1b0f370d.js.LICENSE.txt => main.2325586a.js.LICENSE.txt} (100%) rename mythic-react-docker/mythic/public/static/js/{main.1b0f370d.js.map => main.2325586a.js.map} (62%) diff --git a/mythic-react-docker/mythic/public/asset-manifest.json b/mythic-react-docker/mythic/public/asset-manifest.json index be49248bb..5960275bf 100644 --- a/mythic-react-docker/mythic/public/asset-manifest.json +++ b/mythic-react-docker/mythic/public/asset-manifest.json @@ -1,15 +1,15 @@ { "files": { "main.css": "/new/static/css/main.ec411ae1.css", - "main.js": "/new/static/js/main.1b0f370d.js", + "main.js": "/new/static/js/main.2325586a.js", "static/media/mythic.svg": "/new/static/media/mythic.7189479fdfbd51ae729872ce2cb98784.svg", "static/media/mythic_red_small.svg": "/new/static/media/mythic_red_small.793b41cc7135cdede246661ec232976b.svg", "index.html": "/new/index.html", "main.ec411ae1.css.map": "/new/static/css/main.ec411ae1.css.map", - "main.1b0f370d.js.map": "/new/static/js/main.1b0f370d.js.map" + "main.2325586a.js.map": "/new/static/js/main.2325586a.js.map" }, "entrypoints": [ "static/css/main.ec411ae1.css", - "static/js/main.1b0f370d.js" + "static/js/main.2325586a.js" ] } \ No newline at end of file diff --git a/mythic-react-docker/mythic/public/index.html b/mythic-react-docker/mythic/public/index.html index 0bb4c62d7..c8f61c394 100644 --- a/mythic-react-docker/mythic/public/index.html +++ b/mythic-react-docker/mythic/public/index.html @@ -1 +1 @@ -Mythic
\ No newline at end of file +Mythic
\ No newline at end of file diff --git a/mythic-react-docker/mythic/public/static/js/main.1b0f370d.js b/mythic-react-docker/mythic/public/static/js/main.2325586a.js similarity index 62% rename from mythic-react-docker/mythic/public/static/js/main.1b0f370d.js rename to mythic-react-docker/mythic/public/static/js/main.2325586a.js index c1a7f2c71..5491006bf 100644 --- a/mythic-react-docker/mythic/public/static/js/main.1b0f370d.js +++ b/mythic-react-docker/mythic/public/static/js/main.2325586a.js @@ -1,3 +1,3 @@ -/*! For license information please see main.1b0f370d.js.LICENSE.txt */ -!function(){var e={34575:function(e){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},e.exports.__esModule=!0,e.exports.default=e.exports},93913:function(e){function t(e,t){for(var n=0;n0){if(e!==s){e=s,t.forEach((function(e){a(e).dep.dirty(r),u(e)}));var l=Array.from(n);n.clear(),l.forEach((function(t){return t(e)}))}}else{var c=i.getValue();c&&(o(c),a(c).dep(r))}return e};r.onNextChange=function(e){return n.add(e),function(){n.delete(e)}};var o=r.attachCache=function(e){return t.add(e),a(e).vars.add(r),r};return r.forgetCache=function(e){return t.delete(e)},r}function u(e){e.broadcastWatches&&e.broadcastWatches()}},79777:function(){},15219:function(e,t,n){"use strict";n.d(t,{f:function(){return U},J:function(){return H}});var r=n(29388),i=n(91198),o=n(65942),a=o.i.execute;function s(){for(var e=[],t=0;t0||!1}var f=n(52127),h=n(57917),p=n(44784),m=n(12979),g=n(33134),v=n.n(g);function y(e,t,n){var r=[];e.forEach((function(e){return e[t]&&r.push(e)})),r.forEach((function(e){return e[t](n)}))}function b(e){function t(t){Object.defineProperty(e,t,{value:v()})}return"function"===typeof Symbol&&Symbol.species&&t(Symbol.species),t("@@species"),e}function x(e){return e&&"function"===typeof e.then}var w=function(e){function t(t){var n=e.call(this,(function(e){return n.addObserver(e),function(){return n.removeObserver(e)}}))||this;return n.observers=new Set,n.addCount=0,n.promise=new Promise((function(e,t){n.resolve=e,n.reject=t})),n.handlers={next:function(e){null!==n.sub&&(n.latest=["next",e],y(n.observers,"next",e))},error:function(e){var t=n.sub;null!==t&&(t&&Promise.resolve().then((function(){return t.unsubscribe()})),n.sub=null,n.latest=["error",e],n.reject(e),y(n.observers,"error",e))},complete:function(){if(null!==n.sub){var e=n.sources.shift();e?x(e)?e.then((function(e){return n.sub=e.subscribe(n.handlers)})):n.sub=e.subscribe(n.handlers):(n.sub=null,n.latest&&"next"===n.latest[0]?n.resolve(n.latest[1]):n.resolve(),y(n.observers,"complete"))}}},n.cancel=function(e){n.reject(e),n.sources=[],n.handlers.complete()},n.promise.catch((function(e){})),"function"===typeof t&&(t=[new(v())(t)]),x(t)?t.then((function(e){return n.start(e)}),n.handlers.error):n.start(t),n}return(0,r.ZT)(t,e),t.prototype.start=function(e){void 0===this.sub&&(this.sources=Array.from(e),this.handlers.complete())},t.prototype.deliverLastMessage=function(e){if(this.latest){var t=this.latest[0],n=e[t];n&&n.call(e,this.latest[1]),null===this.sub&&"next"===t&&e.complete&&e.complete()}},t.prototype.addObserver=function(e){this.observers.has(e)||(this.deliverLastMessage(e),this.observers.add(e),++this.addCount)},t.prototype.removeObserver=function(e,t){this.observers.delete(e)&&--this.addCount<1&&!t&&this.handlers.error(new Error("Observable cancelled prematurely"))},t.prototype.cleanup=function(e){var t=this,n=!1,r=function(){n||(n=!0,t.observers.delete(i),e())},i={next:r,error:r,complete:r},o=this.addCount;this.addObserver(i),this.addCount=o},t}(v());function k(e,t,n){return new(v())((function(r){var i=r.next,o=r.error,a=r.complete,s=0,l=!1,c={then:function(e){return new Promise((function(t){return t(e())}))}};function u(e,t){return e?function(t){++s;var n=function(){return e(t)};c=c.then(n,n).then((function(e){--s,i&&i.call(r,e),l&&d.complete()}),(function(e){throw--s,e})).catch((function(e){o&&o.call(r,e)}))}:function(e){return t&&t.call(r,e)}}var d={next:u(t,i),error:u(n,o),complete:function(){l=!0,s||a&&a.call(r)}},f=e.subscribe(d);return function(){return f.unsubscribe()}}))}b(w);var _=n(98221),S=n(58117),C=Object.prototype.toString;function j(e){return E(e)}function E(e,t){switch(C.call(e)){case"[object Array]":if((t=t||new Map).has(e))return t.get(e);var n=e.slice(0);return t.set(e,n),n.forEach((function(e,r){n[r]=E(e,t)})),n;case"[object Object]":if((t=t||new Map).has(e))return t.get(e);var r=Object.create(Object.getPrototypeOf(e));return t.set(e,r),Object.keys(e).forEach((function(n){r[n]=E(e[n],t)})),r;default:return e}}var T=function(){function e(e,t,n,r){this.observer=e,this.options=t,this.fetch=n,this.shouldFetch=r}return e.prototype.reobserve=function(e,t){e?this.updateOptions(e):this.updatePolling();var n=this.fetch(this.options,t);return this.concast&&this.concast.removeObserver(this.observer,!0),n.addObserver(this.observer),(this.concast=n).promise},e.prototype.updateOptions=function(e){return Object.assign(this.options,s(e)),this.updatePolling(),this},e.prototype.stop=function(){this.concast&&(this.concast.removeObserver(this.observer),delete this.concast),this.pollingInfo&&(clearTimeout(this.pollingInfo.timeout),this.options.pollInterval=0,this.updatePolling())},e.prototype.updatePolling=function(){var e=this,t=this.pollingInfo,n=this.options.pollInterval;if(n){if((!t||t.interval!==n)&&((0,i.kG)(n,20),!1!==this.shouldFetch)){(t||(this.pollingInfo={})).interval=n;var r=function(){e.pollingInfo&&(e.shouldFetch&&e.shouldFetch()?e.reobserve({fetchPolicy:"network-only",nextFetchPolicy:e.options.fetchPolicy||"cache-first"},S.I.poll).then(o,o):o())},o=function(){var t=e.pollingInfo;t&&(clearTimeout(t.timeout),t.timeout=setTimeout(r,t.interval))};o()}}else t&&(clearTimeout(t.timeout),delete this.pollingInfo)},e}(),M=function(e){function t(t){var n=t.queryManager,i=t.queryInfo,o=t.options,a=e.call(this,(function(e){return a.onSubscribe(e)}))||this;a.observers=new Set,a.subscriptions=new Set,a.observer={next:function(e){(a.lastError||a.isDifferentFromLastResult(e))&&(a.updateLastResult(e),y(a.observers,"next",e))},error:function(e){a.updateLastResult((0,r.pi)((0,r.pi)({},a.lastResult),{error:e,errors:e.graphQLErrors,networkStatus:S.I.error,loading:!1})),y(a.observers,"error",a.lastError=e)}},a.isTornDown=!1,a.options=o,a.queryId=n.generateQueryId();var s=(0,h.$H)(o.query);return a.queryName=s&&s.name&&s.name.value,a.queryManager=n,a.queryInfo=i,a}return(0,r.ZT)(t,e),Object.defineProperty(t.prototype,"variables",{get:function(){return this.options.variables},enumerable:!1,configurable:!0}),t.prototype.result=function(){var e=this;return new Promise((function(t,n){var r={next:function(n){t(n),e.observers.delete(r),e.observers.size||e.queryManager.removeQuery(e.queryId),setTimeout((function(){i.unsubscribe()}),0)},error:n},i=e.subscribe(r)}))},t.prototype.getCurrentResult=function(e){void 0===e&&(e=!0);var t=this.lastResult,n=this.queryInfo.networkStatus||t&&t.networkStatus||S.I.ready,i=(0,r.pi)((0,r.pi)({},t),{loading:(0,S.O)(n),networkStatus:n});if(this.isTornDown)return i;var o=this.options.fetchPolicy,a=void 0===o?"cache-first":o;if("no-cache"===a||"network-only"===a)delete i.partial;else if(!i.data||!this.queryManager.transform(this.options.query).hasForcedResolvers){var s=this.queryInfo.getDiff();i.data=s.complete||this.options.returnPartialData?s.result:void 0,s.complete?(i.networkStatus!==S.I.loading||"cache-first"!==a&&"cache-only"!==a||(i.networkStatus=S.I.ready,i.loading=!1),delete i.partial):i.partial=!0}return e&&this.updateLastResult(i),i},t.prototype.isDifferentFromLastResult=function(e){return!(0,c.D)(this.lastResultSnapshot,e)},t.prototype.getLastResult=function(){return this.lastResult},t.prototype.getLastError=function(){return this.lastError},t.prototype.resetLastResults=function(){delete this.lastResult,delete this.lastResultSnapshot,delete this.lastError,this.isTornDown=!1},t.prototype.resetQueryStoreErrors=function(){this.queryManager.resetErrors(this.queryId)},t.prototype.refetch=function(e){var t={pollInterval:0},n=this.options.fetchPolicy;return"no-cache"!==n&&"cache-and-network"!==n&&(t.fetchPolicy="network-only",t.nextFetchPolicy=n||"cache-first"),e&&!(0,c.D)(this.options.variables,e)&&(t.variables=this.options.variables=(0,r.pi)((0,r.pi)({},this.options.variables),e)),this.newReobserver(!1).reobserve(t,S.I.refetch)},t.prototype.fetchMore=function(e){var t=this,n=(0,r.pi)((0,r.pi)({},e.query?e:(0,r.pi)((0,r.pi)((0,r.pi)({},this.options),e),{variables:(0,r.pi)((0,r.pi)({},this.options.variables),e.variables)})),{fetchPolicy:"no-cache"}),i=this.queryManager.generateQueryId();return n.notifyOnNetworkStatusChange&&(this.queryInfo.networkStatus=S.I.fetchMore,this.observe()),this.queryManager.fetchQuery(i,n,S.I.fetchMore).then((function(r){var i=r.data,o=e.updateQuery;return o?t.updateQuery((function(e){return o(e,{fetchMoreResult:i,variables:n.variables})})):t.queryManager.cache.writeQuery({query:n.query,variables:n.variables,data:i}),r})).finally((function(){t.queryManager.stopQuery(i),t.reobserve()}))},t.prototype.subscribeToMore=function(e){var t=this,n=this.queryManager.startGraphQLSubscription({query:e.document,variables:e.variables,context:e.context}).subscribe({next:function(n){var r=e.updateQuery;r&&t.updateQuery((function(e,t){var i=t.variables;return r(e,{subscriptionData:n,variables:i})}))},error:function(t){e.onError&&e.onError(t)}});return this.subscriptions.add(n),function(){t.subscriptions.delete(n)&&n.unsubscribe()}},t.prototype.setOptions=function(e){return this.reobserve(e)},t.prototype.setVariables=function(e){if((0,c.D)(this.variables,e))return this.observers.size?this.result():Promise.resolve();if(this.options.variables=e,!this.observers.size)return Promise.resolve();var t=this.options.fetchPolicy,n=void 0===t?"cache-first":t,r={fetchPolicy:n,variables:e};return"cache-first"!==n&&"no-cache"!==n&&"network-only"!==n&&(r.fetchPolicy="cache-and-network",r.nextFetchPolicy=n),this.reobserve(r,S.I.setVariables)},t.prototype.updateQuery=function(e){var t,n=this.queryManager,r=e(n.cache.diff({query:this.options.query,variables:this.variables,previousResult:null===(t=this.lastResult)||void 0===t?void 0:t.data,returnPartialData:!0,optimistic:!1}).result,{variables:this.variables});r&&(n.cache.writeQuery({query:this.options.query,data:r,variables:this.variables}),n.broadcastQueries())},t.prototype.startPolling=function(e){this.getReobserver().updateOptions({pollInterval:e})},t.prototype.stopPolling=function(){this.reobserver&&this.reobserver.updateOptions({pollInterval:0})},t.prototype.updateLastResult=function(e){var t=this.lastResult;return this.lastResult=e,this.lastResultSnapshot=this.queryManager.assumeImmutableResults?e:j(e),(0,f.O)(e.errors)||delete this.lastError,t},t.prototype.onSubscribe=function(e){var t=this;if(e===this.observer)return function(){};try{var n=e._subscription._observer;n&&!n.error&&(n.error=A)}catch(i){}var r=!this.observers.size;return this.observers.add(e),this.lastError?e.error&&e.error(this.lastError):this.lastResult&&e.next&&e.next(this.lastResult),r&&this.reobserve().catch((function(e){})),function(){t.observers.delete(e)&&!t.observers.size&&t.tearDownQuery()}},t.prototype.getReobserver=function(){return this.reobserver||(this.reobserver=this.newReobserver(!0))},t.prototype.newReobserver=function(e){var t=this,n=this.queryManager,i=this.queryId;return n.setObservableQuery(this),new T(this.observer,e?this.options:(0,r.pi)({},this.options),(function(e,r){return n.setObservableQuery(t),n.fetchQueryObservable(i,e,r)}),!n.ssrMode&&function(){return!(0,S.O)(t.queryInfo.networkStatus)})},t.prototype.reobserve=function(e,t){return this.isTornDown=!1,this.getReobserver().reobserve(e,t)},t.prototype.observe=function(){this.observer.next(this.getCurrentResult(!1))},t.prototype.hasObservers=function(){return this.observers.size>0},t.prototype.tearDownQuery=function(){this.isTornDown||(this.reobserver&&(this.reobserver.stop(),delete this.reobserver),this.subscriptions.forEach((function(e){return e.unsubscribe()})),this.subscriptions.clear(),this.queryManager.stopQuery(this.queryId),this.observers.clear(),this.isTornDown=!0)},t}(v());function A(e){}b(M);var R=n(50344),O=n(80114),Z=n(16683),I=n(7082),P=n(34116),L=function(){function e(e){var t=e.cache,n=e.client,r=e.resolvers,i=e.fragmentMatcher;this.cache=t,n&&(this.client=n),r&&this.addResolvers(r),i&&this.setFragmentMatcher(i)}return e.prototype.addResolvers=function(e){var t=this;this.resolvers=this.resolvers||{},Array.isArray(e)?e.forEach((function(e){t.resolvers=(0,O.Ee)(t.resolvers,e)})):this.resolvers=(0,O.Ee)(this.resolvers,e)},e.prototype.setResolvers=function(e){this.resolvers={},this.addResolvers(e)},e.prototype.getResolvers=function(){return this.resolvers||{}},e.prototype.runResolvers=function(e){var t=e.document,n=e.remoteResult,i=e.context,o=e.variables,a=e.onlyRunForcedResolvers,s=void 0!==a&&a;return(0,r.mG)(this,void 0,void 0,(function(){return(0,r.Jh)(this,(function(e){return t?[2,this.resolveDocument(t,n.data,i,o,this.fragmentMatcher,s).then((function(e){return(0,r.pi)((0,r.pi)({},n),{data:e.result})}))]:[2,n]}))}))},e.prototype.setFragmentMatcher=function(e){this.fragmentMatcher=e},e.prototype.getFragmentMatcher=function(){return this.fragmentMatcher},e.prototype.clientQuery=function(e){return(0,m.FS)(["client"],e)&&this.resolvers?e:null},e.prototype.serverQuery=function(e){return(0,p.ob)(e)},e.prototype.prepareContext=function(e){var t=this.cache;return(0,r.pi)((0,r.pi)({},e),{cache:t,getCacheKey:function(e){return t.identify(e)}})},e.prototype.addExportedVariables=function(e,t,n){return void 0===t&&(t={}),void 0===n&&(n={}),(0,r.mG)(this,void 0,void 0,(function(){return(0,r.Jh)(this,(function(i){return e?[2,this.resolveDocument(e,this.buildRootValueFromCache(e,t)||{},this.prepareContext(n),t).then((function(e){return(0,r.pi)((0,r.pi)({},t),e.exportedVariables)}))]:[2,(0,r.pi)({},t)]}))}))},e.prototype.shouldForceResolvers=function(e){var t=!1;return(0,R.Vn)(e,{Directive:{enter:function(e){if("client"===e.name.value&&e.arguments&&(t=e.arguments.some((function(e){return"always"===e.name.value&&"BooleanValue"===e.value.kind&&!0===e.value.value}))))return R.$_}}}),t},e.prototype.buildRootValueFromCache=function(e,t){return this.cache.diff({query:(0,p.aL)(e),variables:t,returnPartialData:!0,optimistic:!1}).result},e.prototype.resolveDocument=function(e,t,n,i,o,a){return void 0===n&&(n={}),void 0===i&&(i={}),void 0===o&&(o=function(){return!0}),void 0===a&&(a=!1),(0,r.mG)(this,void 0,void 0,(function(){var s,l,c,u,d,f,p,m,g;return(0,r.Jh)(this,(function(v){return s=(0,h.p$)(e),l=(0,h.kU)(e),c=(0,Z.F)(l),u=s.operation,d=u?u.charAt(0).toUpperCase()+u.slice(1):"Query",p=(f=this).cache,m=f.client,g={fragmentMap:c,context:(0,r.pi)((0,r.pi)({},n),{cache:p,client:m}),variables:i,fragmentMatcher:o,defaultOperationType:d,exportedVariables:{},onlyRunForcedResolvers:a},[2,this.resolveSelectionSet(s.selectionSet,t,g).then((function(e){return{result:e,exportedVariables:g.exportedVariables}}))]}))}))},e.prototype.resolveSelectionSet=function(e,t,n){return(0,r.mG)(this,void 0,void 0,(function(){var o,a,s,l,c,u=this;return(0,r.Jh)(this,(function(d){return o=n.fragmentMap,a=n.context,s=n.variables,l=[t],c=function(e){return(0,r.mG)(u,void 0,void 0,(function(){var c,u;return(0,r.Jh)(this,(function(r){return(0,m.LZ)(e,s)?(0,I.My)(e)?[2,this.resolveField(e,t,n).then((function(t){var n;"undefined"!==typeof t&&l.push(((n={})[(0,I.u2)(e)]=t,n))}))]:((0,I.Ao)(e)?c=e:(c=o[e.name.value],(0,i.kG)(c,11)),c&&c.typeCondition&&(u=c.typeCondition.name.value,n.fragmentMatcher(t,u,a))?[2,this.resolveSelectionSet(c.selectionSet,t,n).then((function(e){l.push(e)}))]:[2]):[2]}))}))},[2,Promise.all(e.selections.map(c)).then((function(){return(0,O.bw)(l)}))]}))}))},e.prototype.resolveField=function(e,t,n){return(0,r.mG)(this,void 0,void 0,(function(){var i,o,a,s,l,c,u,d,f,h=this;return(0,r.Jh)(this,(function(r){return i=n.variables,o=e.name.value,a=(0,I.u2)(e),s=o!==a,l=t[a]||t[o],c=Promise.resolve(l),n.onlyRunForcedResolvers&&!this.shouldForceResolvers(e)||(u=t.__typename||n.defaultOperationType,(d=this.resolvers&&this.resolvers[u])&&(f=d[s?o:a])&&(c=Promise.resolve(P.ab.withValue(this.cache,f,[t,(0,I.NC)(e,i),n.context,{field:e,fragmentMap:n.fragmentMap}])))),[2,c.then((function(t){return void 0===t&&(t=l),e.directives&&e.directives.forEach((function(e){"export"===e.name.value&&e.arguments&&e.arguments.forEach((function(e){"as"===e.name.value&&"StringValue"===e.value.kind&&(n.exportedVariables[e.value.value]=t)}))})),e.selectionSet?null==t?t:Array.isArray(t)?h.resolveSubSelectedArray(e,t,n):e.selectionSet?h.resolveSelectionSet(e.selectionSet,t,n):void 0:t}))]}))}))},e.prototype.resolveSubSelectedArray=function(e,t,n){var r=this;return Promise.all(t.map((function(t){return null===t?null:Array.isArray(t)?r.resolveSubSelectedArray(e,t,n):e.selectionSet?r.resolveSelectionSet(e.selectionSet,t,n):void 0})))},e}(),D=new(u.m?WeakMap:Map);function N(e,t){var n=e[t];"function"===typeof n&&(e[t]=function(){return D.set(e,(D.get(e)+1)%1e15),n.apply(this,arguments)})}function $(e){e.notifyTimeout&&(clearTimeout(e.notifyTimeout),e.notifyTimeout=void 0)}var F=function(){function e(e){this.cache=e,this.listeners=new Set,this.document=null,this.lastRequestId=1,this.subscriptions=new Set,this.stopped=!1,this.dirty=!1,this.diff=null,this.observableQuery=null,D.has(e)||(D.set(e,0),N(e,"evict"),N(e,"modify"),N(e,"reset"))}return e.prototype.init=function(e){var t=e.networkStatus||S.I.loading;return this.variables&&this.networkStatus!==S.I.loading&&!(0,c.D)(this.variables,e.variables)&&(t=S.I.setVariables),(0,c.D)(e.variables,this.variables)||(this.diff=null),Object.assign(this,{document:e.document,variables:e.variables,networkError:null,graphQLErrors:this.graphQLErrors||[],networkStatus:t}),e.observableQuery&&this.setObservableQuery(e.observableQuery),e.lastRequestId&&(this.lastRequestId=e.lastRequestId),this},e.prototype.reset=function(){$(this),this.diff=null,this.dirty=!1},e.prototype.getDiff=function(e){return void 0===e&&(e=this.variables),this.diff&&(0,c.D)(e,this.variables)?this.diff:(this.updateWatch(this.variables=e),this.diff=this.cache.diff({query:this.document,variables:e,returnPartialData:!0,optimistic:!0}))},e.prototype.setDiff=function(e){var t=this,n=this.diff;this.diff=e,this.dirty||(e&&e.result)===(n&&n.result)||(this.dirty=!0,this.notifyTimeout||(this.notifyTimeout=setTimeout((function(){return t.notify()}),0)))},e.prototype.setObservableQuery=function(e){var t=this;e!==this.observableQuery&&(this.oqListener&&this.listeners.delete(this.oqListener),this.observableQuery=e,e?(e.queryInfo=this,this.listeners.add(this.oqListener=function(){t.getDiff().fromOptimisticTransaction?e.observe():e.reobserve()})):delete this.oqListener)},e.prototype.notify=function(){var e=this;$(this),this.shouldNotify()&&this.listeners.forEach((function(t){return t(e)})),this.dirty=!1},e.prototype.shouldNotify=function(){if(!this.dirty||!this.listeners.size)return!1;if((0,S.O)(this.networkStatus)&&this.observableQuery){var e=this.observableQuery.options.fetchPolicy;if("cache-only"!==e&&"cache-and-network"!==e)return!1}return!0},e.prototype.stop=function(){if(!this.stopped){this.stopped=!0,this.reset(),this.cancel(),delete this.cancel,this.subscriptions.forEach((function(e){return e.unsubscribe()}));var e=this.observableQuery;e&&e.stopPolling()}},e.prototype.cancel=function(){},e.prototype.updateWatch=function(e){var t=this;void 0===e&&(e=this.variables);var n=this.observableQuery;n&&"no-cache"===n.options.fetchPolicy||this.lastWatch&&this.lastWatch.query===this.document&&(0,c.D)(e,this.lastWatch.variables)||(this.cancel(),this.cancel=this.cache.watch(this.lastWatch={query:this.document,variables:e,optimistic:!0,callback:function(e){return t.setDiff(e)}}))},e.prototype.shouldWrite=function(e,t){var n=this.lastWrite;return!(n&&n.dmCount===D.get(this.cache)&&(0,c.D)(t,n.variables)&&(0,c.D)(e.data,n.result.data))},e.prototype.markResult=function(e,t,n){var r=this;this.graphQLErrors=(0,f.O)(e.errors)?e.errors:[],this.reset(),"no-cache"===t.fetchPolicy?this.diff={result:e.data,complete:!0}:!this.stopped&&n&&(z(e,t.errorPolicy)?this.cache.performTransaction((function(n){if(r.shouldWrite(e,t.variables))n.writeQuery({query:r.document,data:e.data,variables:t.variables}),r.lastWrite={result:e,variables:t.variables,dmCount:D.get(r.cache)};else if(r.diff&&r.diff.complete)return void(e.data=r.diff.result);var i=n.diff({query:r.document,variables:t.variables,returnPartialData:!0,optimistic:!0});r.stopped||r.updateWatch(t.variables),r.diff=i,i.complete&&(e.data=i.result)})):this.lastWrite=void 0)},e.prototype.markReady=function(){return this.networkError=null,this.networkStatus=S.I.ready},e.prototype.markError=function(e){return this.networkStatus=S.I.error,this.lastWrite=void 0,this.reset(),e.graphQLErrors&&(this.graphQLErrors=e.graphQLErrors),e.networkError&&(this.networkError=e.networkError),e},e}();function z(e,t){void 0===t&&(t="none");var n="ignore"===t||"all"===t,r=!d(e);return!r&&n&&e.data&&(r=!0),r}var B=Object.prototype.hasOwnProperty,W=function(){function e(e){var t=e.cache,n=e.link,r=e.queryDeduplication,i=void 0!==r&&r,o=e.onBroadcast,a=e.ssrMode,s=void 0!==a&&a,l=e.clientAwareness,c=void 0===l?{}:l,d=e.localState,f=e.assumeImmutableResults;this.clientAwareness={},this.queries=new Map,this.fetchCancelFns=new Map,this.transformCache=new(u.m?WeakMap:Map),this.queryIdCounter=1,this.requestIdCounter=1,this.mutationIdCounter=1,this.inFlightLinkObservables=new Map,this.cache=t,this.link=n,this.queryDeduplication=i,this.clientAwareness=c,this.localState=d||new L({cache:t}),this.ssrMode=s,this.assumeImmutableResults=!!f,(this.onBroadcast=o)&&(this.mutationStore=Object.create(null))}return e.prototype.stop=function(){var e=this;this.queries.forEach((function(t,n){e.stopQueryNoBroadcast(n)})),this.cancelPendingFetches(new i.ej(12))},e.prototype.cancelPendingFetches=function(e){this.fetchCancelFns.forEach((function(t){return t(e)})),this.fetchCancelFns.clear()},e.prototype.mutate=function(e){var t=e.mutation,n=e.variables,o=e.optimisticResponse,a=e.updateQueries,s=e.refetchQueries,l=void 0===s?[]:s,c=e.awaitRefetchQueries,u=void 0!==c&&c,h=e.update,p=e.errorPolicy,m=void 0===p?"none":p,g=e.fetchPolicy,v=e.context,y=void 0===v?{}:v;return(0,r.mG)(this,void 0,void 0,(function(){var e,s,c;return(0,r.Jh)(this,(function(p){switch(p.label){case 0:return(0,i.kG)(t,13),(0,i.kG)(!g||"no-cache"===g,14),e=this.generateMutationId(),t=this.transform(t).document,n=this.getVariables(t,n),this.transform(t).hasClientExports?[4,this.localState.addExportedVariables(t,n,y)]:[3,2];case 1:n=p.sent(),p.label=2;case 2:return s=this.mutationStore&&(this.mutationStore[e]={mutation:t,variables:n,loading:!0,error:null}),o&&this.markMutationOptimistic(o,{mutationId:e,document:t,variables:n,errorPolicy:m,updateQueries:a,update:h}),this.broadcastQueries(),c=this,[2,new Promise((function(i,p){var v,b;c.getObservableFromLink(t,(0,r.pi)((0,r.pi)({},y),{optimisticResponse:o}),n,!1).subscribe({next:function(r){if(d(r)&&"none"===m)b=new _.c({graphQLErrors:r.errors});else{if(s&&(s.loading=!1,s.error=null),"no-cache"!==g)try{c.markMutationResult({mutationId:e,result:r,document:t,variables:n,errorPolicy:m,updateQueries:a,update:h})}catch(i){return void(b=new _.c({networkError:i}))}v=r}},error:function(t){s&&(s.loading=!1,s.error=t),o&&c.cache.removeOptimistic(e),c.broadcastQueries(),p(new _.c({networkError:t}))},complete:function(){if(b&&s&&(s.loading=!1,s.error=b),o&&c.cache.removeOptimistic(e),c.broadcastQueries(),b)p(b);else{"function"===typeof l&&(l=l(v));var t=[];(0,f.O)(l)&&l.forEach((function(e){if("string"===typeof e)c.queries.forEach((function(n){var r=n.observableQuery;r&&r.hasObservers()&&r.queryName===e&&t.push(r.refetch())}));else{var n={query:e.query,variables:e.variables,fetchPolicy:"network-only"};e.context&&(n.context=e.context),t.push(c.query(n))}})),Promise.all(u?t:[]).then((function(){"ignore"===m&&v&&d(v)&&delete v.errors,i(v)}),p)}}})}))]}}))}))},e.prototype.markMutationResult=function(e,t){var n=this;if(void 0===t&&(t=this.cache),z(e.result,e.errorPolicy)){var r=[{result:e.result.data,dataId:"ROOT_MUTATION",query:e.document,variables:e.variables}],i=e.updateQueries;i&&this.queries.forEach((function(o,a){var s=o.observableQuery,l=s&&s.queryName;if(l&&B.call(i,l)){var c=i[l],u=n.queries.get(a),d=u.document,f=u.variables,p=t.diff({query:d,variables:f,returnPartialData:!0,optimistic:!1}),m=p.result;if(p.complete&&m){var g=c(m,{mutationResult:e.result,queryName:d&&(0,h.rY)(d)||void 0,queryVariables:f});g&&r.push({result:g,dataId:"ROOT_QUERY",query:d,variables:f})}}})),t.performTransaction((function(t){r.forEach((function(e){return t.write(e)}));var n=e.update;n&&n(t,e.result)}),null)}},e.prototype.markMutationOptimistic=function(e,t){var n=this,i="function"===typeof e?e(t.variables):e;return this.cache.recordOptimisticTransaction((function(e){try{n.markMutationResult((0,r.pi)((0,r.pi)({},t),{result:{data:i}}),e)}catch(o){}}),t.mutationId)},e.prototype.fetchQuery=function(e,t,n){return this.fetchQueryObservable(e,t,n).promise},e.prototype.getQueryStore=function(){var e=Object.create(null);return this.queries.forEach((function(t,n){e[n]={variables:t.variables,networkStatus:t.networkStatus,networkError:t.networkError,graphQLErrors:t.graphQLErrors}})),e},e.prototype.resetErrors=function(e){var t=this.queries.get(e);t&&(t.networkError=void 0,t.graphQLErrors=[])},e.prototype.transform=function(e){var t=this.transformCache;if(!t.has(e)){var n=this.cache.transformDocument(e),r=(0,p.Fo)(this.cache.transformForLink(n)),i=this.localState.clientQuery(n),o=r&&this.localState.serverQuery(r),a={document:n,hasClientExports:(0,m.mj)(n),hasForcedResolvers:this.localState.shouldForceResolvers(n),clientQuery:i,serverQuery:o,defaultVars:(0,h.O4)((0,h.$H)(n))},s=function(e){e&&!t.has(e)&&t.set(e,a)};s(e),s(n),s(i),s(o)}return t.get(e)},e.prototype.getVariables=function(e,t){return(0,r.pi)((0,r.pi)({},this.transform(e).defaultVars),t)},e.prototype.watchQuery=function(e){"undefined"===typeof(e=(0,r.pi)((0,r.pi)({},e),{variables:this.getVariables(e.query,e.variables)})).notifyOnNetworkStatusChange&&(e.notifyOnNetworkStatusChange=!1);var t=new F(this.cache),n=new M({queryManager:this,queryInfo:t,options:e});return this.queries.set(n.queryId,t),t.init({document:e.query,observableQuery:n,variables:e.variables}),n},e.prototype.query=function(e){var t=this;(0,i.kG)(e.query,15),(0,i.kG)("Document"===e.query.kind,16),(0,i.kG)(!e.returnPartialData,17),(0,i.kG)(!e.pollInterval,18);var n=this.generateQueryId();return this.fetchQuery(n,e).finally((function(){return t.stopQuery(n)}))},e.prototype.generateQueryId=function(){return String(this.queryIdCounter++)},e.prototype.generateRequestId=function(){return this.requestIdCounter++},e.prototype.generateMutationId=function(){return String(this.mutationIdCounter++)},e.prototype.stopQueryInStore=function(e){this.stopQueryInStoreNoBroadcast(e),this.broadcastQueries()},e.prototype.stopQueryInStoreNoBroadcast=function(e){var t=this.queries.get(e);t&&t.stop()},e.prototype.clearStore=function(){return this.cancelPendingFetches(new i.ej(19)),this.queries.forEach((function(e){e.observableQuery?e.networkStatus=S.I.loading:e.stop()})),this.mutationStore&&(this.mutationStore=Object.create(null)),this.cache.reset()},e.prototype.resetStore=function(){var e=this;return this.clearStore().then((function(){return e.reFetchObservableQueries()}))},e.prototype.reFetchObservableQueries=function(e){var t=this;void 0===e&&(e=!1);var n=[];return this.queries.forEach((function(r,i){var o=r.observableQuery;if(o&&o.hasObservers()){var a=o.options.fetchPolicy;o.resetLastResults(),"cache-only"===a||!e&&"standby"===a||n.push(o.refetch()),t.getQuery(i).setDiff(null)}})),this.broadcastQueries(),Promise.all(n)},e.prototype.setObservableQuery=function(e){this.getQuery(e.queryId).setObservableQuery(e)},e.prototype.startGraphQLSubscription=function(e){var t=this,n=e.query,r=e.fetchPolicy,i=e.errorPolicy,o=e.variables,a=e.context,s=void 0===a?{}:a;n=this.transform(n).document,o=this.getVariables(n,o);var l=function(e){return t.getObservableFromLink(n,s,e,!1).map((function(o){if("no-cache"!==r&&(z(o,i)&&t.cache.write({query:n,result:o.data,dataId:"ROOT_SUBSCRIPTION",variables:e}),t.broadcastQueries()),d(o))throw new _.c({graphQLErrors:o.errors});return o}))};if(this.transform(n).hasClientExports){var c=this.localState.addExportedVariables(n,o,s).then(l);return new(v())((function(e){var t=null;return c.then((function(n){return t=n.subscribe(e)}),e.error),function(){return t&&t.unsubscribe()}}))}return l(o)},e.prototype.stopQuery=function(e){this.stopQueryNoBroadcast(e),this.broadcastQueries()},e.prototype.stopQueryNoBroadcast=function(e){this.stopQueryInStoreNoBroadcast(e),this.removeQuery(e)},e.prototype.removeQuery=function(e){this.fetchCancelFns.delete(e),this.getQuery(e).stop(),this.queries.delete(e)},e.prototype.broadcastQueries=function(){this.onBroadcast&&this.onBroadcast(),this.queries.forEach((function(e){return e.notify()}))},e.prototype.getLocalState=function(){return this.localState},e.prototype.getObservableFromLink=function(e,t,n,i){var o,s,l=this;void 0===i&&(i=null!==(o=null===t||void 0===t?void 0:t.queryDeduplication)&&void 0!==o?o:this.queryDeduplication);var c=this.transform(e).serverQuery;if(c){var u=this.inFlightLinkObservables,d=this.link,f={query:c,variables:n,operationName:(0,h.rY)(c)||void 0,context:this.prepareContext((0,r.pi)((0,r.pi)({},t),{forceFetch:!i}))};if(t=f.context,i){var p=u.get(c)||new Map;u.set(c,p);var m=JSON.stringify(n);if(!(s=p.get(m))){var g=new w([a(d,f)]);p.set(m,s=g),g.cleanup((function(){p.delete(m)&&p.size<1&&u.delete(c)}))}}else s=new w([a(d,f)])}else s=new w([v().of({data:{}})]),t=this.prepareContext(t);var y=this.transform(e).clientQuery;return y&&(s=k(s,(function(e){return l.localState.runResolvers({document:y,remoteResult:e,context:t,variables:n})}))),s},e.prototype.getResultsFromLink=function(e,t,n){var r=e.lastRequestId=this.generateRequestId();return k(this.getObservableFromLink(e.document,n.context,n.variables),(function(i){var o=(0,f.O)(i.errors);if(r>=e.lastRequestId){if(o&&"none"===n.errorPolicy)throw e.markError(new _.c({graphQLErrors:i.errors}));e.markResult(i,n,t),e.markReady()}var a={data:i.data,loading:!1,networkStatus:e.networkStatus||S.I.ready};return o&&"ignore"!==n.errorPolicy&&(a.errors=i.errors),a}),(function(t){var n=(0,_.M)(t)?t:new _.c({networkError:t});throw r>=e.lastRequestId&&e.markError(n),n}))},e.prototype.fetchQueryObservable=function(e,t,n){var r=this;void 0===n&&(n=S.I.loading);var i=this.transform(t.query).document,o=this.getVariables(i,t.variables),a=this.getQuery(e),s=a.networkStatus,l=t.fetchPolicy,c=void 0===l?"cache-first":l,u=t.errorPolicy,d=void 0===u?"none":u,f=t.returnPartialData,h=void 0!==f&&f,p=t.notifyOnNetworkStatusChange,m=void 0!==p&&p,g=t.context,v=void 0===g?{}:g;("cache-first"===c||"cache-and-network"===c||"network-only"===c||"no-cache"===c)&&m&&"number"===typeof s&&s!==n&&(0,S.O)(n)&&("cache-first"!==c&&(c="cache-and-network"),h=!0);var y=Object.assign({},t,{query:i,variables:o,fetchPolicy:c,errorPolicy:d,returnPartialData:h,notifyOnNetworkStatusChange:m,context:v}),b=function(e){return y.variables=e,r.fetchQueryByPolicy(a,y,n)};this.fetchCancelFns.set(e,(function(e){Promise.resolve().then((function(){return x.cancel(e)}))}));var x=new w(this.transform(y.query).hasClientExports?this.localState.addExportedVariables(y.query,y.variables,y.context).then(b):b(y.variables));return x.cleanup((function(){r.fetchCancelFns.delete(e);var n=t.nextFetchPolicy;n&&(t.nextFetchPolicy=void 0,t.fetchPolicy="function"===typeof n?n.call(t,t.fetchPolicy||"cache-first"):n)})),x},e.prototype.fetchQueryByPolicy=function(e,t,n){var i=this,o=t.query,a=t.variables,s=t.fetchPolicy,l=t.errorPolicy,c=t.returnPartialData,u=t.context;e.init({document:o,variables:a,networkStatus:n});var d=function(){return e.getDiff(a)},f=function(t,n){void 0===n&&(n=e.networkStatus||S.I.loading);var s=t.result;var l=function(e){return v().of((0,r.pi)({data:e,loading:(0,S.O)(n),networkStatus:n},t.complete?null:{partial:!0}))};return i.transform(o).hasForcedResolvers?i.localState.runResolvers({document:o,remoteResult:{data:s},context:u,variables:a,onlyRunForcedResolvers:!0}).then((function(e){return l(e.data)})):l(s)},h=function(t){return i.getResultsFromLink(e,t,{variables:a,context:u,fetchPolicy:s,errorPolicy:l})};switch(s){default:case"cache-first":return(p=d()).complete?[f(p,e.markReady())]:c?[f(p),h(!0)]:[h(!0)];case"cache-and-network":var p;return(p=d()).complete||c?[f(p),h(!0)]:[h(!0)];case"cache-only":return[f(d(),e.markReady())];case"network-only":return[h(!0)];case"no-cache":return[h(!1)];case"standby":return[]}},e.prototype.getQuery=function(e){return e&&!this.queries.has(e)&&this.queries.set(e,new F(this.cache)),this.queries.get(e)},e.prototype.prepareContext=function(e){void 0===e&&(e={});var t=this.localState.prepareContext(e);return(0,r.pi)((0,r.pi)({},t),{clientAwareness:this.clientAwareness})},e}();function H(e,t){return s(e,t,t.variables&&{variables:(0,r.pi)((0,r.pi)({},e.variables),t.variables)})}var U=function(){function e(e){var t=this;this.defaultOptions={},this.resetStoreCallbacks=[],this.clearStoreCallbacks=[];var n=e.uri,r=e.credentials,a=e.headers,s=e.cache,c=e.ssrMode,u=void 0!==c&&c,d=e.ssrForceFetchDelay,f=void 0===d?0:d,h=e.connectToDevTools,p=void 0===h?"object"===typeof window&&!window.__APOLLO_CLIENT__&&!1:h,m=e.queryDeduplication,g=void 0===m||m,v=e.defaultOptions,y=e.assumeImmutableResults,b=void 0!==y&&y,x=e.resolvers,w=e.typeDefs,k=e.fragmentMatcher,_=e.name,S=e.version,C=e.link;if(C||(C=n?new l.u({uri:n,credentials:r,headers:a}):o.i.empty()),!s)throw new i.ej(9);this.link=C,this.cache=s,this.disableNetworkFetches=u||f>0,this.queryDeduplication=g,this.defaultOptions=v||{},this.typeDefs=w,f&&setTimeout((function(){return t.disableNetworkFetches=!1}),f),this.watchQuery=this.watchQuery.bind(this),this.query=this.query.bind(this),this.mutate=this.mutate.bind(this),this.resetStore=this.resetStore.bind(this),this.reFetchObservableQueries=this.reFetchObservableQueries.bind(this),p&&"object"===typeof window&&(window.__APOLLO_CLIENT__=this),this.version="3.3.20",this.localState=new L({cache:s,client:this,resolvers:x,fragmentMatcher:k}),this.queryManager=new W({cache:this.cache,link:this.link,queryDeduplication:g,ssrMode:u,clientAwareness:{name:_,version:S},localState:this.localState,assumeImmutableResults:b,onBroadcast:p?function(){t.devToolsHookCb&&t.devToolsHookCb({action:{},state:{queries:t.queryManager.getQueryStore(),mutations:t.queryManager.mutationStore||{}},dataWithOptimisticResults:t.cache.extract(!0)})}:void 0})}return e.prototype.stop=function(){this.queryManager.stop()},e.prototype.watchQuery=function(e){return this.defaultOptions.watchQuery&&(e=H(this.defaultOptions.watchQuery,e)),!this.disableNetworkFetches||"network-only"!==e.fetchPolicy&&"cache-and-network"!==e.fetchPolicy||(e=(0,r.pi)((0,r.pi)({},e),{fetchPolicy:"cache-first"})),this.queryManager.watchQuery(e)},e.prototype.query=function(e){return this.defaultOptions.query&&(e=H(this.defaultOptions.query,e)),(0,i.kG)("cache-and-network"!==e.fetchPolicy,10),this.disableNetworkFetches&&"network-only"===e.fetchPolicy&&(e=(0,r.pi)((0,r.pi)({},e),{fetchPolicy:"cache-first"})),this.queryManager.query(e)},e.prototype.mutate=function(e){return this.defaultOptions.mutate&&(e=H(this.defaultOptions.mutate,e)),this.queryManager.mutate(e)},e.prototype.subscribe=function(e){return this.queryManager.startGraphQLSubscription(e)},e.prototype.readQuery=function(e,t){return void 0===t&&(t=!1),this.cache.readQuery(e,t)},e.prototype.readFragment=function(e,t){return void 0===t&&(t=!1),this.cache.readFragment(e,t)},e.prototype.writeQuery=function(e){this.cache.writeQuery(e),this.queryManager.broadcastQueries()},e.prototype.writeFragment=function(e){this.cache.writeFragment(e),this.queryManager.broadcastQueries()},e.prototype.__actionHookForDevTools=function(e){this.devToolsHookCb=e},e.prototype.__requestRaw=function(e){return a(this.link,e)},e.prototype.resetStore=function(){var e=this;return Promise.resolve().then((function(){return e.queryManager.clearStore()})).then((function(){return Promise.all(e.resetStoreCallbacks.map((function(e){return e()})))})).then((function(){return e.reFetchObservableQueries()}))},e.prototype.clearStore=function(){var e=this;return Promise.resolve().then((function(){return e.queryManager.clearStore()})).then((function(){return Promise.all(e.clearStoreCallbacks.map((function(e){return e()})))}))},e.prototype.onResetStore=function(e){var t=this;return this.resetStoreCallbacks.push(e),function(){t.resetStoreCallbacks=t.resetStoreCallbacks.filter((function(t){return t!==e}))}},e.prototype.onClearStore=function(e){var t=this;return this.clearStoreCallbacks.push(e),function(){t.clearStoreCallbacks=t.clearStoreCallbacks.filter((function(t){return t!==e}))}},e.prototype.reFetchObservableQueries=function(e){return this.queryManager.reFetchObservableQueries(e)},e.prototype.extract=function(e){return this.cache.extract(e)},e.prototype.restore=function(e){return this.cache.restore(e)},e.prototype.addResolvers=function(e){this.localState.addResolvers(e)},e.prototype.setResolvers=function(e){this.localState.setResolvers(e)},e.prototype.getResolvers=function(){return this.localState.getResolvers()},e.prototype.setLocalStateFragmentMatcher=function(e){this.localState.setFragmentMatcher(e)},e.prototype.setLink=function(e){this.link=this.queryManager.link=e},e}()},17795:function(e,t,n){"use strict";n.d(t,{from:function(){return o.Dp},split:function(){return o.Vl}});var r=n(17382);n.o(r,"ApolloProvider")&&n.d(t,{ApolloProvider:function(){return r.ApolloProvider}}),n.o(r,"from")&&n.d(t,{from:function(){return r.from}}),n.o(r,"split")&&n.d(t,{split:function(){return r.split}}),n.o(r,"useLazyQuery")&&n.d(t,{useLazyQuery:function(){return r.useLazyQuery}}),n.o(r,"useMutation")&&n.d(t,{useMutation:function(){return r.useMutation}}),n.o(r,"useQuery")&&n.d(t,{useQuery:function(){return r.useQuery}}),n.o(r,"useReactiveVar")&&n.d(t,{useReactiveVar:function(){return r.useReactiveVar}}),n.o(r,"useSubscription")&&n.d(t,{useSubscription:function(){return r.useSubscription}});var i=n(79777);n.o(i,"ApolloProvider")&&n.d(t,{ApolloProvider:function(){return i.ApolloProvider}}),n.o(i,"from")&&n.d(t,{from:function(){return i.from}}),n.o(i,"split")&&n.d(t,{split:function(){return i.split}}),n.o(i,"useLazyQuery")&&n.d(t,{useLazyQuery:function(){return i.useLazyQuery}}),n.o(i,"useMutation")&&n.d(t,{useMutation:function(){return i.useMutation}}),n.o(i,"useQuery")&&n.d(t,{useQuery:function(){return i.useQuery}}),n.o(i,"useReactiveVar")&&n.d(t,{useReactiveVar:function(){return i.useReactiveVar}}),n.o(i,"useSubscription")&&n.d(t,{useSubscription:function(){return i.useSubscription}});var o=n(74176);n.o(o,"ApolloProvider")&&n.d(t,{ApolloProvider:function(){return o.ApolloProvider}}),n.o(o,"useLazyQuery")&&n.d(t,{useLazyQuery:function(){return o.useLazyQuery}}),n.o(o,"useMutation")&&n.d(t,{useMutation:function(){return o.useMutation}}),n.o(o,"useQuery")&&n.d(t,{useQuery:function(){return o.useQuery}}),n.o(o,"useReactiveVar")&&n.d(t,{useReactiveVar:function(){return o.useReactiveVar}}),n.o(o,"useSubscription")&&n.d(t,{useSubscription:function(){return o.useSubscription}}),(0,n(91198).U6)("log")},58117:function(e,t,n){"use strict";var r;function i(e){return!!e&&e<7}n.d(t,{I:function(){return r},O:function(){return i}}),function(e){e[e.loading=1]="loading",e[e.setVariables=2]="setVariables",e[e.fetchMore=3]="fetchMore",e[e.refetch=4]="refetch",e[e.poll=6]="poll",e[e.ready=7]="ready",e[e.error=8]="error"}(r||(r={}))},17382:function(){},98221:function(e,t,n){"use strict";n.d(t,{M:function(){return o},c:function(){return a}});var r=n(29388),i=n(52127);function o(e){return e.hasOwnProperty("graphQLErrors")}var a=function(e){function t(n){var r=n.graphQLErrors,o=n.networkError,a=n.errorMessage,s=n.extraInfo,l=e.call(this,a)||this;return l.graphQLErrors=r||[],l.networkError=o||null,l.message=a||function(e){var t="";return(0,i.O)(e.graphQLErrors)&&e.graphQLErrors.forEach((function(e){var n=e?e.message:"Error message not found.";t+=n+"\n"})),e.networkError&&(t+=e.networkError.message+"\n"),t=t.replace(/\n$/,"")}(l),l.extraInfo=s,l.__proto__=t.prototype,l}return(0,r.ZT)(t,e),t}(Error)},6212:function(e,t,n){"use strict";n.d(t,{ApolloProvider:function(){return i.eT},useLazyQuery:function(){return i.useLazyQuery},useMutation:function(){return i.useMutation},useQuery:function(){return i.useQuery},useReactiveVar:function(){return i.useReactiveVar},useSubscription:function(){return i.useSubscription}});var r=n(17795);n.o(r,"ApolloProvider")&&n.d(t,{ApolloProvider:function(){return r.ApolloProvider}}),n.o(r,"from")&&n.d(t,{from:function(){return r.from}}),n.o(r,"split")&&n.d(t,{split:function(){return r.split}}),n.o(r,"useLazyQuery")&&n.d(t,{useLazyQuery:function(){return r.useLazyQuery}}),n.o(r,"useMutation")&&n.d(t,{useMutation:function(){return r.useMutation}}),n.o(r,"useQuery")&&n.d(t,{useQuery:function(){return r.useQuery}}),n.o(r,"useReactiveVar")&&n.d(t,{useReactiveVar:function(){return r.useReactiveVar}}),n.o(r,"useSubscription")&&n.d(t,{useSubscription:function(){return r.useSubscription}});var i=n(92582);n.o(i,"from")&&n.d(t,{from:function(){return i.from}}),n.o(i,"split")&&n.d(t,{split:function(){return i.split}})},65942:function(e,t,n){"use strict";n.d(t,{i:function(){return d}});var r=n(29388),i=n(91198),o=n(33134),a=n.n(o);var s=n(57917);function l(e,t){return t?t(e):a().of()}function c(e){return"function"===typeof e?new d(e):e}function u(e){return e.request.length<=1}!function(e){function t(t,n){var r=e.call(this,t)||this;return r.link=n,r}(0,r.ZT)(t,e)}(Error);var d=function(){function e(e){e&&(this.request=e)}return e.empty=function(){return new e((function(){return a().of()}))},e.from=function(t){return 0===t.length?e.empty():t.map(c).reduce((function(e,t){return e.concat(t)}))},e.split=function(t,n,r){var i=c(n),o=c(r||new e(l));return u(i)&&u(o)?new e((function(e){return t(e)?i.request(e)||a().of():o.request(e)||a().of()})):new e((function(e,n){return t(e)?i.request(e,n)||a().of():o.request(e,n)||a().of()}))},e.execute=function(e,t){return e.request(function(e,t){var n=(0,r.pi)({},e);return Object.defineProperty(t,"setContext",{enumerable:!1,value:function(e){n="function"===typeof e?(0,r.pi)((0,r.pi)({},n),e(n)):(0,r.pi)((0,r.pi)({},n),e)}}),Object.defineProperty(t,"getContext",{enumerable:!1,value:function(){return(0,r.pi)({},n)}}),t}(t.context,function(e){var t={variables:e.variables||{},extensions:e.extensions||{},operationName:e.operationName,query:e.query};return t.operationName||(t.operationName="string"!==typeof t.query?(0,s.rY)(t.query)||void 0:""),t}(function(e){for(var t=["query","operationName","variables","extensions","context"],n=0,r=Object.keys(e);n=300&&u(e,t,"Response not successful: Received status code "+e.status),Array.isArray(t)||d.call(t,"data")||d.call(t,"errors")||u(e,t,"Server response was missing for query '"+(Array.isArray(r)?r.map((function(e){return e.operationName})):r.operationName)+"'."),t}))})).then((function(e){return n.next(e),n.complete(),e})).catch((function(e){"AbortError"!==e.name&&(e.result&&e.result.errors&&e.result.data&&n.next(e.result),n.error(e))})),function(){w&&w.abort()}}))}))},g=function(e){function t(t){void 0===t&&(t={});var n=e.call(this,m(t).request)||this;return n.options=t,n}return(0,r.ZT)(t,e),t}(i.i)},63542:function(e,t,n){"use strict";n.d(t,{K:function(){return o}});var r=n(72791),i=new(n(67003).m?WeakMap:Map);function o(){var e=i.get(r.createContext);return e||((e=r.createContext({})).displayName="ApolloContext",i.set(r.createContext,e)),e}},91697:function(e,t,n){"use strict";n.d(t,{e:function(){return a}});var r=n(72791),i=n(91198),o=n(63542),a=function(e){var t=e.client,n=e.children,a=(0,o.K)();return r.createElement(a.Consumer,null,(function(e){return void 0===e&&(e={}),t&&e.client!==t&&(e=Object.assign({},e,{client:t})),(0,i.kG)(e.client,28),r.createElement(a.Provider,{value:e},n)}))}},13315:function(e,t,n){"use strict";n.d(t,{td:function(){return g},Db:function(){return b},aM:function(){return x},lY:function(){return _},mU:function(){return k}});var r,i=n(29388),o=n(72791),a=n(5970),s=n(98221),l=n(58117),c=n(91198);!function(e){e[e.Query=0]="Query",e[e.Mutation=1]="Mutation",e[e.Subscription=2]="Subscription"}(r||(r={}));var u=new Map;function d(e){var t;switch(e){case r.Query:t="Query";break;case r.Mutation:t="Mutation";break;case r.Subscription:t="Subscription"}return t}var f=function(){function e(e,t){this.isMounted=!1,this.previousOptions={},this.context={},this.options={},this.options=e||{},this.context=t||{}}return e.prototype.getOptions=function(){return this.options},e.prototype.setOptions=function(e,t){void 0===t&&(t=!1),t&&!(0,a.D)(this.options,e)&&(this.previousOptions=this.options),this.options=e},e.prototype.unmount=function(){this.isMounted=!1},e.prototype.refreshClient=function(){var e=this.options&&this.options.client||this.context&&this.context.client;(0,c.kG)(!!e,29);var t=!1;return e!==this.client&&(t=!0,this.client=e,this.cleanup()),{client:this.client,isNew:t}},e.prototype.verifyDocumentType=function(e,t){var n=function(e){var t,n,i=u.get(e);if(i)return i;(0,c.kG)(!!e&&!!e.kind,34);var o=e.definitions.filter((function(e){return"FragmentDefinition"===e.kind})),a=e.definitions.filter((function(e){return"OperationDefinition"===e.kind&&"query"===e.operation})),s=e.definitions.filter((function(e){return"OperationDefinition"===e.kind&&"mutation"===e.operation})),l=e.definitions.filter((function(e){return"OperationDefinition"===e.kind&&"subscription"===e.operation}));(0,c.kG)(!o.length||a.length||s.length||l.length,35),(0,c.kG)(a.length+s.length+l.length<=1,36),n=a.length?r.Query:r.Mutation,a.length||s.length||(n=r.Subscription);var d=a.length?a:s.length?s:l;(0,c.kG)(1===d.length,37);var f=d[0];t=f.variableDefinitions||[];var h={name:f.name&&"Name"===f.name.kind?f.name.value:"data",type:n,variables:t};return u.set(e,h),h}(e);d(t),d(n.type);(0,c.kG)(n.type===t,30)},e}(),h=function(e){function t(t){var n=t.options,r=t.context,o=t.onNewData,a=e.call(this,n,r)||this;return a.runLazy=!1,a.previous=Object.create(null),a.runLazyQuery=function(e){a.cleanup(),a.runLazy=!0,a.lazyOptions=e,a.onNewData()},a.getQueryResult=function(){var e=a.observableQueryFields(),t=a.getOptions();if(t.skip)e=(0,i.pi)((0,i.pi)({},e),{data:void 0,error:void 0,loading:!1,networkStatus:l.I.ready,called:!0});else if(a.currentObservable){var n=a.currentObservable.getCurrentResult(),r=n.data,o=n.loading,c=n.partial,u=n.networkStatus,d=n.errors,f=n.error;if(d&&d.length>0&&(f=new s.c({graphQLErrors:d})),e=(0,i.pi)((0,i.pi)({},e),{data:r,loading:o,networkStatus:u,error:f,called:!0}),o);else if(f)Object.assign(e,{data:(a.currentObservable.getLastResult()||{}).data});else{var h=a.currentObservable.options.fetchPolicy;if(t.partialRefetch&&c&&(!r||0===Object.keys(r).length)&&"cache-only"!==h)return Object.assign(e,{loading:!0,networkStatus:l.I.loading}),e.refetch(),e}}e.client=a.client,a.setOptions(t,!0);var p=a.previous.result;return a.previous.loading=p&&p.loading||!1,e.previousData=p&&(p.data||p.previousData),a.previous.result=e,a.currentObservable&&a.currentObservable.resetQueryStoreErrors(),e},a.obsRefetch=function(e){var t;return null===(t=a.currentObservable)||void 0===t?void 0:t.refetch(e)},a.obsFetchMore=function(e){return a.currentObservable.fetchMore(e)},a.obsUpdateQuery=function(e){return a.currentObservable.updateQuery(e)},a.obsStartPolling=function(e){var t;null===(t=a.currentObservable)||void 0===t||t.startPolling(e)},a.obsStopPolling=function(){var e;null===(e=a.currentObservable)||void 0===e||e.stopPolling()},a.obsSubscribeToMore=function(e){return a.currentObservable.subscribeToMore(e)},a.onNewData=o,a}return(0,i.ZT)(t,e),t.prototype.execute=function(){this.refreshClient();var e=this.getOptions(),t=e.skip,n=e.query;return(t||n!==this.previous.query)&&(this.removeQuerySubscription(),this.removeObservable(!t),this.previous.query=n),this.updateObservableQuery(),this.isMounted&&this.startQuerySubscription(),this.getExecuteSsrResult()||this.getExecuteResult()},t.prototype.executeLazy=function(){return this.runLazy?[this.runLazyQuery,this.execute()]:[this.runLazyQuery,{loading:!1,networkStatus:l.I.ready,called:!1,data:void 0}]},t.prototype.fetchData=function(){var e=this,t=this.getOptions();return!t.skip&&!1!==t.ssr&&new Promise((function(t){return e.startQuerySubscription(t)}))},t.prototype.afterExecute=function(e){var t=(void 0===e?{}:e).lazy,n=void 0!==t&&t;return this.isMounted=!0,n&&!this.runLazy||this.handleErrorOrCompleted(),this.previousOptions=this.getOptions(),this.unmount.bind(this)},t.prototype.cleanup=function(){this.removeQuerySubscription(),this.removeObservable(!0),delete this.previous.result},t.prototype.getOptions=function(){var t=e.prototype.getOptions.call(this);return this.lazyOptions&&(t.variables=(0,i.pi)((0,i.pi)({},t.variables),this.lazyOptions.variables),t.context=(0,i.pi)((0,i.pi)({},t.context),this.lazyOptions.context)),this.runLazy&&delete t.skip,t},t.prototype.ssrInitiated=function(){return this.context&&this.context.renderPromises},t.prototype.getExecuteResult=function(){var e=this.getQueryResult();return this.startQuerySubscription(),e},t.prototype.getExecuteSsrResult=function(){var e=this.getOptions(),t=e.ssr,n=e.skip,r=!1===t,o=this.refreshClient().client.disableNetworkFetches,a=(0,i.pi)({loading:!0,networkStatus:l.I.loading,called:!0,data:void 0,stale:!1,client:this.client},this.observableQueryFields());if(r&&(this.ssrInitiated()||o))return this.previous.result=a,a;if(this.ssrInitiated()){var s=this.getQueryResult()||a;return s.loading&&!n&&this.context.renderPromises.addQueryPromise(this,(function(){return null})),s}},t.prototype.prepareObservableQueryOptions=function(){var e=this.getOptions();this.verifyDocumentType(e.query,r.Query);var t=e.displayName||"Query";return!this.ssrInitiated()||"network-only"!==e.fetchPolicy&&"cache-and-network"!==e.fetchPolicy||(e.fetchPolicy="cache-first"),(0,i.pi)((0,i.pi)({},e),{displayName:t,context:e.context})},t.prototype.initializeObservableQuery=function(){if(this.ssrInitiated()&&(this.currentObservable=this.context.renderPromises.getSSRObservable(this.getOptions())),!this.currentObservable){var e=this.prepareObservableQueryOptions();this.previous.observableQueryOptions=(0,i.pi)((0,i.pi)({},e),{children:null}),this.currentObservable=this.refreshClient().client.watchQuery((0,i.pi)({},e)),this.ssrInitiated()&&this.context.renderPromises.registerSSRObservable(this.currentObservable,e)}},t.prototype.updateObservableQuery=function(){if(this.currentObservable){if(!this.getOptions().skip){var e=(0,i.pi)((0,i.pi)({},this.prepareObservableQueryOptions()),{children:null});(0,a.D)(e,this.previous.observableQueryOptions)||(this.previous.observableQueryOptions=e,this.currentObservable.setOptions(e).catch((function(){})))}}else this.initializeObservableQuery()},t.prototype.startQuerySubscription=function(e){var t=this;void 0===e&&(e=this.onNewData),this.currentSubscription||this.getOptions().skip||(this.currentSubscription=this.currentObservable.subscribe({next:function(n){var r=n.loading,i=n.networkStatus,o=n.data,s=t.previous.result;s&&s.loading===r&&s.networkStatus===i&&(0,a.D)(s.data,o)||e()},error:function(n){if(t.resubscribeToQuery(),!n.hasOwnProperty("graphQLErrors"))throw n;var r=t.previous.result;(r&&r.loading||!(0,a.D)(n,t.previous.error))&&(t.previous.error=n,e())}}))},t.prototype.resubscribeToQuery=function(){this.removeQuerySubscription();var e=this.currentObservable;if(e){var t=e.getLastError(),n=e.getLastResult();e.resetLastResults(),this.startQuerySubscription(),Object.assign(e,{lastError:t,lastResult:n})}},t.prototype.handleErrorOrCompleted=function(){if(this.currentObservable&&this.previous.result){var e=this.previous.result,t=e.data,n=e.loading,r=e.error;if(!n){var i=this.getOptions(),o=i.query,s=i.variables,l=i.onCompleted,c=i.onError,u=i.skip;if(this.previousOptions&&!this.previous.loading&&(0,a.D)(this.previousOptions.query,o)&&(0,a.D)(this.previousOptions.variables,s))return;!l||r||u?c&&r&&c(r):l(t)}}},t.prototype.removeQuerySubscription=function(){this.currentSubscription&&(this.currentSubscription.unsubscribe(),delete this.currentSubscription)},t.prototype.removeObservable=function(e){this.currentObservable&&(this.currentObservable.tearDownQuery(),e&&delete this.currentObservable)},t.prototype.observableQueryFields=function(){var e;return{variables:null===(e=this.currentObservable)||void 0===e?void 0:e.variables,refetch:this.obsRefetch,fetchMore:this.obsFetchMore,updateQuery:this.obsUpdateQuery,startPolling:this.obsStartPolling,stopPolling:this.obsStopPolling,subscribeToMore:this.obsSubscribeToMore}},t}(f);var p=n(63542);function m(e,t,n){void 0===n&&(n=!1);var r=(0,o.useContext)((0,p.K)()),s=(0,o.useReducer)((function(e){return e+1}),0),l=s[0],c=s[1],u=t?(0,i.pi)((0,i.pi)({},t),{query:e}):{query:e},d=(0,o.useRef)(),f=d.current||(d.current=new h({options:u,context:r,onNewData:function(){f.ssrInitiated()?c():Promise.resolve().then((function(){return d.current&&c()}))}}));f.setOptions(u),f.context=r;var m=function(e,t){var n=(0,o.useRef)();return n.current&&(0,a.D)(t,n.current.key)||(n.current={key:t,value:e()}),n.current.value}((function(){return n?f.executeLazy():f.execute()}),{options:(0,i.pi)((0,i.pi)({},u),{onError:void 0,onCompleted:void 0}),context:r,tick:l}),g=n?m[1]:m;return(0,o.useEffect)((function(){return function(){return f.cleanup()}}),[]),(0,o.useEffect)((function(){return f.afterExecute({lazy:n})}),[g.loading,g.networkStatus,g.error,g.data]),m}function g(e,t){return m(e,t,!0)}var v=n(15219),y=function(e){function t(t){var n=t.options,i=t.context,o=t.result,a=t.setResult,s=e.call(this,n,i)||this;return s.runMutation=function(e){void 0===e&&(e={}),s.onMutationStart();var t=s.generateNewMutationId();return s.mutate(e).then((function(e){return s.onMutationCompleted(e,t),e})).catch((function(e){var n=s.getOptions().onError;if(s.onMutationError(e,t),n)return n(e),{data:void 0,errors:e};throw e}))},s.verifyDocumentType(n.mutation,r.Mutation),s.result=o,s.setResult=a,s.mostRecentMutationId=0,s}return(0,i.ZT)(t,e),t.prototype.execute=function(e){return this.isMounted=!0,this.verifyDocumentType(this.getOptions().mutation,r.Mutation),[this.runMutation,(0,i.pi)((0,i.pi)({},e),{client:this.refreshClient().client})]},t.prototype.afterExecute=function(){return this.isMounted=!0,this.unmount.bind(this)},t.prototype.cleanup=function(){},t.prototype.mutate=function(e){return this.refreshClient().client.mutate((0,v.J)(this.getOptions(),e))},t.prototype.onMutationStart=function(){this.result.loading||this.getOptions().ignoreResults||this.updateResult({loading:!0,error:void 0,data:void 0,called:!0})},t.prototype.onMutationCompleted=function(e,t){var n=this.getOptions(),r=n.onCompleted,i=n.ignoreResults,o=e.data,a=e.errors,l=a&&a.length>0?new s.c({graphQLErrors:a}):void 0;this.isMostRecentMutation(t)&&!i&&this.updateResult({called:!0,loading:!1,data:o,error:l}),r&&r(o)},t.prototype.onMutationError=function(e,t){this.isMostRecentMutation(t)&&this.updateResult({loading:!1,error:e,data:void 0,called:!0})},t.prototype.generateNewMutationId=function(){return++this.mostRecentMutationId},t.prototype.isMostRecentMutation=function(e){return this.mostRecentMutationId===e},t.prototype.updateResult=function(e){if(this.isMounted&&(!this.previousResult||!(0,a.D)(this.previousResult,e)))return this.setResult(e),this.previousResult=e,e},t}(f);function b(e,t){var n=(0,o.useContext)((0,p.K)()),r=(0,o.useState)({called:!1,loading:!1}),a=r[0],s=r[1],l=t?(0,i.pi)((0,i.pi)({},t),{mutation:e}):{mutation:e},c=(0,o.useRef)();var u=(c.current||(c.current=new y({options:l,context:n,result:a,setResult:s})),c.current);return u.setOptions(l),u.context=n,(0,o.useEffect)((function(){return u.afterExecute()})),u.execute(a)}function x(e,t){return m(e,t,!1)}var w=function(e){function t(t){var n=t.options,r=t.context,i=t.setResult,o=e.call(this,n,r)||this;return o.currentObservable={},o.setResult=i,o.initialize(n),o}return(0,i.ZT)(t,e),t.prototype.execute=function(e){if(!0===this.getOptions().skip)return this.cleanup(),{loading:!1,error:void 0,data:void 0,variables:this.getOptions().variables};var t=e;this.refreshClient().isNew&&(t=this.getLoadingResult());var n=this.getOptions().shouldResubscribe;return"function"===typeof n&&(n=!!n(this.getOptions())),!1!==n&&this.previousOptions&&Object.keys(this.previousOptions).length>0&&(this.previousOptions.subscription!==this.getOptions().subscription||!(0,a.D)(this.previousOptions.variables,this.getOptions().variables)||this.previousOptions.skip!==this.getOptions().skip)&&(this.cleanup(),t=this.getLoadingResult()),this.initialize(this.getOptions()),this.startSubscription(),this.previousOptions=this.getOptions(),(0,i.pi)((0,i.pi)({},t),{variables:this.getOptions().variables})},t.prototype.afterExecute=function(){this.isMounted=!0},t.prototype.cleanup=function(){this.endSubscription(),delete this.currentObservable.query},t.prototype.initialize=function(e){this.currentObservable.query||!0===this.getOptions().skip||(this.currentObservable.query=this.refreshClient().client.subscribe({query:e.subscription,variables:e.variables,fetchPolicy:e.fetchPolicy,context:e.context}))},t.prototype.startSubscription=function(){this.currentObservable.subscription||(this.currentObservable.subscription=this.currentObservable.query.subscribe({next:this.updateCurrentData.bind(this),error:this.updateError.bind(this),complete:this.completeSubscription.bind(this)}))},t.prototype.getLoadingResult=function(){return{loading:!0,error:void 0,data:void 0}},t.prototype.updateResult=function(e){this.isMounted&&this.setResult(e)},t.prototype.updateCurrentData=function(e){var t=this.getOptions().onSubscriptionData;this.updateResult({data:e.data,loading:!1,error:void 0}),t&&t({client:this.refreshClient().client,subscriptionData:e})},t.prototype.updateError=function(e){this.updateResult({error:e,loading:!1})},t.prototype.completeSubscription=function(){var e=this;Promise.resolve().then((function(){var t=e.getOptions().onSubscriptionComplete;t&&t(),e.endSubscription()}))},t.prototype.endSubscription=function(){this.currentObservable.subscription&&(this.currentObservable.subscription.unsubscribe(),delete this.currentObservable.subscription)},t}(f);function k(e,t){var n=(0,o.useContext)((0,p.K)()),r=t?(0,i.pi)((0,i.pi)({},t),{subscription:e}):{subscription:e},a=(0,o.useState)({loading:!r.skip,error:void 0,data:void 0}),s=a[0],l=a[1],c=(0,o.useRef)();var u=(c.current||(c.current=new w({options:r,context:n,setResult:l})),c.current);return u.setOptions(r,!0),u.context=n,(0,o.useEffect)((function(){return u.afterExecute()})),(0,o.useEffect)((function(){return u.cleanup.bind(u)}),[]),u.execute(s)}function _(e){var t=e(),n=(0,o.useState)(t)[1];return(0,o.useEffect)((function(){var r=e();if(t===r)return e.onNextChange(n);n(r)}),[t]),t}},92582:function(e,t,n){"use strict";n.d(t,{eT:function(){return r.e},useLazyQuery:function(){return i.td},useMutation:function(){return i.Db},useQuery:function(){return i.aM},useReactiveVar:function(){return i.lY},useSubscription:function(){return i.mU}});var r=n(91697),i=n(13315),o=n(64469);n.o(o,"from")&&n.d(t,{from:function(){return o.from}}),n.o(o,"split")&&n.d(t,{split:function(){return o.split}})},64469:function(){},52127:function(e,t,n){"use strict";function r(e){return Array.isArray(e)&&e.length>0}n.d(t,{O:function(){return r}})},67003:function(e,t,n){"use strict";n.d(t,{m:function(){return r}});var r="function"===typeof WeakMap&&!("object"===typeof navigator&&"ReactNative"===navigator.product)},80114:function(e,t,n){"use strict";n.d(t,{Ee:function(){return o},bw:function(){return a},w0:function(){return c}});var r=n(29388),i=Object.prototype.hasOwnProperty;function o(){for(var e=[],t=0;t1)for(var r=new c,i=1;i-1}))}function s(e){return e&&a(["client"],e)&&a(["export"],e)}},16683:function(e,t,n){"use strict";n.d(t,{Yk:function(){return o},F:function(){return a},hi:function(){return s}});var r=n(29388),i=n(91198);function o(e,t){var n=t,o=[];return e.definitions.forEach((function(e){if("OperationDefinition"===e.kind)throw new i.ej(42);"FragmentDefinition"===e.kind&&o.push(e)})),"undefined"===typeof n&&((0,i.kG)(1===o.length,43),n=o[0].name.value),(0,r.pi)((0,r.pi)({},e),{definitions:(0,r.pr)([{kind:"OperationDefinition",operation:"query",selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:n}}]}}],e.definitions)})}function a(e){void 0===e&&(e=[]);var t={};return e.forEach((function(e){t[e.name.value]=e})),t}function s(e,t){switch(e.kind){case"InlineFragment":return e;case"FragmentSpread":var n=t&&t[e.name.value];return(0,i.kG)(n,44),n;default:return null}}},57917:function(e,t,n){"use strict";n.d(t,{A$:function(){return o},$H:function(){return a},rY:function(){return s},kU:function(){return l},iW:function(){return c},pD:function(){return u},p$:function(){return d},O4:function(){return f}});var r=n(91198),i=n(7082);function o(e){(0,r.kG)(e&&"Document"===e.kind,45);var t=e.definitions.filter((function(e){return"FragmentDefinition"!==e.kind})).map((function(e){if("OperationDefinition"!==e.kind)throw new r.ej(46);return e}));return(0,r.kG)(t.length<=1,47),e}function a(e){return o(e),e.definitions.filter((function(e){return"OperationDefinition"===e.kind}))[0]}function s(e){return e.definitions.filter((function(e){return"OperationDefinition"===e.kind&&e.name})).map((function(e){return e.name.value}))[0]||null}function l(e){return e.definitions.filter((function(e){return"FragmentDefinition"===e.kind}))}function c(e){var t=a(e);return(0,r.kG)(t&&"query"===t.operation,48),t}function u(e){(0,r.kG)("Document"===e.kind,49),(0,r.kG)(e.definitions.length<=1,50);var t=e.definitions[0];return(0,r.kG)("FragmentDefinition"===t.kind,51),t}function d(e){var t;o(e);for(var n=0,i=e.definitions;n0){var r=n.connection.filter?n.connection.filter:[];r.sort();var o={};return r.forEach((function(e){o[e]=t[e]})),n.connection.key+"("+JSON.stringify(o)+")"}return n.connection.key}var a=e;if(t){var s=i()(t);a+="("+s+")"}return n&&Object.keys(n).forEach((function(e){-1===d.indexOf(e)&&(n[e]&&Object.keys(n[e]).length?a+="@"+e+"("+JSON.stringify(n[e])+")":a+="@"+e)})),a}function h(e,t){if(e.arguments&&e.arguments.length){var n={};return e.arguments.forEach((function(e){var r=e.name,i=e.value;return c(n,r,i,t)})),n}return null}function p(e){return e.alias?e.alias.value:e.name.value}function m(e,t,n){if("string"===typeof e.__typename)return e.__typename;for(var r=0,i=t.selections;r0?u(x,--y):0,g--,10===b&&(g=1,m--),b}function S(){return b=y2||T(b)>3?"":" "}function Z(e,t){for(;--t&&S()&&!(b<48||b>102||b>57&&b<65||b>70&&b<97););return E(e,j()+(t<6&&32==C()&&32==S()))}function I(e){for(;S();)switch(b){case e:return y;case 34:case 39:34!==e&&39!==e&&I(b);break;case 40:41===e&&I(e);break;case 92:S()}return y}function P(e,t){for(;S()&&e+b!==57&&(e+b!==84||47!==C()););return"/*"+E(t,y-1)+"*"+o(47===e?e:S())}function L(e){for(;!T(C());)S();return E(e,y)}var D="-ms-",N="-moz-",$="-webkit-",F="comm",z="rule",B="decl",W="@keyframes";function H(e,t){for(var n="",r=h(e),i=0;i6)switch(u(e,t+1)){case 109:if(45!==u(e,t+4))break;case 102:return l(e,/(.+:)(.+)-([^]+)/,"$1-webkit-$2-$3$1"+N+(108==u(e,t+3)?"$3":"$2-$3"))+e;case 115:return~c(e,"stretch")?V(l(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==u(e,t+1))break;case 6444:switch(u(e,f(e)-3-(~c(e,"!important")&&10))){case 107:return l(e,":",":"+$)+e;case 101:return l(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+$+(45===u(e,14)?"inline-":"")+"box$3$1"+$+"$2$3$1"+D+"$2box$3")+e}break;case 5936:switch(u(e,t+11)){case 114:return $+e+D+l(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return $+e+D+l(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return $+e+D+l(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return $+e+D+e+e}return e}function q(e){return A(G("",null,null,null,[""],e=M(e),0,[0],e))}function G(e,t,n,r,i,a,s,u,d){for(var h=0,m=0,g=s,v=0,y=0,b=0,x=1,w=1,k=1,E=0,T="",M=i,A=a,I=r,D=T;w;)switch(b=E,E=S()){case 40:if(108!=b&&58==D.charCodeAt(g-1)){-1!=c(D+=l(R(E),"&","&\f"),"&\f")&&(k=-1);break}case 34:case 39:case 91:D+=R(E);break;case 9:case 10:case 13:case 32:D+=O(b);break;case 92:D+=Z(j()-1,7);continue;case 47:switch(C()){case 42:case 47:p(Q(P(S(),j()),t,n),d);break;default:D+="/"}break;case 123*x:u[h++]=f(D)*k;case 125*x:case 59:case 0:switch(E){case 0:case 125:w=0;case 59+m:y>0&&f(D)-g&&p(y>32?Y(D+";",r,n,g-1):Y(l(D," ","")+";",r,n,g-2),d);break;case 59:D+=";";default:if(p(I=K(D,t,n,h,m,i,u,T,M=[],A=[],g),a),123===E)if(0===m)G(D,t,I,I,M,a,g,u,A);else switch(v){case 100:case 109:case 115:G(e,I,I,r&&p(K(e,I,I,0,0,i,u,T,i,M=[],g),A),i,A,g,u,r?M:A);break;default:G(D,I,I,I,[""],A,0,u,A)}}h=m=y=0,x=k=1,T=D="",g=s;break;case 58:g=1+f(D),y=b;default:if(x<1)if(123==E)--x;else if(125==E&&0==x++&&125==_())continue;switch(D+=o(E),E*x){case 38:k=m>0?1:(D+="\f",-1);break;case 44:u[h++]=(f(D)-1)*k,k=1;break;case 64:45===C()&&(D+=R(S())),v=C(),m=g=f(T=D+=L(j())),E++;break;case 45:45===b&&2==f(D)&&(x=0)}}return a}function K(e,t,n,r,o,a,c,u,f,p,m){for(var g=o-1,v=0===o?a:[""],y=h(v),b=0,x=0,k=0;b0?v[_]+" "+S:l(S,/&\f/g,v[_])))&&(f[k++]=C);return w(e,t,n,0===o?z:u,f,p,m)}function Q(e,t,n){return w(e,t,n,F,o(b),d(e,2,-2),0)}function Y(e,t,n,r){return w(e,t,n,B,d(e,0,r),d(e,r+1,-1),r)}var X=function(e,t,n){for(var r=0,i=0;r=i,i=C(),38===r&&12===i&&(t[n]=1),!T(i);)S();return E(e,y)},J=function(e,t){return A(function(e,t){var n=-1,r=44;do{switch(T(r)){case 0:38===r&&12===C()&&(t[n]=1),e[n]+=X(y-1,t,n);break;case 2:e[n]+=R(r);break;case 4:if(44===r){e[++n]=58===C()?"&\f":"",t[n]=e[n].length;break}default:e[n]+=o(r)}}while(r=S());return e}(M(e),t))},ee=new WeakMap,te=function(e){if("rule"===e.type&&e.parent&&!(e.length<1)){for(var t=e.value,n=e.parent,r=e.column===n.column&&e.line===n.line;"rule"!==n.type;)if(!(n=n.parent))return;if((1!==e.props.length||58===t.charCodeAt(0)||ee.get(n))&&!r){ee.set(e,!0);for(var i=[],o=J(t,i),a=n.props,s=0,l=0;s-1&&!e.return)switch(e.type){case B:e.return=V(e.value,e.length);break;case W:return H([k(e,{value:l(e.value,"@","@"+$)})],r);case z:if(e.length)return function(e,t){return e.map(t).join("")}(e.props,(function(t){switch(function(e,t){return(e=t.exec(e))?e[0]:e}(t,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return H([k(e,{props:[l(t,/:(read-\w+)/,":-moz-$1")]})],r);case"::placeholder":return H([k(e,{props:[l(t,/:(plac\w+)/,":-webkit-input-$1")]}),k(e,{props:[l(t,/:(plac\w+)/,":-moz-$1")]}),k(e,{props:[l(t,/:(plac\w+)/,D+"input-$1")]})],r)}return""}))}}],ie=function(e){var t=e.key;if("css"===t){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,(function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))}))}var i=e.stylisPlugins||re;var o,a,s={},l=[];o=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),(function(e){for(var t=e.getAttribute("data-emotion").split(" "),n=1;n=4;++r,i-=4)t=1540483477*(65535&(t=255&e.charCodeAt(r)|(255&e.charCodeAt(++r))<<8|(255&e.charCodeAt(++r))<<16|(255&e.charCodeAt(++r))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(i){case 3:n^=(255&e.charCodeAt(r+2))<<16;case 2:n^=(255&e.charCodeAt(r+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(r)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)},i=n(63840),o=n(50620),a=/[A-Z]|^ms/g,s=/_EMO_([^_]+?)_([^]*?)_EMO_/g,l=function(e){return 45===e.charCodeAt(1)},c=function(e){return null!=e&&"boolean"!==typeof e},u=(0,o.Z)((function(e){return l(e)?e:e.replace(a,"-$&").toLowerCase()})),d=function(e,t){switch(e){case"animation":case"animationName":if("string"===typeof t)return t.replace(s,(function(e,t,n){return h={name:t,styles:n,next:h},t}))}return 1===i.Z[e]||l(e)||"number"!==typeof t||0===t?t:t+"px"};function f(e,t,n){if(null==n)return"";if(void 0!==n.__emotion_styles)return n;switch(typeof n){case"boolean":return"";case"object":if(1===n.anim)return h={name:n.name,styles:n.styles,next:h},n.name;if(void 0!==n.styles){var r=n.next;if(void 0!==r)for(;void 0!==r;)h={name:r.name,styles:r.styles,next:h},r=r.next;return n.styles+";"}return function(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i0&&void 0!==arguments[0]?arguments[0]:"light")?{main:g[200],light:g[50],dark:g[400]}:{main:g[700],light:g[400],dark:g[800]}}(n),j=e.secondary||function(){return"dark"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"light")?{main:h[200],light:h[50],dark:h[400]}:{main:h[500],light:h[300],dark:h[700]}}(n),E=e.error||function(){return"dark"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"light")?{main:p.Z[500],light:p.Z[300],dark:p.Z[700]}:{main:p.Z[700],light:p.Z[400],dark:p.Z[800]}}(n),T=e.info||function(){return"dark"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"light")?{main:v[400],light:v[300],dark:v[700]}:{main:v[700],light:v[500],dark:v[900]}}(n),M=e.success||function(){return"dark"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"light")?{main:y[400],light:y[300],dark:y[700]}:{main:y[800],light:y[500],dark:y[900]}}(n),A=e.warning||function(){return"dark"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"light")?{main:m[400],light:m[300],dark:m[700]}:{main:"#ed6c02",light:m[500],dark:m[900]}}(n);function R(e){return(0,u.mi)(e,w.text.primary)>=s?w.text.primary:x.text.primary}var O=function(e){var t=e.color,n=e.name,i=e.mainShade,o=void 0===i?500:i,a=e.lightShade,s=void 0===a?300:a,l=e.darkShade,u=void 0===l?700:l;if(!(t=(0,r.Z)({},t)).main&&t[o]&&(t.main=t[o]),!t.hasOwnProperty("main"))throw new Error((0,c.Z)(11,n?" (".concat(n,")"):"",o));if("string"!==typeof t.main)throw new Error((0,c.Z)(12,n?" (".concat(n,")"):"",JSON.stringify(t.main)));return k(t,"light",s,_),k(t,"dark",u,_),t.contrastText||(t.contrastText=R(t.main)),t},Z={dark:w,light:x};return(0,o.Z)((0,r.Z)({common:d,mode:n,primary:O({color:C,name:"primary"}),secondary:O({color:j,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:O({color:E,name:"error"}),warning:O({color:A,name:"warning"}),info:O({color:T,name:"info"}),success:O({color:M,name:"success"}),grey:f,contrastThreshold:s,getContrastText:R,augmentColor:O,tonalOffset:_},Z[n]),S)}var S=["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"];var C={textTransform:"uppercase"},j='"Roboto", "Helvetica", "Arial", sans-serif';function E(e,t){var n="function"===typeof t?t(e):t,a=n.fontFamily,s=void 0===a?j:a,l=n.fontSize,c=void 0===l?14:l,u=n.fontWeightLight,d=void 0===u?300:u,f=n.fontWeightRegular,h=void 0===f?400:f,p=n.fontWeightMedium,m=void 0===p?500:p,g=n.fontWeightBold,v=void 0===g?700:g,y=n.htmlFontSize,b=void 0===y?16:y,x=n.allVariants,w=n.pxToRem,k=(0,i.Z)(n,S);var _=c/14,E=w||function(e){return"".concat(e/b*_,"rem")},T=function(e,t,n,i,o){return(0,r.Z)({fontFamily:s,fontWeight:e,fontSize:E(t),lineHeight:n},s===j?{letterSpacing:"".concat((a=i/t,Math.round(1e5*a)/1e5),"em")}:{},o,x);var a},M={h1:T(d,96,1.167,-1.5),h2:T(d,60,1.2,-.5),h3:T(h,48,1.167,0),h4:T(h,34,1.235,.25),h5:T(h,24,1.334,0),h6:T(m,20,1.6,.15),subtitle1:T(h,16,1.75,.15),subtitle2:T(m,14,1.57,.1),body1:T(h,16,1.5,.15),body2:T(h,14,1.43,.15),button:T(m,14,1.75,.4,C),caption:T(h,12,1.66,.4),overline:T(h,12,2.66,1,C)};return(0,o.Z)((0,r.Z)({htmlFontSize:b,pxToRem:E,fontFamily:s,fontSize:c,fontWeightLight:d,fontWeightRegular:h,fontWeightMedium:m,fontWeightBold:v},M),k,{clone:!1})}function T(){return["".concat(arguments.length<=0?void 0:arguments[0],"px ").concat(arguments.length<=1?void 0:arguments[1],"px ").concat(arguments.length<=2?void 0:arguments[2],"px ").concat(arguments.length<=3?void 0:arguments[3],"px rgba(0,0,0,").concat(.2,")"),"".concat(arguments.length<=4?void 0:arguments[4],"px ").concat(arguments.length<=5?void 0:arguments[5],"px ").concat(arguments.length<=6?void 0:arguments[6],"px ").concat(arguments.length<=7?void 0:arguments[7],"px rgba(0,0,0,").concat(.14,")"),"".concat(arguments.length<=8?void 0:arguments[8],"px ").concat(arguments.length<=9?void 0:arguments[9],"px ").concat(arguments.length<=10?void 0:arguments[10],"px ").concat(arguments.length<=11?void 0:arguments[11],"px rgba(0,0,0,").concat(.12,")")].join(",")}var M=["none",T(0,2,1,-1,0,1,1,0,0,1,3,0),T(0,3,1,-2,0,2,2,0,0,1,5,0),T(0,3,3,-2,0,3,4,0,0,1,8,0),T(0,2,4,-1,0,4,5,0,0,1,10,0),T(0,3,5,-1,0,5,8,0,0,1,14,0),T(0,3,5,-1,0,6,10,0,0,1,18,0),T(0,4,5,-2,0,7,10,1,0,2,16,1),T(0,5,5,-3,0,8,10,1,0,3,14,2),T(0,5,6,-3,0,9,12,1,0,3,16,2),T(0,6,6,-3,0,10,14,1,0,4,18,3),T(0,6,7,-4,0,11,15,1,0,4,20,3),T(0,7,8,-4,0,12,17,2,0,5,22,4),T(0,7,8,-4,0,13,19,2,0,5,24,4),T(0,7,9,-4,0,14,21,2,0,5,26,4),T(0,8,9,-5,0,15,22,2,0,6,28,5),T(0,8,10,-5,0,16,24,2,0,6,30,5),T(0,8,11,-5,0,17,26,2,0,6,32,5),T(0,9,11,-5,0,18,28,2,0,7,34,6),T(0,9,12,-6,0,19,29,2,0,7,36,6),T(0,10,13,-6,0,20,31,3,0,8,38,7),T(0,10,13,-6,0,21,33,3,0,8,40,7),T(0,10,14,-6,0,22,35,3,0,8,42,7),T(0,11,14,-7,0,23,36,3,0,9,44,8),T(0,11,15,-7,0,24,38,3,0,9,46,8)],A=n(81314),R={mobileStepper:1e3,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500},O=["breakpoints","mixins","spacing","palette","transitions","typography","shape"];function Z(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.mixins,n=void 0===t?{}:t,s=e.palette,c=void 0===s?{}:s,u=e.transitions,d=void 0===u?{}:u,f=e.typography,h=void 0===f?{}:f,p=(0,i.Z)(e,O),m=_(c),g=(0,a.Z)(e),v=(0,o.Z)(g,{mixins:l(g.breakpoints,g.spacing,n),palette:m,shadows:M.slice(),typography:E(m,h),transitions:(0,A.ZP)(d),zIndex:(0,r.Z)({},R)});v=(0,o.Z)(v,p);for(var y=arguments.length,b=new Array(y>1?y-1:0),x=1;x0&&void 0!==arguments[0]?arguments[0]:["all"],i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=i.duration,s=void 0===a?n.standard:a,c=i.easing,u=void 0===c?t.easeInOut:c,d=i.delay,f=void 0===d?0:d;(0,r.Z)(i,o);return(Array.isArray(e)?e:[e]).map((function(e){return"".concat(e," ").concat("string"===typeof s?s:l(s)," ").concat(u," ").concat("string"===typeof f?f:l(f))})).join(",")}},e,{easing:t,duration:n})}},36482:function(e,t,n){"use strict";var r=(0,n(83625).Z)();t.Z=r},47630:function(e,t,n){"use strict";n.d(t,{ZP:function(){return E},FO:function(){return S},Dz:function(){return C}});var r=n(93433),i=n(29439),o=n(87462),a=n(63366),s=n(30568),l=n(85080),c=n(60104),u=n(27312),d=["variant"];function f(e){return 0===e.length}function h(e){var t=e.variant,n=(0,a.Z)(e,d),r=t||"";return Object.keys(n).sort().forEach((function(t){r+="color"===t?f(r)?e[t]:(0,u.Z)(e[t]):"".concat(f(r)?t:(0,u.Z)(t)).concat((0,u.Z)(e[t].toString()))})),r}var p=["name","slot","skipVariantsResolver","skipSx","overridesResolver"],m=["theme"],g=["theme"];function v(e){return 0===Object.keys(e).length}var y=function(e,t){return t.components&&t.components[e]&&t.components[e].styleOverrides?t.components[e].styleOverrides:null},b=function(e,t){var n=[];t&&t.components&&t.components[e]&&t.components[e].variants&&(n=t.components[e].variants);var r={};return n.forEach((function(e){var t=h(e.props);r[t]=e.style})),r},x=function(e,t,n,r){var i,o,a=e.ownerState,s=void 0===a?{}:a,l=[],c=null==n||null==(i=n.components)||null==(o=i[r])?void 0:o.variants;return c&&c.forEach((function(n){var r=!0;Object.keys(n.props).forEach((function(t){s[t]!==n.props[t]&&e[t]!==n.props[t]&&(r=!1)})),r&&l.push(t[h(n.props)])})),l};function w(e){return"ownerState"!==e&&"theme"!==e&&"sx"!==e&&"as"!==e}var k=(0,l.Z)();var _=n(36482),S=function(e){return w(e)&&"classes"!==e},C=w,j=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.defaultTheme,n=void 0===t?k:t,l=e.rootShouldForwardProp,u=void 0===l?w:l,d=e.slotShouldForwardProp,f=void 0===d?w:d;return function(e){var t,l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},d=l.name,h=l.slot,k=l.skipVariantsResolver,_=l.skipSx,S=l.overridesResolver,C=(0,a.Z)(l,p),j=void 0!==k?k:h&&"Root"!==h||!1,E=_||!1;var T=w;"Root"===h?T=u:h&&(T=f);var M=(0,s.ZP)(e,(0,o.Z)({shouldForwardProp:T,label:t},C)),A=function(e){for(var t=arguments.length,s=new Array(t>1?t-1:0),l=1;l0){var p=new Array(h).fill("");(f=[].concat((0,r.Z)(e),(0,r.Z)(p))).raw=[].concat((0,r.Z)(e.raw),(0,r.Z)(p))}else"function"===typeof e&&(f=function(t){var r=t.theme,i=(0,a.Z)(t,g);return e((0,o.Z)({theme:v(r)?n:r},i))});var w=M.apply(void 0,[f].concat((0,r.Z)(u)));return w};return M.withConfig&&(A.withConfig=M.withConfig),A}}({defaultTheme:_.Z,rootShouldForwardProp:S}),E=j},61046:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(35735);var i=n(30418);function o(e){var t=e.props,n=e.name,o=e.defaultTheme,a=function(e){var t=e.theme,n=e.name,i=e.props;return t&&t.components&&t.components[n]&&t.components[n].defaultProps?(0,r.Z)(t.components[n].defaultProps,i):i}({theme:(0,i.Z)(o),name:n,props:t});return a}var a=n(36482);function s(e){return o({props:e.props,name:e.name,defaultTheme:a.Z})}},14036:function(e,t,n){"use strict";var r=n(27312);t.Z=r.Z},74223:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(87462),i=n(72791),o=n(99259),a=n(80184);function s(e,t){var n=function(n,i){return(0,a.jsx)(o.Z,(0,r.Z)({"data-testid":"".concat(t,"Icon"),ref:i},n,{children:e}))};return n.muiName=o.Z.muiName,i.memo(i.forwardRef(n))}},83199:function(e,t,n){"use strict";var r=n(93981);t.Z=r.Z},54421:function(e,t,n){"use strict";n.r(t),n.d(t,{capitalize:function(){return r.Z},createChainedFunction:function(){return i},createSvgIcon:function(){return o.Z},debounce:function(){return a.Z},deprecatedPropType:function(){return s},isMuiElement:function(){return l.Z},ownerDocument:function(){return c.Z},ownerWindow:function(){return u.Z},requirePropFactory:function(){return d},setRef:function(){return f},unstable_ClassNameGenerator:function(){return x.Z},unstable_useEnhancedEffect:function(){return h.Z},unstable_useId:function(){return p.Z},unsupportedProp:function(){return m},useControlled:function(){return g.Z},useEventCallback:function(){return v.Z},useForkRef:function(){return y.Z},useIsFocusVisible:function(){return b.Z}});var r=n(14036),i=n(78949).Z,o=n(74223),a=n(83199);var s=function(e,t){return function(){return null}},l=n(19103),c=n(98301),u=n(17602);n(87462);var d=function(e,t){return function(){return null}},f=n(62971).Z,h=n(40162),p=n(67384);var m=function(e,t,n,r,i){return null},g=n(98278),v=n(89683),y=n(42071),b=n(23031),x=n(87125)},19103:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(72791);var i=function(e,t){return r.isValidElement(e)&&-1!==t.indexOf(e.type.muiName)}},98301:function(e,t,n){"use strict";var r=n(99723);t.Z=r.Z},17602:function(e,t,n){"use strict";var r=n(27979);t.Z=r.Z},98278:function(e,t,n){"use strict";var r=n(58959);t.Z=r.Z},40162:function(e,t,n){"use strict";var r=n(75721);t.Z=r.Z},89683:function(e,t,n){"use strict";var r=n(58956);t.Z=r.Z},42071:function(e,t,n){"use strict";var r=n(47563);t.Z=r.Z},67384:function(e,t,n){"use strict";var r=n(96248);t.Z=r.Z},23031:function(e,t,n){"use strict";n.d(t,{Z:function(){return f}});var r,i=n(72791),o=!0,a=!1,s={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function l(e){e.metaKey||e.altKey||e.ctrlKey||(o=!0)}function c(){o=!1}function u(){"hidden"===this.visibilityState&&a&&(o=!0)}function d(e){var t=e.target;try{return t.matches(":focus-visible")}catch(n){}return o||function(e){var t=e.type,n=e.tagName;return!("INPUT"!==n||!s[t]||e.readOnly)||"TEXTAREA"===n&&!e.readOnly||!!e.isContentEditable}(t)}var f=function(){var e=i.useCallback((function(e){var t;null!=e&&((t=e.ownerDocument).addEventListener("keydown",l,!0),t.addEventListener("mousedown",c,!0),t.addEventListener("pointerdown",c,!0),t.addEventListener("touchstart",c,!0),t.addEventListener("visibilitychange",u,!0))}),[]),t=i.useRef(!1);return{isFocusVisibleRef:t,onFocus:function(e){return!!d(e)&&(t.current=!0,!0)},onBlur:function(){return!!t.current&&(a=!0,window.clearTimeout(r),r=window.setTimeout((function(){a=!1}),100),t.current=!1,!0)},ref:e}}},68023:function(e,t,n){"use strict";var r=n(72791).createContext(null);t.Z=r},29598:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(72791),i=n(68023);function o(){return r.useContext(i.Z)}},30568:function(e,t,n){"use strict";n.d(t,{ZP:function(){return b}});var r=n(72791),i=n(87462),o=n(50620),a=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,s=(0,o.Z)((function(e){return a.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)<91})),l=n(91672),c=n(95438),u=n(84804),d=s,f=function(e){return"theme"!==e},h=function(e){return"string"===typeof e&&e.charCodeAt(0)>96?d:f},p=function(e,t,n){var r;if(t){var i=t.shouldForwardProp;r=e.__emotion_forwardProp&&i?function(t){return e.__emotion_forwardProp(t)&&i(t)}:i}return"function"!==typeof r&&n&&(r=e.__emotion_forwardProp),r},m=function(){return null},g=function e(t,n){var o,a,s=t.__emotion_real===t,d=s&&t.__emotion_base||t;void 0!==n&&(o=n.label,a=n.target);var f=p(t,n,s),g=f||h(d),v=!g("as");return function(){var y=arguments,b=s&&void 0!==t.__emotion_styles?t.__emotion_styles.slice(0):[];if(void 0!==o&&b.push("label:"+o+";"),null==y[0]||void 0===y[0].raw)b.push.apply(b,y);else{0,b.push(y[0][0]);for(var x=y.length,w=1;w0&&void 0!==arguments[0]?arguments[0]:{},n=null==t||null==(e=t.keys)?void 0:e.reduce((function(e,n){return e[t.up(n)]={},e}),{});return n||{}}function s(e,t){return e.reduce((function(e,t){var n=e[t];return(!n||0===Object.keys(n).length)&&delete e[t],e}),t)}function l(e){var t,n=e.values,r=e.breakpoints,i=e.base||function(e,t){if("object"!==typeof e)return{};var n={},r=Object.keys(t);return Array.isArray(e)?r.forEach((function(t,r){r1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return Math.min(Math.max(t,e),n)}function o(e){if(e.type)return e;if("#"===e.charAt(0))return o(function(e){e=e.substr(1);var t=new RegExp(".{1,".concat(e.length>=6?2:1,"}"),"g"),n=e.match(t);return n&&1===n[0].length&&(n=n.map((function(e){return e+e}))),n?"rgb".concat(4===n.length?"a":"","(").concat(n.map((function(e,t){return t<3?parseInt(e,16):Math.round(parseInt(e,16)/255*1e3)/1e3})).join(", "),")"):""}(e));var t=e.indexOf("("),n=e.substring(0,t);if(-1===["rgb","rgba","hsl","hsla","color"].indexOf(n))throw new Error((0,r.Z)(9,e));var i,a=e.substring(t+1,e.length-1);if("color"===n){if(i=(a=a.split(" ")).shift(),4===a.length&&"/"===a[3].charAt(0)&&(a[3]=a[3].substr(1)),-1===["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].indexOf(i))throw new Error((0,r.Z)(10,i))}else a=a.split(",");return{type:n,values:a=a.map((function(e){return parseFloat(e)})),colorSpace:i}}function a(e){var t=e.type,n=e.colorSpace,r=e.values;return-1!==t.indexOf("rgb")?r=r.map((function(e,t){return t<3?parseInt(e,10):e})):-1!==t.indexOf("hsl")&&(r[1]="".concat(r[1],"%"),r[2]="".concat(r[2],"%")),r=-1!==t.indexOf("color")?"".concat(n," ").concat(r.join(" ")):"".concat(r.join(", ")),"".concat(t,"(").concat(r,")")}function s(e){var t="hsl"===(e=o(e)).type?o(function(e){var t=(e=o(e)).values,n=t[0],r=t[1]/100,i=t[2]/100,s=r*Math.min(i,1-i),l=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(e+n/30)%12;return i-s*Math.max(Math.min(t-3,9-t,1),-1)},c="rgb",u=[Math.round(255*l(0)),Math.round(255*l(8)),Math.round(255*l(4))];return"hsla"===e.type&&(c+="a",u.push(t[3])),a({type:c,values:u})}(e)).values:e.values;return t=t.map((function(t){return"color"!==e.type&&(t/=255),t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4)})),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function l(e,t){var n=s(e),r=s(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function c(e,t){return e=o(e),t=i(t),"rgb"!==e.type&&"hsl"!==e.type||(e.type+="a"),"color"===e.type?e.values[3]="/".concat(t):e.values[3]=t,a(e)}function u(e,t){if(e=o(e),t=i(t),-1!==e.type.indexOf("hsl"))e.values[2]*=1-t;else if(-1!==e.type.indexOf("rgb")||-1!==e.type.indexOf("color"))for(var n=0;n<3;n+=1)e.values[n]*=1-t;return a(e)}function d(e,t){if(e=o(e),t=i(t),-1!==e.type.indexOf("hsl"))e.values[2]+=(100-e.values[2])*t;else if(-1!==e.type.indexOf("rgb"))for(var n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;else if(-1!==e.type.indexOf("color"))for(var r=0;r<3;r+=1)e.values[r]+=(1-e.values[r])*t;return a(e)}function f(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.15;return s(e)>.5?u(e,t):d(e,t)}},85080:function(e,t,n){"use strict";n.d(t,{Z:function(){return f}});var r=n(87462),i=n(63366),o=n(82466),a=["values","unit","step"];function s(e){var t=e.values,n=void 0===t?{xs:0,sm:600,md:900,lg:1200,xl:1536}:t,o=e.unit,s=void 0===o?"px":o,l=e.step,c=void 0===l?5:l,u=(0,i.Z)(e,a),d=Object.keys(n);function f(e){var t="number"===typeof n[e]?n[e]:e;return"@media (min-width:".concat(t).concat(s,")")}function h(e){var t="number"===typeof n[e]?n[e]:e;return"@media (max-width:".concat(t-c/100).concat(s,")")}function p(e,t){var r=d.indexOf(t);return"@media (min-width:".concat("number"===typeof n[e]?n[e]:e).concat(s,") and ")+"(max-width:".concat((-1!==r&&"number"===typeof n[d[r]]?n[d[r]]:t)-c/100).concat(s,")")}return(0,r.Z)({keys:d,values:n,up:f,down:h,between:p,only:function(e){return d.indexOf(e)+10&&void 0!==arguments[0]?arguments[0]:8;if(e.mui)return e;var t=(0,c.hB)({spacing:e}),n=function(){for(var e=arguments.length,n=new Array(e),r=0;r0&&void 0!==arguments[0]?arguments[0]:{},t=e.breakpoints,n=void 0===t?{}:t,a=e.palette,c=void 0===a?{}:a,f=e.spacing,h=e.shape,p=void 0===h?{}:h,m=(0,i.Z)(e,d),g=s(n),v=u(f),y=(0,o.Z)({breakpoints:g,direction:"ltr",components:{},palette:(0,r.Z)({mode:"light"},c),spacing:v,shape:(0,r.Z)({},l,p)},m),b=arguments.length,x=new Array(b>1?b-1:0),w=1;w2){if(!c[e])return[e];e=c[e]}var t=e.split(""),n=(0,r.Z)(t,2),i=n[0],o=n[1],a=s[i],u=l[o]||"";return Array.isArray(u)?u.map((function(e){return a+e})):[a+u]})),d=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],f=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],h=[].concat(d,f);function p(e,t,n,r){var i=(0,o.D)(e,t)||n;return"number"===typeof i?function(e){return"string"===typeof e?e:i*e}:Array.isArray(i)?function(e){return"string"===typeof e?e:i[e]}:"function"===typeof i?i:function(){}}function m(e){return p(e,"spacing",8)}function g(e,t){if("string"===typeof t||null==t)return t;var n=e(Math.abs(t));return t>=0?n:"number"===typeof n?-n:"-".concat(n)}function v(e,t,n,r){if(-1===t.indexOf(n))return null;var o=function(e,t){return function(n){return e.reduce((function(e,r){return e[r]=g(t,n),e}),{})}}(u(n),r),a=e[n];return(0,i.k9)(e,a,o)}function y(e,t){var n=m(e.theme);return Object.keys(e).map((function(r){return v(e,t,r,n)})).reduce(a.Z,{})}function b(e){return y(e,d)}function x(e){return y(e,f)}function w(e){return y(e,h)}b.propTypes={},b.filterProps=d,x.propTypes={},x.filterProps=f,w.propTypes={},w.filterProps=h;var k=w},18529:function(e,t,n){"use strict";n.d(t,{D:function(){return a}});var r=n(4942),i=n(27312),o=n(51184);function a(e,t){return t&&"string"===typeof t?t.split(".").reduce((function(e,t){return e&&e[t]?e[t]:null}),e):null}function s(e,t,n){var r,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:n;return r="function"===typeof e?e(n):Array.isArray(e)?e[n]||i:a(e,n)||i,t&&(r=t(r)),r}t.Z=function(e){var t=e.prop,n=e.cssProperty,l=void 0===n?e.prop:n,c=e.themeKey,u=e.transform,d=function(e){if(null==e[t])return null;var n=e[t],d=a(e.theme,c)||{};return(0,o.k9)(e,n,(function(e){var n=s(d,u,e);return e===n&&"string"===typeof e&&(n=s(d,u,"".concat(t).concat("default"===e?"":(0,i.Z)(e)),e)),!1===l?n:(0,r.Z)({},l,n)}))};return d.propTypes={},d.filterProps=[t],d}},60104:function(e,t,n){"use strict";var r=n(4942),i=n(98247),o=n(46001),a=n(51184);function s(e){var t=e||{},n=t.sx,l=t.theme,c=void 0===l?{}:l;if(!n)return null;function u(e){var t=e;if("function"===typeof e)t=e(c);else if("object"!==typeof e)return e;var n=(0,a.W8)(c.breakpoints),l=Object.keys(n),u=n;return Object.keys(t).forEach((function(e){var n,l,d=(n=t[e],l=c,"function"===typeof n?n(l):n);if(null!==d&&void 0!==d)if("object"===typeof d)if(o.G[e])u=(0,i.Z)(u,(0,o.Z)(e,d,c));else{var f=(0,a.k9)({theme:c},d,(function(t){return(0,r.Z)({},e,t)}));!function(){for(var e=arguments.length,t=new Array(e),n=0;n0&&void 0!==arguments[0]?arguments[0]:o;return(0,i.Z)(e)}},69120:function(e,t,n){"use strict";var r=n(29598);function i(e){return 0===Object.keys(e).length}t.Z=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=(0,r.Z)();return!t||i(t)?e:t}},27312:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(46189);function i(e){if("string"!==typeof e)throw new Error((0,r.Z)(7));return e.charAt(0).toUpperCase()+e.slice(1)}},78949:function(e,t,n){"use strict";function r(){for(var e=arguments.length,t=new Array(e),n=0;n1&&void 0!==arguments[1]?arguments[1]:166;function r(){for(var r=this,i=arguments.length,o=new Array(i),a=0;a2&&void 0!==arguments[2]?arguments[2]:{clone:!0},a=n.clone?(0,r.Z)({},e):e;return i(e)&&i(t)&&Object.keys(t).forEach((function(r){"__proto__"!==r&&(i(t[r])&&r in e&&i(e[r])?a[r]=o(e[r],t[r],n):a[r]=t[r])})),a}},46189:function(e,t,n){"use strict";function r(e){for(var t="https://mui.com/production-error/?code="+e,n=1;n=0&&e.indexOf(t,n)===n}(k,f)}return!1}function u(e){return Object.keys(e).filter(d,e)}function d(e){return void 0!==this[e]}var f="{ [native code] }";function h(e,t){var n=s.get(e);if(n){if(n.has(t))return!0}else s.set(e,n=new Set);return n.add(t),!1}},65675:function(e,t,n){e=n.nmd(e),function(){var e=function(){return this}();e||"undefined"==typeof window||(e=window);var t=function e(t,n,r){"string"===typeof t?(2==arguments.length&&(r=n),e.modules[t]||(e.payloads[t]=r,e.modules[t]=null)):e.original?e.original.apply(this,arguments):(console.error("dropping module because define wasn't a string."),console.trace())};t.modules={},t.payloads={};var n=function(e,t,n){if("string"===typeof t){var i=o(e,t);if(void 0!=i)return n&&n(),i}else if("[object Array]"===Object.prototype.toString.call(t)){for(var a=[],s=0,l=t.length;s=0?parseFloat((o.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]):parseFloat((o.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]),t.isOldIE=t.isIE&&t.isIE<9,t.isGecko=t.isMozilla=o.match(/ Gecko\/\d+/),t.isOpera="object"==typeof opera&&"[object Opera]"==Object.prototype.toString.call(window.opera),t.isWebKit=parseFloat(o.split("WebKit/")[1])||void 0,t.isChrome=parseFloat(o.split(" Chrome/")[1])||void 0,t.isEdge=parseFloat(o.split(" Edge/")[1])||void 0,t.isAIR=o.indexOf("AdobeAIR")>=0,t.isAndroid=o.indexOf("Android")>=0,t.isChromeOS=o.indexOf(" CrOS ")>=0,t.isIOS=/iPad|iPhone|iPod/.test(o)&&!window.MSStream,t.isIOS&&(t.isMac=!0),t.isMobile=t.isIOS||t.isAndroid})),ace.define("ace/lib/dom",["require","exports","module","ace/lib/useragent"],(function(e,t,n){"use strict";var r=e("./useragent");if(t.buildDom=function e(t,n,r){if("string"==typeof t&&t){var i=document.createTextNode(t);return n&&n.appendChild(i),i}if(!Array.isArray(t))return t&&t.appendChild&&n&&n.appendChild(t),t;if("string"!=typeof t[0]||!t[0]){for(var o=[],a=0;a=1.5,"undefined"!==typeof document){var i=document.createElement("div");t.HI_DPI&&void 0!==i.style.transform&&(t.HAS_CSS_TRANSFORMS=!0),r.isEdge||"undefined"===typeof i.style.animationName||(t.HAS_CSS_ANIMATION=!0),i=null}t.HAS_CSS_TRANSFORMS?t.translate=function(e,t,n){e.style.transform="translate("+Math.round(t)+"px, "+Math.round(n)+"px)"}:t.translate=function(e,t,n){e.style.top=Math.round(n)+"px",e.style.left=Math.round(t)+"px"}})),ace.define("ace/lib/oop",["require","exports","module"],(function(e,t,n){"use strict";t.inherits=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})},t.mixin=function(e,t){for(var n in t)e[n]=t[n];return e},t.implement=function(e,n){t.mixin(e,n)}})),ace.define("ace/lib/keys",["require","exports","module","ace/lib/oop"],(function(e,t,n){"use strict";var r=e("./oop"),i=function(){var e,t,n={MODIFIER_KEYS:{16:"Shift",17:"Ctrl",18:"Alt",224:"Meta",91:"MetaLeft",92:"MetaRight",93:"ContextMenu"},KEY_MODS:{ctrl:1,alt:2,option:2,shift:4,super:8,meta:8,command:8,cmd:8,control:1},FUNCTION_KEYS:{8:"Backspace",9:"Tab",13:"Return",19:"Pause",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"Print",45:"Insert",46:"Delete",96:"Numpad0",97:"Numpad1",98:"Numpad2",99:"Numpad3",100:"Numpad4",101:"Numpad5",102:"Numpad6",103:"Numpad7",104:"Numpad8",105:"Numpad9","-13":"NumpadEnter",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"Numlock",145:"Scrolllock"},PRINTABLE_KEYS:{32:" ",48:"0",49:"1",50:"2",51:"3",52:"4",53:"5",54:"6",55:"7",56:"8",57:"9",59:";",61:"=",65:"a",66:"b",67:"c",68:"d",69:"e",70:"f",71:"g",72:"h",73:"i",74:"j",75:"k",76:"l",77:"m",78:"n",79:"o",80:"p",81:"q",82:"r",83:"s",84:"t",85:"u",86:"v",87:"w",88:"x",89:"y",90:"z",107:"+",109:"-",110:".",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",111:"/",106:"*"}};for(t in n.FUNCTION_KEYS)e=n.FUNCTION_KEYS[t].toLowerCase(),n[e]=parseInt(t,10);for(t in n.PRINTABLE_KEYS)e=n.PRINTABLE_KEYS[t].toLowerCase(),n[e]=parseInt(t,10);return r.mixin(n,n.MODIFIER_KEYS),r.mixin(n,n.PRINTABLE_KEYS),r.mixin(n,n.FUNCTION_KEYS),n.enter=n.return,n.escape=n.esc,n.del=n.delete,n[173]="-",function(){for(var e=["cmd","ctrl","alt","shift"],t=Math.pow(2,e.length);t--;)n.KEY_MODS[t]=e.filter((function(e){return t&n.KEY_MODS[e]})).join("-")+"-"}(),n.KEY_MODS[0]="",n.KEY_MODS[-1]="input-",n}();r.mixin(t,i),t.keyCodeToString=function(e){var t=i[e];return"string"!=typeof t&&(t=String.fromCharCode(e)),t.toLowerCase()}})),ace.define("ace/lib/event",["require","exports","module","ace/lib/keys","ace/lib/useragent"],(function(e,t,n){"use strict";var r,i=e("./keys"),o=e("./useragent"),a=null,s=0;function l(){return void 0==r&&function(){r=!1;try{document.createComment("").addEventListener("test",(function(){}),{get passive(){r={passive:!1}}})}catch(e){}}(),r}function c(e,t,n){this.elem=e,this.type=t,this.callback=n}c.prototype.destroy=function(){d(this.elem,this.type,this.callback),this.elem=this.type=this.callback=void 0};var u=t.addListener=function(e,t,n,r){e.addEventListener(t,n,l()),r&&r.$toDestroy.push(new c(e,t,n))},d=t.removeListener=function(e,t,n){e.removeEventListener(t,n,l())};t.stopEvent=function(e){return t.stopPropagation(e),t.preventDefault(e),!1},t.stopPropagation=function(e){e.stopPropagation&&e.stopPropagation()},t.preventDefault=function(e){e.preventDefault&&e.preventDefault()},t.getButton=function(e){return"dblclick"==e.type?0:"contextmenu"==e.type||o.isMac&&e.ctrlKey&&!e.altKey&&!e.shiftKey?2:e.button},t.capture=function(e,t,n){var r=e&&e.ownerDocument||document;function i(e){t&&t(e),n&&n(e),d(r,"mousemove",t),d(r,"mouseup",i),d(r,"dragstart",i)}return u(r,"mousemove",t),u(r,"mouseup",i),u(r,"dragstart",i),i},t.addMouseWheelListener=function(e,t,n){"onmousewheel"in e?u(e,"mousewheel",(function(e){void 0!==e.wheelDeltaX?(e.wheelX=-e.wheelDeltaX/8,e.wheelY=-e.wheelDeltaY/8):(e.wheelX=0,e.wheelY=-e.wheelDelta/8),t(e)}),n):"onwheel"in e?u(e,"wheel",(function(e){switch(e.deltaMode){case e.DOM_DELTA_PIXEL:e.wheelX=.35*e.deltaX||0,e.wheelY=.35*e.deltaY||0;break;case e.DOM_DELTA_LINE:case e.DOM_DELTA_PAGE:e.wheelX=5*(e.deltaX||0),e.wheelY=5*(e.deltaY||0)}t(e)}),n):u(e,"DOMMouseScroll",(function(e){e.axis&&e.axis==e.HORIZONTAL_AXIS?(e.wheelX=5*(e.detail||0),e.wheelY=0):(e.wheelX=0,e.wheelY=5*(e.detail||0)),t(e)}),n)},t.addMultiMouseDownListener=function(e,n,r,i,a){var s,l,c,d=0,f={2:"dblclick",3:"tripleclick",4:"quadclick"};function h(e){if(0!==t.getButton(e)?d=0:e.detail>1?++d>4&&(d=1):d=1,o.isIE){var a=Math.abs(e.clientX-s)>5||Math.abs(e.clientY-l)>5;c&&!a||(d=1),c&&clearTimeout(c),c=setTimeout((function(){c=null}),n[d-1]||600),1==d&&(s=e.clientX,l=e.clientY)}if(e._clicks=d,r[i]("mousedown",e),d>4)d=0;else if(d>1)return r[i](f[d],e)}Array.isArray(e)||(e=[e]),e.forEach((function(e){u(e,"mousedown",h,a)}))};var f=function(e){return 0|(e.ctrlKey?1:0)|(e.altKey?2:0)|(e.shiftKey?4:0)|(e.metaKey?8:0)};function h(e,t,n){var r=f(t);if(!o.isMac&&a){if(t.getModifierState&&(t.getModifierState("OS")||t.getModifierState("Win"))&&(r|=8),a.altGr){if(3==(3&r))return;a.altGr=0}if(18===n||17===n){var l="location"in t?t.location:t.keyLocation;if(17===n&&1===l)1==a[n]&&(s=t.timeStamp);else if(18===n&&3===r&&2===l){t.timeStamp-s<50&&(a.altGr=!0)}}}if((n in i.MODIFIER_KEYS&&(n=-1),!r&&13===n)&&(3===(l="location"in t?t.location:t.keyLocation)&&(e(t,r,-n),t.defaultPrevented)))return;if(o.isChromeOS&&8&r){if(e(t,r,n),t.defaultPrevented)return;r&=-9}return!!(r||n in i.FUNCTION_KEYS||n in i.PRINTABLE_KEYS)&&e(t,r,n)}function p(){a=Object.create(null)}if(t.getModifierString=function(e){return i.KEY_MODS[f(e)]},t.addCommandKeyListener=function(e,n,r){if(o.isOldGecko||o.isOpera&&!("KeyboardEvent"in window)){var i=null;u(e,"keydown",(function(e){i=e.keyCode}),r),u(e,"keypress",(function(e){return h(n,e,i)}),r)}else{var s=null;u(e,"keydown",(function(e){a[e.keyCode]=(a[e.keyCode]||0)+1;var t=h(n,e,e.keyCode);return s=e.defaultPrevented,t}),r),u(e,"keypress",(function(e){s&&(e.ctrlKey||e.altKey||e.shiftKey||e.metaKey)&&(t.stopEvent(e),s=null)}),r),u(e,"keyup",(function(e){a[e.keyCode]=null}),r),a||(p(),u(window,"focus",p))}},"object"==typeof window&&window.postMessage&&!o.isOldIE){var m=1;t.nextTick=function(e,n){n=n||window;var r="zero-timeout-message-"+m++;u(n,"message",(function i(o){o.data==r&&(t.stopPropagation(o),d(n,"message",i),e())})),n.postMessage(r,"*")}}t.$idleBlocked=!1,t.onIdle=function(e,n){return setTimeout((function n(){t.$idleBlocked?setTimeout(n,100):e()}),n)},t.$idleBlockId=null,t.blockIdle=function(e){t.$idleBlockId&&clearTimeout(t.$idleBlockId),t.$idleBlocked=!0,t.$idleBlockId=setTimeout((function(){t.$idleBlocked=!1}),e||100)},t.nextFrame="object"==typeof window&&(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame),t.nextFrame?t.nextFrame=t.nextFrame.bind(window):t.nextFrame=function(e){setTimeout(e,17)}})),ace.define("ace/range",["require","exports","module"],(function(e,t,n){"use strict";var r=function(e,t,n,r){this.start={row:e,column:t},this.end={row:n,column:r}};(function(){this.isEqual=function(e){return this.start.row===e.start.row&&this.end.row===e.end.row&&this.start.column===e.start.column&&this.end.column===e.end.column},this.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"},this.contains=function(e,t){return 0==this.compare(e,t)},this.compareRange=function(e){var t,n=e.end,r=e.start;return 1==(t=this.compare(n.row,n.column))?1==(t=this.compare(r.row,r.column))?2:0==t?1:0:-1==t?-2:-1==(t=this.compare(r.row,r.column))?-1:1==t?42:0},this.comparePoint=function(e){return this.compare(e.row,e.column)},this.containsRange=function(e){return 0==this.comparePoint(e.start)&&0==this.comparePoint(e.end)},this.intersects=function(e){var t=this.compareRange(e);return-1==t||0==t||1==t},this.isEnd=function(e,t){return this.end.row==e&&this.end.column==t},this.isStart=function(e,t){return this.start.row==e&&this.start.column==t},this.setStart=function(e,t){"object"==typeof e?(this.start.column=e.column,this.start.row=e.row):(this.start.row=e,this.start.column=t)},this.setEnd=function(e,t){"object"==typeof e?(this.end.column=e.column,this.end.row=e.row):(this.end.row=e,this.end.column=t)},this.inside=function(e,t){return 0==this.compare(e,t)&&(!this.isEnd(e,t)&&!this.isStart(e,t))},this.insideStart=function(e,t){return 0==this.compare(e,t)&&!this.isEnd(e,t)},this.insideEnd=function(e,t){return 0==this.compare(e,t)&&!this.isStart(e,t)},this.compare=function(e,t){return this.isMultiLine()||e!==this.start.row?ethis.end.row?1:this.start.row===e?t>=this.start.column?0:-1:this.end.row===e?t<=this.end.column?0:1:0:tthis.end.column?1:0},this.compareStart=function(e,t){return this.start.row==e&&this.start.column==t?-1:this.compare(e,t)},this.compareEnd=function(e,t){return this.end.row==e&&this.end.column==t?1:this.compare(e,t)},this.compareInside=function(e,t){return this.end.row==e&&this.end.column==t?1:this.start.row==e&&this.start.column==t?-1:this.compare(e,t)},this.clipRows=function(e,t){if(this.end.row>t)var n={row:t+1,column:0};else if(this.end.rowt)var i={row:t+1,column:0};else if(this.start.row0;)1&t&&(n+=e),(t>>=1)&&(e+=e);return n};var r=/^\s\s*/,i=/\s\s*$/;t.stringTrimLeft=function(e){return e.replace(r,"")},t.stringTrimRight=function(e){return e.replace(i,"")},t.copyObject=function(e){var t={};for(var n in e)t[n]=e[n];return t},t.copyArray=function(e){for(var t=[],n=0,r=e.length;nDate.now()-50)||(r=!1)},cancel:function(){r=Date.now()}}})),ace.define("ace/keyboard/textinput",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/lib/dom","ace/lib/lang","ace/clipboard","ace/lib/keys"],(function(e,t,n){"use strict";var r=e("../lib/event"),i=e("../lib/useragent"),o=e("../lib/dom"),a=e("../lib/lang"),s=e("../clipboard"),l=i.isChrome<18,c=i.isIE,u=i.isChrome>63,d=400,f=e("../lib/keys"),h=f.KEY_MODS,p=i.isIOS,m=p?/\s/:/\n/,g=i.isMobile;t.TextInput=function(e,t){var n=o.createElement("textarea");n.className="ace_text-input",n.setAttribute("wrap","off"),n.setAttribute("autocorrect","off"),n.setAttribute("autocapitalize","off"),n.setAttribute("spellcheck",!1),n.style.opacity="0",e.insertBefore(n,e.firstChild);var v=!1,y=!1,b=!1,x=!1,w="";g||(n.style.fontSize="1px");var k=!1,_=!1,S="",C=0,j=0,E=0;try{var T=document.activeElement===n}catch(V){}r.addListener(n,"blur",(function(e){_||(t.onBlur(e),T=!1)}),t),r.addListener(n,"focus",(function(e){if(!_){if(T=!0,i.isEdge)try{if(!document.hasFocus())return}catch(e){}t.onFocus(e),i.isEdge?setTimeout(M):M()}}),t),this.$focusScroll=!1,this.focus=function(){if(w||u||"browser"==this.$focusScroll)return n.focus({preventScroll:!0});var e=n.style.top;n.style.position="fixed",n.style.top="0px";try{var t=0!=n.getBoundingClientRect().top}catch(V){return}var r=[];if(t)for(var i=n.parentElement;i&&1==i.nodeType;)r.push(i),i.setAttribute("ace_nocontext",!0),i=!i.parentElement&&i.getRootNode?i.getRootNode().host:i.parentElement;n.focus({preventScroll:!0}),t&&r.forEach((function(e){e.removeAttribute("ace_nocontext")})),setTimeout((function(){n.style.position="","0px"==n.style.top&&(n.style.top=e)}),0)},this.blur=function(){n.blur()},this.isFocused=function(){return T},t.on("beforeEndOperation",(function(){var e=t.curOp,r=e&&e.command&&e.command.name;if("insertstring"!=r){var i=r&&(e.docChanged||e.selectionChanged);b&&i&&(S=n.value="",F()),M()}}));var M=p?function(e){if(T&&(!v||e)&&!x){e||(e="");var r="\n ab"+e+"cde fg\n";r!=n.value&&(n.value=S=r);var i=4+(e.length||(t.selection.isEmpty()?0:1));4==C&&j==i||n.setSelectionRange(4,i),C=4,j=i}}:function(){if(!b&&!x&&(T||R)){b=!0;var e=0,r=0,i="";if(t.session){var o=t.selection,a=o.getRange(),s=o.cursor.row;if(e=a.start.column,r=a.end.column,i=t.session.getLine(s),a.start.row!=s){var l=t.session.getLine(s-1);e=a.start.rows+1?c.length:r,r+=i.length+1,i=i+"\n"+c}else g&&s>0&&(i="\n"+i,r+=1,e+=1);i.length>d&&(e0&&S[f]==e[f];)f++,s--;for(c=c.slice(f),f=1;l>0&&S.length-f>C-1&&S[S.length-f]==e[e.length-f];)f++,l--;u-=f-1,d-=f-1;var h=c.length-f+1;if(h<0&&(s=-h,h=0),c=c.slice(0,h),!r&&!c&&!u&&!s&&!l&&!d)return"";x=!0;var p=!1;return i.isAndroid&&". "==c&&(c=" ",p=!0),c&&!s&&!l&&!u&&!d||k?t.onTextInput(c):t.onTextInput(c,{extendLeft:s,extendRight:l,restoreStart:u,restoreEnd:d}),x=!1,S=e,C=o,j=a,E=d,p?"\n":c},Z=function(e){if(b)return $();if(e&&e.inputType){if("historyUndo"==e.inputType)return t.execCommand("undo");if("historyRedo"==e.inputType)return t.execCommand("redo")}var r=n.value,i=O(r,!0);(r.length>500||m.test(i)||g&&C<1&&C==j)&&M()},I=function e(t,n,r){var i=t.clipboardData||window.clipboardData;if(i&&!l){var o=c||r?"Text":"text/plain";try{return n?!1!==i.setData(o,n):i.getData(o)}catch(t){if(!r)return e(t,n,!0)}}},P=function(e,i){var o=t.getCopyText();if(!o)return r.preventDefault(e);I(e,o)?(p&&(M(o),v=o,setTimeout((function(){v=!1}),10)),i?t.onCut():t.onCopy(),r.preventDefault(e)):(v=!0,n.value=o,n.select(),setTimeout((function(){v=!1,M(),i?t.onCut():t.onCopy()})))},L=function(e){P(e,!0)},D=function(e){P(e,!1)},N=function(e){var o=I(e);s.pasteCancelled()||("string"==typeof o?(o&&t.onPaste(o,e),i.isIE&&setTimeout(M),r.preventDefault(e)):(n.value="",y=!0))};r.addCommandKeyListener(n,t.onCommandKey.bind(t),t),r.addListener(n,"select",(function(e){b||(v?v=!1:!function(e){return 0===e.selectionStart&&e.selectionEnd>=S.length&&e.value===S&&S&&e.selectionEnd!==j}(n)?g&&n.selectionStart!=C&&M():(t.selectAll(),M()))}),t),r.addListener(n,"input",Z,t),r.addListener(n,"cut",L,t),r.addListener(n,"copy",D,t),r.addListener(n,"paste",N,t),"oncut"in n&&"oncopy"in n&&"onpaste"in n||r.addListener(e,"keydown",(function(e){if((!i.isMac||e.metaKey)&&e.ctrlKey)switch(e.keyCode){case 67:D(e);break;case 86:N(e);break;case 88:L(e)}}),t);var $=function(){if(b&&t.onCompositionUpdate&&!t.$readOnly){if(k)return z();if(b.useTextareaForIME)t.onCompositionUpdate(n.value);else{var e=n.value;O(e),b.markerRange&&(b.context&&(b.markerRange.start.column=b.selectionStart=b.context.compositionStartOffset),b.markerRange.end.column=b.markerRange.start.column+j-b.selectionStart+E)}}},F=function(e){t.onCompositionEnd&&!t.$readOnly&&(b=!1,t.onCompositionEnd(),t.off("mousedown",z),e&&Z())};function z(){_=!0,n.blur(),n.focus(),_=!1}var B,W=a.delayedCall($,50).schedule.bind(null,null);function H(){clearTimeout(B),B=setTimeout((function(){w&&(n.style.cssText=w,w=""),t.renderer.$isMousePressed=!1,t.renderer.$keepTextAreaAtCursor&&t.renderer.$moveTextAreaToCursor()}),0)}r.addListener(n,"compositionstart",(function(e){if(!b&&t.onCompositionStart&&!t.$readOnly&&(b={},!k)){e.data&&(b.useTextareaForIME=!1),setTimeout($,0),t._signal("compositionStart"),t.on("mousedown",z);var r=t.getSelectionRange();r.end.row=r.start.row,r.end.column=r.start.column,b.markerRange=r,b.selectionStart=C,t.onCompositionStart(b),b.useTextareaForIME?(S=n.value="",C=0,j=0):(n.msGetInputContext&&(b.context=n.msGetInputContext()),n.getInputContext&&(b.context=n.getInputContext()))}}),t),r.addListener(n,"compositionupdate",$,t),r.addListener(n,"keyup",(function(e){27==e.keyCode&&n.value.lengthj&&"\n"==S[o]?a=f.end:rj&&S.slice(0,o).split("\n").length>2?a=f.down:o>j&&" "==S[o-1]?(a=f.right,s=h.option):(o>j||o==j&&j!=C&&r==o)&&(a=f.right),r!==o&&(s|=h.shift),a){if(!t.onCommandKey({},s,a)&&t.commands){a=f.keyCodeToString(a);var l=t.commands.findKeyCommand(s,a);l&&t.execCommand(l)}C=r,j=o,M("")}}};document.addEventListener("selectionchange",o),t.on("destroy",(function(){document.removeEventListener("selectionchange",o)}))}(0,t,n)},t.$setUserAgentForTests=function(e,t){g=e,p=t}})),ace.define("ace/mouse/default_handlers",["require","exports","module","ace/lib/useragent"],(function(e,t,n){"use strict";var r=e("../lib/useragent");function i(e){e.$clickSelection=null;var t=e.editor;t.setDefaultHandler("mousedown",this.onMouseDown.bind(e)),t.setDefaultHandler("dblclick",this.onDoubleClick.bind(e)),t.setDefaultHandler("tripleclick",this.onTripleClick.bind(e)),t.setDefaultHandler("quadclick",this.onQuadClick.bind(e)),t.setDefaultHandler("mousewheel",this.onMouseWheel.bind(e));["select","startSelect","selectEnd","selectAllEnd","selectByWordsEnd","selectByLinesEnd","dragWait","dragWaitEnd","focusWait"].forEach((function(t){e[t]=this[t]}),this),e.selectByLines=this.extendSelectionBy.bind(e,"getLineRange"),e.selectByWords=this.extendSelectionBy.bind(e,"getWordRange")}function o(e,t){if(e.start.row==e.end.row)var n=2*t.column-e.start.column-e.end.column;else if(e.start.row!=e.end.row-1||e.start.column||e.end.column)n=2*t.row-e.start.row-e.end.row;else var n=t.column-4;return n<0?{cursor:e.start,anchor:e.end}:{cursor:e.end,anchor:e.start}}(function(){this.onMouseDown=function(e){var t=e.inSelection(),n=e.getDocumentPosition();this.mousedownEvent=e;var i=this.editor,o=e.getButton();return 0!==o?((i.getSelectionRange().isEmpty()||1==o)&&i.selection.moveToPosition(n),void(2==o&&(i.textInput.onContextMenu(e.domEvent),r.isMozilla||e.preventDefault()))):(this.mousedownEvent.time=Date.now(),!t||i.isFocused()||(i.focus(),!this.$focusTimeout||this.$clickSelection||i.inMultiSelectMode)?(this.captureMouse(e),this.startSelect(n,e.domEvent._clicks>1),e.preventDefault()):(this.setState("focusWait"),void this.captureMouse(e)))},this.startSelect=function(e,t){e=e||this.editor.renderer.screenToTextCoordinates(this.x,this.y);var n=this.editor;this.mousedownEvent&&(this.mousedownEvent.getShiftKey()?n.selection.selectToPosition(e):t||n.selection.moveToPosition(e),t||this.select(),n.renderer.scroller.setCapture&&n.renderer.scroller.setCapture(),n.setStyle("ace_selecting"),this.setState("select"))},this.select=function(){var e,t=this.editor,n=t.renderer.screenToTextCoordinates(this.x,this.y);if(this.$clickSelection){var r=this.$clickSelection.comparePoint(n);if(-1==r)e=this.$clickSelection.end;else if(1==r)e=this.$clickSelection.start;else{var i=o(this.$clickSelection,n);n=i.cursor,e=i.anchor}t.selection.setSelectionAnchor(e.row,e.column)}t.selection.selectToPosition(n),t.renderer.scrollCursorIntoView()},this.extendSelectionBy=function(e){var t,n=this.editor,r=n.renderer.screenToTextCoordinates(this.x,this.y),i=n.selection[e](r.row,r.column);if(this.$clickSelection){var a=this.$clickSelection.comparePoint(i.start),s=this.$clickSelection.comparePoint(i.end);if(-1==a&&s<=0)t=this.$clickSelection.end,i.end.row==r.row&&i.end.column==r.column||(r=i.start);else if(1==s&&a>=0)t=this.$clickSelection.start,i.start.row==r.row&&i.start.column==r.column||(r=i.end);else if(-1==a&&1==s)r=i.end,t=i.start;else{var l=o(this.$clickSelection,r);r=l.cursor,t=l.anchor}n.selection.setSelectionAnchor(t.row,t.column)}n.selection.selectToPosition(r),n.renderer.scrollCursorIntoView()},this.selectEnd=this.selectAllEnd=this.selectByWordsEnd=this.selectByLinesEnd=function(){this.$clickSelection=null,this.editor.unsetStyle("ace_selecting"),this.editor.renderer.scroller.releaseCapture&&this.editor.renderer.scroller.releaseCapture()},this.focusWait=function(){var e,t,n,r,i=(e=this.mousedownEvent.x,t=this.mousedownEvent.y,n=this.x,r=this.y,Math.sqrt(Math.pow(n-e,2)+Math.pow(r-t,2))),o=Date.now();(i>0||o-this.mousedownEvent.time>this.$focusTimeout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},this.onDoubleClick=function(e){var t=e.getDocumentPosition(),n=this.editor,r=n.session.getBracketRange(t);r?(r.isEmpty()&&(r.start.column--,r.end.column++),this.setState("select")):(r=n.selection.getWordRange(t.row,t.column),this.setState("selectByWords")),this.$clickSelection=r,this.select()},this.onTripleClick=function(e){var t=e.getDocumentPosition(),n=this.editor;this.setState("selectByLines");var r=n.getSelectionRange();r.isMultiLine()&&r.contains(t.row,t.column)?(this.$clickSelection=n.selection.getLineRange(r.start.row),this.$clickSelection.end=n.selection.getLineRange(r.end.row).end):this.$clickSelection=n.selection.getLineRange(t.row),this.select()},this.onQuadClick=function(e){var t=this.editor;t.selectAll(),this.$clickSelection=t.getSelectionRange(),this.setState("selectAll")},this.onMouseWheel=function(e){if(!e.getAccelKey()){e.getShiftKey()&&e.wheelY&&!e.wheelX&&(e.wheelX=e.wheelY,e.wheelY=0);var t=this.editor;this.$lastScroll||(this.$lastScroll={t:0,vx:0,vy:0,allowed:0});var n=this.$lastScroll,r=e.domEvent.timeStamp,i=r-n.t,o=i?e.wheelX/i:n.vx,a=i?e.wheelY/i:n.vy;i<550&&(o=(o+n.vx)/2,a=(a+n.vy)/2);var s=Math.abs(o/a),l=!1;if(s>=1&&t.renderer.isScrollableBy(e.wheelX*e.speed,0)&&(l=!0),s<=1&&t.renderer.isScrollableBy(0,e.wheelY*e.speed)&&(l=!0),l)n.allowed=r;else if(r-n.allowed<550){Math.abs(o)<=1.5*Math.abs(n.vx)&&Math.abs(a)<=1.5*Math.abs(n.vy)?(l=!0,n.allowed=r):n.allowed=0}return n.t=r,n.vx=o,n.vy=a,l?(t.renderer.scrollBy(e.wheelX*e.speed,e.wheelY*e.speed),e.stop()):void 0}}}).call(i.prototype),t.DefaultHandlers=i})),ace.define("ace/tooltip",["require","exports","module","ace/lib/oop","ace/lib/dom"],(function(e,t,n){"use strict";e("./lib/oop");var r=e("./lib/dom");function i(e){this.isOpen=!1,this.$element=null,this.$parentNode=e}(function(){this.$init=function(){return this.$element=r.createElement("div"),this.$element.className="ace_tooltip",this.$element.style.display="none",this.$parentNode.appendChild(this.$element),this.$element},this.getElement=function(){return this.$element||this.$init()},this.setText=function(e){this.getElement().textContent=e},this.setHtml=function(e){this.getElement().innerHTML=e},this.setPosition=function(e,t){this.getElement().style.left=e+"px",this.getElement().style.top=t+"px"},this.setClassName=function(e){r.addCssClass(this.getElement(),e)},this.show=function(e,t,n){null!=e&&this.setText(e),null!=t&&null!=n&&this.setPosition(t,n),this.isOpen||(this.getElement().style.display="block",this.isOpen=!0)},this.hide=function(){this.isOpen&&(this.getElement().style.display="none",this.isOpen=!1)},this.getHeight=function(){return this.getElement().offsetHeight},this.getWidth=function(){return this.getElement().offsetWidth},this.destroy=function(){this.isOpen=!1,this.$element&&this.$element.parentNode&&this.$element.parentNode.removeChild(this.$element)}}).call(i.prototype),t.Tooltip=i})),ace.define("ace/mouse/default_gutter_handler",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event","ace/tooltip"],(function(e,t,n){"use strict";var r=e("../lib/dom"),i=e("../lib/oop"),o=e("../lib/event"),a=e("../tooltip").Tooltip;function s(e){a.call(this,e)}i.inherits(s,a),function(){this.setPosition=function(e,t){var n=window.innerWidth||document.documentElement.clientWidth,r=window.innerHeight||document.documentElement.clientHeight,i=this.getWidth(),o=this.getHeight();(e+=15)+i>n&&(e-=e+i-n),(t+=15)+o>r&&(t-=20+o),a.prototype.setPosition.call(this,e,t)}}.call(s.prototype),t.GutterHandler=function(e){var t,n,i,a=e.editor,l=a.renderer.$gutterLayer,c=new s(a.container);function u(){t&&(t=clearTimeout(t)),i&&(c.hide(),i=null,a._signal("hideGutterTooltip",c),a.off("mousewheel",u))}function d(e){c.setPosition(e.x,e.y)}e.editor.setDefaultHandler("guttermousedown",(function(t){if(a.isFocused()&&0==t.getButton()&&"foldWidgets"!=l.getRegion(t)){var n=t.getDocumentPosition().row,r=a.session.selection;if(t.getShiftKey())r.selectTo(n,0);else{if(2==t.domEvent.detail)return a.selectAll(),t.preventDefault();e.$clickSelection=a.selection.getLineRange(n)}return e.setState("selectByLines"),e.captureMouse(t),t.preventDefault()}})),e.editor.setDefaultHandler("guttermousemove",(function(o){var s=o.domEvent.target||o.domEvent.srcElement;if(r.hasCssClass(s,"ace_fold-widget"))return u();i&&e.$tooltipFollowsMouse&&d(o),n=o,t||(t=setTimeout((function(){t=null,n&&!e.isMousePressed?function(){var t=n.getDocumentPosition().row,r=l.$annotations[t];if(!r)return u();if(t==a.session.getLength()){var o=a.renderer.pixelToScreenCoordinates(0,n.y).row,s=n.$pos;if(o>a.session.documentToScreenRow(s.row,s.column))return u()}if(i!=r)if(i=r.text.join("
"),c.setHtml(i),c.show(),a._signal("showGutterTooltip",c),a.on("mousewheel",u),e.$tooltipFollowsMouse)d(n);else{var f=n.domEvent.target.getBoundingClientRect(),h=c.getElement().style;h.left=f.right+"px",h.top=f.bottom+"px"}}():u()}),50))})),o.addListener(a.renderer.$gutter,"mouseout",(function(e){n=null,i&&!t&&(t=setTimeout((function(){t=null,u()}),50))}),a),a.on("changeSession",u)}})),ace.define("ace/mouse/mouse_event",["require","exports","module","ace/lib/event","ace/lib/useragent"],(function(e,t,n){"use strict";var r=e("../lib/event"),i=e("../lib/useragent"),o=t.MouseEvent=function(e,t){this.domEvent=e,this.editor=t,this.x=this.clientX=e.clientX,this.y=this.clientY=e.clientY,this.$pos=null,this.$inSelection=null,this.propagationStopped=!1,this.defaultPrevented=!1};(function(){this.stopPropagation=function(){r.stopPropagation(this.domEvent),this.propagationStopped=!0},this.preventDefault=function(){r.preventDefault(this.domEvent),this.defaultPrevented=!0},this.stop=function(){this.stopPropagation(),this.preventDefault()},this.getDocumentPosition=function(){return this.$pos||(this.$pos=this.editor.renderer.screenToTextCoordinates(this.clientX,this.clientY)),this.$pos},this.inSelection=function(){if(null!==this.$inSelection)return this.$inSelection;var e=this.editor.getSelectionRange();if(e.isEmpty())this.$inSelection=!1;else{var t=this.getDocumentPosition();this.$inSelection=e.contains(t.row,t.column)}return this.$inSelection},this.getButton=function(){return r.getButton(this.domEvent)},this.getShiftKey=function(){return this.domEvent.shiftKey},this.getAccelKey=i.isMac?function(){return this.domEvent.metaKey}:function(){return this.domEvent.ctrlKey}}).call(o.prototype)})),ace.define("ace/mouse/dragdrop_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],(function(e,t,n){"use strict";var r=e("../lib/dom"),i=e("../lib/event"),o=e("../lib/useragent");function a(e){var t=e.editor,n=r.createElement("img");n.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",o.isOpera&&(n.style.cssText="width:1px;height:1px;position:fixed;top:0;left:0;z-index:2147483647;opacity:0;");["dragWait","dragWaitEnd","startDrag","dragReadyEnd","onMouseDrag"].forEach((function(t){e[t]=this[t]}),this),t.on("mousedown",this.onMouseDown.bind(e));var a,l,c,u,d,f,h,p,m,g,v,y=t.container,b=0;function x(){var e=f;(function(e,n){var r=Date.now(),i=!n||e.row!=n.row,o=!n||e.column!=n.column;!g||i||o?(t.moveCursorToPosition(e),g=r,v={x:l,y:c}):s(v.x,v.y,l,c)>5?g=null:r-g>=200&&(t.renderer.scrollCursorIntoView(),g=null)})(f=t.renderer.screenToTextCoordinates(l,c),e),function(e,n){var r=Date.now(),i=t.renderer.layerConfig.lineHeight,o=t.renderer.layerConfig.characterWidth,a=t.renderer.scroller.getBoundingClientRect(),s={x:{left:l-a.left,right:a.right-l},y:{top:c-a.top,bottom:a.bottom-c}},u=Math.min(s.x.left,s.x.right),d=Math.min(s.y.top,s.y.bottom),f={row:e.row,column:e.column};u/o<=2&&(f.column+=s.x.left=200&&t.renderer.scrollCursorIntoView(f):m=r:m=null}(f,e)}function w(){d=t.selection.toOrientedRange(),a=t.session.addMarker(d,"ace_selection",t.getSelectionStyle()),t.clearSelection(),t.isFocused()&&t.renderer.$cursorLayer.setBlinking(!1),clearInterval(u),x(),u=setInterval(x,20),b=0,i.addListener(document,"mousemove",S)}function k(){clearInterval(u),t.session.removeMarker(a),a=null,t.selection.fromOrientedRange(d),t.isFocused()&&!p&&t.$resetCursorStyle(),d=null,f=null,b=0,m=null,g=null,i.removeListener(document,"mousemove",S)}this.onDragStart=function(e){if(this.cancelDrag||!y.draggable){var r=this;return setTimeout((function(){r.startSelect(),r.captureMouse(e)}),0),e.preventDefault()}d=t.getSelectionRange();var i=e.dataTransfer;i.effectAllowed=t.getReadOnly()?"copy":"copyMove",o.isOpera&&(t.container.appendChild(n),n.scrollTop=0),i.setDragImage&&i.setDragImage(n,0,0),o.isOpera&&t.container.removeChild(n),i.clearData(),i.setData("Text",t.session.getTextRange()),p=!0,this.setState("drag")},this.onDragEnd=function(e){if(y.draggable=!1,p=!1,this.setState(null),!t.getReadOnly()){var n=e.dataTransfer.dropEffect;h||"move"!=n||t.session.remove(t.getSelectionRange()),t.$resetCursorStyle()}this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle("")},this.onDragEnter=function(e){if(!t.getReadOnly()&&C(e.dataTransfer))return l=e.clientX,c=e.clientY,a||w(),b++,e.dataTransfer.dropEffect=h=j(e),i.preventDefault(e)},this.onDragOver=function(e){if(!t.getReadOnly()&&C(e.dataTransfer))return l=e.clientX,c=e.clientY,a||(w(),b++),null!==_&&(_=null),e.dataTransfer.dropEffect=h=j(e),i.preventDefault(e)},this.onDragLeave=function(e){if(--b<=0&&a)return k(),h=null,i.preventDefault(e)},this.onDrop=function(e){if(f){var n=e.dataTransfer;if(p)switch(h){case"move":d=d.contains(f.row,f.column)?{start:f,end:f}:t.moveText(d,f);break;case"copy":d=t.moveText(d,f,!0)}else{var r=n.getData("Text");d={start:f,end:t.session.insert(f,r)},t.focus(),h=null}return k(),i.preventDefault(e)}},i.addListener(y,"dragstart",this.onDragStart.bind(e),t),i.addListener(y,"dragend",this.onDragEnd.bind(e),t),i.addListener(y,"dragenter",this.onDragEnter.bind(e),t),i.addListener(y,"dragover",this.onDragOver.bind(e),t),i.addListener(y,"dragleave",this.onDragLeave.bind(e),t),i.addListener(y,"drop",this.onDrop.bind(e),t);var _=null;function S(){null==_&&(_=setTimeout((function(){null!=_&&a&&k()}),20))}function C(e){var t=e.types;return!t||Array.prototype.some.call(t,(function(e){return"text/plain"==e||"Text"==e}))}function j(e){var t=["copy","copymove","all","uninitialized"],n=o.isMac?e.altKey:e.ctrlKey,r="uninitialized";try{r=e.dataTransfer.effectAllowed.toLowerCase()}catch(e){}var i="none";return n&&t.indexOf(r)>=0?i="copy":["move","copymove","linkmove","all","uninitialized"].indexOf(r)>=0?i="move":t.indexOf(r)>=0&&(i="copy"),i}}function s(e,t,n,r){return Math.sqrt(Math.pow(n-e,2)+Math.pow(r-t,2))}(function(){this.dragWait=function(){Date.now()-this.mousedownEvent.time>this.editor.getDragDelay()&&this.startDrag()},this.dragWaitEnd=function(){this.editor.container.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()),this.selectEnd()},this.dragReadyEnd=function(e){this.editor.$resetCursorStyle(),this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle(""),this.dragWaitEnd()},this.startDrag=function(){this.cancelDrag=!1;var e=this.editor;e.container.draggable=!0,e.renderer.$cursorLayer.setBlinking(!1),e.setStyle("ace_dragging");var t=o.isWin?"default":"move";e.renderer.setCursorStyle(t),this.setState("dragReady")},this.onMouseDrag=function(e){var t=this.editor.container;o.isIE&&"dragReady"==this.state&&(s(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y)>3&&t.dragDrop());"dragWait"===this.state&&(s(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y)>0&&(t.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition())))},this.onMouseDown=function(e){if(this.$dragEnabled){this.mousedownEvent=e;var t=this.editor,n=e.inSelection(),r=e.getButton();if(1===(e.domEvent.detail||1)&&0===r&&n){if(e.editor.inMultiSelectMode&&(e.getAccelKey()||e.getShiftKey()))return;this.mousedownEvent.time=Date.now();var i=e.domEvent.target||e.domEvent.srcElement;if("unselectable"in i&&(i.unselectable="on"),t.getDragDelay()){if(o.isWebKit)this.cancelDrag=!0,t.container.draggable=!0;this.setState("dragWait")}else this.startDrag();this.captureMouse(e,this.onMouseDrag.bind(this)),e.defaultPrevented=!0}}}}).call(a.prototype),t.DragdropHandler=a})),ace.define("ace/mouse/touch_handler",["require","exports","module","ace/mouse/mouse_event","ace/lib/event","ace/lib/dom"],(function(e,t,n){"use strict";var r=e("./mouse_event").MouseEvent,i=e("../lib/event"),o=e("../lib/dom");t.addTouchListeners=function(e,t){var n,a,s,l,c,u,d,f,h,p="scroll",m=0,g=0,v=0,y=0;function b(){var e=window.navigator&&window.navigator.clipboard,n=!1,r=function(r){var i=r.target.getAttribute("action");if("more"==i||!n)return n=!n,function(){var r=t.getCopyText(),i=t.session.getUndoManager().hasUndo();h.replaceChild(o.buildDom(n?["span",!r&&["span",{class:"ace_mobile-button",action:"selectall"},"Select All"],r&&["span",{class:"ace_mobile-button",action:"copy"},"Copy"],r&&["span",{class:"ace_mobile-button",action:"cut"},"Cut"],e&&["span",{class:"ace_mobile-button",action:"paste"},"Paste"],i&&["span",{class:"ace_mobile-button",action:"undo"},"Undo"],["span",{class:"ace_mobile-button",action:"find"},"Find"],["span",{class:"ace_mobile-button",action:"openCommandPallete"},"Pallete"]]:["span"]),h.firstChild)}();"paste"==i?e.readText().then((function(e){t.execCommand(i,e)})):i&&("cut"!=i&&"copy"!=i||(e?e.writeText(t.getCopyText()):document.execCommand("copy")),t.execCommand(i)),h.firstChild.style.display="none",n=!1,"openCommandPallete"!=i&&t.focus()};h=o.buildDom(["div",{class:"ace_mobile-menu",ontouchstart:function(e){p="menu",e.stopPropagation(),e.preventDefault(),t.textInput.focus()},ontouchend:function(e){e.stopPropagation(),e.preventDefault(),r(e)},onclick:r},["span"],["span",{class:"ace_mobile-button",action:"more"},"..."]],t.container)}function x(){h||b();var e=t.selection.cursor,n=t.renderer.textToScreenCoordinates(e.row,e.column),r=t.renderer.textToScreenCoordinates(0,0).pageX,i=t.renderer.scrollLeft,o=t.container.getBoundingClientRect();h.style.top=n.pageY-o.top-3+"px",n.pageX-o.left1)return clearTimeout(c),c=null,s=-1,void(p="zoom");f=t.$mouseHandler.isMousePressed=!0;var o=t.renderer.layerConfig.lineHeight,u=t.renderer.layerConfig.lineHeight,h=e.timeStamp;l=h;var b=i[0],x=b.clientX,w=b.clientY;Math.abs(n-x)+Math.abs(a-w)>o&&(s=-1),n=e.clientX=x,a=e.clientY=w,v=y=0;var _=new r(e,t);if(d=_.getDocumentPosition(),h-s<500&&1==i.length&&!m)g++,e.preventDefault(),e.button=0,function(){c=null,clearTimeout(c),t.selection.moveToPosition(d);var e=g>=2?t.selection.getLineRange(d.row):t.session.getBracketRange(d);e&&!e.isEmpty()?t.selection.setRange(e):t.selection.selectWord(),p="wait"}();else{g=0;var S=t.selection.cursor,C=t.selection.isEmpty()?S:t.selection.anchor,j=t.renderer.$cursorLayer.getPixelPosition(S,!0),E=t.renderer.$cursorLayer.getPixelPosition(C,!0),T=t.renderer.scroller.getBoundingClientRect(),M=t.renderer.layerConfig.offset,A=t.renderer.scrollLeft,R=function(e,t){return(e/=u)*e+(t=t/o-.75)*t};if(e.clientXZ?"cursor":"anchor"),p=Z<3.5?"anchor":O<3.5?"cursor":"scroll",c=setTimeout(k,450)}s=h}),t),i.addListener(e,"touchend",(function(e){f=t.$mouseHandler.isMousePressed=!1,u&&clearInterval(u),"zoom"==p?(p="",m=0):c?(t.selection.moveToPosition(d),m=0,x()):"scroll"==p?(m+=60,u=setInterval((function(){m--<=0&&(clearInterval(u),u=null),Math.abs(v)<.01&&(v=0),Math.abs(y)<.01&&(y=0),m<20&&(v*=.9),m<20&&(y*=.9);var e=t.session.getScrollTop();t.renderer.scrollBy(10*v,10*y),e==t.session.getScrollTop()&&(m=0)}),10),w()):x(),clearTimeout(c),c=null}),t),i.addListener(e,"touchmove",(function(e){c&&(clearTimeout(c),c=null);var i=e.touches;if(!(i.length>1||"zoom"==p)){var o=i[0],s=n-o.clientX,u=a-o.clientY;if("wait"==p){if(!(s*s+u*u>4))return e.preventDefault();p="cursor"}n=o.clientX,a=o.clientY,e.clientX=o.clientX,e.clientY=o.clientY;var d=e.timeStamp,f=d-l;if(l=d,"scroll"==p){var h=new r(e,t);h.speed=1,h.wheelX=s,h.wheelY=u,10*Math.abs(s)1&&(i=n[n.length-2]);var a=l[t+"Path"];return null==a?a=l.basePath:"/"==r&&(t=r=""),a&&"/"!=a.slice(-1)&&(a+="/"),a+t+r+i+this.get("suffix")},t.setModuleUrl=function(e,t){return l.$moduleUrls[e]=t},t.$loading={},t.loadModule=function(n,r){var i,a;Array.isArray(n)&&(a=n[0],n=n[1]);try{i=e(n)}catch(l){}if(i&&!t.$loading[n])return r&&r(i);if(t.$loading[n]||(t.$loading[n]=[]),t.$loading[n].push(r),!(t.$loading[n].length>1)){var s=function(){e([n],(function(e){t._emit("load.module",{name:n,module:e});var r=t.$loading[n];t.$loading[n]=null,r.forEach((function(t){t&&t(e)}))}))};if(!t.get("packaged"))return s();o.loadScript(t.moduleUrl(n,a),s),c()}};var c=function(){l.basePath||l.workerPath||l.modePath||l.themePath||Object.keys(l.$moduleUrls).length||(console.error("Unable to infer path to ace from script src,","use ace.config.set('basePath', 'path') to enable dynamic loading of modes and themes","or with webpack use ace/webpack-resolver"),c=function(){})};function u(i){if(s&&s.document){l.packaged=i||e.packaged||r.packaged||s.define&&n.amdD.packaged;for(var o,a={},c="",u=document.currentScript||document._currentScript,d=(u&&u.ownerDocument||document).getElementsByTagName("script"),f=0;f=e){for(o=d+1;o=e;)o++;for(s=d,l=o-1;s=t.length||2!=(l=n[i-1])&&3!=l||2!=(c=t[i+1])&&3!=c?4:(o&&(c=3),c==l?c:4);case 10:return 2==(l=i>0?n[i-1]:5)&&i+10&&2==n[i-1])return 2;if(o)return 4;for(h=i+1,f=t.length;h=1425&&m<=2303||64286==m;if(l=t[h],g&&(1==l||7==l))return 1}return i<1||5==(l=t[i-1])?4:n[i-1];case 5:return o=!1,a=!0,r;case 6:return s=!0,4;case 13:case 14:case 16:case 17:case 15:o=!1;case d:return 4}}function g(e){var t=e.charCodeAt(0),n=t>>8;return 0==n?t>191?0:f[t]:5==n?/[\u0591-\u05f4]/.test(e)?1:0:6==n?/[\u0610-\u061a\u064b-\u065f\u06d6-\u06e4\u06e7-\u06ed]/.test(e)?12:/[\u0660-\u0669\u066b-\u066c]/.test(e)?3:1642==t?u:/[\u06f0-\u06f9]/.test(e)?2:7:32==n&&t<=8287?h[255&t]:254==n&&t>=65136?7:4}t.L=0,t.R=1,t.EN=2,t.ON_R=3,t.AN=4,t.R_H=5,t.B=6,t.RLE=7,t.DOT="\xb7",t.doBidiReorder=function(e,n,u){if(e.length<2)return{};var f=e.split(""),h=new Array(f.length),v=new Array(f.length),y=[];r=u?1:0,function(e,t,n,u){var d=r?c:l,f=null,h=null,p=null,v=0,y=null,b=-1,x=null,w=null,k=[];if(!u)for(x=0,u=[];x0)if(16==y){for(x=b;x-1){for(x=b;x=0&&8==u[_];_--)t[_]=r}}(f,y,f.length,n);for(var b=0;b7&&n[b]<13||4===n[b]||n[b]===d)?y[b]=t.ON_R:b>0&&"\u0644"===f[b-1]&&/\u0622|\u0623|\u0625|\u0627/.test(f[b])&&(y[b-1]=y[b]=t.R_H,b++);f[f.length-1]===t.DOT&&(y[f.length-1]=t.B),"\u202b"===f[0]&&(y[0]=t.RLE);for(b=0;b=0&&(e=this.session.$docRowCache[n])}return e},this.getSplitIndex=function(){var e=0,t=this.session.$screenRowCache;if(t.length)for(var n,r=this.session.$getRowCacheIndex(t,this.currentRow);this.currentRow-e>0&&(n=this.session.$getRowCacheIndex(t,this.currentRow-e-1))===r;)r=n,e++;else e=this.currentRow;return e},this.updateRowLine=function(e,t){void 0===e&&(e=this.getDocumentRow());var n=e===this.session.getLength()-1?this.EOF:this.EOL;if(this.wrapIndent=0,this.line=this.session.getLine(e),this.isRtlDir=this.$isRtl||this.line.charAt(0)===this.RLE,this.session.$useWrapMode){var o=this.session.$wrapData[e];o&&(void 0===t&&(t=this.getSplitIndex()),t>0&&o.length?(this.wrapIndent=o.indent,this.wrapOffset=this.wrapIndent*this.charWidths[r.L],this.line=tt?this.session.getOverwrite()?e:e-1:t,i=r.getVisualFromLogicalIdx(n,this.bidiMap),o=this.bidiMap.bidiLevels,a=0;!this.session.getOverwrite()&&e<=t&&o[i]%2!==0&&i++;for(var s=0;st&&o[i]%2===0&&(a+=this.charWidths[o[i]]),this.wrapIndent&&(a+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset),this.isRtlDir&&(a+=this.rtlLineOffset),a},this.getSelections=function(e,t){var n,r=this.bidiMap,i=r.bidiLevels,o=[],a=0,s=Math.min(e,t)-this.wrapIndent,l=Math.max(e,t)-this.wrapIndent,c=!1,u=!1,d=0;this.wrapIndent&&(a+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);for(var f,h=0;h=s&&fn+o/2;){if(n+=o,r===i.length-1){o=0;break}o=this.charWidths[i[++r]]}return r>0&&i[r-1]%2!==0&&i[r]%2===0?(e0&&i[r-1]%2===0&&i[r]%2!==0?t=1+(e>n?this.bidiMap.logicalFromVisual[r]:this.bidiMap.logicalFromVisual[r-1]):this.isRtlDir&&r===i.length-1&&0===o&&i[r-1]%2===0||!this.isRtlDir&&0===r&&i[r]%2!==0?t=1+this.bidiMap.logicalFromVisual[r]:(r>0&&i[r-1]%2!==0&&0!==o&&r--,t=this.bidiMap.logicalFromVisual[r]),0===t&&this.isRtlDir&&t++,t+this.wrapIndent}}).call(a.prototype),t.BidiHandler=a})),ace.define("ace/selection",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/range"],(function(e,t,n){"use strict";var r=e("./lib/oop"),i=e("./lib/lang"),o=e("./lib/event_emitter").EventEmitter,a=e("./range").Range,s=function(e){this.session=e,this.doc=e.getDocument(),this.clearSelection(),this.cursor=this.lead=this.doc.createAnchor(0,0),this.anchor=this.doc.createAnchor(0,0),this.$silent=!1;var t=this;this.cursor.on("change",(function(e){t.$cursorChanged=!0,t.$silent||t._emit("changeCursor"),t.$isEmpty||t.$silent||t._emit("changeSelection"),t.$keepDesiredColumnOnChange||e.old.column==e.value.column||(t.$desiredColumn=null)})),this.anchor.on("change",(function(){t.$anchorChanged=!0,t.$isEmpty||t.$silent||t._emit("changeSelection")}))};(function(){r.implement(this,o),this.isEmpty=function(){return this.$isEmpty||this.anchor.row==this.lead.row&&this.anchor.column==this.lead.column},this.isMultiLine=function(){return!this.$isEmpty&&this.anchor.row!=this.cursor.row},this.getCursor=function(){return this.lead.getPosition()},this.setSelectionAnchor=function(e,t){this.$isEmpty=!1,this.anchor.setPosition(e,t)},this.getAnchor=this.getSelectionAnchor=function(){return this.$isEmpty?this.getSelectionLead():this.anchor.getPosition()},this.getSelectionLead=function(){return this.lead.getPosition()},this.isBackwards=function(){var e=this.anchor,t=this.lead;return e.row>t.row||e.row==t.row&&e.column>t.column},this.getRange=function(){var e=this.anchor,t=this.lead;return this.$isEmpty?a.fromPoints(t,t):this.isBackwards()?a.fromPoints(t,e):a.fromPoints(e,t)},this.clearSelection=function(){this.$isEmpty||(this.$isEmpty=!0,this._emit("changeSelection"))},this.selectAll=function(){this.$setSelection(0,0,Number.MAX_VALUE,Number.MAX_VALUE)},this.setRange=this.setSelectionRange=function(e,t){var n=t?e.end:e.start,r=t?e.start:e.end;this.$setSelection(n.row,n.column,r.row,r.column)},this.$setSelection=function(e,t,n,r){if(!this.$silent){var i=this.$isEmpty,o=this.inMultiSelectMode;this.$silent=!0,this.$cursorChanged=this.$anchorChanged=!1,this.anchor.setPosition(e,t),this.cursor.setPosition(n,r),this.$isEmpty=!a.comparePoints(this.anchor,this.cursor),this.$silent=!1,this.$cursorChanged&&this._emit("changeCursor"),(this.$cursorChanged||this.$anchorChanged||i!=this.$isEmpty||o)&&this._emit("changeSelection")}},this.$moveSelection=function(e){var t=this.lead;this.$isEmpty&&this.setSelectionAnchor(t.row,t.column),e.call(this)},this.selectTo=function(e,t){this.$moveSelection((function(){this.moveCursorTo(e,t)}))},this.selectToPosition=function(e){this.$moveSelection((function(){this.moveCursorToPosition(e)}))},this.moveTo=function(e,t){this.clearSelection(),this.moveCursorTo(e,t)},this.moveToPosition=function(e){this.clearSelection(),this.moveCursorToPosition(e)},this.selectUp=function(){this.$moveSelection(this.moveCursorUp)},this.selectDown=function(){this.$moveSelection(this.moveCursorDown)},this.selectRight=function(){this.$moveSelection(this.moveCursorRight)},this.selectLeft=function(){this.$moveSelection(this.moveCursorLeft)},this.selectLineStart=function(){this.$moveSelection(this.moveCursorLineStart)},this.selectLineEnd=function(){this.$moveSelection(this.moveCursorLineEnd)},this.selectFileEnd=function(){this.$moveSelection(this.moveCursorFileEnd)},this.selectFileStart=function(){this.$moveSelection(this.moveCursorFileStart)},this.selectWordRight=function(){this.$moveSelection(this.moveCursorWordRight)},this.selectWordLeft=function(){this.$moveSelection(this.moveCursorWordLeft)},this.getWordRange=function(e,t){if("undefined"==typeof t){var n=e||this.lead;e=n.row,t=n.column}return this.session.getWordRange(e,t)},this.selectWord=function(){this.setSelectionRange(this.getWordRange())},this.selectAWord=function(){var e=this.getCursor(),t=this.session.getAWordRange(e.row,e.column);this.setSelectionRange(t)},this.getLineRange=function(e,t){var n,r="number"==typeof e?e:this.lead.row,i=this.session.getFoldLine(r);return i?(r=i.start.row,n=i.end.row):n=r,!0===t?new a(r,0,n,this.session.getLine(n).length):new a(r,0,n+1,0)},this.selectLine=function(){this.setSelectionRange(this.getLineRange())},this.moveCursorUp=function(){this.moveCursorBy(-1,0)},this.moveCursorDown=function(){this.moveCursorBy(1,0)},this.wouldMoveIntoSoftTab=function(e,t,n){var r=e.column,i=e.column+t;return n<0&&(r=e.column-t,i=e.column),this.session.isTabStop(e)&&this.doc.getLine(e.row).slice(r,i).split(" ").length-1==t},this.moveCursorLeft=function(){var e,t=this.lead.getPosition();if(e=this.session.getFoldAt(t.row,t.column,-1))this.moveCursorTo(e.start.row,e.start.column);else if(0===t.column)t.row>0&&this.moveCursorTo(t.row-1,this.doc.getLine(t.row-1).length);else{var n=this.session.getTabSize();this.wouldMoveIntoSoftTab(t,n,-1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,-n):this.moveCursorBy(0,-1)}},this.moveCursorRight=function(){var e,t=this.lead.getPosition();if(e=this.session.getFoldAt(t.row,t.column,1))this.moveCursorTo(e.end.row,e.end.column);else if(this.lead.column==this.doc.getLine(this.lead.row).length)this.lead.row0&&(t.column=r)}}this.moveCursorTo(t.row,t.column)},this.moveCursorFileEnd=function(){var e=this.doc.getLength()-1,t=this.doc.getLine(e).length;this.moveCursorTo(e,t)},this.moveCursorFileStart=function(){this.moveCursorTo(0,0)},this.moveCursorLongWordRight=function(){var e=this.lead.row,t=this.lead.column,n=this.doc.getLine(e),r=n.substring(t);this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;var i=this.session.getFoldAt(e,t,1);if(i)this.moveCursorTo(i.end.row,i.end.column);else{if(this.session.nonTokenRe.exec(r)&&(t+=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0,r=n.substring(t)),t>=n.length)return this.moveCursorTo(e,n.length),this.moveCursorRight(),void(e0&&this.moveCursorWordLeft());this.session.tokenRe.exec(o)&&(n-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(t,n)}},this.$shortWordEndIndex=function(e){var t,n=0,r=/\s/,i=this.session.tokenRe;if(i.lastIndex=0,this.session.tokenRe.exec(e))n=this.session.tokenRe.lastIndex;else{for(;(t=e[n])&&r.test(t);)n++;if(n<1)for(i.lastIndex=0;(t=e[n])&&!i.test(t);)if(i.lastIndex=0,n++,r.test(t)){if(n>2){n--;break}for(;(t=e[n])&&r.test(t);)n++;if(n>2)break}}return i.lastIndex=0,n},this.moveCursorShortWordRight=function(){var e=this.lead.row,t=this.lead.column,n=this.doc.getLine(e),r=n.substring(t),i=this.session.getFoldAt(e,t,1);if(i)return this.moveCursorTo(i.end.row,i.end.column);if(t==n.length){var o=this.doc.getLength();do{e++,r=this.doc.getLine(e)}while(e0&&/^\s*$/.test(r));n=r.length,/\s+$/.test(r)||(r="")}var o=i.stringReverse(r),a=this.$shortWordEndIndex(o);return this.moveCursorTo(t,n-a)},this.moveCursorWordRight=function(){this.session.$selectLongWords?this.moveCursorLongWordRight():this.moveCursorShortWordRight()},this.moveCursorWordLeft=function(){this.session.$selectLongWords?this.moveCursorLongWordLeft():this.moveCursorShortWordLeft()},this.moveCursorBy=function(e,t){var n,r=this.session.documentToScreenPosition(this.lead.row,this.lead.column);if(0===t&&(0!==e&&(this.session.$bidiHandler.isBidiRow(r.row,this.lead.row)?(n=this.session.$bidiHandler.getPosLeft(r.column),r.column=Math.round(n/this.session.$bidiHandler.charWidths[0])):n=r.column*this.session.$bidiHandler.charWidths[0]),this.$desiredColumn?r.column=this.$desiredColumn:this.$desiredColumn=r.column),0!=e&&this.session.lineWidgets&&this.session.lineWidgets[this.lead.row]){var i=this.session.lineWidgets[this.lead.row];e<0?e-=i.rowsAbove||0:e>0&&(e+=i.rowCount-(i.rowsAbove||0))}var o=this.session.screenToDocumentPosition(r.row+e,r.column,n);0!==e&&0===t&&o.row===this.lead.row&&(o.column,this.lead.column),this.moveCursorTo(o.row,o.column+t,0===t)},this.moveCursorToPosition=function(e){this.moveCursorTo(e.row,e.column)},this.moveCursorTo=function(e,t,n){var r=this.session.getFoldAt(e,t,1);r&&(e=r.start.row,t=r.start.column),this.$keepDesiredColumnOnChange=!0;var i=this.session.getLine(e);/[\uDC00-\uDFFF]/.test(i.charAt(t))&&i.charAt(t-1)&&(this.lead.row==e&&this.lead.column==t+1?t-=1:t+=1),this.lead.setPosition(e,t),this.$keepDesiredColumnOnChange=!1,n||(this.$desiredColumn=null)},this.moveCursorToScreen=function(e,t,n){var r=this.session.screenToDocumentPosition(e,t);this.moveCursorTo(r.row,r.column,n)},this.detach=function(){this.lead.detach(),this.anchor.detach(),this.session=this.doc=null},this.fromOrientedRange=function(e){this.setSelectionRange(e,e.cursor==e.start),this.$desiredColumn=e.desiredColumn||this.$desiredColumn},this.toOrientedRange=function(e){var t=this.getRange();return e?(e.start.column=t.start.column,e.start.row=t.start.row,e.end.column=t.end.column,e.end.row=t.end.row):e=t,e.cursor=this.isBackwards()?e.start:e.end,e.desiredColumn=this.$desiredColumn,e},this.getRangeOfMovements=function(e){var t=this.getCursor();try{e(this);var n=this.getCursor();return a.fromPoints(t,n)}catch(r){return a.fromPoints(t,t)}finally{this.moveCursorToPosition(t)}},this.toJSON=function(){if(this.rangeCount)var e=this.ranges.map((function(e){var t=e.clone();return t.isBackwards=e.cursor==e.start,t}));else(e=this.getRange()).isBackwards=this.isBackwards();return e},this.fromJSON=function(e){if(void 0==e.start){if(this.rangeList&&e.length>1){this.toSingleRange(e[0]);for(var t=e.length;t--;){var n=a.fromPoints(e[t].start,e[t].end);e[t].isBackwards&&(n.cursor=n.start),this.addRange(n,!0)}return}e=e[0]}this.rangeList&&this.toSingleRange(e),this.setSelectionRange(e,e.isBackwards)},this.isEqual=function(e){if((e.length||this.rangeCount)&&e.length!=this.rangeCount)return!1;if(!e.length||!this.ranges)return this.getRange().isEqual(e);for(var t=this.ranges.length;t--;)if(!this.ranges[t].isEqual(e[t]))return!1;return!0}}).call(s.prototype),t.Selection=s})),ace.define("ace/tokenizer",["require","exports","module","ace/config"],(function(e,t,n){"use strict";var r=e("./config"),i=2e3,o=function(e){for(var t in this.states=e,this.regExps={},this.matchMappings={},this.states){for(var n=this.states[t],r=[],i=0,o=this.matchMappings[t]={defaultToken:"text"},a="g",s=[],l=0;l1?this.$applyToken:c.token),d>1&&(/\\\d/.test(c.regex)?u=c.regex.replace(/\\([0-9]+)/g,(function(e,t){return"\\"+(parseInt(t,10)+i+1)})):(d=1,u=this.removeCapturingGroups(c.regex)),c.splitRegex||"string"==typeof c.token||s.push(c)),o[i]=l,i+=d,r.push(u),c.onMatch||(c.onMatch=null)}}r.length||(o[0]=0,r.push("$")),s.forEach((function(e){e.splitRegex=this.createSplitterRegexp(e.regex,a)}),this),this.regExps[t]=new RegExp("("+r.join(")|(")+")|($)",a)}};(function(){this.$setMaxTokenCount=function(e){i=0|e},this.$applyToken=function(e){var t=this.splitRegex.exec(e).slice(1),n=this.token.apply(this,t);if("string"===typeof n)return[{type:n,value:e}];for(var r=[],i=0,o=n.length;iu){var v=e.substring(u,g-m.length);f.type==h?f.value+=v:(f.type&&c.push(f),f={type:h,value:v})}for(var y=0;yi){for(d>2*e.length&&this.reportError("infinite loop with in ace tokenizer",{startState:t,line:e});u1&&n[0]!==r&&n.unshift("#tmp",r),{tokens:c,state:n.length?n:r}},this.reportError=r.reportError}).call(o.prototype),t.Tokenizer=o})),ace.define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/lang"],(function(e,t,n){"use strict";var r=e("../lib/lang"),i=function(){this.$rules={start:[{token:"empty_line",regex:"^$"},{defaultToken:"text"}]}};(function(){this.addRules=function(e,t){if(t)for(var n in e){for(var r=e[n],i=0;i=this.$rowTokens.length;){if(this.$row+=1,e||(e=this.$session.getLength()),this.$row>=e)return this.$row=e-1,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=0}return this.$rowTokens[this.$tokenIndex]},this.getCurrentToken=function(){return this.$rowTokens[this.$tokenIndex]},this.getCurrentTokenRow=function(){return this.$row},this.getCurrentTokenColumn=function(){var e=this.$rowTokens,t=this.$tokenIndex,n=e[t].start;if(void 0!==n)return n;for(n=0;t>0;)n+=e[t-=1].value.length;return n},this.getCurrentTokenPosition=function(){return{row:this.$row,column:this.getCurrentTokenColumn()}},this.getCurrentTokenRange=function(){var e=this.$rowTokens[this.$tokenIndex],t=this.getCurrentTokenColumn();return new r(this.$row,t,this.$row,t+e.value.length)}}).call(i.prototype),t.TokenIterator=i})),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],(function(e,t,n){"use strict";var r,i=e("../../lib/oop"),o=e("../behaviour").Behaviour,a=e("../../token_iterator").TokenIterator,s=e("../../lib/lang"),l=["text","paren.rparen","rparen","paren","punctuation.operator"],c=["text","paren.rparen","rparen","paren","punctuation.operator","comment"],u={},d={'"':'"',"'":"'"},f=function(e){var t=-1;if(e.multiSelect&&(t=e.selection.index,u.rangeCount!=e.multiSelect.rangeCount&&(u={rangeCount:e.multiSelect.rangeCount})),u[t])return r=u[t];r=u[t]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""}},h=function(e,t,n,r){var i=e.end.row-e.start.row;return{text:n+t+r,selection:[0,e.start.column+1,i,e.end.column+(i?0:1)]}},p=function e(t){this.add("braces","insertion",(function(n,i,o,a,l){var c=o.getCursorPosition(),u=a.doc.getLine(c.row);if("{"==l){f(o);var d=o.getSelectionRange(),p=a.doc.getTextRange(d);if(""!==p&&"{"!==p&&o.getWrapBehavioursEnabled())return h(d,p,"{","}");if(e.isSaneInsertion(o,a))return/[\]\}\)]/.test(u[c.column])||o.inMultiSelectMode||t&&t.braces?(e.recordAutoInsert(o,a,"}"),{text:"{}",selection:[1,1]}):(e.recordMaybeInsert(o,a,"{"),{text:"{",selection:[1,1]})}else if("}"==l){if(f(o),"}"==u.substring(c.column,c.column+1))if(null!==a.$findOpeningBracket("}",{column:c.column+1,row:c.row})&&e.isAutoInsertedClosing(c,u,l))return e.popAutoInsertedClosing(),{text:"",selection:[1,1]}}else{if("\n"==l||"\r\n"==l){f(o);var m="";if(e.isMaybeInsertedClosing(c,u)&&(m=s.stringRepeat("}",r.maybeInsertedBrackets),e.clearMaybeInsertedClosing()),"}"===u.substring(c.column,c.column+1)){var g=a.findMatchingBracket({row:c.row,column:c.column+1},"}");if(!g)return null;var v=this.$getIndent(a.getLine(g.row))}else{if(!m)return void e.clearMaybeInsertedClosing();v=this.$getIndent(u)}var y=v+a.getTabString();return{text:"\n"+y+"\n"+v+m,selection:[1,y.length,1,y.length]}}e.clearMaybeInsertedClosing()}})),this.add("braces","deletion",(function(e,t,n,i,o){var a=i.doc.getTextRange(o);if(!o.isMultiLine()&&"{"==a){if(f(n),"}"==i.doc.getLine(o.start.row).substring(o.end.column,o.end.column+1))return o.end.column++,o;r.maybeInsertedBrackets--}})),this.add("parens","insertion",(function(t,n,r,i,o){if("("==o){f(r);var a=r.getSelectionRange(),s=i.doc.getTextRange(a);if(""!==s&&r.getWrapBehavioursEnabled())return h(a,s,"(",")");if(e.isSaneInsertion(r,i))return e.recordAutoInsert(r,i,")"),{text:"()",selection:[1,1]}}else if(")"==o){f(r);var l=r.getCursorPosition(),c=i.doc.getLine(l.row);if(")"==c.substring(l.column,l.column+1))if(null!==i.$findOpeningBracket(")",{column:l.column+1,row:l.row})&&e.isAutoInsertedClosing(l,c,o))return e.popAutoInsertedClosing(),{text:"",selection:[1,1]}}})),this.add("parens","deletion",(function(e,t,n,r,i){var o=r.doc.getTextRange(i);if(!i.isMultiLine()&&"("==o&&(f(n),")"==r.doc.getLine(i.start.row).substring(i.start.column+1,i.start.column+2)))return i.end.column++,i})),this.add("brackets","insertion",(function(t,n,r,i,o){if("["==o){f(r);var a=r.getSelectionRange(),s=i.doc.getTextRange(a);if(""!==s&&r.getWrapBehavioursEnabled())return h(a,s,"[","]");if(e.isSaneInsertion(r,i))return e.recordAutoInsert(r,i,"]"),{text:"[]",selection:[1,1]}}else if("]"==o){f(r);var l=r.getCursorPosition(),c=i.doc.getLine(l.row);if("]"==c.substring(l.column,l.column+1))if(null!==i.$findOpeningBracket("]",{column:l.column+1,row:l.row})&&e.isAutoInsertedClosing(l,c,o))return e.popAutoInsertedClosing(),{text:"",selection:[1,1]}}})),this.add("brackets","deletion",(function(e,t,n,r,i){var o=r.doc.getTextRange(i);if(!i.isMultiLine()&&"["==o&&(f(n),"]"==r.doc.getLine(i.start.row).substring(i.start.column+1,i.start.column+2)))return i.end.column++,i})),this.add("string_dquotes","insertion",(function(e,t,n,r,i){var o=r.$mode.$quotes||d;if(1==i.length&&o[i]){if(this.lineCommentStart&&-1!=this.lineCommentStart.indexOf(i))return;f(n);var a=i,s=n.getSelectionRange(),l=r.doc.getTextRange(s);if(!(""===l||1==l.length&&o[l])&&n.getWrapBehavioursEnabled())return h(s,l,a,a);if(!l){var c=n.getCursorPosition(),u=r.doc.getLine(c.row),p=u.substring(c.column-1,c.column),m=u.substring(c.column,c.column+1),g=r.getTokenAt(c.row,c.column),v=r.getTokenAt(c.row,c.column+1);if("\\"==p&&g&&/escape/.test(g.type))return null;var y,b=g&&/string|escape/.test(g.type),x=!v||/string|escape/.test(v.type);if(m==a)(y=b!==x)&&/string\.end/.test(v.type)&&(y=!1);else{if(b&&!x)return null;if(b&&x)return null;var w=r.$mode.tokenRe;w.lastIndex=0;var k=w.test(p);w.lastIndex=0;var _=w.test(p);if(k||_)return null;if(m&&!/[\s;,.})\]\\]/.test(m))return null;var S=u[c.column-2];if(p==a&&(S==a||w.test(S)))return null;y=!0}return{text:y?a+a:"",selection:[1,1]}}}})),this.add("string_dquotes","deletion",(function(e,t,n,r,i){var o=r.$mode.$quotes||d,a=r.doc.getTextRange(i);if(!i.isMultiLine()&&o.hasOwnProperty(a)&&(f(n),r.doc.getLine(i.start.row).substring(i.start.column+1,i.start.column+2)==a))return i.end.column++,i}))};p.isSaneInsertion=function(e,t){var n=e.getCursorPosition(),r=new a(t,n.row,n.column);if(!this.$matchTokenType(r.getCurrentToken()||"text",l)){if(/[)}\]]/.test(e.session.getLine(n.row)[n.column]))return!0;var i=new a(t,n.row,n.column+1);if(!this.$matchTokenType(i.getCurrentToken()||"text",l))return!1}return r.stepForward(),r.getCurrentTokenRow()!==n.row||this.$matchTokenType(r.getCurrentToken()||"text",c)},p.$matchTokenType=function(e,t){return t.indexOf(e.type||e)>-1},p.recordAutoInsert=function(e,t,n){var i=e.getCursorPosition(),o=t.doc.getLine(i.row);this.isAutoInsertedClosing(i,o,r.autoInsertedLineEnd[0])||(r.autoInsertedBrackets=0),r.autoInsertedRow=i.row,r.autoInsertedLineEnd=n+o.substr(i.column),r.autoInsertedBrackets++},p.recordMaybeInsert=function(e,t,n){var i=e.getCursorPosition(),o=t.doc.getLine(i.row);this.isMaybeInsertedClosing(i,o)||(r.maybeInsertedBrackets=0),r.maybeInsertedRow=i.row,r.maybeInsertedLineStart=o.substr(0,i.column)+n,r.maybeInsertedLineEnd=o.substr(i.column),r.maybeInsertedBrackets++},p.isAutoInsertedClosing=function(e,t,n){return r.autoInsertedBrackets>0&&e.row===r.autoInsertedRow&&n===r.autoInsertedLineEnd[0]&&t.substr(e.column)===r.autoInsertedLineEnd},p.isMaybeInsertedClosing=function(e,t){return r.maybeInsertedBrackets>0&&e.row===r.maybeInsertedRow&&t.substr(e.column)===r.maybeInsertedLineEnd&&t.substr(0,e.column)==r.maybeInsertedLineStart},p.popAutoInsertedClosing=function(){r.autoInsertedLineEnd=r.autoInsertedLineEnd.substr(1),r.autoInsertedBrackets--},p.clearMaybeInsertedClosing=function(){r&&(r.maybeInsertedBrackets=0,r.maybeInsertedRow=-1)},i.inherits(p,o),t.CstyleBehaviour=p})),ace.define("ace/unicode",["require","exports","module"],(function(e,t,n){"use strict";for(var r=[48,9,8,25,5,0,2,25,48,0,11,0,5,0,6,22,2,30,2,457,5,11,15,4,8,0,2,0,18,116,2,1,3,3,9,0,2,2,2,0,2,19,2,82,2,138,2,4,3,155,12,37,3,0,8,38,10,44,2,0,2,1,2,1,2,0,9,26,6,2,30,10,7,61,2,9,5,101,2,7,3,9,2,18,3,0,17,58,3,100,15,53,5,0,6,45,211,57,3,18,2,5,3,11,3,9,2,1,7,6,2,2,2,7,3,1,3,21,2,6,2,0,4,3,3,8,3,1,3,3,9,0,5,1,2,4,3,11,16,2,2,5,5,1,3,21,2,6,2,1,2,1,2,1,3,0,2,4,5,1,3,2,4,0,8,3,2,0,8,15,12,2,2,8,2,2,2,21,2,6,2,1,2,4,3,9,2,2,2,2,3,0,16,3,3,9,18,2,2,7,3,1,3,21,2,6,2,1,2,4,3,8,3,1,3,2,9,1,5,1,2,4,3,9,2,0,17,1,2,5,4,2,2,3,4,1,2,0,2,1,4,1,4,2,4,11,5,4,4,2,2,3,3,0,7,0,15,9,18,2,2,7,2,2,2,22,2,9,2,4,4,7,2,2,2,3,8,1,2,1,7,3,3,9,19,1,2,7,2,2,2,22,2,9,2,4,3,8,2,2,2,3,8,1,8,0,2,3,3,9,19,1,2,7,2,2,2,22,2,15,4,7,2,2,2,3,10,0,9,3,3,9,11,5,3,1,2,17,4,23,2,8,2,0,3,6,4,0,5,5,2,0,2,7,19,1,14,57,6,14,2,9,40,1,2,0,3,1,2,0,3,0,7,3,2,6,2,2,2,0,2,0,3,1,2,12,2,2,3,4,2,0,2,5,3,9,3,1,35,0,24,1,7,9,12,0,2,0,2,0,5,9,2,35,5,19,2,5,5,7,2,35,10,0,58,73,7,77,3,37,11,42,2,0,4,328,2,3,3,6,2,0,2,3,3,40,2,3,3,32,2,3,3,6,2,0,2,3,3,14,2,56,2,3,3,66,5,0,33,15,17,84,13,619,3,16,2,25,6,74,22,12,2,6,12,20,12,19,13,12,2,2,2,1,13,51,3,29,4,0,5,1,3,9,34,2,3,9,7,87,9,42,6,69,11,28,4,11,5,11,11,39,3,4,12,43,5,25,7,10,38,27,5,62,2,28,3,10,7,9,14,0,89,75,5,9,18,8,13,42,4,11,71,55,9,9,4,48,83,2,2,30,14,230,23,280,3,5,3,37,3,5,3,7,2,0,2,0,2,0,2,30,3,52,2,6,2,0,4,2,2,6,4,3,3,5,5,12,6,2,2,6,67,1,20,0,29,0,14,0,17,4,60,12,5,0,4,11,18,0,5,0,3,9,2,0,4,4,7,0,2,0,2,0,2,3,2,10,3,3,6,4,5,0,53,1,2684,46,2,46,2,132,7,6,15,37,11,53,10,0,17,22,10,6,2,6,2,6,2,6,2,6,2,6,2,6,2,6,2,31,48,0,470,1,36,5,2,4,6,1,5,85,3,1,3,2,2,89,2,3,6,40,4,93,18,23,57,15,513,6581,75,20939,53,1164,68,45,3,268,4,27,21,31,3,13,13,1,2,24,9,69,11,1,38,8,3,102,3,1,111,44,25,51,13,68,12,9,7,23,4,0,5,45,3,35,13,28,4,64,15,10,39,54,10,13,3,9,7,22,4,1,5,66,25,2,227,42,2,1,3,9,7,11171,13,22,5,48,8453,301,3,61,3,105,39,6,13,4,6,11,2,12,2,4,2,0,2,1,2,1,2,107,34,362,19,63,3,53,41,11,5,15,17,6,13,1,25,2,33,4,2,134,20,9,8,25,5,0,2,25,12,88,4,5,3,5,3,5,3,2],i=0,o=[],a=0;a2?r%c!=c-1:r%c==0})}else{if(!this.blockComment)return!1;var h=this.blockComment.start,p=this.blockComment.end,m=new RegExp("^(\\s*)(?:"+l.escapeRegExp(h)+")"),g=new RegExp("(?:"+l.escapeRegExp(p)+")\\s*$"),v=function(e,t){b(e,t)||o&&!/\S/.test(e)||(i.insertInLine({row:t,column:e.length},p),i.insertInLine({row:t,column:s},h))},y=function(e,t){var n;(n=e.match(g))&&i.removeInLine(t,e.length-n[0].length,e.length),(n=e.match(m))&&i.removeInLine(t,n[1].length,n[0].length)},b=function(e,n){if(m.test(e))return!0;for(var r=t.getTokens(n),i=0;ie.length&&(w=e.length)})),s==1/0&&(s=w,o=!1,a=!1),u&&s%c!=0&&(s=Math.floor(s/c)*c),x(a?y:v)},this.toggleBlockComment=function(e,t,n,r){var i=this.blockComment;if(i){!i.start&&i[0]&&(i=i[0]);var o,a,s=(m=new c(t,r.row,r.column)).getCurrentToken(),l=(t.selection,t.selection.toOrientedRange());if(s&&/comment/.test(s.type)){for(var d,f;s&&/comment/.test(s.type);){if(-1!=(g=s.value.indexOf(i.start))){var h=m.getCurrentTokenRow(),p=m.getCurrentTokenColumn()+g;d=new u(h,p,h,p+i.start.length);break}s=m.stepBackward()}var m;for(s=(m=new c(t,r.row,r.column)).getCurrentToken();s&&/comment/.test(s.type);){var g;if(-1!=(g=s.value.indexOf(i.end))){h=m.getCurrentTokenRow(),p=m.getCurrentTokenColumn()+g;f=new u(h,p,h,p+i.end.length);break}s=m.stepForward()}f&&t.remove(f),d&&(t.remove(d),o=d.start.row,a=-i.start.length)}else a=i.start.length,o=n.start.row,t.insert(n.end,i.end),t.insert(n.start,i.start);l.start.row==o&&(l.start.column+=a),l.end.row==o&&(l.end.column+=a),t.selection.fromOrientedRange(l)}},this.getNextLineIndent=function(e,t,n){return this.$getIndent(t)},this.checkOutdent=function(e,t,n){return!1},this.autoOutdent=function(e,t,n){},this.$getIndent=function(e){return e.match(/^\s*/)[0]},this.createWorker=function(e){return null},this.createModeDelegates=function(e){for(var t in this.$embeds=[],this.$modes={},e)if(e[t]){var n=e[t],i=n.prototype.$id,o=r.$modes[i];o||(r.$modes[i]=o=new n),r.$modes[t]||(r.$modes[t]=o),this.$embeds.push(t),this.$modes[t]=o}var a=["toggleBlockComment","toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"];for(t=0;tthis.row)){var n=function(t,n,r){var i="insert"==t.action,o=(i?1:-1)*(t.end.row-t.start.row),a=(i?1:-1)*(t.end.column-t.start.column),s=t.start,l=i?s:t.end;if(e(n,s,r))return{row:n.row,column:n.column};if(e(l,n,!r))return{row:n.row+o,column:n.column+(n.row==l.row?a:0)};return{row:s.row,column:s.column}}(t,{row:this.row,column:this.column},this.$insertRight);this.setPosition(n.row,n.column,!0)}},this.setPosition=function(e,t,n){var r;if(r=n?{row:e,column:t}:this.$clipPositionToDocument(e,t),this.row!=r.row||this.column!=r.column){var i={row:this.row,column:this.column};this.row=r.row,this.column=r.column,this._signal("change",{old:i,value:r})}},this.detach=function(){this.document.off("change",this.$onChange)},this.attach=function(e){this.document=e||this.document,this.document.on("change",this.$onChange)},this.$clipPositionToDocument=function(e,t){var n={};return e>=this.document.getLength()?(n.row=Math.max(0,this.document.getLength()-1),n.column=this.document.getLine(n.row).length):e<0?(n.row=0,n.column=0):(n.row=e,n.column=Math.min(this.document.getLine(n.row).length,Math.max(0,t))),t<0&&(n.column=0),n}}).call(o.prototype)})),ace.define("ace/document",["require","exports","module","ace/lib/oop","ace/apply_delta","ace/lib/event_emitter","ace/range","ace/anchor"],(function(e,t,n){"use strict";var r=e("./lib/oop"),i=e("./apply_delta").applyDelta,o=e("./lib/event_emitter").EventEmitter,a=e("./range").Range,s=e("./anchor").Anchor,l=function(e){this.$lines=[""],0===e.length?this.$lines=[""]:Array.isArray(e)?this.insertMergedLines({row:0,column:0},e):this.insert({row:0,column:0},e)};(function(){r.implement(this,o),this.setValue=function(e){var t=this.getLength()-1;this.remove(new a(0,0,t,this.getLine(t).length)),this.insert({row:0,column:0},e)},this.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},this.createAnchor=function(e,t){return new s(this,e,t)},0==="aaa".split(/a/).length?this.$split=function(e){return e.replace(/\r\n|\r/g,"\n").split("\n")}:this.$split=function(e){return e.split(/\r\n|\r|\n/)},this.$detectNewLine=function(e){var t=e.match(/^.*?(\r\n|\r|\n)/m);this.$autoNewLine=t?t[1]:"\n",this._signal("changeNewLineMode")},this.getNewLineCharacter=function(){switch(this.$newLineMode){case"windows":return"\r\n";case"unix":return"\n";default:return this.$autoNewLine||"\n"}},this.$autoNewLine="",this.$newLineMode="auto",this.setNewLineMode=function(e){this.$newLineMode!==e&&(this.$newLineMode=e,this._signal("changeNewLineMode"))},this.getNewLineMode=function(){return this.$newLineMode},this.isNewLine=function(e){return"\r\n"==e||"\r"==e||"\n"==e},this.getLine=function(e){return this.$lines[e]||""},this.getLines=function(e,t){return this.$lines.slice(e,t+1)},this.getAllLines=function(){return this.getLines(0,this.getLength())},this.getLength=function(){return this.$lines.length},this.getTextRange=function(e){return this.getLinesForRange(e).join(this.getNewLineCharacter())},this.getLinesForRange=function(e){var t;if(e.start.row===e.end.row)t=[this.getLine(e.start.row).substring(e.start.column,e.end.column)];else{(t=this.getLines(e.start.row,e.end.row))[0]=(t[0]||"").substring(e.start.column);var n=t.length-1;e.end.row-e.start.row==n&&(t[n]=t[n].substring(0,e.end.column))}return t},this.insertLines=function(e,t){return console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."),this.insertFullLines(e,t)},this.removeLines=function(e,t){return console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."),this.removeFullLines(e,t)},this.insertNewLine=function(e){return console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead."),this.insertMergedLines(e,["",""])},this.insert=function(e,t){return this.getLength()<=1&&this.$detectNewLine(t),this.insertMergedLines(e,this.$split(t))},this.insertInLine=function(e,t){var n=this.clippedPos(e.row,e.column),r=this.pos(e.row,e.column+t.length);return this.applyDelta({start:n,end:r,action:"insert",lines:[t]},!0),this.clonePos(r)},this.clippedPos=function(e,t){var n=this.getLength();void 0===e?e=n:e<0?e=0:e>=n&&(e=n-1,t=void 0);var r=this.getLine(e);return void 0==t&&(t=r.length),{row:e,column:t=Math.min(Math.max(t,0),r.length)}},this.clonePos=function(e){return{row:e.row,column:e.column}},this.pos=function(e,t){return{row:e,column:t}},this.$clipPosition=function(e){var t=this.getLength();return e.row>=t?(e.row=Math.max(0,t-1),e.column=this.getLine(t-1).length):(e.row=Math.max(0,e.row),e.column=Math.min(Math.max(e.column,0),this.getLine(e.row).length)),e},this.insertFullLines=function(e,t){var n=0;(e=Math.min(Math.max(e,0),this.getLength()))0,r=t=0&&this.applyDelta({start:this.pos(e,this.getLine(e).length),end:this.pos(e+1,0),action:"remove",lines:["",""]})},this.replace=function(e,t){return e instanceof a||(e=a.fromPoints(e.start,e.end)),0===t.length&&e.isEmpty()?e.start:t==this.getTextRange(e)?e.end:(this.remove(e),t?this.insert(e.start,t):e.start)},this.applyDeltas=function(e){for(var t=0;t=0;t--)this.revertDelta(e[t])},this.applyDelta=function(e,t){var n="insert"==e.action;(n?e.lines.length<=1&&!e.lines[0]:!a.comparePoints(e.start,e.end))||(n&&e.lines.length>2e4?this.$splitAndapplyLargeDelta(e,2e4):(i(this.$lines,e,t),this._signal("change",e)))},this.$safeApplyDelta=function(e){var t=this.$lines.length;("remove"==e.action&&e.start.row20){n.running=setTimeout(n.$worker,20);break}}n.currentLine=t,-1==r&&(r=t),o<=r&&n.fireUpdateEvent(o,r)}}};(function(){r.implement(this,i),this.setTokenizer=function(e){this.tokenizer=e,this.lines=[],this.states=[],this.start(0)},this.setDocument=function(e){this.doc=e,this.lines=[],this.states=[],this.stop()},this.fireUpdateEvent=function(e,t){var n={first:e,last:t};this._signal("update",{data:n})},this.start=function(e){this.currentLine=Math.min(e||0,this.currentLine,this.doc.getLength()),this.lines.splice(this.currentLine,this.lines.length),this.states.splice(this.currentLine,this.states.length),this.stop(),this.running=setTimeout(this.$worker,700)},this.scheduleStart=function(){this.running||(this.running=setTimeout(this.$worker,700))},this.$updateOnChange=function(e){var t=e.start.row,n=e.end.row-t;if(0===n)this.lines[t]=null;else if("remove"==e.action)this.lines.splice(t,n+1,null),this.states.splice(t,n+1,null);else{var r=Array(n+1);r.unshift(t,1),this.lines.splice.apply(this.lines,r),this.states.splice.apply(this.states,r)}this.currentLine=Math.min(t,this.currentLine,this.doc.getLength()),this.stop()},this.stop=function(){this.running&&clearTimeout(this.running),this.running=!1},this.getTokens=function(e){return this.lines[e]||this.$tokenizeRow(e)},this.getState=function(e){return this.currentLine==e&&this.$tokenizeRow(e),this.states[e]||"start"},this.$tokenizeRow=function(e){var t=this.doc.getLine(e),n=this.states[e-1],r=this.tokenizer.getLineTokens(t,n,e);return this.states[e]+""!==r.state+""?(this.states[e]=r.state,this.lines[e+1]=null,this.currentLine>e+1&&(this.currentLine=e+1)):this.currentLine==e&&(this.currentLine=e+1),this.lines[e]=r.tokens}}).call(o.prototype),t.BackgroundTokenizer=o})),ace.define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],(function(e,t,n){"use strict";var r=e("./lib/lang"),i=(e("./lib/oop"),e("./range").Range),o=function(e,t,n){this.setRegexp(e),this.clazz=t,this.type=n||"text"};(function(){this.MAX_RANGES=500,this.setRegexp=function(e){this.regExp+""!=e+""&&(this.regExp=e,this.cache=[])},this.update=function(e,t,n,o){if(this.regExp)for(var a=o.firstRow,s=o.lastRow,l=a;l<=s;l++){var c=this.cache[l];null==c&&((c=r.getMatchOffsets(n.getLine(l),this.regExp)).length>this.MAX_RANGES&&(c=c.slice(0,this.MAX_RANGES)),c=c.map((function(e){return new i(l,e.offset,l,e.offset+e.length)})),this.cache[l]=c.length?c:"");for(var u=c.length;u--;)t.drawSingleLineMarker(e,c[u].toScreenRange(n),this.clazz,o)}}}).call(o.prototype),t.SearchHighlight=o})),ace.define("ace/edit_session/fold_line",["require","exports","module","ace/range"],(function(e,t,n){"use strict";var r=e("../range").Range;function i(e,t){this.foldData=e,Array.isArray(t)?this.folds=t:t=this.folds=[t];var n=t[t.length-1];this.range=new r(t[0].start.row,t[0].start.column,n.end.row,n.end.column),this.start=this.range.start,this.end=this.range.end,this.folds.forEach((function(e){e.setFoldLine(this)}),this)}(function(){this.shiftRow=function(e){this.start.row+=e,this.end.row+=e,this.folds.forEach((function(t){t.start.row+=e,t.end.row+=e}))},this.addFold=function(e){if(e.sameRow){if(e.start.rowthis.endRow)throw new Error("Can't add a fold to this FoldLine as it has no connection");this.folds.push(e),this.folds.sort((function(e,t){return-e.range.compareEnd(t.start.row,t.start.column)})),this.range.compareEnd(e.start.row,e.start.column)>0?(this.end.row=e.end.row,this.end.column=e.end.column):this.range.compareStart(e.end.row,e.end.column)<0&&(this.start.row=e.start.row,this.start.column=e.start.column)}else if(e.start.row==this.end.row)this.folds.push(e),this.end.row=e.end.row,this.end.column=e.end.column;else{if(e.end.row!=this.start.row)throw new Error("Trying to add fold to FoldRow that doesn't have a matching row");this.folds.unshift(e),this.start.row=e.start.row,this.start.column=e.start.column}e.foldLine=this},this.containsRow=function(e){return e>=this.start.row&&e<=this.end.row},this.walk=function(e,t,n){var r,i,o=0,a=this.folds,s=!0;null==t&&(t=this.end.row,n=this.end.column);for(var l=0;l0)){var l=r(e,a.start);return 0===s?t&&0!==l?-o-2:o:l>0||0===l&&!t?o:-o-1}}return-o-1},this.add=function(e){var t=!e.isEmpty(),n=this.pointIndex(e.start,t);n<0&&(n=-n-1);var r=this.pointIndex(e.end,t,n);return r<0?r=-r-1:r++,this.ranges.splice(n,r-n,e)},this.addList=function(e){for(var t=[],n=e.length;n--;)t.push.apply(t,this.add(e[n]));return t},this.substractPoint=function(e){var t=this.pointIndex(e);if(t>=0)return this.ranges.splice(t,1)},this.merge=function(){for(var e,t=[],n=this.ranges,i=(n=n.sort((function(e,t){return r(e.start,t.start)})))[0],o=1;o=0},this.containsPoint=function(e){return this.pointIndex(e)>=0},this.rangeAtPoint=function(e){var t=this.pointIndex(e);if(t>=0)return this.ranges[t]},this.clipRows=function(e,t){var n=this.ranges;if(n[0].start.row>t||n[n.length-1].start.row=r)break}if("insert"==e.action)for(var l=i-r,c=-t.column+n.column;ar)break;if(u.start.row==r&&u.start.column>=t.column&&(u.start.column==t.column&&this.$bias<=0||(u.start.column+=c,u.start.row+=l)),u.end.row==r&&u.end.column>=t.column){if(u.end.column==t.column&&this.$bias<0)continue;u.end.column==t.column&&c>0&&au.start.column&&u.end.column==o[a+1].start.column&&(u.end.column-=c),u.end.column+=c,u.end.row+=l}}else for(l=r-i,c=t.column-n.column;ai)break;u.end.rowt.column)&&(u.end.column=t.column,u.end.row=t.row):(u.end.column+=c,u.end.row+=l):u.end.row>i&&(u.end.row+=l),u.start.rowt.column)&&(u.start.column=t.column,u.start.row=t.row):(u.start.column+=c,u.start.row+=l):u.start.row>i&&(u.start.row+=l)}if(0!=l&&a=e)return i;if(i.end.row>e)return null}return null},this.getNextFoldLine=function(e,t){var n=this.$foldData,r=0;for(t&&(r=n.indexOf(t)),-1==r&&(r=0);r=e)return i}return null},this.getFoldedRowCount=function(e,t){for(var n=this.$foldData,r=t-e+1,i=0;i=t){s=e?r-=t-s:r=0);break}a>=e&&(r-=s>=e?a-s:a-e+1)}return r},this.$addFoldLine=function(e){return this.$foldData.push(e),this.$foldData.sort((function(e,t){return e.start.row-t.start.row})),e},this.addFold=function(e,t){var n,r=this.$foldData,a=!1;e instanceof o?n=e:(n=new o(t,e)).collapseChildren=t.collapseChildren,this.$clipRangeToDocument(n.range);var s=n.start.row,l=n.start.column,c=n.end.row,u=n.end.column,d=this.getFoldAt(s,l,1),f=this.getFoldAt(c,u,-1);if(d&&f==d)return d.addSubFold(n);d&&!d.range.isStart(s,l)&&this.removeFold(d),f&&!f.range.isEnd(c,u)&&this.removeFold(f);var h=this.getFoldsInRange(n.range);h.length>0&&(this.removeFolds(h),n.collapseChildren||h.forEach((function(e){n.addSubFold(e)})));for(var p=0;p0&&this.foldAll(e.start.row+1,e.end.row,e.collapseChildren-1),e.subFolds=[]},this.expandFolds=function(e){e.forEach((function(e){this.expandFold(e)}),this)},this.unfold=function(e,t){var n,i;if(null==e?(n=new r(0,0,this.getLength(),0),null==t&&(t=!0)):n="number"==typeof e?new r(e,0,e,this.getLine(e).length):"row"in e?r.fromPoints(e,e):e,i=this.getFoldsInRangeList(n),0!=t?this.removeFolds(i):this.expandFolds(i),i.length)return i},this.isRowFolded=function(e,t){return!!this.getFoldLine(e,t)},this.getRowFoldEnd=function(e,t){var n=this.getFoldLine(e,t);return n?n.end.row:e},this.getRowFoldStart=function(e,t){var n=this.getFoldLine(e,t);return n?n.start.row:e},this.getFoldDisplayLine=function(e,t,n,r,i){null==r&&(r=e.start.row),null==i&&(i=0),null==t&&(t=e.end.row),null==n&&(n=this.getLine(t).length);var o=this.doc,a="";return e.walk((function(e,t,n,s){if(!(tu)break}while(o&&l.test(o.type));o=i.stepBackward()}else o=i.getCurrentToken();return c.end.row=i.getCurrentTokenRow(),c.end.column=i.getCurrentTokenColumn()+o.value.length-2,c}},this.foldAll=function(e,t,n,r){void 0==n&&(n=1e5);var i=this.foldWidgets;if(i){t=t||this.getLength();for(var o=e=e||0;o=e&&(o=a.end.row,a.collapseChildren=n,this.addFold("...",a))}}},this.foldToLevel=function(e){for(this.foldAll();e-- >0;)this.unfold(null,!1)},this.foldAllComments=function(){var e=this;this.foldAll(null,null,null,(function(t){for(var n=e.getTokens(t),r=0;r=0;){var o=n[i];if(null==o&&(o=n[i]=this.getFoldWidget(i)),"start"==o){var a=this.getFoldWidgetRange(i);if(r||(r=a),a&&a.end.row>=e)break}i--}return{range:-1!==i&&a,firstRange:r}},this.onFoldWidgetClick=function(e,t){var n={children:(t=t.domEvent).shiftKey,all:t.ctrlKey||t.metaKey,siblings:t.altKey};if(!this.$toggleFoldWidget(e,n)){var r=t.target||t.srcElement;r&&/ace_fold-widget/.test(r.className)&&(r.className+=" ace_invalid")}},this.$toggleFoldWidget=function(e,t){if(this.getFoldWidget){var n=this.getFoldWidget(e),r=this.getLine(e),i="end"===n?-1:1,o=this.getFoldAt(e,-1===i?0:r.length,i);if(o)return t.children||t.all?this.removeFold(o):this.expandFold(o),o;var a=this.getFoldWidgetRange(e,!0);if(a&&!a.isMultiLine()&&(o=this.getFoldAt(a.start.row,a.start.column,1))&&a.isEqual(o.range))return this.removeFold(o),o;if(t.siblings){var s=this.getParentFoldRangeData(e);if(s.range)var l=s.range.start.row+1,c=s.range.end.row;this.foldAll(l,c,t.all?1e4:0)}else t.children?(c=a?a.end.row:this.getLength(),this.foldAll(e+1,c,t.all?1e4:0)):a&&(t.all&&(a.collapseChildren=1e4),this.addFold("...",a));return a}},this.toggleFoldWidget=function(e){var t=this.selection.getCursor().row;t=this.getRowFoldStart(t);var n=this.$toggleFoldWidget(t,{});if(!n){var r=this.getParentFoldRangeData(t,!0);if(n=r.range||r.firstRange){t=n.start.row;var i=this.getFoldAt(t,this.getLine(t).length,1);i?this.removeFold(i):this.addFold("...",n)}}},this.updateFoldWidgets=function(e){var t=e.start.row,n=e.end.row-t;if(0===n)this.foldWidgets[t]=null;else if("remove"==e.action)this.foldWidgets.splice(t,n+1,null);else{var r=Array(n+1);r.unshift(t,1),this.foldWidgets.splice.apply(this.foldWidgets,r)}},this.tokenizerUpdateFoldWidgets=function(e){var t=e.data;t.first!=t.last&&this.foldWidgets.length>t.first&&this.foldWidgets.splice(t.first,this.foldWidgets.length)}}})),ace.define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"],(function(e,t,n){"use strict";var r=e("../token_iterator").TokenIterator,i=e("../range").Range;t.BracketMatch=function(){this.findMatchingBracket=function(e,t){if(0==e.column)return null;var n=t||this.getLine(e.row).charAt(e.column-1);if(""==n)return null;var r=n.match(/([\(\[\{])|([\)\]\}])/);return r?r[1]?this.$findClosingBracket(r[1],e):this.$findOpeningBracket(r[2],e):null},this.getBracketRange=function(e){var t,n=this.getLine(e.row),r=!0,o=n.charAt(e.column-1),a=o&&o.match(/([\(\[\{])|([\)\]\}])/);if(a||(o=n.charAt(e.column),e={row:e.row,column:e.column+1},a=o&&o.match(/([\(\[\{])|([\)\]\}])/),r=!1),!a)return null;if(a[1]){if(!(s=this.$findClosingBracket(a[1],e)))return null;t=i.fromPoints(e,s),r||(t.end.column++,t.start.column--),t.cursor=t.end}else{var s;if(!(s=this.$findOpeningBracket(a[2],e)))return null;t=i.fromPoints(s,e),r||(t.start.column++,t.end.column--),t.cursor=t.start}return t},this.getMatchingBracketRanges=function(e){var t=this.getLine(e.row),n=t.charAt(e.column-1),r=n&&n.match(/([\(\[\{])|([\)\]\}])/);if(r||(n=t.charAt(e.column),e={row:e.row,column:e.column+1},r=n&&n.match(/([\(\[\{])|([\)\]\}])/)),!r)return null;var o=new i(e.row,e.column-1,e.row,e.column),a=r[1]?this.$findClosingBracket(r[1],e):this.$findOpeningBracket(r[2],e);return a?[o,new i(a.row,a.column,a.row,a.column+1)]:[o]},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{","<":">",">":"<"},this.$findOpeningBracket=function(e,t,n){var i=this.$brackets[e],o=1,a=new r(this,t.row,t.column),s=a.getCurrentToken();if(s||(s=a.stepForward()),s){n||(n=new RegExp("(\\.?"+s.type.replace(".","\\.").replace("rparen",".paren").replace(/\b(?:end)\b/,"(?:start|begin|end)")+")+"));for(var l=t.column-a.getCurrentTokenColumn()-2,c=s.value;;){for(;l>=0;){var u=c.charAt(l);if(u==i){if(0==(o-=1))return{row:a.getCurrentTokenRow(),column:l+a.getCurrentTokenColumn()}}else u==e&&(o+=1);l-=1}do{s=a.stepBackward()}while(s&&!n.test(s.type));if(null==s)break;l=(c=s.value).length-1}return null}},this.$findClosingBracket=function(e,t,n){var i=this.$brackets[e],o=1,a=new r(this,t.row,t.column),s=a.getCurrentToken();if(s||(s=a.stepForward()),s){n||(n=new RegExp("(\\.?"+s.type.replace(".","\\.").replace("lparen",".paren").replace(/\b(?:start|begin)\b/,"(?:start|begin|end)")+")+"));for(var l=t.column-a.getCurrentTokenColumn();;){for(var c=s.value,u=c.length;ln&&(this.$docRowCache.splice(n,t),this.$screenRowCache.splice(n,t))},this.$getRowCacheIndex=function(e,t){for(var n=0,r=e.length-1;n<=r;){var i=n+r>>1,o=e[i];if(t>o)n=i+1;else{if(!(t=t);o++);return(n=r[o])?(n.index=o,n.start=i-n.value.length,n):null},this.setUndoManager=function(e){if(this.$undoManager=e,this.$informUndoManager&&this.$informUndoManager.cancel(),e){var t=this;e.addSession(this),this.$syncInformUndoManager=function(){t.$informUndoManager.cancel(),t.mergeUndoDeltas=!1},this.$informUndoManager=i.delayedCall(this.$syncInformUndoManager)}else this.$syncInformUndoManager=function(){}},this.markUndoGroup=function(){this.$syncInformUndoManager&&this.$syncInformUndoManager()},this.$defaultUndoManager={undo:function(){},redo:function(){},hasUndo:function(){},hasRedo:function(){},reset:function(){},add:function(){},addSelection:function(){},startNewGroup:function(){},addSession:function(){}},this.getUndoManager=function(){return this.$undoManager||this.$defaultUndoManager},this.getTabString=function(){return this.getUseSoftTabs()?i.stringRepeat(" ",this.getTabSize()):"\t"},this.setUseSoftTabs=function(e){this.setOption("useSoftTabs",e)},this.getUseSoftTabs=function(){return this.$useSoftTabs&&!this.$mode.$indentWithTabs},this.setTabSize=function(e){this.setOption("tabSize",e)},this.getTabSize=function(){return this.$tabSize},this.isTabStop=function(e){return this.$useSoftTabs&&e.column%this.$tabSize===0},this.setNavigateWithinSoftTabs=function(e){this.setOption("navigateWithinSoftTabs",e)},this.getNavigateWithinSoftTabs=function(){return this.$navigateWithinSoftTabs},this.$overwrite=!1,this.setOverwrite=function(e){this.setOption("overwrite",e)},this.getOverwrite=function(){return this.$overwrite},this.toggleOverwrite=function(){this.setOverwrite(!this.$overwrite)},this.addGutterDecoration=function(e,t){this.$decorations[e]||(this.$decorations[e]=""),this.$decorations[e]+=" "+t,this._signal("changeBreakpoint",{})},this.removeGutterDecoration=function(e,t){this.$decorations[e]=(this.$decorations[e]||"").replace(" "+t,""),this._signal("changeBreakpoint",{})},this.getBreakpoints=function(){return this.$breakpoints},this.setBreakpoints=function(e){this.$breakpoints=[];for(var t=0;t0&&(r=!!n.charAt(t-1).match(this.tokenRe)),r||(r=!!n.charAt(t).match(this.tokenRe)),r)var i=this.tokenRe;else if(/^\s+$/.test(n.slice(t-1,t+1)))i=/\s/;else i=this.nonTokenRe;var o=t;if(o>0){do{o--}while(o>=0&&n.charAt(o).match(i));o++}for(var a=t;ae&&(e=t.screenWidth)})),this.lineWidgetWidth=e},this.$computeWidth=function(e){if(this.$modified||e){if(this.$modified=!1,this.$useWrapMode)return this.screenWidth=this.$wrapLimit;for(var t=this.doc.getAllLines(),n=this.$rowLengthCache,r=0,i=0,o=this.$foldData[i],a=o?o.start.row:1/0,s=t.length,l=0;la){if((l=o.end.row+1)>=s)break;a=(o=this.$foldData[i++])?o.start.row:1/0}null==n[l]&&(n[l]=this.$getStringScreenWidth(t[l])[0]),n[l]>r&&(r=n[l])}this.screenWidth=r}},this.getLine=function(e){return this.doc.getLine(e)},this.getLines=function(e,t){return this.doc.getLines(e,t)},this.getLength=function(){return this.doc.getLength()},this.getTextRange=function(e){return this.doc.getTextRange(e||this.selection.getRange())},this.insert=function(e,t){return this.doc.insert(e,t)},this.remove=function(e){return this.doc.remove(e)},this.removeFullLines=function(e,t){return this.doc.removeFullLines(e,t)},this.undoChanges=function(e,t){if(e.length){this.$fromUndo=!0;for(var n=e.length-1;-1!=n;n--){var r=e[n];"insert"==r.action||"remove"==r.action?this.doc.revertDelta(r):r.folds&&this.addFolds(r.folds)}!t&&this.$undoSelect&&(e.selectionBefore?this.selection.fromJSON(e.selectionBefore):this.selection.setRange(this.$getUndoSelection(e,!0))),this.$fromUndo=!1}},this.redoChanges=function(e,t){if(e.length){this.$fromUndo=!0;for(var n=0;ne.end.column&&(o.start.column+=c),o.end.row==e.end.row&&o.end.column>e.end.column&&(o.end.column+=c)),a&&o.start.row>=e.end.row&&(o.start.row+=a,o.end.row+=a)}if(o.end=this.insert(o.start,r),i.length){var s=e.start,l=o.start,c=(a=l.row-s.row,l.column-s.column);this.addFolds(i.map((function(e){return(e=e.clone()).start.row==s.row&&(e.start.column+=c),e.end.row==s.row&&(e.end.column+=c),e.start.row+=a,e.end.row+=a,e})))}return o},this.indentRows=function(e,t,n){n=n.replace(/\t/g,this.getTabString());for(var r=e;r<=t;r++)this.doc.insertInLine({row:r,column:0},n)},this.outdentRows=function(e){for(var t=e.collapseRows(),n=new u(0,0,0,0),r=this.getTabSize(),i=t.start.row;i<=t.end.row;++i){var o=this.getLine(i);n.start.row=i,n.end.row=i;for(var a=0;a0){var i;if((i=this.getRowFoldEnd(t+n))>this.doc.getLength()-1)return 0;r=i-t}else{e=this.$clipRowToDocument(e);r=(t=this.$clipRowToDocument(t))-e+1}var o=new u(e,0,t,Number.MAX_VALUE),a=this.getFoldsInRange(o).map((function(e){return(e=e.clone()).start.row+=r,e.end.row+=r,e})),s=0==n?this.doc.getLines(e,t):this.doc.removeFullLines(e,t);return this.doc.insertFullLines(e+r,s),a.length&&this.addFolds(a),r},this.moveLinesUp=function(e,t){return this.$moveLines(e,t,-1)},this.moveLinesDown=function(e,t){return this.$moveLines(e,t,1)},this.duplicateLines=function(e,t){return this.$moveLines(e,t,0)},this.$clipRowToDocument=function(e){return Math.max(0,Math.min(e,this.doc.getLength()-1))},this.$clipColumnToRow=function(e,t){return t<0?0:Math.min(this.doc.getLine(e).length,t)},this.$clipPositionToDocument=function(e,t){if(t=Math.max(0,t),e<0)e=0,t=0;else{var n=this.doc.getLength();e>=n?(e=n-1,t=this.doc.getLine(n-1).length):t=Math.min(this.doc.getLine(e).length,t)}return{row:e,column:t}},this.$clipRangeToDocument=function(e){e.start.row<0?(e.start.row=0,e.start.column=0):e.start.column=this.$clipColumnToRow(e.start.row,e.start.column);var t=this.doc.getLength()-1;return e.end.row>t?(e.end.row=t,e.end.column=this.doc.getLine(t).length):e.end.column=this.$clipColumnToRow(e.end.row,e.end.column),e},this.$wrapLimit=80,this.$useWrapMode=!1,this.$wrapLimitRange={min:null,max:null},this.setUseWrapMode=function(e){if(e!=this.$useWrapMode){if(this.$useWrapMode=e,this.$modified=!0,this.$resetRowCache(0),e){var t=this.getLength();this.$wrapData=Array(t),this.$updateWrapData(0,t-1)}this._signal("changeWrapMode")}},this.getUseWrapMode=function(){return this.$useWrapMode},this.setWrapLimitRange=function(e,t){this.$wrapLimitRange.min===e&&this.$wrapLimitRange.max===t||(this.$wrapLimitRange={min:e,max:t},this.$modified=!0,this.$bidiHandler.markAsDirty(),this.$useWrapMode&&this._signal("changeWrapMode"))},this.adjustWrapLimit=function(e,t){var n=this.$wrapLimitRange;n.max<0&&(n={min:t,max:t});var r=this.$constrainWrapLimit(e,n.min,n.max);return r!=this.$wrapLimit&&r>1&&(this.$wrapLimit=r,this.$modified=!0,this.$useWrapMode&&(this.$updateWrapData(0,this.getLength()-1),this.$resetRowCache(0),this._signal("changeWrapLimit")),!0)},this.$constrainWrapLimit=function(e,t,n){return t&&(e=Math.max(t,e)),n&&(e=Math.min(n,e)),e},this.getWrapLimit=function(){return this.$wrapLimit},this.setWrapLimit=function(e){this.setWrapLimitRange(e,e)},this.getWrapLimitRange=function(){return{min:this.$wrapLimitRange.min,max:this.$wrapLimitRange.max}},this.$updateInternalDataOnChange=function(e){var t=this.$useWrapMode,n=e.action,r=e.start,i=e.end,o=r.row,a=i.row,s=a-o,l=null;if(this.$updating=!0,0!=s)if("remove"===n){this[t?"$wrapData":"$rowLengthCache"].splice(o,s);var c=this.$foldData;l=this.getFoldsInRange(e),this.removeFolds(l);var u=0;if(m=this.getFoldLine(i.row)){m.addRemoveChars(i.row,i.column,r.column-i.column),m.shiftRow(-s);var d=this.getFoldLine(o);d&&d!==m&&(d.merge(m),m=d),u=c.indexOf(m)+1}for(;u=i.row&&m.shiftRow(-s)}a=o}else{var f=Array(s);f.unshift(o,0);var h=t?this.$wrapData:this.$rowLengthCache;h.splice.apply(h,f);c=this.$foldData,u=0;if(m=this.getFoldLine(o)){var p=m.range.compareInside(r.row,r.column);0==p?(m=m.split(r.row,r.column))&&(m.shiftRow(s),m.addRemoveChars(a,0,i.column-r.column)):-1==p&&(m.addRemoveChars(o,0,i.column-r.column),m.shiftRow(s)),u=c.indexOf(m)+1}for(;u=o&&m.shiftRow(s)}}else s=Math.abs(e.start.column-e.end.column),"remove"===n&&(l=this.getFoldsInRange(e),this.removeFolds(l),s=-s),(m=this.getFoldLine(o))&&m.addRemoveChars(o,r.column,s);return t&&this.$wrapData.length!=this.doc.getLength()&&console.error("doc.getLength() and $wrapData.length have to be the same!"),this.$updating=!1,t?this.$updateWrapData(o,a):this.$updateRowLengthCache(o,a),l},this.$updateRowLengthCache=function(e,t,n){this.$rowLengthCache[e]=null,this.$rowLengthCache[t]=null},this.$updateWrapData=function(n,r){var i,o,a=this.doc.getAllLines(),s=this.getTabSize(),l=this.$wrapData,c=this.$wrapLimit,u=n;for(r=Math.min(r,a.length-1);u<=r;)(o=this.getFoldLine(u,o))?(i=[],o.walk(function(n,r,o,s){var l;if(null!=n){(l=this.$getDisplayTokens(n,i.length))[0]=e;for(var c=1;c=4352&&e<=4447||e>=4515&&e<=4519||e>=4602&&e<=4607||e>=9001&&e<=9002||e>=11904&&e<=11929||e>=11931&&e<=12019||e>=12032&&e<=12245||e>=12272&&e<=12283||e>=12288&&e<=12350||e>=12353&&e<=12438||e>=12441&&e<=12543||e>=12549&&e<=12589||e>=12593&&e<=12686||e>=12688&&e<=12730||e>=12736&&e<=12771||e>=12784&&e<=12830||e>=12832&&e<=12871||e>=12880&&e<=13054||e>=13056&&e<=19903||e>=19968&&e<=42124||e>=42128&&e<=42182||e>=43360&&e<=43388||e>=44032&&e<=55203||e>=55216&&e<=55238||e>=55243&&e<=55291||e>=63744&&e<=64255||e>=65040&&e<=65049||e>=65072&&e<=65106||e>=65108&&e<=65126||e>=65128&&e<=65131||e>=65281&&e<=65376||e>=65504&&e<=65510)}this.$computeWrapSplits=function(n,r,i){if(0==n.length)return[];var o=[],a=n.length,s=0,l=0,c=this.$wrapAsCode,u=this.$indentedSoftWrap,d=r<=Math.max(2*i,8)||!1===u?0:Math.floor(r/2);function f(e){for(var t=e-s,r=s;rr-h;){var p=s+r-h;if(n[p-1]>=10&&n[p]>=10)f(p);else if(n[p]!=e&&n[p]!=t){for(var m=Math.max(p-(r-(r>>2)),s-1);p>m&&n[p]m&&n[p]m&&9==n[p];)p--}else for(;p>m&&n[p]<10;)p--;p>m?f(++p):(2==n[p=s+r]&&p--,f(p-h))}else{for(;p!=s-1&&n[p]!=e;p--);if(p>s){f(p);continue}for(p=s+r;p39&&a<48||a>57&&a<64?i.push(9):a>=4352&&n(a)?i.push(1,2):i.push(1)}return i},this.$getStringScreenWidth=function(e,t,r){if(0==t)return[0,0];var i,o;for(null==t&&(t=1/0),r=r||0,o=0;o=4352&&n(i)?r+=2:r+=1,!(r>t));o++);return[r,o]},this.lineWidgets=null,this.getRowLength=function(e){var t=1;return this.lineWidgets&&(t+=this.lineWidgets[e]&&this.lineWidgets[e].rowCount||0),this.$useWrapMode&&this.$wrapData[e]?this.$wrapData[e].length+t:t},this.getRowLineCount=function(e){return this.$useWrapMode&&this.$wrapData[e]?this.$wrapData[e].length+1:1},this.getRowWrapIndent=function(e){if(this.$useWrapMode){var t=this.screenToDocumentPosition(e,Number.MAX_VALUE),n=this.$wrapData[t.row];return n.length&&n[0]=0){s=c[u],o=this.$docRowCache[u];var f=e>c[d-1]}else f=!d;for(var h=this.getLength()-1,p=this.getNextFoldLine(o),m=p?p.start.row:1/0;s<=e&&!(s+(l=this.getRowLength(o))>e||o>=h);)s+=l,++o>m&&(o=p.end.row+1,m=(p=this.getNextFoldLine(o,p))?p.start.row:1/0),f&&(this.$docRowCache.push(o),this.$screenRowCache.push(s));if(p&&p.start.row<=o)r=this.getFoldDisplayLine(p),o=p.start.row;else{if(s+l<=e||o>h)return{row:h,column:this.getLine(h).length};r=this.getLine(o),p=null}var g=0,v=Math.floor(e-s);if(this.$useWrapMode){var y=this.$wrapData[o];y&&(i=y[v],v>0&&y.length&&(g=y.indent,a=y[v-1]||y[y.length-1],r=r.substring(a)))}return void 0!==n&&this.$bidiHandler.isBidiRow(s+v,o,v)&&(t=this.$bidiHandler.offsetToCol(n)),a+=this.$getStringScreenWidth(r,t-g)[1],this.$useWrapMode&&a>=i&&(a=i-1),p?p.idxToPosition(a):{row:o,column:a}},this.documentToScreenPosition=function(e,t){if("undefined"===typeof t)var n=this.$clipPositionToDocument(e.row,e.column);else n=this.$clipPositionToDocument(e,t);e=n.row,t=n.column;var r,i=0,o=null;(r=this.getFoldAt(e,t,1))&&(e=r.start.row,t=r.start.column);var a,s=0,l=this.$docRowCache,c=this.$getRowCacheIndex(l,e),u=l.length;if(u&&c>=0){s=l[c],i=this.$screenRowCache[c];var d=e>l[u-1]}else d=!u;for(var f=this.getNextFoldLine(s),h=f?f.start.row:1/0;s=h){if((a=f.end.row+1)>e)break;h=(f=this.getNextFoldLine(a,f))?f.start.row:1/0}else a=s+1;i+=this.getRowLength(s),s=a,d&&(this.$docRowCache.push(s),this.$screenRowCache.push(i))}var p="";f&&s>=h?(p=this.getFoldDisplayLine(f,e,t),o=f.start.row):(p=this.getLine(e).substring(0,t),o=e);var m=0;if(this.$useWrapMode){var g=this.$wrapData[o];if(g){for(var v=0;p.length>=g[v];)i++,v++;p=p.substring(g[v-1]||0,p.length),m=v>0?g.indent:0}}return this.lineWidgets&&this.lineWidgets[s]&&this.lineWidgets[s].rowsAbove&&(i+=this.lineWidgets[s].rowsAbove),{row:i,column:m+this.$getStringScreenWidth(p)[0]}},this.documentToScreenColumn=function(e,t){return this.documentToScreenPosition(e,t).column},this.documentToScreenRow=function(e,t){return this.documentToScreenPosition(e,t).row},this.getScreenLength=function(){var e=0,t=null;if(this.$useWrapMode)for(var n=this.$wrapData.length,r=0,i=(s=0,(t=this.$foldData[s++])?t.start.row:1/0);ri&&(r=t.end.row+1,i=(t=this.$foldData[s++])?t.start.row:1/0)}else{e=this.getLength();for(var a=this.$foldData,s=0;sn);o++);return[r,o]})},this.destroy=function(){this.bgTokenizer&&(this.bgTokenizer.setDocument(null),this.bgTokenizer=null),this.$stopWorker(),this.removeAllListeners(),this.selection.detach()},this.isFullWidth=n}.call(p.prototype),e("./edit_session/folding").Folding.call(p.prototype),e("./edit_session/bracket_match").BracketMatch.call(p.prototype),a.defineOptions(p.prototype,"session",{wrap:{set:function(e){if(e&&"off"!=e?"free"==e?e=!0:"printMargin"==e?e=-1:"string"==typeof e&&(e=parseInt(e,10)||!1):e=!1,this.$wrap!=e)if(this.$wrap=e,e){var t="number"==typeof e?e:null;this.setWrapLimitRange(t,t),this.setUseWrapMode(!0)}else this.setUseWrapMode(!1)},get:function(){return this.getUseWrapMode()?-1==this.$wrap?"printMargin":this.getWrapLimitRange().min?this.$wrap:"free":"off"},handlesSet:!0},wrapMethod:{set:function(e){(e="auto"==e?"text"!=this.$mode.type:"text"!=e)!=this.$wrapAsCode&&(this.$wrapAsCode=e,this.$useWrapMode&&(this.$useWrapMode=!1,this.setUseWrapMode(!0)))},initialValue:"auto"},indentedSoftWrap:{set:function(){this.$useWrapMode&&(this.$useWrapMode=!1,this.setUseWrapMode(!0))},initialValue:!0},firstLineNumber:{set:function(){this._signal("changeBreakpoint")},initialValue:1},useWorker:{set:function(e){this.$useWorker=e,this.$stopWorker(),e&&this.$startWorker()},initialValue:!0},useSoftTabs:{initialValue:!0},tabSize:{set:function(e){(e=parseInt(e))>0&&this.$tabSize!==e&&(this.$modified=!0,this.$rowLengthCache=[],this.$tabSize=e,this._signal("changeTabSize"))},initialValue:4,handlesSet:!0},navigateWithinSoftTabs:{initialValue:!1},foldStyle:{set:function(e){this.setFoldStyle(e)},handlesSet:!0},overwrite:{set:function(e){this._signal("changeOverwrite")},initialValue:!1},newLineMode:{set:function(e){this.doc.setNewLineMode(e)},get:function(){return this.doc.getNewLineMode()},handlesSet:!0},mode:{set:function(e){this.setMode(e)},get:function(){return this.$modeId},handlesSet:!0}}),t.EditSession=p})),ace.define("ace/search",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],(function(e,t,n){"use strict";var r=e("./lib/lang"),i=e("./lib/oop"),o=e("./range").Range,a=function(){this.$options={}};(function(){this.set=function(e){return i.mixin(this.$options,e),this},this.getOptions=function(){return r.copyObject(this.$options)},this.setOptions=function(e){this.$options=e},this.find=function(e){var t=this.$options,n=this.$matchIterator(e,t);if(!n)return!1;var r=null;return n.forEach((function(e,n,i,a){return r=new o(e,n,i,a),!(n==a&&t.start&&t.start.start&&0!=t.skipCurrent&&r.isEqual(t.start))||(r=null,!1)})),r},this.findAll=function(e){var t=this.$options;if(!t.needle)return[];this.$assembleRegExp(t);var n=t.range,i=n?e.getLines(n.start.row,n.end.row):e.doc.getAllLines(),a=[],s=t.re;if(t.$isMultiLine){var l,c=s.length,u=i.length-c;e:for(var d=s.offset||0;d<=u;d++){for(var f=0;fm||(a.push(l=new o(d,m,d+c-1,g)),c>2&&(d=d+c-2))}}else for(var v=0;vw&&a[f].end.row==n.end.row;)f--;for(a=a.slice(v,f+1),v=0,f=a.length;v=s;n--)if(d(n,Number.MAX_VALUE,e))return;if(0!=t.wrap)for(n=l,s=a.row;n>=s;n--)if(d(n,Number.MAX_VALUE,e))return}};else c=function(e){var n=a.row;if(!d(n,a.column,e)){for(n+=1;n<=l;n++)if(d(n,0,e))return;if(0!=t.wrap)for(n=s,l=a.row;n<=l;n++)if(d(n,0,e))return}};if(t.$isMultiLine)var u=n.length,d=function(t,i,o){var a=r?t-u+1:t;if(!(a<0)){var s=e.getLine(a),l=s.search(n[0]);if(!(!r&&li))return!!o(a,l,a+u-1,d)||void 0}}};else if(r)d=function(t,r,i){var o,a=e.getLine(t),s=[],l=0;for(n.lastIndex=0;o=n.exec(a);){var c=o[0].length;if(l=o.index,!c){if(l>=a.length)break;n.lastIndex=l+=1}if(o.index+c>r)break;s.push(o.index,c)}for(var u=s.length-1;u>=0;u-=2){var d=s[u-1];if(i(t,d,t,d+(c=s[u])))return!0}};else d=function(t,r,i){var o,a,s=e.getLine(t);for(n.lastIndex=r;a=n.exec(s);){var l=a[0].length;if(i(t,o=a.index,t,o+l))return!0;if(!l&&(n.lastIndex=o+=1,o>=s.length))return!1}};return{forEach:c}}}).call(a.prototype),t.Search=a})),ace.define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"],(function(e,t,n){"use strict";var r=e("../lib/keys"),i=e("../lib/useragent"),o=r.KEY_MODS;function a(e,t){this.platform=t||(i.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={},this.addCommands(e),this.$singleCommand=!0}function s(e,t){a.call(this,e,t),this.$singleCommand=!1}s.prototype=a.prototype,function(){function e(e){return"object"==typeof e&&e.bindKey&&e.bindKey.position||(e.isDefault?-100:0)}this.addCommand=function(e){this.commands[e.name]&&this.removeCommand(e),this.commands[e.name]=e,e.bindKey&&this._buildKeyHash(e)},this.removeCommand=function(e,t){var n=e&&("string"===typeof e?e:e.name);e=this.commands[n],t||delete this.commands[n];var r=this.commandKeyBinding;for(var i in r){var o=r[i];if(o==e)delete r[i];else if(Array.isArray(o)){var a=o.indexOf(e);-1!=a&&(o.splice(a,1),1==o.length&&(r[i]=o[0]))}}},this.bindKey=function(e,t,n){if("object"==typeof e&&e&&(void 0==n&&(n=e.position),e=e[this.platform]),e)return"function"==typeof t?this.addCommand({exec:t,bindKey:e,name:t.name||e}):void e.split("|").forEach((function(e){var r="";if(-1!=e.indexOf(" ")){var i=e.split(/\s+/);e=i.pop(),i.forEach((function(e){var t=this.parseKeys(e),n=o[t.hashId]+t.key;r+=(r?" ":"")+n,this._addCommandToBinding(r,"chainKeys")}),this),r+=" "}var a=this.parseKeys(e),s=o[a.hashId]+a.key;this._addCommandToBinding(r+s,t,n)}),this)},this._addCommandToBinding=function(t,n,r){var i,o=this.commandKeyBinding;if(n)if(!o[t]||this.$singleCommand)o[t]=n;else{Array.isArray(o[t])?-1!=(i=o[t].indexOf(n))&&o[t].splice(i,1):o[t]=[o[t]],"number"!=typeof r&&(r=e(n));var a=o[t];for(i=0;ir)break}a.splice(i,0,n)}else delete o[t]},this.addCommands=function(e){e&&Object.keys(e).forEach((function(t){var n=e[t];if(n){if("string"===typeof n)return this.bindKey(n,t);"function"===typeof n&&(n={exec:n}),"object"===typeof n&&(n.name||(n.name=t),this.addCommand(n))}}),this)},this.removeCommands=function(e){Object.keys(e).forEach((function(t){this.removeCommand(e[t])}),this)},this.bindKeys=function(e){Object.keys(e).forEach((function(t){this.bindKey(t,e[t])}),this)},this._buildKeyHash=function(e){this.bindKey(e.bindKey,e)},this.parseKeys=function(e){var t=e.toLowerCase().split(/[\-\+]([\-\+])?/).filter((function(e){return e})),n=t.pop(),i=r[n];if(r.FUNCTION_KEYS[i])n=r.FUNCTION_KEYS[i].toLowerCase();else{if(!t.length)return{key:n,hashId:-1};if(1==t.length&&"shift"==t[0])return{key:n.toUpperCase(),hashId:-1}}for(var o=0,a=t.length;a--;){var s=r.KEY_MODS[t[a]];if(null==s)return"undefined"!=typeof console&&console.error("invalid modifier "+t[a]+" in "+e),!1;o|=s}return{key:n,hashId:o}},this.findKeyCommand=function(e,t){var n=o[e]+t;return this.commandKeyBinding[n]},this.handleKeyboard=function(e,t,n,r){if(!(r<0)){var i=o[t]+n,a=this.commandKeyBinding[i];return e.$keyChain&&(e.$keyChain+=" "+i,a=this.commandKeyBinding[e.$keyChain]||a),!a||"chainKeys"!=a&&"chainKeys"!=a[a.length-1]?(e.$keyChain&&(t&&4!=t||1!=n.length?(-1==t||r>0)&&(e.$keyChain=""):e.$keyChain=e.$keyChain.slice(0,-i.length-1)),{command:a}):(e.$keyChain=e.$keyChain||i,{command:"null"})}},this.getStatusText=function(e,t){return t.$keyChain||""}}.call(a.prototype),t.HashHandler=a,t.MultiHashHandler=s})),ace.define("ace/commands/command_manager",["require","exports","module","ace/lib/oop","ace/keyboard/hash_handler","ace/lib/event_emitter"],(function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../keyboard/hash_handler").MultiHashHandler,o=e("../lib/event_emitter").EventEmitter,a=function(e,t){i.call(this,t,e),this.byName=this.commands,this.setDefaultHandler("exec",(function(e){return e.command.exec(e.editor,e.args||{})}))};r.inherits(a,i),function(){r.implement(this,o),this.exec=function(e,t,n){if(Array.isArray(e)){for(var r=e.length;r--;)if(this.exec(e[r],t,n))return!0;return!1}if("string"===typeof e&&(e=this.commands[e]),!e)return!1;if(t&&t.$readOnly&&!e.readOnly)return!1;if(0!=this.$checkCommandState&&e.isAvailable&&!e.isAvailable(t))return!1;var i={editor:t,command:e,args:n};return i.returnValue=this._emit("exec",i),this._signal("afterExec",i),!1!==i.returnValue},this.toggleRecording=function(e){if(!this.$inReplay)return e&&e._emit("changeStatus"),this.recording?(this.macro.pop(),this.off("exec",this.$addCommandToMacro),this.macro.length||(this.macro=this.oldMacro),this.recording=!1):(this.$addCommandToMacro||(this.$addCommandToMacro=function(e){this.macro.push([e.command,e.args])}.bind(this)),this.oldMacro=this.macro,this.macro=[],this.on("exec",this.$addCommandToMacro),this.recording=!0)},this.replay=function(e){if(!this.$inReplay&&this.macro){if(this.recording)return this.toggleRecording(e);try{this.$inReplay=!0,this.macro.forEach((function(t){"string"==typeof t?this.exec(t,e):this.exec(t[0],e,t[1])}),this)}finally{this.$inReplay=!1}}},this.trimMacro=function(e){return e.map((function(e){return"string"!=typeof e[0]&&(e[0]=e[0].name),e[1]||(e=e[0]),e}))}}.call(a.prototype),t.CommandManager=a})),ace.define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"],(function(e,t,n){"use strict";var r=e("../lib/lang"),i=e("../config"),o=e("../range").Range;function a(e,t){return{win:e,mac:t}}t.commands=[{name:"showSettingsMenu",bindKey:a("Ctrl-,","Command-,"),exec:function(e){i.loadModule("ace/ext/settings_menu",(function(t){t.init(e),e.showSettingsMenu()}))},readOnly:!0},{name:"goToNextError",bindKey:a("Alt-E","F4"),exec:function(e){i.loadModule("./ext/error_marker",(function(t){t.showErrorMarker(e,1)}))},scrollIntoView:"animate",readOnly:!0},{name:"goToPreviousError",bindKey:a("Alt-Shift-E","Shift-F4"),exec:function(e){i.loadModule("./ext/error_marker",(function(t){t.showErrorMarker(e,-1)}))},scrollIntoView:"animate",readOnly:!0},{name:"selectall",description:"Select all",bindKey:a("Ctrl-A","Command-A"),exec:function(e){e.selectAll()},readOnly:!0},{name:"centerselection",description:"Center selection",bindKey:a(null,"Ctrl-L"),exec:function(e){e.centerSelection()},readOnly:!0},{name:"gotoline",description:"Go to line...",bindKey:a("Ctrl-L","Command-L"),exec:function(e,t){"number"!==typeof t||isNaN(t)||e.gotoLine(t),e.prompt({$type:"gotoLine"})},readOnly:!0},{name:"fold",bindKey:a("Alt-L|Ctrl-F1","Command-Alt-L|Command-F1"),exec:function(e){e.session.toggleFold(!1)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"unfold",bindKey:a("Alt-Shift-L|Ctrl-Shift-F1","Command-Alt-Shift-L|Command-Shift-F1"),exec:function(e){e.session.toggleFold(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleFoldWidget",bindKey:a("F2","F2"),exec:function(e){e.session.toggleFoldWidget()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleParentFoldWidget",bindKey:a("Alt-F2","Alt-F2"),exec:function(e){e.session.toggleFoldWidget(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"foldall",description:"Fold all",bindKey:a(null,"Ctrl-Command-Option-0"),exec:function(e){e.session.foldAll()},scrollIntoView:"center",readOnly:!0},{name:"foldAllComments",description:"Fold all comments",bindKey:a(null,"Ctrl-Command-Option-0"),exec:function(e){e.session.foldAllComments()},scrollIntoView:"center",readOnly:!0},{name:"foldOther",description:"Fold other",bindKey:a("Alt-0","Command-Option-0"),exec:function(e){e.session.foldAll(),e.session.unfold(e.selection.getAllRanges())},scrollIntoView:"center",readOnly:!0},{name:"unfoldall",description:"Unfold all",bindKey:a("Alt-Shift-0","Command-Option-Shift-0"),exec:function(e){e.session.unfold()},scrollIntoView:"center",readOnly:!0},{name:"findnext",description:"Find next",bindKey:a("Ctrl-K","Command-G"),exec:function(e){e.findNext()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"findprevious",description:"Find previous",bindKey:a("Ctrl-Shift-K","Command-Shift-G"),exec:function(e){e.findPrevious()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"selectOrFindNext",description:"Select or find next",bindKey:a("Alt-K","Ctrl-G"),exec:function(e){e.selection.isEmpty()?e.selection.selectWord():e.findNext()},readOnly:!0},{name:"selectOrFindPrevious",description:"Select or find previous",bindKey:a("Alt-Shift-K","Ctrl-Shift-G"),exec:function(e){e.selection.isEmpty()?e.selection.selectWord():e.findPrevious()},readOnly:!0},{name:"find",description:"Find",bindKey:a("Ctrl-F","Command-F"),exec:function(e){i.loadModule("ace/ext/searchbox",(function(t){t.Search(e)}))},readOnly:!0},{name:"overwrite",description:"Overwrite",bindKey:"Insert",exec:function(e){e.toggleOverwrite()},readOnly:!0},{name:"selecttostart",description:"Select to start",bindKey:a("Ctrl-Shift-Home","Command-Shift-Home|Command-Shift-Up"),exec:function(e){e.getSelection().selectFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotostart",description:"Go to start",bindKey:a("Ctrl-Home","Command-Home|Command-Up"),exec:function(e){e.navigateFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectup",description:"Select up",bindKey:a("Shift-Up","Shift-Up|Ctrl-Shift-P"),exec:function(e){e.getSelection().selectUp()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golineup",description:"Go line up",bindKey:a("Up","Up|Ctrl-P"),exec:function(e,t){e.navigateUp(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttoend",description:"Select to end",bindKey:a("Ctrl-Shift-End","Command-Shift-End|Command-Shift-Down"),exec:function(e){e.getSelection().selectFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotoend",description:"Go to end",bindKey:a("Ctrl-End","Command-End|Command-Down"),exec:function(e){e.navigateFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectdown",description:"Select down",bindKey:a("Shift-Down","Shift-Down|Ctrl-Shift-N"),exec:function(e){e.getSelection().selectDown()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golinedown",description:"Go line down",bindKey:a("Down","Down|Ctrl-N"),exec:function(e,t){e.navigateDown(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordleft",description:"Select word left",bindKey:a("Ctrl-Shift-Left","Option-Shift-Left"),exec:function(e){e.getSelection().selectWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordleft",description:"Go to word left",bindKey:a("Ctrl-Left","Option-Left"),exec:function(e){e.navigateWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolinestart",description:"Select to line start",bindKey:a("Alt-Shift-Left","Command-Shift-Left|Ctrl-Shift-A"),exec:function(e){e.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolinestart",description:"Go to line start",bindKey:a("Alt-Left|Home","Command-Left|Home|Ctrl-A"),exec:function(e){e.navigateLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectleft",description:"Select left",bindKey:a("Shift-Left","Shift-Left|Ctrl-Shift-B"),exec:function(e){e.getSelection().selectLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoleft",description:"Go to left",bindKey:a("Left","Left|Ctrl-B"),exec:function(e,t){e.navigateLeft(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordright",description:"Select word right",bindKey:a("Ctrl-Shift-Right","Option-Shift-Right"),exec:function(e){e.getSelection().selectWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordright",description:"Go to word right",bindKey:a("Ctrl-Right","Option-Right"),exec:function(e){e.navigateWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolineend",description:"Select to line end",bindKey:a("Alt-Shift-Right","Command-Shift-Right|Shift-End|Ctrl-Shift-E"),exec:function(e){e.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolineend",description:"Go to line end",bindKey:a("Alt-Right|End","Command-Right|End|Ctrl-E"),exec:function(e){e.navigateLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectright",description:"Select right",bindKey:a("Shift-Right","Shift-Right"),exec:function(e){e.getSelection().selectRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoright",description:"Go to right",bindKey:a("Right","Right|Ctrl-F"),exec:function(e,t){e.navigateRight(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectpagedown",description:"Select page down",bindKey:"Shift-PageDown",exec:function(e){e.selectPageDown()},readOnly:!0},{name:"pagedown",description:"Page down",bindKey:a(null,"Option-PageDown"),exec:function(e){e.scrollPageDown()},readOnly:!0},{name:"gotopagedown",description:"Go to page down",bindKey:a("PageDown","PageDown|Ctrl-V"),exec:function(e){e.gotoPageDown()},readOnly:!0},{name:"selectpageup",description:"Select page up",bindKey:"Shift-PageUp",exec:function(e){e.selectPageUp()},readOnly:!0},{name:"pageup",description:"Page up",bindKey:a(null,"Option-PageUp"),exec:function(e){e.scrollPageUp()},readOnly:!0},{name:"gotopageup",description:"Go to page up",bindKey:"PageUp",exec:function(e){e.gotoPageUp()},readOnly:!0},{name:"scrollup",description:"Scroll up",bindKey:a("Ctrl-Up",null),exec:function(e){e.renderer.scrollBy(0,-2*e.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"scrolldown",description:"Scroll down",bindKey:a("Ctrl-Down",null),exec:function(e){e.renderer.scrollBy(0,2*e.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"selectlinestart",description:"Select line start",bindKey:"Shift-Home",exec:function(e){e.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectlineend",description:"Select line end",bindKey:"Shift-End",exec:function(e){e.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"togglerecording",description:"Toggle recording",bindKey:a("Ctrl-Alt-E","Command-Option-E"),exec:function(e){e.commands.toggleRecording(e)},readOnly:!0},{name:"replaymacro",description:"Replay macro",bindKey:a("Ctrl-Shift-E","Command-Shift-E"),exec:function(e){e.commands.replay(e)},readOnly:!0},{name:"jumptomatching",description:"Jump to matching",bindKey:a("Ctrl-\\|Ctrl-P","Command-\\"),exec:function(e){e.jumpToMatching()},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"selecttomatching",description:"Select to matching",bindKey:a("Ctrl-Shift-\\|Ctrl-Shift-P","Command-Shift-\\"),exec:function(e){e.jumpToMatching(!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"expandToMatching",description:"Expand to matching",bindKey:a("Ctrl-Shift-M","Ctrl-Shift-M"),exec:function(e){e.jumpToMatching(!0,!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"passKeysToBrowser",description:"Pass keys to browser",bindKey:a(null,null),exec:function(){},passEvent:!0,readOnly:!0},{name:"copy",description:"Copy",exec:function(e){},readOnly:!0},{name:"cut",description:"Cut",exec:function(e){var t=e.$copyWithEmptySelection&&e.selection.isEmpty()?e.selection.getLineRange():e.selection.getRange();e._emit("cut",t),t.isEmpty()||e.session.remove(t),e.clearSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"paste",description:"Paste",exec:function(e,t){e.$handlePaste(t)},scrollIntoView:"cursor"},{name:"removeline",description:"Remove line",bindKey:a("Ctrl-D","Command-D"),exec:function(e){e.removeLines()},scrollIntoView:"cursor",multiSelectAction:"forEachLine"},{name:"duplicateSelection",description:"Duplicate selection",bindKey:a("Ctrl-Shift-D","Command-Shift-D"),exec:function(e){e.duplicateSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"sortlines",description:"Sort lines",bindKey:a("Ctrl-Alt-S","Command-Alt-S"),exec:function(e){e.sortLines()},scrollIntoView:"selection",multiSelectAction:"forEachLine"},{name:"togglecomment",description:"Toggle comment",bindKey:a("Ctrl-/","Command-/"),exec:function(e){e.toggleCommentLines()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"toggleBlockComment",description:"Toggle block comment",bindKey:a("Ctrl-Shift-/","Command-Shift-/"),exec:function(e){e.toggleBlockComment()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"modifyNumberUp",description:"Modify number up",bindKey:a("Ctrl-Shift-Up","Alt-Shift-Up"),exec:function(e){e.modifyNumber(1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"modifyNumberDown",description:"Modify number down",bindKey:a("Ctrl-Shift-Down","Alt-Shift-Down"),exec:function(e){e.modifyNumber(-1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"replace",description:"Replace",bindKey:a("Ctrl-H","Command-Option-F"),exec:function(e){i.loadModule("ace/ext/searchbox",(function(t){t.Search(e,!0)}))}},{name:"undo",description:"Undo",bindKey:a("Ctrl-Z","Command-Z"),exec:function(e){e.undo()}},{name:"redo",description:"Redo",bindKey:a("Ctrl-Shift-Z|Ctrl-Y","Command-Shift-Z|Command-Y"),exec:function(e){e.redo()}},{name:"copylinesup",description:"Copy lines up",bindKey:a("Alt-Shift-Up","Command-Option-Up"),exec:function(e){e.copyLinesUp()},scrollIntoView:"cursor"},{name:"movelinesup",description:"Move lines up",bindKey:a("Alt-Up","Option-Up"),exec:function(e){e.moveLinesUp()},scrollIntoView:"cursor"},{name:"copylinesdown",description:"Copy lines down",bindKey:a("Alt-Shift-Down","Command-Option-Down"),exec:function(e){e.copyLinesDown()},scrollIntoView:"cursor"},{name:"movelinesdown",description:"Move lines down",bindKey:a("Alt-Down","Option-Down"),exec:function(e){e.moveLinesDown()},scrollIntoView:"cursor"},{name:"del",description:"Delete",bindKey:a("Delete","Delete|Ctrl-D|Shift-Delete"),exec:function(e){e.remove("right")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"backspace",description:"Backspace",bindKey:a("Shift-Backspace|Backspace","Ctrl-Backspace|Shift-Backspace|Backspace|Ctrl-H"),exec:function(e){e.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"cut_or_delete",description:"Cut or delete",bindKey:a("Shift-Delete",null),exec:function(e){if(!e.selection.isEmpty())return!1;e.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestart",description:"Remove to line start",bindKey:a("Alt-Backspace","Command-Backspace"),exec:function(e){e.removeToLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineend",description:"Remove to line end",bindKey:a("Alt-Delete","Ctrl-K|Command-Delete"),exec:function(e){e.removeToLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestarthard",description:"Remove to line start hard",bindKey:a("Ctrl-Shift-Backspace",null),exec:function(e){var t=e.selection.getRange();t.start.column=0,e.session.remove(t)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineendhard",description:"Remove to line end hard",bindKey:a("Ctrl-Shift-Delete",null),exec:function(e){var t=e.selection.getRange();t.end.column=Number.MAX_VALUE,e.session.remove(t)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordleft",description:"Remove word left",bindKey:a("Ctrl-Backspace","Alt-Backspace|Ctrl-Alt-Backspace"),exec:function(e){e.removeWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordright",description:"Remove word right",bindKey:a("Ctrl-Delete","Alt-Delete"),exec:function(e){e.removeWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"outdent",description:"Outdent",bindKey:a("Shift-Tab","Shift-Tab"),exec:function(e){e.blockOutdent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"indent",description:"Indent",bindKey:a("Tab","Tab"),exec:function(e){e.indent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"blockoutdent",description:"Block outdent",bindKey:a("Ctrl-[","Ctrl-["),exec:function(e){e.blockOutdent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"blockindent",description:"Block indent",bindKey:a("Ctrl-]","Ctrl-]"),exec:function(e){e.blockIndent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"insertstring",description:"Insert string",exec:function(e,t){e.insert(t)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"inserttext",description:"Insert text",exec:function(e,t){e.insert(r.stringRepeat(t.text||"",t.times||1))},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"splitline",description:"Split line",bindKey:a(null,"Ctrl-O"),exec:function(e){e.splitLine()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"transposeletters",description:"Transpose letters",bindKey:a("Alt-Shift-X","Ctrl-T"),exec:function(e){e.transposeLetters()},multiSelectAction:function(e){e.transposeSelections(1)},scrollIntoView:"cursor"},{name:"touppercase",description:"To uppercase",bindKey:a("Ctrl-U","Ctrl-U"),exec:function(e){e.toUpperCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"tolowercase",description:"To lowercase",bindKey:a("Ctrl-Shift-U","Ctrl-Shift-U"),exec:function(e){e.toLowerCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"autoindent",description:"Auto Indent",bindKey:a(null,null),exec:function(e){e.autoIndent()},multiSelectAction:"forEachLine",scrollIntoView:"animate"},{name:"expandtoline",description:"Expand to line",bindKey:a("Ctrl-Shift-L","Command-Shift-L"),exec:function(e){var t=e.selection.getRange();t.start.column=t.end.column=0,t.end.row++,e.selection.setRange(t,!1)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"joinlines",description:"Join lines",bindKey:a(null,null),exec:function(e){for(var t=e.selection.isBackwards(),n=t?e.selection.getSelectionLead():e.selection.getSelectionAnchor(),i=t?e.selection.getSelectionAnchor():e.selection.getSelectionLead(),a=e.session.doc.getLine(n.row).length,s=e.session.doc.getTextRange(e.selection.getRange()).replace(/\n\s*/," ").length,l=e.session.doc.getLine(n.row),c=n.row+1;c<=i.row+1;c++){var u=r.stringTrimLeft(r.stringTrimRight(e.session.doc.getLine(c)));0!==u.length&&(u=" "+u),l+=u}i.row+10?(e.selection.moveCursorTo(n.row,n.column),e.selection.selectTo(n.row,n.column+s)):(a=e.session.doc.getLine(n.row).length>a?a+1:a,e.selection.moveCursorTo(n.row,a))},multiSelectAction:"forEach",readOnly:!0},{name:"invertSelection",description:"Invert selection",bindKey:a(null,null),exec:function(e){var t=e.session.doc.getLength()-1,n=e.session.doc.getLine(t).length,r=e.selection.rangeList.ranges,i=[];r.length<1&&(r=[e.selection.getRange()]);for(var a=0;a=i.lastRow||r.end.row<=i.firstRow)&&this.renderer.scrollSelectionIntoView(this.selection.anchor,this.selection.lead)}"animate"==n&&this.renderer.animateScrolling(this.curOp.scrollTop)}var o=this.selection.toJSON();this.curOp.selectionAfter=o,this.$lastSel=this.selection.toJSON(),this.session.getUndoManager().addSelection(o),this.prevOp=this.curOp,this.curOp=null}},this.$mergeableCommands=["backspace","del","insertstring"],this.$historyTracker=function(e){if(this.$mergeUndoDeltas){var t=this.prevOp,n=this.$mergeableCommands,r=t.command&&e.command.name==t.command.name;if("insertstring"==e.command.name){var i=e.args;void 0===this.mergeNextCommand&&(this.mergeNextCommand=!0),r=r&&this.mergeNextCommand&&(!/\s/.test(i)||/\s/.test(t.args)),this.mergeNextCommand=!0}else r=r&&-1!==n.indexOf(e.command.name);"always"!=this.$mergeUndoDeltas&&Date.now()-this.sequenceStartTime>2e3&&(r=!1),r?this.session.mergeUndoDeltas=!0:-1!==n.indexOf(e.command.name)&&(this.sequenceStartTime=Date.now())}},this.setKeyboardHandler=function(e,t){if(e&&"string"===typeof e&&"ace"!=e){this.$keybindingId=e;var n=this;v.loadModule(["keybinding",e],(function(r){n.$keybindingId==e&&n.keyBinding.setKeyboardHandler(r&&r.handler),t&&t()}))}else this.$keybindingId=null,this.keyBinding.setKeyboardHandler(e),t&&t()},this.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()},this.setSession=function(e){if(this.session!=e){this.curOp&&this.endOperation(),this.curOp={};var t=this.session;if(t){this.session.off("change",this.$onDocumentChange),this.session.off("changeMode",this.$onChangeMode),this.session.off("tokenizerUpdate",this.$onTokenizerUpdate),this.session.off("changeTabSize",this.$onChangeTabSize),this.session.off("changeWrapLimit",this.$onChangeWrapLimit),this.session.off("changeWrapMode",this.$onChangeWrapMode),this.session.off("changeFold",this.$onChangeFold),this.session.off("changeFrontMarker",this.$onChangeFrontMarker),this.session.off("changeBackMarker",this.$onChangeBackMarker),this.session.off("changeBreakpoint",this.$onChangeBreakpoint),this.session.off("changeAnnotation",this.$onChangeAnnotation),this.session.off("changeOverwrite",this.$onCursorChange),this.session.off("changeScrollTop",this.$onScrollTopChange),this.session.off("changeScrollLeft",this.$onScrollLeftChange);var n=this.session.getSelection();n.off("changeCursor",this.$onCursorChange),n.off("changeSelection",this.$onSelectionChange)}this.session=e,e?(this.$onDocumentChange=this.onDocumentChange.bind(this),e.on("change",this.$onDocumentChange),this.renderer.setSession(e),this.$onChangeMode=this.onChangeMode.bind(this),e.on("changeMode",this.$onChangeMode),this.$onTokenizerUpdate=this.onTokenizerUpdate.bind(this),e.on("tokenizerUpdate",this.$onTokenizerUpdate),this.$onChangeTabSize=this.renderer.onChangeTabSize.bind(this.renderer),e.on("changeTabSize",this.$onChangeTabSize),this.$onChangeWrapLimit=this.onChangeWrapLimit.bind(this),e.on("changeWrapLimit",this.$onChangeWrapLimit),this.$onChangeWrapMode=this.onChangeWrapMode.bind(this),e.on("changeWrapMode",this.$onChangeWrapMode),this.$onChangeFold=this.onChangeFold.bind(this),e.on("changeFold",this.$onChangeFold),this.$onChangeFrontMarker=this.onChangeFrontMarker.bind(this),this.session.on("changeFrontMarker",this.$onChangeFrontMarker),this.$onChangeBackMarker=this.onChangeBackMarker.bind(this),this.session.on("changeBackMarker",this.$onChangeBackMarker),this.$onChangeBreakpoint=this.onChangeBreakpoint.bind(this),this.session.on("changeBreakpoint",this.$onChangeBreakpoint),this.$onChangeAnnotation=this.onChangeAnnotation.bind(this),this.session.on("changeAnnotation",this.$onChangeAnnotation),this.$onCursorChange=this.onCursorChange.bind(this),this.session.on("changeOverwrite",this.$onCursorChange),this.$onScrollTopChange=this.onScrollTopChange.bind(this),this.session.on("changeScrollTop",this.$onScrollTopChange),this.$onScrollLeftChange=this.onScrollLeftChange.bind(this),this.session.on("changeScrollLeft",this.$onScrollLeftChange),this.selection=e.getSelection(),this.selection.on("changeCursor",this.$onCursorChange),this.$onSelectionChange=this.onSelectionChange.bind(this),this.selection.on("changeSelection",this.$onSelectionChange),this.onChangeMode(),this.onCursorChange(),this.onScrollTopChange(),this.onScrollLeftChange(),this.onSelectionChange(),this.onChangeFrontMarker(),this.onChangeBackMarker(),this.onChangeBreakpoint(),this.onChangeAnnotation(),this.session.getUseWrapMode()&&this.renderer.adjustWrapLimit(),this.renderer.updateFull()):(this.selection=null,this.renderer.setSession(e)),this._signal("changeSession",{session:e,oldSession:t}),this.curOp=null,t&&t._signal("changeEditor",{oldEditor:this}),e&&e._signal("changeEditor",{editor:this}),e&&e.bgTokenizer&&e.bgTokenizer.scheduleStart()}},this.getSession=function(){return this.session},this.setValue=function(e,t){return this.session.doc.setValue(e),t?1==t?this.navigateFileEnd():-1==t&&this.navigateFileStart():this.selectAll(),e},this.getValue=function(){return this.session.getValue()},this.getSelection=function(){return this.selection},this.resize=function(e){this.renderer.onResize(e)},this.setTheme=function(e,t){this.renderer.setTheme(e,t)},this.getTheme=function(){return this.renderer.getTheme()},this.setStyle=function(e){this.renderer.setStyle(e)},this.unsetStyle=function(e){this.renderer.unsetStyle(e)},this.getFontSize=function(){return this.getOption("fontSize")||i.computedStyle(this.container).fontSize},this.setFontSize=function(e){this.setOption("fontSize",e)},this.$highlightBrackets=function(){if(!this.$highlightPending){var e=this;this.$highlightPending=!0,setTimeout((function(){e.$highlightPending=!1;var t=e.session;if(t&&t.bgTokenizer){t.$bracketHighlight&&(t.$bracketHighlight.markerIds.forEach((function(e){t.removeMarker(e)})),t.$bracketHighlight=null);var n=t.getMatchingBracketRanges(e.getCursorPosition());if(!n&&t.$mode.getMatching&&(n=t.$mode.getMatching(e.session)),n){var r="ace_bracket";Array.isArray(n)?1==n.length&&(r="ace_error_bracket"):n=[n],2==n.length&&(0==h.comparePoints(n[0].end,n[1].start)?n=[h.fromPoints(n[0].start,n[1].end)]:0==h.comparePoints(n[0].start,n[1].end)&&(n=[h.fromPoints(n[1].start,n[0].end)])),t.$bracketHighlight={ranges:n,markerIds:n.map((function(e){return t.addMarker(e,r,"text")}))}}}}),50)}},this.$highlightTags=function(){if(!this.$highlightTagPending){var e=this;this.$highlightTagPending=!0,setTimeout((function(){e.$highlightTagPending=!1;var t=e.session;if(t&&t.bgTokenizer){var n=e.getCursorPosition(),r=new y(e.session,n.row,n.column),i=r.getCurrentToken();if(!i||!/\b(?:tag-open|tag-name)/.test(i.type))return t.removeMarker(t.$tagHighlight),void(t.$tagHighlight=null);if(-1===i.type.indexOf("tag-open")||(i=r.stepForward())){var o=i.value,a=i.value,s=0,l=r.stepBackward();if("<"===l.value)do{l=i,(i=r.stepForward())&&(-1!==i.type.indexOf("tag-name")?o===(a=i.value)&&("<"===l.value?s++:""===i.value&&s--)}while(i&&s>=0);else{do{if(i=l,l=r.stepBackward(),i)if(-1!==i.type.indexOf("tag-name"))o===i.value&&("<"===l.value?s++:""===i.value){for(var c=0,u=l;u;){if(-1!==u.type.indexOf("tag-name")&&u.value===o){s--;break}if("<"===u.value)break;u=r.stepBackward(),c++}for(var d=0;d1||(e=!1)),t.$highlightLineMarker&&!e)t.removeMarker(t.$highlightLineMarker.id),t.$highlightLineMarker=null;else if(!t.$highlightLineMarker&&e){var n=new h(e.row,e.column,e.row,1/0);n.id=t.addMarker(n,"ace_active-line","screenLine"),t.$highlightLineMarker=n}else e&&(t.$highlightLineMarker.start.row=e.row,t.$highlightLineMarker.end.row=e.row,t.$highlightLineMarker.start.column=e.column,t._signal("changeBackMarker"))},this.onSelectionChange=function(e){var t=this.session;if(t.$selectionMarker&&t.removeMarker(t.$selectionMarker),t.$selectionMarker=null,this.selection.isEmpty())this.$updateHighlightActiveLine();else{var n=this.selection.getRange(),r=this.getSelectionStyle();t.$selectionMarker=t.addMarker(n,"ace_selection",r)}var i=this.$highlightSelectedWord&&this.$getSelectionHighLightRegexp();this.session.highlight(i),this._signal("changeSelection")},this.$getSelectionHighLightRegexp=function(){var e=this.session,t=this.getSelectionRange();if(!t.isEmpty()&&!t.isMultiLine()){var n=t.start.column,r=t.end.column,i=e.getLine(t.start.row),o=i.substring(n,r);if(!(o.length>5e3)&&/[\w\d]/.test(o)){var a=this.$search.$assembleRegExp({wholeWord:!0,caseSensitive:!0,needle:o}),s=i.substring(n-1,r+1);if(a.test(s))return a}}},this.onChangeFrontMarker=function(){this.renderer.updateFrontMarkers()},this.onChangeBackMarker=function(){this.renderer.updateBackMarkers()},this.onChangeBreakpoint=function(){this.renderer.updateBreakpoints()},this.onChangeAnnotation=function(){this.renderer.setAnnotations(this.session.getAnnotations())},this.onChangeMode=function(e){this.renderer.updateText(),this._emit("changeMode",e)},this.onChangeWrapLimit=function(){this.renderer.updateFull()},this.onChangeWrapMode=function(){this.renderer.onResize(!0)},this.onChangeFold=function(){this.$updateHighlightActiveLine(),this.renderer.updateFull()},this.getSelectedText=function(){return this.session.getTextRange(this.getSelectionRange())},this.getCopyText=function(){var e=this.getSelectedText(),t=this.session.doc.getNewLineCharacter(),n=!1;if(!e&&this.$copyWithEmptySelection){n=!0;for(var r=this.selection.getAllRanges(),i=0;is.search(/\S|$/)){var l=s.substr(i.column).search(/\S|$/);n.doc.removeInLine(i.row,i.column,i.column+l)}}this.clearSelection();var c=i.column,u=n.getState(i.row),d=(s=n.getLine(i.row),r.checkOutdent(u,s,e));if(n.insert(i,e),o&&o.selection&&(2==o.selection.length?this.selection.setSelectionRange(new h(i.row,c+o.selection[0],i.row,c+o.selection[1])):this.selection.setSelectionRange(new h(i.row+o.selection[0],o.selection[1],i.row+o.selection[2],o.selection[3]))),this.$enableAutoIndent){if(n.getDocument().isNewLine(e)){var f=r.getNextLineIndent(u,s.slice(0,i.column),n.getTabString());n.insert({row:i.row+1,column:0},f)}d&&r.autoOutdent(u,n,i.row)}},this.autoIndent=function(){var e,t,n=this.session,r=n.getMode();if(this.selection.isEmpty())e=0,t=n.doc.getLength()-1;else{var i=this.getSelectionRange();e=i.start.row,t=i.end.row}for(var o,a,s,l="",c="",u="",d=n.getTabString(),f=e;f<=t;f++)f>0&&(l=n.getState(f-1),c=n.getLine(f-1),u=r.getNextLineIndent(l,c,d)),o=n.getLine(f),u!==(a=r.$getIndent(o))&&(a.length>0&&(s=new h(f,0,f,a.length),n.remove(s)),u.length>0&&n.insert({row:f,column:0},u)),r.autoOutdent(l,n,f)},this.onTextInput=function(e,t){if(!t)return this.keyBinding.onTextInput(e);this.startOperation({command:{name:"insertstring"}});var n=this.applyComposition.bind(this,e,t);this.selection.rangeCount?this.forEachSelection(n):n(),this.endOperation()},this.applyComposition=function(e,t){var n;(t.extendLeft||t.extendRight)&&((n=this.selection.getRange()).start.column-=t.extendLeft,n.end.column+=t.extendRight,n.start.column<0&&(n.start.row--,n.start.column+=this.session.getLine(n.start.row).length+1),this.selection.setRange(n),e||n.isEmpty()||this.remove());(!e&&this.selection.isEmpty()||this.insert(e,!0),t.restoreStart||t.restoreEnd)&&((n=this.selection.getRange()).start.column-=t.restoreStart,n.end.column-=t.restoreEnd,this.selection.setRange(n))},this.onCommandKey=function(e,t,n){return this.keyBinding.onCommandKey(e,t,n)},this.setOverwrite=function(e){this.session.setOverwrite(e)},this.getOverwrite=function(){return this.session.getOverwrite()},this.toggleOverwrite=function(){this.session.toggleOverwrite()},this.setScrollSpeed=function(e){this.setOption("scrollSpeed",e)},this.getScrollSpeed=function(){return this.getOption("scrollSpeed")},this.setDragDelay=function(e){this.setOption("dragDelay",e)},this.getDragDelay=function(){return this.getOption("dragDelay")},this.setSelectionStyle=function(e){this.setOption("selectionStyle",e)},this.getSelectionStyle=function(){return this.getOption("selectionStyle")},this.setHighlightActiveLine=function(e){this.setOption("highlightActiveLine",e)},this.getHighlightActiveLine=function(){return this.getOption("highlightActiveLine")},this.setHighlightGutterLine=function(e){this.setOption("highlightGutterLine",e)},this.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},this.setHighlightSelectedWord=function(e){this.setOption("highlightSelectedWord",e)},this.getHighlightSelectedWord=function(){return this.$highlightSelectedWord},this.setAnimatedScroll=function(e){this.renderer.setAnimatedScroll(e)},this.getAnimatedScroll=function(){return this.renderer.getAnimatedScroll()},this.setShowInvisibles=function(e){this.renderer.setShowInvisibles(e)},this.getShowInvisibles=function(){return this.renderer.getShowInvisibles()},this.setDisplayIndentGuides=function(e){this.renderer.setDisplayIndentGuides(e)},this.getDisplayIndentGuides=function(){return this.renderer.getDisplayIndentGuides()},this.setShowPrintMargin=function(e){this.renderer.setShowPrintMargin(e)},this.getShowPrintMargin=function(){return this.renderer.getShowPrintMargin()},this.setPrintMarginColumn=function(e){this.renderer.setPrintMarginColumn(e)},this.getPrintMarginColumn=function(){return this.renderer.getPrintMarginColumn()},this.setReadOnly=function(e){this.setOption("readOnly",e)},this.getReadOnly=function(){return this.getOption("readOnly")},this.setBehavioursEnabled=function(e){this.setOption("behavioursEnabled",e)},this.getBehavioursEnabled=function(){return this.getOption("behavioursEnabled")},this.setWrapBehavioursEnabled=function(e){this.setOption("wrapBehavioursEnabled",e)},this.getWrapBehavioursEnabled=function(){return this.getOption("wrapBehavioursEnabled")},this.setShowFoldWidgets=function(e){this.setOption("showFoldWidgets",e)},this.getShowFoldWidgets=function(){return this.getOption("showFoldWidgets")},this.setFadeFoldWidgets=function(e){this.setOption("fadeFoldWidgets",e)},this.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},this.remove=function(e){this.selection.isEmpty()&&("left"==e?this.selection.selectLeft():this.selection.selectRight());var t=this.getSelectionRange();if(this.getBehavioursEnabled()){var n=this.session,r=n.getState(t.start.row),i=n.getMode().transformAction(r,"deletion",this,n,t);if(0===t.end.column){var o=n.getTextRange(t);if("\n"==o[o.length-1]){var a=n.getLine(t.end.row);/^\s+$/.test(a)&&(t.end.column=a.length)}}i&&(t=i)}this.session.remove(t),this.clearSelection()},this.removeWordRight=function(){this.selection.isEmpty()&&this.selection.selectWordRight(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.removeWordLeft=function(){this.selection.isEmpty()&&this.selection.selectWordLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.removeToLineStart=function(){this.selection.isEmpty()&&this.selection.selectLineStart(),this.selection.isEmpty()&&this.selection.selectLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.removeToLineEnd=function(){this.selection.isEmpty()&&this.selection.selectLineEnd();var e=this.getSelectionRange();e.start.column==e.end.column&&e.start.row==e.end.row&&(e.end.column=0,e.end.row++),this.session.remove(e),this.clearSelection()},this.splitLine=function(){this.selection.isEmpty()||(this.session.remove(this.getSelectionRange()),this.clearSelection());var e=this.getCursorPosition();this.insert("\n"),this.moveCursorToPosition(e)},this.transposeLetters=function(){if(this.selection.isEmpty()){var e=this.getCursorPosition(),t=e.column;if(0!==t){var n,r,i=this.session.getLine(e.row);tt.toLowerCase()?1:0}));var i=new h(0,0,0,0);for(r=e.first;r<=e.last;r++){var o=t.getLine(r);i.start.row=r,i.end.row=r,i.end.column=o.length,t.replace(i,n[r-e.first])}},this.toggleCommentLines=function(){var e=this.session.getState(this.getCursorPosition().row),t=this.$getSelectedRows();this.session.getMode().toggleCommentLines(e,this.session,t.first,t.last)},this.toggleBlockComment=function(){var e=this.getCursorPosition(),t=this.session.getState(e.row),n=this.getSelectionRange();this.session.getMode().toggleBlockComment(t,this.session,n,e)},this.getNumberAt=function(e,t){var n=/[\-]?[0-9]+(?:\.[0-9]+)?/g;n.lastIndex=0;for(var r=this.session.getLine(e);n.lastIndex=t)return{value:i[0],start:i.index,end:i.index+i[0].length}}return null},this.modifyNumber=function(e){var t=this.selection.getCursor().row,n=this.selection.getCursor().column,r=new h(t,n-1,t,n),i=this.session.getTextRange(r);if(!isNaN(parseFloat(i))&&isFinite(i)){var o=this.getNumberAt(t,n);if(o){var a=o.value.indexOf(".")>=0?o.start+o.value.indexOf(".")+1:o.end,s=o.start+o.value.length-a,l=parseFloat(o.value);l*=Math.pow(10,s),a!==o.end&&n=s&&a<=l&&(n=t,c.selection.clearSelection(),c.moveCursorTo(e,s+r),c.selection.selectTo(e,l+r)),s=l}));for(var u,d=this.$toggleWordPairs,f=0;fh+1)break;h=p.last}for(u--,s=this.session.$moveLines(f,h,t?0:e),t&&-1==e&&(d=u+1);d<=u;)a[d].moveBy(s,0),d++;t||(s=0),l+=s}i.fromOrientedRange(i.ranges[0]),i.rangeList.attach(this.session),this.inVirtualSelectionMode=!1}},this.$getSelectedRows=function(e){return e=(e||this.getSelectionRange()).collapseRows(),{first:this.session.getRowFoldStart(e.start.row),last:this.session.getRowFoldEnd(e.end.row)}},this.onCompositionStart=function(e){this.renderer.showComposition(e)},this.onCompositionUpdate=function(e){this.renderer.setCompositionText(e)},this.onCompositionEnd=function(){this.renderer.hideComposition()},this.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},this.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},this.isRowVisible=function(e){return e>=this.getFirstVisibleRow()&&e<=this.getLastVisibleRow()},this.isRowFullyVisible=function(e){return e>=this.renderer.getFirstFullyVisibleRow()&&e<=this.renderer.getLastFullyVisibleRow()},this.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},this.$moveByPage=function(e,t){var n=this.renderer,r=this.renderer.layerConfig,i=e*Math.floor(r.height/r.lineHeight);!0===t?this.selection.$moveSelection((function(){this.moveCursorBy(i,0)})):!1===t&&(this.selection.moveCursorBy(i,0),this.selection.clearSelection());var o=n.scrollTop;n.scrollBy(0,i*r.lineHeight),null!=t&&n.scrollCursorIntoView(null,.5),n.animateScrolling(o)},this.selectPageDown=function(){this.$moveByPage(1,!0)},this.selectPageUp=function(){this.$moveByPage(-1,!0)},this.gotoPageDown=function(){this.$moveByPage(1,!1)},this.gotoPageUp=function(){this.$moveByPage(-1,!1)},this.scrollPageDown=function(){this.$moveByPage(1)},this.scrollPageUp=function(){this.$moveByPage(-1)},this.scrollToRow=function(e){this.renderer.scrollToRow(e)},this.scrollToLine=function(e,t,n,r){this.renderer.scrollToLine(e,t,n,r)},this.centerSelection=function(){var e=this.getSelectionRange(),t={row:Math.floor(e.start.row+(e.end.row-e.start.row)/2),column:Math.floor(e.start.column+(e.end.column-e.start.column)/2)};this.renderer.alignCursor(t,.5)},this.getCursorPosition=function(){return this.selection.getCursor()},this.getCursorPositionScreen=function(){return this.session.documentToScreenPosition(this.getCursorPosition())},this.getSelectionRange=function(){return this.selection.getRange()},this.selectAll=function(){this.selection.selectAll()},this.clearSelection=function(){this.selection.clearSelection()},this.moveCursorTo=function(e,t){this.selection.moveCursorTo(e,t)},this.moveCursorToPosition=function(e){this.selection.moveCursorToPosition(e)},this.jumpToMatching=function(e,t){var n=this.getCursorPosition(),r=new y(this.session,n.row,n.column),i=r.getCurrentToken(),o=i||r.stepForward();if(o){var a,s,l=!1,c={},u=n.column-o.start,d={")":"(","(":"(","]":"[","[":"[","{":"{","}":"{"};do{if(o.value.match(/[{}()\[\]]/g)){for(;u=0;--o)this.$tryReplace(n[o],e)&&r++;return this.selection.setSelectionRange(i),r},this.$tryReplace=function(e,t){var n=this.session.getTextRange(e);return null!==(t=this.$search.replace(n,t))?(e.end=this.session.replace(e,t),e):null},this.getLastSearchOptions=function(){return this.$search.getOptions()},this.find=function(e,t,n){t||(t={}),"string"==typeof e||e instanceof RegExp?t.needle=e:"object"==typeof e&&r.mixin(t,e);var i=this.selection.getRange();null==t.needle&&((e=this.session.getTextRange(i)||this.$search.$options.needle)||(i=this.session.getWordRange(i.start.row,i.start.column),e=this.session.getTextRange(i)),this.$search.set({needle:e})),this.$search.set(t),t.start||this.$search.set({start:i});var o=this.$search.find(this.session);return t.preventScroll?o:o?(this.revealRange(o,n),o):(t.backwards?i.start=i.end:i.end=i.start,void this.selection.setRange(i))},this.findNext=function(e,t){this.find({skipCurrent:!0,backwards:!1},e,t)},this.findPrevious=function(e,t){this.find(e,{skipCurrent:!0,backwards:!0},t)},this.revealRange=function(e,t){this.session.unfold(e),this.selection.setSelectionRange(e);var n=this.renderer.scrollTop;this.renderer.scrollSelectionIntoView(e.start,e.end,.5),!1!==t&&this.renderer.animateScrolling(n)},this.undo=function(){this.session.getUndoManager().undo(this.session),this.renderer.scrollCursorIntoView(null,.5)},this.redo=function(){this.session.getUndoManager().redo(this.session),this.renderer.scrollCursorIntoView(null,.5)},this.destroy=function(){this.$toDestroy&&(this.$toDestroy.forEach((function(e){e.destroy()})),this.$toDestroy=null),this.$mouseHandler&&this.$mouseHandler.destroy(),this.renderer.destroy(),this._signal("destroy",this),this.session&&this.session.destroy(),this._$emitInputEvent&&this._$emitInputEvent.cancel(),this.removeAllListeners()},this.setAutoScrollEditorIntoView=function(e){if(e){var t,n=this,r=!1;this.$scrollAnchor||(this.$scrollAnchor=document.createElement("div"));var i=this.$scrollAnchor;i.style.cssText="position:absolute",this.container.insertBefore(i,this.container.firstChild);var o=this.on("changeSelection",(function(){r=!0})),a=this.renderer.on("beforeRender",(function(){r&&(t=n.renderer.container.getBoundingClientRect())})),s=this.renderer.on("afterRender",(function(){if(r&&t&&(n.isFocused()||n.searchBox&&n.searchBox.isFocused())){var e=n.renderer,o=e.$cursorLayer.$pixelPos,a=e.layerConfig,s=o.top-a.offset;null!=(r=o.top>=0&&s+t.top<0||!(o.topwindow.innerHeight)&&null)&&(i.style.top=s+"px",i.style.left=o.left+"px",i.style.height=a.lineHeight+"px",i.scrollIntoView(r)),r=t=null}}));this.setAutoScrollEditorIntoView=function(e){e||(delete this.setAutoScrollEditorIntoView,this.off("changeSelection",o),this.renderer.off("afterRender",s),this.renderer.off("beforeRender",a))}}},this.$resetCursorStyle=function(){var e=this.$cursorStyle||"ace",t=this.renderer.$cursorLayer;t&&(t.setSmoothBlinking(/smooth/.test(e)),t.isBlinking=!this.$readOnly&&"wide"!=e,i.setCssClass(t.element,"ace_slim-cursors",/slim/.test(e)))},this.prompt=function(e,t,n){var r=this;v.loadModule("./ext/prompt",(function(i){i.prompt(r,e,t,n)}))}}.call(x.prototype),v.defineOptions(x.prototype,"editor",{selectionStyle:{set:function(e){this.onSelectionChange(),this._signal("changeSelectionStyle",{data:e})},initialValue:"line"},highlightActiveLine:{set:function(){this.$updateHighlightActiveLine()},initialValue:!0},highlightSelectedWord:{set:function(e){this.$onSelectionChange()},initialValue:!0},readOnly:{set:function(e){this.textInput.setReadOnly(e),this.$resetCursorStyle()},initialValue:!1},copyWithEmptySelection:{set:function(e){this.textInput.setCopyWithEmptySelection(e)},initialValue:!1},cursorStyle:{set:function(e){this.$resetCursorStyle()},values:["ace","slim","smooth","wide"],initialValue:"ace"},mergeUndoDeltas:{values:[!1,!0,"always"],initialValue:!0},behavioursEnabled:{initialValue:!0},wrapBehavioursEnabled:{initialValue:!0},enableAutoIndent:{initialValue:!0},autoScrollEditorIntoView:{set:function(e){this.setAutoScrollEditorIntoView(e)}},keyboardHandler:{set:function(e){this.setKeyboardHandler(e)},get:function(){return this.$keybindingId},handlesSet:!0},value:{set:function(e){this.session.setValue(e)},get:function(){return this.getValue()},handlesSet:!0,hidden:!0},session:{set:function(e){this.setSession(e)},get:function(){return this.session},handlesSet:!0,hidden:!0},showLineNumbers:{set:function(e){this.renderer.$gutterLayer.setShowLineNumbers(e),this.renderer.$loop.schedule(this.renderer.CHANGE_GUTTER),e&&this.$relativeLineNumbers?w.attach(this):w.detach(this)},initialValue:!0},relativeLineNumbers:{set:function(e){this.$showLineNumbers&&e?w.attach(this):w.detach(this)}},placeholder:{set:function(e){this.$updatePlaceholder||(this.$updatePlaceholder=function(){var e=this.session&&(this.renderer.$composition||this.getValue());if(e&&this.renderer.placeholderNode)this.renderer.off("afterRender",this.$updatePlaceholder),i.removeCssClass(this.container,"ace_hasPlaceholder"),this.renderer.placeholderNode.remove(),this.renderer.placeholderNode=null;else if(e||this.renderer.placeholderNode)!e&&this.renderer.placeholderNode&&(this.renderer.placeholderNode.textContent=this.$placeholder||"");else{this.renderer.on("afterRender",this.$updatePlaceholder),i.addCssClass(this.container,"ace_hasPlaceholder");var t=i.createElement("div");t.className="ace_placeholder",t.textContent=this.$placeholder||"",this.renderer.placeholderNode=t,this.renderer.content.appendChild(this.renderer.placeholderNode)}}.bind(this),this.on("input",this.$updatePlaceholder)),this.$updatePlaceholder()}},hScrollBarAlwaysVisible:"renderer",vScrollBarAlwaysVisible:"renderer",highlightGutterLine:"renderer",animatedScroll:"renderer",showInvisibles:"renderer",showPrintMargin:"renderer",printMarginColumn:"renderer",printMargin:"renderer",fadeFoldWidgets:"renderer",showFoldWidgets:"renderer",displayIndentGuides:"renderer",showGutter:"renderer",fontSize:"renderer",fontFamily:"renderer",maxLines:"renderer",minLines:"renderer",scrollPastEnd:"renderer",fixedWidthGutter:"renderer",theme:"renderer",hasCssTransforms:"renderer",maxPixelHeight:"renderer",useTextareaForIME:"renderer",scrollSpeed:"$mouseHandler",dragDelay:"$mouseHandler",dragEnabled:"$mouseHandler",focusTimeout:"$mouseHandler",tooltipFollowsMouse:"$mouseHandler",firstLineNumber:"session",overwrite:"session",newLineMode:"session",useWorker:"session",useSoftTabs:"session",navigateWithinSoftTabs:"session",tabSize:"session",wrap:"session",indentedSoftWrap:"session",foldStyle:"session",mode:"session"});var w={getText:function(e,t){return(Math.abs(e.selection.lead.row-t)||t+1+(t<9?"\xb7":""))+""},getWidth:function(e,t,n){return Math.max(t.toString().length,(n.lastRow+1).toString().length,2)*n.characterWidth},update:function(e,t){t.renderer.$loop.schedule(t.renderer.CHANGE_GUTTER)},attach:function(e){e.renderer.$gutterLayer.$renderer=this,e.on("changeSelection",this.update),this.update(null,e)},detach:function(e){e.renderer.$gutterLayer.$renderer==this&&(e.renderer.$gutterLayer.$renderer=null),e.off("changeSelection",this.update),this.update(null,e)}};t.Editor=x})),ace.define("ace/undomanager",["require","exports","module","ace/range"],(function(e,t,n){"use strict";var r=function(){this.$maxRev=0,this.$fromUndo=!1,this.reset()};(function(){this.addSession=function(e){this.$session=e},this.add=function(e,t,n){this.$fromUndo||e!=this.$lastDelta&&(this.$keepRedoStack||(this.$redoStack.length=0),!1!==t&&this.lastDeltas||(this.lastDeltas=[],this.$undoStack.push(this.lastDeltas),e.id=this.$rev=++this.$maxRev),"remove"!=e.action&&"insert"!=e.action||(this.$lastDelta=e),this.lastDeltas.push(e))},this.addSelection=function(e,t){this.selections.push({value:e,rev:t||this.$rev})},this.startNewGroup=function(){return this.lastDeltas=null,this.$rev},this.markIgnored=function(e,t){null==t&&(t=this.$rev+1);for(var n=this.$undoStack,r=n.length;r--;){var i=n[r][0];if(i.id<=e)break;i.id0},this.canRedo=function(){return this.$redoStack.length>0},this.bookmark=function(e){void 0==e&&(e=this.$rev),this.mark=e},this.isAtBookmark=function(){return this.$rev===this.mark},this.toJSON=function(){},this.fromJSON=function(){},this.hasUndo=this.canUndo,this.hasRedo=this.canRedo,this.isClean=this.isAtBookmark,this.markClean=this.bookmark,this.$prettyPrint=function(e){return e?s(e):s(this.$undoStack)+"\n---\n"+s(this.$redoStack)}}).call(r.prototype);var i=e("./range").Range,o=i.comparePoints;i.comparePoints;function a(e){return{row:e.row,column:e.column}}function s(e){if(e=e||this,Array.isArray(e))return e.map(s).join("\n");var t="";return e.action?(t="insert"==e.action?"+":"-",t+="["+e.lines+"]"):e.value&&(t=Array.isArray(e.value)?e.value.map(l).join("\n"):l(e.value)),e.start&&(t+=l(e)),(e.id||e.rev)&&(t+="\t("+(e.id||e.rev)+")"),t}function l(e){return e.start.row+":"+e.start.column+"=>"+e.end.row+":"+e.end.column}function c(e,t){var n="insert"==e.action,r="insert"==t.action;if(n&&r)if(o(t.start,e.end)>=0)f(t,e,-1);else{if(!(o(t.start,e.start)<=0))return null;f(e,t,1)}else if(n&&!r)if(o(t.start,e.end)>=0)f(t,e,-1);else{if(!(o(t.end,e.start)<=0))return null;f(e,t,-1)}else if(!n&&r)if(o(t.start,e.start)>=0)f(t,e,1);else{if(!(o(t.start,e.start)<=0))return null;f(e,t,1)}else if(!n&&!r)if(o(t.start,e.start)>=0)f(t,e,1);else{if(!(o(t.end,e.start)<=0))return null;f(e,t,-1)}return[t,e]}function u(e,t){for(var n=e.length;n--;)for(var r=0;r=0?f(e,t,-1):(o(e.start,t.start)<=0||f(e,i.fromPoints(t.start,e.start),-1),f(t,e,1));else if(!n&&r)o(t.start,e.end)>=0?f(t,e,-1):(o(t.start,e.start)<=0||f(t,i.fromPoints(e.start,t.start),-1),f(e,t,1));else if(!n&&!r)if(o(t.start,e.end)>=0)f(t,e,-1);else{var a,s;if(!(o(t.end,e.start)<=0))return o(e.start,t.start)<0&&(a=e,e=p(e,t.start)),o(e.end,t.end)>0&&(s=p(e,t.end)),h(t.end,e.start,e.end,-1),s&&!a&&(e.lines=s.lines,e.start=s.start,e.end=s.end,s=e),[t,a,s].filter(Boolean);f(e,t,-1)}return[t,e]}function f(e,t,n){h(e.start,t.start,t.end,n),h(e.end,t.start,t.end,n)}function h(e,t,n,r){e.row==(1==r?t:n).row&&(e.column+=r*(n.column-t.column)),e.row+=r*(n.row-t.row)}function p(e,t){var n=e.lines,r=e.end;e.end=a(t);var i=e.end.row-e.start.row,o=n.splice(i,n.length),s=i?t.column:t.column-e.start.column;return n.push(o[0].substring(0,s)),o[0]=o[0].substr(s),{start:a(t),end:r,lines:o,action:e.action}}function m(e,t){t=function(e){return{start:a(e.start),end:a(e.end),action:e.action,lines:e.lines.slice()}}(t);for(var n=e.length;n--;){for(var r=e[n],i=0;io&&(l=i.end.row+1,o=(i=t.getNextFoldLine(l,i))?i.start.row:1/0),l>r){for(;this.$lines.getLength()>s+1;)this.$lines.pop();break}(a=this.$lines.get(++s))?a.row=l:(a=this.$lines.createCell(l,e,this.session,c),this.$lines.push(a)),this.$renderCell(a,e,i,l),l++}this._signal("afterRender"),this.$updateGutterWidth(e)},this.$updateGutterWidth=function(e){var t=this.session,n=t.gutterRenderer||this.$renderer,r=t.$firstLineNumber,i=this.$lines.last()?this.$lines.last().text:"";(this.$fixedWidth||t.$useWrapMode)&&(i=t.getLength()+r-1);var o=n?n.getWidth(t,i,e):i.toString().length*e.characterWidth,a=this.$padding||this.$computePadding();(o+=a.left+a.right)===this.gutterWidth||isNaN(o)||(this.gutterWidth=o,this.element.parentNode.style.width=this.element.style.width=Math.ceil(this.gutterWidth)+"px",this._signal("changeGutterWidth",o))},this.$updateCursorRow=function(){if(this.$highlightGutterLine){var e=this.session.selection.getCursor();this.$cursorRow!==e.row&&(this.$cursorRow=e.row)}},this.updateLineHighlight=function(){if(this.$highlightGutterLine){var e=this.session.selection.cursor.row;if(this.$cursorRow=e,!this.$cursorCell||this.$cursorCell.row!=e){this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ",""));var t=this.$lines.cells;this.$cursorCell=null;for(var n=0;n=this.$cursorRow){if(r.row>this.$cursorRow){var i=this.session.getFoldLine(this.$cursorRow);if(!(n>0&&i&&i.start.row==t[n-1].row))break;r=t[n-1]}r.element.className="ace_gutter-active-line "+r.element.className,this.$cursorCell=r;break}}}}},this.scrollLines=function(e){var t=this.config;if(this.config=e,this.$updateCursorRow(),this.$lines.pageChanged(t,e))return this.update(e);this.$lines.moveContainer(e);var n=Math.min(e.lastRow+e.gutterOffset,this.session.getLength()-1),r=this.oldLastRow;if(this.oldLastRow=n,!t||r0;i--)this.$lines.shift();if(r>n)for(i=this.session.getFoldedRowCount(n+1,r);i>0;i--)this.$lines.pop();e.firstRowr&&this.$lines.push(this.$renderLines(e,r+1,n)),this.updateLineHighlight(),this._signal("afterRender"),this.$updateGutterWidth(e)},this.$renderLines=function(e,t,n){for(var r=[],i=t,o=this.session.getNextFoldLine(i),a=o?o.start.row:1/0;i>a&&(i=o.end.row+1,a=(o=this.session.getNextFoldLine(i,o))?o.start.row:1/0),!(i>n);){var s=this.$lines.createCell(i,e,this.session,c);this.$renderCell(s,e,o,i),r.push(s),i++}return r},this.$renderCell=function(e,t,n,i){var o=e.element,a=this.session,s=o.childNodes[0],l=o.childNodes[1],c=a.$firstLineNumber,u=a.$breakpoints,d=a.$decorations,f=a.gutterRenderer||this.$renderer,h=this.$showFoldWidgets&&a.foldWidgets,p=n?n.start.row:Number.MAX_VALUE,m="ace_gutter-cell ";if(this.$highlightGutterLine&&(i==this.$cursorRow||n&&i=p&&this.$cursorRow<=n.end.row)&&(m+="ace_gutter-active-line ",this.$cursorCell!=e&&(this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ","")),this.$cursorCell=e)),u[i]&&(m+=u[i]),d[i]&&(m+=d[i]),this.$annotations[i]&&(m+=this.$annotations[i].className),o.className!=m&&(o.className=m),h){var g=h[i];null==g&&(g=h[i]=a.getFoldWidget(i))}if(g){m="ace_fold-widget ace_"+g;"start"==g&&i==p&&in.right-t.right?"foldWidgets":void 0}}).call(l.prototype),t.Gutter=l})),ace.define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"],(function(e,t,n){"use strict";var r=e("../range").Range,i=e("../lib/dom"),o=function(e){this.element=i.createElement("div"),this.element.className="ace_layer ace_marker-layer",e.appendChild(this.element)};(function(){this.$padding=0,this.setPadding=function(e){this.$padding=e},this.setSession=function(e){this.session=e},this.setMarkers=function(e){this.markers=e},this.elt=function(e,t){var n=-1!=this.i&&this.element.childNodes[this.i];n?this.i++:(n=document.createElement("div"),this.element.appendChild(n),this.i=-1),n.style.cssText=t,n.className=e},this.update=function(e){if(e){var t;for(var n in this.config=e,this.i=0,this.markers){var r=this.markers[n];if(r.range){var i=r.range.clipRows(e.firstRow,e.lastRow);if(!i.isEmpty())if(i=i.toScreenRange(this.session),r.renderer){var o=this.$getTop(i.start.row,e),a=this.$padding+i.start.column*e.characterWidth;r.renderer(t,i,a,o,e)}else"fullLine"==r.type?this.drawFullLineMarker(t,i,r.clazz,e):"screenLine"==r.type?this.drawScreenLineMarker(t,i,r.clazz,e):i.isMultiLine()?"text"==r.type?this.drawTextMarker(t,i,r.clazz,e):this.drawMultiLineMarker(t,i,r.clazz,e):this.drawSingleLineMarker(t,i,r.clazz+" ace_start ace_br15",e)}else r.update(t,this,this.session,e)}if(-1!=this.i)for(;this.if?4:0)|(c==l?8:0)),i,c==l?0:1,o)},this.drawMultiLineMarker=function(e,t,n,r,i){var o=this.$padding,a=r.lineHeight,s=this.$getTop(t.start.row,r),l=o+t.start.column*r.characterWidth;(i=i||"",this.session.$bidiHandler.isBidiRow(t.start.row))?((c=t.clone()).end.row=c.start.row,c.end.column=this.session.getLine(c.start.row).length,this.drawBidiSingleLineMarker(e,c,n+" ace_br1 ace_start",r,null,i)):this.elt(n+" ace_br1 ace_start","height:"+a+"px;right:0;top:"+s+"px;left:"+l+"px;"+(i||""));if(this.session.$bidiHandler.isBidiRow(t.end.row)){var c;(c=t.clone()).start.row=c.end.row,c.start.column=0,this.drawBidiSingleLineMarker(e,c,n+" ace_br12",r,null,i)}else{s=this.$getTop(t.end.row,r);var u=t.end.column*r.characterWidth;this.elt(n+" ace_br12","height:"+a+"px;width:"+u+"px;top:"+s+"px;left:"+o+"px;"+(i||""))}if(!((a=(t.end.row-t.start.row-1)*r.lineHeight)<=0)){s=this.$getTop(t.start.row+1,r);var d=(t.start.column?1:0)|(t.end.column?0:8);this.elt(n+(d?" ace_br"+d:""),"height:"+a+"px;right:0;top:"+s+"px;left:"+o+"px;"+(i||""))}},this.drawSingleLineMarker=function(e,t,n,r,i,o){if(this.session.$bidiHandler.isBidiRow(t.start.row))return this.drawBidiSingleLineMarker(e,t,n,r,i,o);var a=r.lineHeight,s=(t.end.column+(i||0)-t.start.column)*r.characterWidth,l=this.$getTop(t.start.row,r),c=this.$padding+t.start.column*r.characterWidth;this.elt(n,"height:"+a+"px;width:"+s+"px;top:"+l+"px;left:"+c+"px;"+(o||""))},this.drawBidiSingleLineMarker=function(e,t,n,r,i,o){var a=r.lineHeight,s=this.$getTop(t.start.row,r),l=this.$padding;this.session.$bidiHandler.getSelections(t.start.column,t.end.column).forEach((function(e){this.elt(n,"height:"+a+"px;width:"+e.width+(i||0)+"px;top:"+s+"px;left:"+(l+e.left)+"px;"+(o||""))}),this)},this.drawFullLineMarker=function(e,t,n,r,i){var o=this.$getTop(t.start.row,r),a=r.lineHeight;t.start.row!=t.end.row&&(a+=this.$getTop(t.end.row,r)-o),this.elt(n,"height:"+a+"px;top:"+o+"px;left:0;right:0;"+(i||""))},this.drawScreenLineMarker=function(e,t,n,r,i){var o=this.$getTop(t.start.row,r),a=r.lineHeight;this.elt(n,"height:"+a+"px;top:"+o+"px;left:0;right:0;"+(i||""))}}).call(o.prototype),t.Marker=o})),ace.define("ace/layer/text",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/layer/lines","ace/lib/event_emitter"],(function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/dom"),o=e("../lib/lang"),a=e("./lines").Lines,s=e("../lib/event_emitter").EventEmitter,l=function(e){this.dom=i,this.element=this.dom.createElement("div"),this.element.className="ace_layer ace_text-layer",e.appendChild(this.element),this.$updateEolChar=this.$updateEolChar.bind(this),this.$lines=new a(this.element)};(function(){r.implement(this,s),this.EOF_CHAR="\xb6",this.EOL_CHAR_LF="\xac",this.EOL_CHAR_CRLF="\xa4",this.EOL_CHAR=this.EOL_CHAR_LF,this.TAB_CHAR="\u2014",this.SPACE_CHAR="\xb7",this.$padding=0,this.MAX_LINE_LENGTH=1e4,this.$updateEolChar=function(){var e=this.session.doc,t="\n"==e.getNewLineCharacter()&&"windows"!=e.getNewLineMode()?this.EOL_CHAR_LF:this.EOL_CHAR_CRLF;if(this.EOL_CHAR!=t)return this.EOL_CHAR=t,!0},this.setPadding=function(e){this.$padding=e,this.element.style.margin="0 "+e+"px"},this.getLineHeight=function(){return this.$fontMetrics.$characterSize.height||0},this.getCharacterWidth=function(){return this.$fontMetrics.$characterSize.width||0},this.$setFontMetrics=function(e){this.$fontMetrics=e,this.$fontMetrics.on("changeCharacterSize",function(e){this._signal("changeCharacterSize",e)}.bind(this)),this.$pollSizeChanges()},this.checkForSizeChanges=function(){this.$fontMetrics.checkForSizeChanges()},this.$pollSizeChanges=function(){return this.$pollSizeChangesTimer=this.$fontMetrics.$pollSizeChanges()},this.setSession=function(e){this.session=e,e&&this.$computeTabString()},this.showInvisibles=!1,this.showSpaces=!1,this.showTabs=!1,this.showEOL=!1,this.setShowInvisibles=function(e){return this.showInvisibles!=e&&(this.showInvisibles=e,"string"==typeof e?(this.showSpaces=/tab/i.test(e),this.showTabs=/space/i.test(e),this.showEOL=/eol/i.test(e)):this.showSpaces=this.showTabs=this.showEOL=e,this.$computeTabString(),!0)},this.displayIndentGuides=!0,this.setDisplayIndentGuides=function(e){return this.displayIndentGuides!=e&&(this.displayIndentGuides=e,this.$computeTabString(),!0)},this.$tabStrings=[],this.onChangeTabSize=this.$computeTabString=function(){var e=this.session.getTabSize();this.tabSize=e;for(var t=this.$tabStrings=[0],n=1;nu&&(s=l.end.row+1,u=(l=this.session.getNextFoldLine(s,l))?l.start.row:1/0),!(s>i);){var d=o[a++];if(d){this.dom.removeChildren(d),this.$renderLine(d,s,s==u&&l),c&&(d.style.top=this.$lines.computeLineTop(s,e,this.session)+"px");var f=e.lineHeight*this.session.getRowLength(s)+"px";d.style.height!=f&&(c=!0,d.style.height=f)}s++}if(c)for(;a0;i--)this.$lines.shift();if(t.lastRow>e.lastRow)for(i=this.session.getFoldedRowCount(e.lastRow+1,t.lastRow);i>0;i--)this.$lines.pop();e.firstRowt.lastRow&&this.$lines.push(this.$renderLinesFragment(e,t.lastRow+1,e.lastRow))},this.$renderLinesFragment=function(e,t,n){for(var r=[],o=t,a=this.session.getNextFoldLine(o),s=a?a.start.row:1/0;o>s&&(o=a.end.row+1,s=(a=this.session.getNextFoldLine(o,a))?a.start.row:1/0),!(o>n);){var l=this.$lines.createCell(o,e,this.session),c=l.element;this.dom.removeChildren(c),i.setStyle(c.style,"height",this.$lines.computeLineHeight(o,e,this.session)+"px"),i.setStyle(c.style,"top",this.$lines.computeLineTop(o,e,this.session)+"px"),this.$renderLine(c,o,o==s&&a),this.$useLineGroups()?c.className="ace_line_group":c.className="ace_line",r.push(l),o++}return r},this.update=function(e){this.$lines.moveContainer(e),this.config=e;for(var t=e.firstRow,n=e.lastRow,r=this.$lines;r.getLength();)r.pop();r.push(this.$renderLinesFragment(e,t,n))},this.$textToken={text:!0,rparen:!0,lparen:!0},this.$renderToken=function(e,t,n,r){for(var i,a=this,s=/(\t)|( +)|([\x00-\x1f\x80-\xa0\xad\u1680\u180E\u2000-\u200f\u2028\u2029\u202F\u205F\uFEFF\uFFF9-\uFFFC]+)|(\u3000)|([\u1100-\u115F\u11A3-\u11A7\u11FA-\u11FF\u2329-\u232A\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3001-\u303E\u3041-\u3096\u3099-\u30FF\u3105-\u312D\u3131-\u318E\u3190-\u31BA\u31C0-\u31E3\u31F0-\u321E\u3220-\u3247\u3250-\u32FE\u3300-\u4DBF\u4E00-\uA48C\uA490-\uA4C6\uA960-\uA97C\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFAFF\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE66\uFE68-\uFE6B\uFF01-\uFF60\uFFE0-\uFFE6]|[\uD800-\uDBFF][\uDC00-\uDFFF])/g,l=this.dom.createFragment(this.element),c=0;i=s.exec(r);){var u=i[1],d=i[2],f=i[3],h=i[4],p=i[5];if(a.showSpaces||!d){var m=c!=i.index?r.slice(c,i.index):"";if(c=i.index+i[0].length,m&&l.appendChild(this.dom.createTextNode(m,this.element)),u){var g=a.session.getScreenTabSize(t+i.index);l.appendChild(a.$tabStrings[g].cloneNode(!0)),t+=g-1}else if(d){if(a.showSpaces)(y=this.dom.createElement("span")).className="ace_invisible ace_invisible_space",y.textContent=o.stringRepeat(a.SPACE_CHAR,d.length),l.appendChild(y);else l.appendChild(this.com.createTextNode(d,this.element))}else if(f){(y=this.dom.createElement("span")).className="ace_invisible ace_invisible_space ace_invalid",y.textContent=o.stringRepeat(a.SPACE_CHAR,f.length),l.appendChild(y)}else if(h){t+=1,(y=this.dom.createElement("span")).style.width=2*a.config.characterWidth+"px",y.className=a.showSpaces?"ace_cjk ace_invisible ace_invisible_space":"ace_cjk",y.textContent=a.showSpaces?a.SPACE_CHAR:h,l.appendChild(y)}else if(p){t+=1,(y=this.dom.createElement("span")).style.width=2*a.config.characterWidth+"px",y.className="ace_cjk",y.textContent=p,l.appendChild(y)}}}if(l.appendChild(this.dom.createTextNode(c?r.slice(c):r,this.element)),this.$textToken[n.type])e.appendChild(l);else{var v="ace_"+n.type.replace(/\./g," ace_"),y=this.dom.createElement("span");"fold"==n.type&&(y.style.width=n.value.length*this.config.characterWidth+"px"),y.className=v,y.appendChild(l),e.appendChild(y)}return t+r.length},this.renderIndentGuide=function(e,t,n){var r=t.search(this.$indentGuideRe);if(r<=0||r>=n)return t;if(" "==t[0]){for(var i=(r-=r%this.tabSize)/this.tabSize,o=0;o=a;)s=this.$renderToken(l,s,u,d.substring(0,a-r)),d=d.substring(a-r),r=a,l=this.$createLineElement(),e.appendChild(l),l.appendChild(this.dom.createTextNode(o.stringRepeat("\xa0",n.indent),this.element)),s=0,a=n[++i]||Number.MAX_VALUE;0!=d.length&&(r+=d.length,s=this.$renderToken(l,s,u,d))}}n[n.length-1]>this.MAX_LINE_LENGTH&&this.$renderOverflowMessage(l,s,null,"",!0)},this.$renderSimpleLine=function(e,t){var n=0,r=t[0],i=r.value;this.displayIndentGuides&&(i=this.renderIndentGuide(e,i)),i&&(n=this.$renderToken(e,n,r,i));for(var o=1;othis.MAX_LINE_LENGTH)return this.$renderOverflowMessage(e,n,r,i);n=this.$renderToken(e,n,r,i)}},this.$renderOverflowMessage=function(e,t,n,r,i){n&&this.$renderToken(e,t,n,r.slice(0,this.MAX_LINE_LENGTH-t));var o=this.dom.createElement("span");o.className="ace_inline_button ace_keyword ace_toggle_wrap",o.textContent=i?"":"",e.appendChild(o)},this.$renderLine=function(e,t,n){if(n||0==n||(n=this.session.getFoldLine(t)),n)var r=this.$getFoldLineTokens(t,n);else r=this.session.getTokens(t);var i=e;if(r.length){var o=this.session.getRowSplitData(t);if(o&&o.length){this.$renderWrappedLine(e,r,o);i=e.lastChild}else{i=e;this.$useLineGroups()&&(i=this.$createLineElement(),e.appendChild(i)),this.$renderSimpleLine(i,r)}}else this.$useLineGroups()&&(i=this.$createLineElement(),e.appendChild(i));if(this.showEOL&&i){n&&(t=n.end.row);var a=this.dom.createElement("span");a.className="ace_invisible ace_invisible_eol",a.textContent=t==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,i.appendChild(a)}},this.$getFoldLineTokens=function(e,t){var n=this.session,r=[];var i=n.getTokens(e);return t.walk((function(e,t,o,a,s){null!=e?r.push({type:"fold",value:e}):(s&&(i=n.getTokens(t)),i.length&&function(e,t,n){for(var i=0,o=0;o+e[i].value.lengthn-t&&(a=a.substring(0,n-t)),r.push({type:e[i].type,value:a}),o=t+a.length,i+=1);on?r.push({type:e[i].type,value:a.substring(0,n-o)}):r.push(e[i]),o+=a.length,i+=1}}(i,a,o))}),t.end.row,this.session.getLine(t.end.row).length),r},this.$useLineGroups=function(){return this.session.getUseWrapMode()},this.destroy=function(){}}).call(l.prototype),t.Text=l})),ace.define("ace/layer/cursor",["require","exports","module","ace/lib/dom"],(function(e,t,n){"use strict";var r=e("../lib/dom"),i=function(e){this.element=r.createElement("div"),this.element.className="ace_layer ace_cursor-layer",e.appendChild(this.element),this.isVisible=!1,this.isBlinking=!0,this.blinkInterval=1e3,this.smoothBlinking=!1,this.cursors=[],this.cursor=this.addCursor(),r.addCssClass(this.element,"ace_hidden-cursors"),this.$updateCursors=this.$updateOpacity.bind(this)};(function(){this.$updateOpacity=function(e){for(var t=this.cursors,n=t.length;n--;)r.setStyle(t[n].style,"opacity",e?"":"0")},this.$startCssAnimation=function(){for(var e=this.cursors,t=e.length;t--;)e[t].style.animationDuration=this.blinkInterval+"ms";setTimeout(function(){r.addCssClass(this.element,"ace_animate-blinking")}.bind(this))},this.$stopCssAnimation=function(){r.removeCssClass(this.element,"ace_animate-blinking")},this.$padding=0,this.setPadding=function(e){this.$padding=e},this.setSession=function(e){this.session=e},this.setBlinking=function(e){e!=this.isBlinking&&(this.isBlinking=e,this.restartTimer())},this.setBlinkInterval=function(e){e!=this.blinkInterval&&(this.blinkInterval=e,this.restartTimer())},this.setSmoothBlinking=function(e){e!=this.smoothBlinking&&(this.smoothBlinking=e,r.setCssClass(this.element,"ace_smooth-blinking",e),this.$updateCursors(!0),this.restartTimer())},this.addCursor=function(){var e=r.createElement("div");return e.className="ace_cursor",this.element.appendChild(e),this.cursors.push(e),e},this.removeCursor=function(){if(this.cursors.length>1){var e=this.cursors.pop();return e.parentNode.removeChild(e),e}},this.hideCursor=function(){this.isVisible=!1,r.addCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},this.showCursor=function(){this.isVisible=!0,r.removeCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},this.restartTimer=function(){var e=this.$updateCursors;if(clearInterval(this.intervalId),clearTimeout(this.timeoutId),this.$stopCssAnimation(),this.smoothBlinking&&r.removeCssClass(this.element,"ace_smooth-blinking"),e(!0),this.isBlinking&&this.blinkInterval&&this.isVisible)if(this.smoothBlinking&&setTimeout(function(){r.addCssClass(this.element,"ace_smooth-blinking")}.bind(this)),r.HAS_CSS_ANIMATION)this.$startCssAnimation();else{var t=function(){this.timeoutId=setTimeout((function(){e(!1)}),.6*this.blinkInterval)}.bind(this);this.intervalId=setInterval((function(){e(!0),t()}),this.blinkInterval),t()}else this.$stopCssAnimation()},this.getPixelPosition=function(e,t){if(!this.config||!this.session)return{left:0,top:0};e||(e=this.session.selection.getCursor());var n=this.session.documentToScreenPosition(e);return{left:this.$padding+(this.session.$bidiHandler.isBidiRow(n.row,e.row)?this.session.$bidiHandler.getPosLeft(n.column):n.column*this.config.characterWidth),top:(n.row-(t?this.config.firstRowScreen:0))*this.config.lineHeight}},this.isCursorInView=function(e,t){return e.top>=0&&e.tope.height+e.offset||a.top<0)&&n>1)){var s=this.cursors[i++]||this.addCursor(),l=s.style;this.drawCursor?this.drawCursor(s,a,e,t[n],this.session):this.isCursorInView(a,e)?(r.setStyle(l,"display","block"),r.translate(s,a.left,a.top),r.setStyle(l,"width",Math.round(e.characterWidth)+"px"),r.setStyle(l,"height",e.lineHeight+"px")):r.setStyle(l,"display","none")}}for(;this.cursors.length>i;)this.removeCursor();var c=this.session.getOverwrite();this.$setOverwrite(c),this.$pixelPos=a,this.restartTimer()},this.drawCursor=null,this.$setOverwrite=function(e){e!=this.overwrite&&(this.overwrite=e,e?r.addCssClass(this.element,"ace_overwrite-cursors"):r.removeCssClass(this.element,"ace_overwrite-cursors"))},this.destroy=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId)}}).call(i.prototype),t.Cursor=i})),ace.define("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],(function(e,t,n){"use strict";var r=e("./lib/oop"),i=e("./lib/dom"),o=e("./lib/event"),a=e("./lib/event_emitter").EventEmitter,s=32768,l=function(e){this.element=i.createElement("div"),this.element.className="ace_scrollbar ace_scrollbar"+this.classSuffix,this.inner=i.createElement("div"),this.inner.className="ace_scrollbar-inner",this.inner.textContent="\xa0",this.element.appendChild(this.inner),e.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,o.addListener(this.element,"scroll",this.onScroll.bind(this)),o.addListener(this.element,"mousedown",o.preventDefault)};(function(){r.implement(this,a),this.setVisible=function(e){this.element.style.display=e?"":"none",this.isVisible=e,this.coeff=1}}).call(l.prototype);var c=function(e,t){l.call(this,e),this.scrollTop=0,this.scrollHeight=0,t.$scrollbarWidth=this.width=i.scrollbarWidth(e.ownerDocument),this.inner.style.width=this.element.style.width=(this.width||15)+5+"px",this.$minWidth=0};r.inherits(c,l),function(){this.classSuffix="-v",this.onScroll=function(){if(!this.skipEvent){if(this.scrollTop=this.element.scrollTop,1!=this.coeff){var e=this.element.clientHeight/this.scrollHeight;this.scrollTop=this.scrollTop*(1-e)/(this.coeff-e)}this._emit("scroll",{data:this.scrollTop})}this.skipEvent=!1},this.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},this.setHeight=function(e){this.element.style.height=e+"px"},this.setInnerHeight=this.setScrollHeight=function(e){this.scrollHeight=e,e>s?(this.coeff=s/e,e=s):1!=this.coeff&&(this.coeff=1),this.inner.style.height=e+"px"},this.setScrollTop=function(e){this.scrollTop!=e&&(this.skipEvent=!0,this.scrollTop=e,this.element.scrollTop=e*this.coeff)}}.call(c.prototype);var u=function(e,t){l.call(this,e),this.scrollLeft=0,this.height=t.$scrollbarWidth,this.inner.style.height=this.element.style.height=(this.height||15)+5+"px"};r.inherits(u,l),function(){this.classSuffix="-h",this.onScroll=function(){this.skipEvent||(this.scrollLeft=this.element.scrollLeft,this._emit("scroll",{data:this.scrollLeft})),this.skipEvent=!1},this.getHeight=function(){return this.isVisible?this.height:0},this.setWidth=function(e){this.element.style.width=e+"px"},this.setInnerWidth=function(e){this.inner.style.width=e+"px"},this.setScrollWidth=function(e){this.inner.style.width=e+"px"},this.setScrollLeft=function(e){this.scrollLeft!=e&&(this.skipEvent=!0,this.scrollLeft=this.element.scrollLeft=e)}}.call(u.prototype),t.ScrollBar=c,t.ScrollBarV=c,t.ScrollBarH=u,t.VScrollBar=c,t.HScrollBar=u})),ace.define("ace/renderloop",["require","exports","module","ace/lib/event"],(function(e,t,n){"use strict";var r=e("./lib/event"),i=function(e,t){this.onRender=e,this.pending=!1,this.changes=0,this.$recursionLimit=2,this.window=t||window;var n=this;this._flush=function(e){n.pending=!1;var t=n.changes;if(t&&(r.blockIdle(100),n.changes=0,n.onRender(t)),n.changes){if(n.$recursionLimit--<0)return;n.schedule()}else n.$recursionLimit=2}};(function(){this.schedule=function(e){this.changes=this.changes|e,this.changes&&!this.pending&&(r.nextFrame(this._flush),this.pending=!0)},this.clear=function(e){var t=this.changes;return this.changes=0,t}}).call(i.prototype),t.RenderLoop=i})),ace.define("ace/layer/font_metrics",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/event","ace/lib/useragent","ace/lib/event_emitter"],(function(e,t,n){var r=e("../lib/oop"),i=e("../lib/dom"),o=e("../lib/lang"),a=e("../lib/event"),s=e("../lib/useragent"),l=e("../lib/event_emitter").EventEmitter,c=256,u="function"==typeof ResizeObserver,d=200,f=t.FontMetrics=function(e){this.el=i.createElement("div"),this.$setMeasureNodeStyles(this.el.style,!0),this.$main=i.createElement("div"),this.$setMeasureNodeStyles(this.$main.style),this.$measureNode=i.createElement("div"),this.$setMeasureNodeStyles(this.$measureNode.style),this.el.appendChild(this.$main),this.el.appendChild(this.$measureNode),e.appendChild(this.el),this.$measureNode.textContent=o.stringRepeat("X",c),this.$characterSize={width:0,height:0},u?this.$addObserver():this.checkForSizeChanges()};(function(){r.implement(this,l),this.$characterSize={width:0,height:0},this.$setMeasureNodeStyles=function(e,t){e.width=e.height="auto",e.left=e.top="0px",e.visibility="hidden",e.position="absolute",e.whiteSpace="pre",s.isIE<8?e["font-family"]="inherit":e.font="inherit",e.overflow=t?"hidden":"visible"},this.checkForSizeChanges=function(e){if(void 0===e&&(e=this.$measureSizes()),e&&(this.$characterSize.width!==e.width||this.$characterSize.height!==e.height)){this.$measureNode.style.fontWeight="bold";var t=this.$measureSizes();this.$measureNode.style.fontWeight="",this.$characterSize=e,this.charSizes=Object.create(null),this.allowBoldFonts=t&&t.width===e.width&&t.height===e.height,this._emit("changeCharacterSize",{data:e})}},this.$addObserver=function(){var e=this;this.$observer=new window.ResizeObserver((function(t){e.checkForSizeChanges()})),this.$observer.observe(this.$measureNode)},this.$pollSizeChanges=function(){if(this.$pollSizeChangesTimer||this.$observer)return this.$pollSizeChangesTimer;var e=this;return this.$pollSizeChangesTimer=a.onIdle((function t(){e.checkForSizeChanges(),a.onIdle(t,500)}),500)},this.setPolling=function(e){e?this.$pollSizeChanges():this.$pollSizeChangesTimer&&(clearInterval(this.$pollSizeChangesTimer),this.$pollSizeChangesTimer=0)},this.$measureSizes=function(e){var t={height:(e||this.$measureNode).clientHeight,width:(e||this.$measureNode).clientWidth/c};return 0===t.width||0===t.height?null:t},this.$measureCharWidth=function(e){return this.$main.textContent=o.stringRepeat(e,c),this.$main.getBoundingClientRect().width/c},this.getCharacterWidth=function(e){var t=this.charSizes[e];return void 0===t&&(t=this.charSizes[e]=this.$measureCharWidth(e)/this.$characterSize.width),t},this.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.$observer&&this.$observer.disconnect(),this.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el)},this.$getZoom=function e(t){return t&&t.parentElement?(window.getComputedStyle(t).zoom||1)*e(t.parentElement):1},this.$initTransformMeasureNodes=function(){var e=function(e,t){return["div",{style:"position: absolute;top:"+e+"px;left:"+t+"px;"}]};this.els=i.buildDom([e(0,0),e(d,0),e(0,d),e(d,d)],this.el)},this.transformCoordinates=function(e,t){e&&(e=o(1/this.$getZoom(this.el),e));function n(e,t,n){var r=e[1]*t[0]-e[0]*t[1];return[(-t[1]*n[0]+t[0]*n[1])/r,(+e[1]*n[0]-e[0]*n[1])/r]}function r(e,t){return[e[0]-t[0],e[1]-t[1]]}function i(e,t){return[e[0]+t[0],e[1]+t[1]]}function o(e,t){return[e*t[0],e*t[1]]}function a(e){var t=e.getBoundingClientRect();return[t.left,t.top]}this.els||this.$initTransformMeasureNodes();var s=a(this.els[0]),l=a(this.els[1]),c=a(this.els[2]),u=a(this.els[3]),f=n(r(u,l),r(u,c),r(i(l,c),i(u,s))),h=o(1+f[0],r(l,s)),p=o(1+f[1],r(c,s));if(t){var m=t,g=f[0]*m[0]/d+f[1]*m[1]/d+1,v=i(o(m[0],h),o(m[1],p));return i(o(1/g/d,v),s)}var y=r(e,s),b=n(r(h,o(f[0],y)),r(p,o(f[1],y)),y);return o(d,b)}}).call(f.prototype)})),ace.define("ace/virtual_renderer",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/config","ace/layer/gutter","ace/layer/marker","ace/layer/text","ace/layer/cursor","ace/scrollbar","ace/scrollbar","ace/renderloop","ace/layer/font_metrics","ace/lib/event_emitter","ace/lib/useragent"],(function(e,t,n){"use strict";var r=e("./lib/oop"),i=e("./lib/dom"),o=e("./config"),a=e("./layer/gutter").Gutter,s=e("./layer/marker").Marker,l=e("./layer/text").Text,c=e("./layer/cursor").Cursor,u=e("./scrollbar").HScrollBar,d=e("./scrollbar").VScrollBar,f=e("./renderloop").RenderLoop,h=e("./layer/font_metrics").FontMetrics,p=e("./lib/event_emitter").EventEmitter,m='.ace_br1 {border-top-left-radius : 3px;}.ace_br2 {border-top-right-radius : 3px;}.ace_br3 {border-top-left-radius : 3px; border-top-right-radius: 3px;}.ace_br4 {border-bottom-right-radius: 3px;}.ace_br5 {border-top-left-radius : 3px; border-bottom-right-radius: 3px;}.ace_br6 {border-top-right-radius : 3px; border-bottom-right-radius: 3px;}.ace_br7 {border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px;}.ace_br8 {border-bottom-left-radius : 3px;}.ace_br9 {border-top-left-radius : 3px; border-bottom-left-radius: 3px;}.ace_br10{border-top-right-radius : 3px; border-bottom-left-radius: 3px;}.ace_br11{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-left-radius: 3px;}.ace_br12{border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}.ace_br13{border-top-left-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}.ace_br14{border-top-right-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}.ace_br15{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}.ace_editor {position: relative;overflow: hidden;padding: 0;font: 12px/normal \'Monaco\', \'Menlo\', \'Ubuntu Mono\', \'Consolas\', \'source-code-pro\', monospace;direction: ltr;text-align: left;-webkit-tap-highlight-color: rgba(0, 0, 0, 0);}.ace_scroller {position: absolute;overflow: hidden;top: 0;bottom: 0;background-color: inherit;-ms-user-select: none;-moz-user-select: none;-webkit-user-select: none;user-select: none;cursor: text;}.ace_content {position: absolute;box-sizing: border-box;min-width: 100%;contain: style size layout;font-variant-ligatures: no-common-ligatures;}.ace_dragging .ace_scroller:before{position: absolute;top: 0;left: 0;right: 0;bottom: 0;content: \'\';background: rgba(250, 250, 250, 0.01);z-index: 1000;}.ace_dragging.ace_dark .ace_scroller:before{background: rgba(0, 0, 0, 0.01);}.ace_selecting, .ace_selecting * {cursor: text !important;}.ace_gutter {position: absolute;overflow : hidden;width: auto;top: 0;bottom: 0;left: 0;cursor: default;z-index: 4;-ms-user-select: none;-moz-user-select: none;-webkit-user-select: none;user-select: none;contain: style size layout;}.ace_gutter-active-line {position: absolute;left: 0;right: 0;}.ace_scroller.ace_scroll-left {box-shadow: 17px 0 16px -16px rgba(0, 0, 0, 0.4) inset;}.ace_gutter-cell {position: absolute;top: 0;left: 0;right: 0;padding-left: 19px;padding-right: 6px;background-repeat: no-repeat;}.ace_gutter-cell.ace_error {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAABOFBMVEX/////////QRswFAb/Ui4wFAYwFAYwFAaWGAfDRymzOSH/PxswFAb/SiUwFAYwFAbUPRvjQiDllog5HhHdRybsTi3/Tyv9Tir+Syj/UC3////XurebMBIwFAb/RSHbPx/gUzfdwL3kzMivKBAwFAbbvbnhPx66NhowFAYwFAaZJg8wFAaxKBDZurf/RB6mMxb/SCMwFAYwFAbxQB3+RB4wFAb/Qhy4Oh+4QifbNRcwFAYwFAYwFAb/QRzdNhgwFAYwFAbav7v/Uy7oaE68MBK5LxLewr/r2NXewLswFAaxJw4wFAbkPRy2PyYwFAaxKhLm1tMwFAazPiQwFAaUGAb/QBrfOx3bvrv/VC/maE4wFAbRPBq6MRO8Qynew8Dp2tjfwb0wFAbx6eju5+by6uns4uH9/f36+vr/GkHjAAAAYnRSTlMAGt+64rnWu/bo8eAA4InH3+DwoN7j4eLi4xP99Nfg4+b+/u9B/eDs1MD1mO7+4PHg2MXa347g7vDizMLN4eG+Pv7i5evs/v79yu7S3/DV7/498Yv24eH+4ufQ3Ozu/v7+y13sRqwAAADLSURBVHjaZc/XDsFgGIBhtDrshlitmk2IrbHFqL2pvXf/+78DPokj7+Fz9qpU/9UXJIlhmPaTaQ6QPaz0mm+5gwkgovcV6GZzd5JtCQwgsxoHOvJO15kleRLAnMgHFIESUEPmawB9ngmelTtipwwfASilxOLyiV5UVUyVAfbG0cCPHig+GBkzAENHS0AstVF6bacZIOzgLmxsHbt2OecNgJC83JERmePUYq8ARGkJx6XtFsdddBQgZE2nPR6CICZhawjA4Fb/chv+399kfR+MMMDGOQAAAABJRU5ErkJggg==");background-repeat: no-repeat;background-position: 2px center;}.ace_gutter-cell.ace_warning {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAmVBMVEX///8AAAD///8AAAAAAABPSzb/5sAAAAB/blH/73z/ulkAAAAAAAD85pkAAAAAAAACAgP/vGz/rkDerGbGrV7/pkQICAf////e0IsAAAD/oED/qTvhrnUAAAD/yHD/njcAAADuv2r/nz//oTj/p064oGf/zHAAAAA9Nir/tFIAAAD/tlTiuWf/tkIAAACynXEAAAAAAAAtIRW7zBpBAAAAM3RSTlMAABR1m7RXO8Ln31Z36zT+neXe5OzooRDfn+TZ4p3h2hTf4t3k3ucyrN1K5+Xaks52Sfs9CXgrAAAAjklEQVR42o3PbQ+CIBQFYEwboPhSYgoYunIqqLn6/z8uYdH8Vmdnu9vz4WwXgN/xTPRD2+sgOcZjsge/whXZgUaYYvT8QnuJaUrjrHUQreGczuEafQCO/SJTufTbroWsPgsllVhq3wJEk2jUSzX3CUEDJC84707djRc5MTAQxoLgupWRwW6UB5fS++NV8AbOZgnsC7BpEAAAAABJRU5ErkJggg==");background-position: 2px center;}.ace_gutter-cell.ace_info {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAAAAAA6mKC9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAJ0Uk5TAAB2k804AAAAPklEQVQY02NgIB68QuO3tiLznjAwpKTgNyDbMegwisCHZUETUZV0ZqOquBpXj2rtnpSJT1AEnnRmL2OgGgAAIKkRQap2htgAAAAASUVORK5CYII=");background-position: 2px center;}.ace_dark .ace_gutter-cell.ace_info {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAJFBMVEUAAAChoaGAgIAqKiq+vr6tra1ZWVmUlJSbm5s8PDxubm56enrdgzg3AAAAAXRSTlMAQObYZgAAAClJREFUeNpjYMAPdsMYHegyJZFQBlsUlMFVCWUYKkAZMxZAGdxlDMQBAG+TBP4B6RyJAAAAAElFTkSuQmCC");}.ace_scrollbar {contain: strict;position: absolute;right: 0;bottom: 0;z-index: 6;}.ace_scrollbar-inner {position: absolute;cursor: text;left: 0;top: 0;}.ace_scrollbar-v{overflow-x: hidden;overflow-y: scroll;top: 0;}.ace_scrollbar-h {overflow-x: scroll;overflow-y: hidden;left: 0;}.ace_print-margin {position: absolute;height: 100%;}.ace_text-input {position: absolute;z-index: 0;width: 0.5em;height: 1em;opacity: 0;background: transparent;-moz-appearance: none;appearance: none;border: none;resize: none;outline: none;overflow: hidden;font: inherit;padding: 0 1px;margin: 0 -1px;contain: strict;-ms-user-select: text;-moz-user-select: text;-webkit-user-select: text;user-select: text;white-space: pre!important;}.ace_text-input.ace_composition {background: transparent;color: inherit;z-index: 1000;opacity: 1;}.ace_composition_placeholder { color: transparent }.ace_composition_marker { border-bottom: 1px solid;position: absolute;border-radius: 0;margin-top: 1px;}[ace_nocontext=true] {transform: none!important;filter: none!important;clip-path: none!important;mask : none!important;contain: none!important;perspective: none!important;mix-blend-mode: initial!important;z-index: auto;}.ace_layer {z-index: 1;position: absolute;overflow: hidden;word-wrap: normal;white-space: pre;height: 100%;width: 100%;box-sizing: border-box;pointer-events: none;}.ace_gutter-layer {position: relative;width: auto;text-align: right;pointer-events: auto;height: 1000000px;contain: style size layout;}.ace_text-layer {font: inherit !important;position: absolute;height: 1000000px;width: 1000000px;contain: style size layout;}.ace_text-layer > .ace_line, .ace_text-layer > .ace_line_group {contain: style size layout;position: absolute;top: 0;left: 0;right: 0;}.ace_hidpi .ace_text-layer,.ace_hidpi .ace_gutter-layer,.ace_hidpi .ace_content,.ace_hidpi .ace_gutter {contain: strict;will-change: transform;}.ace_hidpi .ace_text-layer > .ace_line, .ace_hidpi .ace_text-layer > .ace_line_group {contain: strict;}.ace_cjk {display: inline-block;text-align: center;}.ace_cursor-layer {z-index: 4;}.ace_cursor {z-index: 4;position: absolute;box-sizing: border-box;border-left: 2px solid;transform: translatez(0);}.ace_multiselect .ace_cursor {border-left-width: 1px;}.ace_slim-cursors .ace_cursor {border-left-width: 1px;}.ace_overwrite-cursors .ace_cursor {border-left-width: 0;border-bottom: 1px solid;}.ace_hidden-cursors .ace_cursor {opacity: 0.2;}.ace_hasPlaceholder .ace_hidden-cursors .ace_cursor {opacity: 0;}.ace_smooth-blinking .ace_cursor {transition: opacity 0.18s;}.ace_animate-blinking .ace_cursor {animation-duration: 1000ms;animation-timing-function: step-end;animation-name: blink-ace-animate;animation-iteration-count: infinite;}.ace_animate-blinking.ace_smooth-blinking .ace_cursor {animation-duration: 1000ms;animation-timing-function: ease-in-out;animation-name: blink-ace-animate-smooth;}@keyframes blink-ace-animate {from, to { opacity: 1; }60% { opacity: 0; }}@keyframes blink-ace-animate-smooth {from, to { opacity: 1; }45% { opacity: 1; }60% { opacity: 0; }85% { opacity: 0; }}.ace_marker-layer .ace_step, .ace_marker-layer .ace_stack {position: absolute;z-index: 3;}.ace_marker-layer .ace_selection {position: absolute;z-index: 5;}.ace_marker-layer .ace_bracket {position: absolute;z-index: 6;}.ace_marker-layer .ace_error_bracket {position: absolute;border-bottom: 1px solid #DE5555;border-radius: 0;}.ace_marker-layer .ace_active-line {position: absolute;z-index: 2;}.ace_marker-layer .ace_selected-word {position: absolute;z-index: 4;box-sizing: border-box;}.ace_line .ace_fold {box-sizing: border-box;display: inline-block;height: 11px;margin-top: -2px;vertical-align: middle;background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACJJREFUeNpi+P//fxgTAwPDBxDxD078RSX+YeEyDFMCIMAAI3INmXiwf2YAAAAASUVORK5CYII=");background-repeat: no-repeat, repeat-x;background-position: center center, top left;color: transparent;border: 1px solid black;border-radius: 2px;cursor: pointer;pointer-events: auto;}.ace_dark .ace_fold {}.ace_fold:hover{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACBJREFUeNpi+P//fz4TAwPDZxDxD5X4i5fLMEwJgAADAEPVDbjNw87ZAAAAAElFTkSuQmCC");}.ace_tooltip {background-color: #FFF;background-image: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.1));border: 1px solid gray;border-radius: 1px;box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);color: black;max-width: 100%;padding: 3px 4px;position: fixed;z-index: 999999;box-sizing: border-box;cursor: default;white-space: pre;word-wrap: break-word;line-height: normal;font-style: normal;font-weight: normal;letter-spacing: normal;pointer-events: none;}.ace_folding-enabled > .ace_gutter-cell {padding-right: 13px;}.ace_fold-widget {box-sizing: border-box;margin: 0 -12px 0 1px;display: none;width: 11px;vertical-align: top;background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42mWKsQ0AMAzC8ixLlrzQjzmBiEjp0A6WwBCSPgKAXoLkqSot7nN3yMwR7pZ32NzpKkVoDBUxKAAAAABJRU5ErkJggg==");background-repeat: no-repeat;background-position: center;border-radius: 3px;border: 1px solid transparent;cursor: pointer;}.ace_folding-enabled .ace_fold-widget {display: inline-block; }.ace_fold-widget.ace_end {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42m3HwQkAMAhD0YzsRchFKI7sAikeWkrxwScEB0nh5e7KTPWimZki4tYfVbX+MNl4pyZXejUO1QAAAABJRU5ErkJggg==");}.ace_fold-widget.ace_closed {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAGCAYAAAAG5SQMAAAAOUlEQVR42jXKwQkAMAgDwKwqKD4EwQ26sSOkVWjgIIHAzPiCgaqiqnJHZnKICBERHN194O5b9vbLuAVRL+l0YWnZAAAAAElFTkSuQmCCXA==");}.ace_fold-widget:hover {border: 1px solid rgba(0, 0, 0, 0.3);background-color: rgba(255, 255, 255, 0.2);box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);}.ace_fold-widget:active {border: 1px solid rgba(0, 0, 0, 0.4);background-color: rgba(0, 0, 0, 0.05);box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);}.ace_dark .ace_fold-widget {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHklEQVQIW2P4//8/AzoGEQ7oGCaLLAhWiSwB146BAQCSTPYocqT0AAAAAElFTkSuQmCC");}.ace_dark .ace_fold-widget.ace_end {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAH0lEQVQIW2P4//8/AxQ7wNjIAjDMgC4AxjCVKBirIAAF0kz2rlhxpAAAAABJRU5ErkJggg==");}.ace_dark .ace_fold-widget.ace_closed {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAFCAYAAACAcVaiAAAAHElEQVQIW2P4//+/AxAzgDADlOOAznHAKgPWAwARji8UIDTfQQAAAABJRU5ErkJggg==");}.ace_dark .ace_fold-widget:hover {box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);background-color: rgba(255, 255, 255, 0.1);}.ace_dark .ace_fold-widget:active {box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);}.ace_inline_button {border: 1px solid lightgray;display: inline-block;margin: -1px 8px;padding: 0 5px;pointer-events: auto;cursor: pointer;}.ace_inline_button:hover {border-color: gray;background: rgba(200,200,200,0.2);display: inline-block;pointer-events: auto;}.ace_fold-widget.ace_invalid {background-color: #FFB4B4;border-color: #DE5555;}.ace_fade-fold-widgets .ace_fold-widget {transition: opacity 0.4s ease 0.05s;opacity: 0;}.ace_fade-fold-widgets:hover .ace_fold-widget {transition: opacity 0.05s ease 0.05s;opacity:1;}.ace_underline {text-decoration: underline;}.ace_bold {font-weight: bold;}.ace_nobold .ace_bold {font-weight: normal;}.ace_italic {font-style: italic;}.ace_error-marker {background-color: rgba(255, 0, 0,0.2);position: absolute;z-index: 9;}.ace_highlight-marker {background-color: rgba(255, 255, 0,0.2);position: absolute;z-index: 8;}.ace_mobile-menu {position: absolute;line-height: 1.5;border-radius: 4px;-ms-user-select: none;-moz-user-select: none;-webkit-user-select: none;user-select: none;background: white;box-shadow: 1px 3px 2px grey;border: 1px solid #dcdcdc;color: black;}.ace_dark > .ace_mobile-menu {background: #333;color: #ccc;box-shadow: 1px 3px 2px grey;border: 1px solid #444;}.ace_mobile-button {padding: 2px;cursor: pointer;overflow: hidden;}.ace_mobile-button:hover {background-color: #eee;opacity:1;}.ace_mobile-button:active {background-color: #ddd;}.ace_placeholder {font-family: arial;transform: scale(0.9);transform-origin: left;white-space: pre;opacity: 0.7;margin: 0 10px;}',g=e("./lib/useragent"),v=g.isIE;i.importCssString(m,"ace_editor.css");var y=function(e,t){var n=this;this.container=e||i.createElement("div"),i.addCssClass(this.container,"ace_editor"),i.HI_DPI&&i.addCssClass(this.container,"ace_hidpi"),this.setTheme(t),this.$gutter=i.createElement("div"),this.$gutter.className="ace_gutter",this.container.appendChild(this.$gutter),this.$gutter.setAttribute("aria-hidden",!0),this.scroller=i.createElement("div"),this.scroller.className="ace_scroller",this.container.appendChild(this.scroller),this.content=i.createElement("div"),this.content.className="ace_content",this.scroller.appendChild(this.content),this.$gutterLayer=new a(this.$gutter),this.$gutterLayer.on("changeGutterWidth",this.onGutterResize.bind(this)),this.$markerBack=new s(this.content);var r=this.$textLayer=new l(this.content);this.canvas=r.element,this.$markerFront=new s(this.content),this.$cursorLayer=new c(this.content),this.$horizScroll=!1,this.$vScroll=!1,this.scrollBar=this.scrollBarV=new d(this.container,this),this.scrollBarH=new u(this.container,this),this.scrollBarV.on("scroll",(function(e){n.$scrollAnimation||n.session.setScrollTop(e.data-n.scrollMargin.top)})),this.scrollBarH.on("scroll",(function(e){n.$scrollAnimation||n.session.setScrollLeft(e.data-n.scrollMargin.left)})),this.scrollTop=0,this.scrollLeft=0,this.cursorPos={row:0,column:0},this.$fontMetrics=new h(this.container),this.$textLayer.$setFontMetrics(this.$fontMetrics),this.$textLayer.on("changeCharacterSize",(function(e){n.updateCharacterSize(),n.onResize(!0,n.gutterWidth,n.$size.width,n.$size.height),n._signal("changeCharacterSize",e)})),this.$size={width:0,height:0,scrollerHeight:0,scrollerWidth:0,$dirty:!0},this.layerConfig={width:1,padding:0,firstRow:0,firstRowScreen:0,lastRow:0,lineHeight:0,characterWidth:0,minHeight:1,maxHeight:1,offset:0,height:1,gutterOffset:1},this.scrollMargin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.margin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.$keepTextAreaAtCursor=!g.isIOS,this.$loop=new f(this.$renderChanges.bind(this),this.container.ownerDocument.defaultView),this.$loop.schedule(this.CHANGE_FULL),this.updateCharacterSize(),this.setPadding(4),o.resetOptions(this),o._signal("renderer",this)};(function(){this.CHANGE_CURSOR=1,this.CHANGE_MARKER=2,this.CHANGE_GUTTER=4,this.CHANGE_SCROLL=8,this.CHANGE_LINES=16,this.CHANGE_TEXT=32,this.CHANGE_SIZE=64,this.CHANGE_MARKER_BACK=128,this.CHANGE_MARKER_FRONT=256,this.CHANGE_FULL=512,this.CHANGE_H_SCROLL=1024,r.implement(this,p),this.updateCharacterSize=function(){this.$textLayer.allowBoldFonts!=this.$allowBoldFonts&&(this.$allowBoldFonts=this.$textLayer.allowBoldFonts,this.setStyle("ace_nobold",!this.$allowBoldFonts)),this.layerConfig.characterWidth=this.characterWidth=this.$textLayer.getCharacterWidth(),this.layerConfig.lineHeight=this.lineHeight=this.$textLayer.getLineHeight(),this.$updatePrintMargin(),i.setStyle(this.scroller.style,"line-height",this.lineHeight+"px")},this.setSession=function(e){this.session&&this.session.doc.off("changeNewLineMode",this.onChangeNewLineMode),this.session=e,e&&this.scrollMargin.top&&e.getScrollTop()<=0&&e.setScrollTop(-this.scrollMargin.top),this.$cursorLayer.setSession(e),this.$markerBack.setSession(e),this.$markerFront.setSession(e),this.$gutterLayer.setSession(e),this.$textLayer.setSession(e),e&&(this.$loop.schedule(this.CHANGE_FULL),this.session.$setFontMetrics(this.$fontMetrics),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.onChangeNewLineMode=this.onChangeNewLineMode.bind(this),this.onChangeNewLineMode(),this.session.doc.on("changeNewLineMode",this.onChangeNewLineMode))},this.updateLines=function(e,t,n){if(void 0===t&&(t=1/0),this.$changedLines?(this.$changedLines.firstRow>e&&(this.$changedLines.firstRow=e),this.$changedLines.lastRowthis.layerConfig.lastRow||this.$loop.schedule(this.CHANGE_LINES)},this.onChangeNewLineMode=function(){this.$loop.schedule(this.CHANGE_TEXT),this.$textLayer.$updateEolChar(),this.session.$bidiHandler.setEolChar(this.$textLayer.EOL_CHAR)},this.onChangeTabSize=function(){this.$loop.schedule(this.CHANGE_TEXT|this.CHANGE_MARKER),this.$textLayer.onChangeTabSize()},this.updateText=function(){this.$loop.schedule(this.CHANGE_TEXT)},this.updateFull=function(e){e?this.$renderChanges(this.CHANGE_FULL,!0):this.$loop.schedule(this.CHANGE_FULL)},this.updateFontSize=function(){this.$textLayer.checkForSizeChanges()},this.$changes=0,this.$updateSizeAsync=function(){this.$loop.pending?this.$size.$dirty=!0:this.onResize()},this.onResize=function(e,t,n,r){if(!(this.resizing>2)){this.resizing>0?this.resizing++:this.resizing=e?1:0;var i=this.container;r||(r=i.clientHeight||i.scrollHeight),n||(n=i.clientWidth||i.scrollWidth);var o=this.$updateCachedSize(e,t,n,r);if(!this.$size.scrollerHeight||!n&&!r)return this.resizing=0;e&&(this.$gutterLayer.$padding=null),e?this.$renderChanges(o|this.$changes,!0):this.$loop.schedule(o|this.$changes),this.resizing&&(this.resizing=0),this.scrollBarV.scrollLeft=this.scrollBarV.scrollTop=null}},this.$updateCachedSize=function(e,t,n,r){r-=this.$extraHeight||0;var o=0,a=this.$size,s={width:a.width,height:a.height,scrollerHeight:a.scrollerHeight,scrollerWidth:a.scrollerWidth};if(r&&(e||a.height!=r)&&(a.height=r,o|=this.CHANGE_SIZE,a.scrollerHeight=a.height,this.$horizScroll&&(a.scrollerHeight-=this.scrollBarH.getHeight()),this.scrollBarV.element.style.bottom=this.scrollBarH.getHeight()+"px",o|=this.CHANGE_SCROLL),n&&(e||a.width!=n)){o|=this.CHANGE_SIZE,a.width=n,null==t&&(t=this.$showGutter?this.$gutter.offsetWidth:0),this.gutterWidth=t,i.setStyle(this.scrollBarH.element.style,"left",t+"px"),i.setStyle(this.scroller.style,"left",t+this.margin.left+"px"),a.scrollerWidth=Math.max(0,n-t-this.scrollBarV.getWidth()-this.margin.h),i.setStyle(this.$gutter.style,"left",this.margin.left+"px");var l=this.scrollBarV.getWidth()+"px";i.setStyle(this.scrollBarH.element.style,"right",l),i.setStyle(this.scroller.style,"right",l),i.setStyle(this.scroller.style,"bottom",this.scrollBarH.getHeight()),(this.session&&this.session.getUseWrapMode()&&this.adjustWrapLimit()||e)&&(o|=this.CHANGE_FULL)}return a.$dirty=!n||!r,o&&this._signal("resize",s),o},this.onGutterResize=function(e){var t=this.$showGutter?e:0;t!=this.gutterWidth&&(this.$changes|=this.$updateCachedSize(!0,t,this.$size.width,this.$size.height)),this.session.getUseWrapMode()&&this.adjustWrapLimit()||this.$size.$dirty?this.$loop.schedule(this.CHANGE_FULL):this.$computeLayerConfig()},this.adjustWrapLimit=function(){var e=this.$size.scrollerWidth-2*this.$padding,t=Math.floor(e/this.characterWidth);return this.session.adjustWrapLimit(t,this.$showPrintMargin&&this.$printMarginColumn)},this.setAnimatedScroll=function(e){this.setOption("animatedScroll",e)},this.getAnimatedScroll=function(){return this.$animatedScroll},this.setShowInvisibles=function(e){this.setOption("showInvisibles",e),this.session.$bidiHandler.setShowInvisibles(e)},this.getShowInvisibles=function(){return this.getOption("showInvisibles")},this.getDisplayIndentGuides=function(){return this.getOption("displayIndentGuides")},this.setDisplayIndentGuides=function(e){this.setOption("displayIndentGuides",e)},this.setShowPrintMargin=function(e){this.setOption("showPrintMargin",e)},this.getShowPrintMargin=function(){return this.getOption("showPrintMargin")},this.setPrintMarginColumn=function(e){this.setOption("printMarginColumn",e)},this.getPrintMarginColumn=function(){return this.getOption("printMarginColumn")},this.getShowGutter=function(){return this.getOption("showGutter")},this.setShowGutter=function(e){return this.setOption("showGutter",e)},this.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},this.setFadeFoldWidgets=function(e){this.setOption("fadeFoldWidgets",e)},this.setHighlightGutterLine=function(e){this.setOption("highlightGutterLine",e)},this.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},this.$updatePrintMargin=function(){if(this.$showPrintMargin||this.$printMarginEl){if(!this.$printMarginEl){var e=i.createElement("div");e.className="ace_layer ace_print-margin-layer",this.$printMarginEl=i.createElement("div"),this.$printMarginEl.className="ace_print-margin",e.appendChild(this.$printMarginEl),this.content.insertBefore(e,this.content.firstChild)}var t=this.$printMarginEl.style;t.left=Math.round(this.characterWidth*this.$printMarginColumn+this.$padding)+"px",t.visibility=this.$showPrintMargin?"visible":"hidden",this.session&&-1==this.session.$wrap&&this.adjustWrapLimit()}},this.getContainerElement=function(){return this.container},this.getMouseEventTarget=function(){return this.scroller},this.getTextAreaContainer=function(){return this.container},this.$moveTextAreaToCursor=function(){if(!this.$isMousePressed){var e=this.textarea.style,t=this.$composition;if(this.$keepTextAreaAtCursor||t){var n=this.$cursorLayer.$pixelPos;if(n){t&&t.markerRange&&(n=this.$cursorLayer.getPixelPosition(t.markerRange.start,!0));var r=this.layerConfig,o=n.top,a=n.left;o-=r.offset;var s=t&&t.useTextareaForIME?this.lineHeight:v?0:1;if(o<0||o>r.height-s)i.translate(this.textarea,0,0);else{var l=1,c=this.$size.height-s;if(t)if(t.useTextareaForIME){var u=this.textarea.value;l=this.characterWidth*this.session.$getStringScreenWidth(u)[0]}else o+=this.lineHeight+2;else o+=this.lineHeight;(a-=this.scrollLeft)>this.$size.scrollerWidth-l&&(a=this.$size.scrollerWidth-l),a+=this.gutterWidth+this.margin.left,i.setStyle(e,"height",s+"px"),i.setStyle(e,"width",l+"px"),i.translate(this.textarea,Math.min(a,this.$size.scrollerWidth-l),Math.min(o,c))}}}else i.translate(this.textarea,-100,0)}},this.getFirstVisibleRow=function(){return this.layerConfig.firstRow},this.getFirstFullyVisibleRow=function(){return this.layerConfig.firstRow+(0===this.layerConfig.offset?0:1)},this.getLastFullyVisibleRow=function(){var e=this.layerConfig,t=e.lastRow;return this.session.documentToScreenRow(t,0)*e.lineHeight-this.session.getScrollTop()>e.height-e.lineHeight?t-1:t},this.getLastVisibleRow=function(){return this.layerConfig.lastRow},this.$padding=null,this.setPadding=function(e){this.$padding=e,this.$textLayer.setPadding(e),this.$cursorLayer.setPadding(e),this.$markerFront.setPadding(e),this.$markerBack.setPadding(e),this.$loop.schedule(this.CHANGE_FULL),this.$updatePrintMargin()},this.setScrollMargin=function(e,t,n,r){var i=this.scrollMargin;i.top=0|e,i.bottom=0|t,i.right=0|r,i.left=0|n,i.v=i.top+i.bottom,i.h=i.left+i.right,i.top&&this.scrollTop<=0&&this.session&&this.session.setScrollTop(-i.top),this.updateFull()},this.setMargin=function(e,t,n,r){var i=this.margin;i.top=0|e,i.bottom=0|t,i.right=0|r,i.left=0|n,i.v=i.top+i.bottom,i.h=i.left+i.right,this.$updateCachedSize(!0,this.gutterWidth,this.$size.width,this.$size.height),this.updateFull()},this.getHScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},this.setHScrollBarAlwaysVisible=function(e){this.setOption("hScrollBarAlwaysVisible",e)},this.getVScrollBarAlwaysVisible=function(){return this.$vScrollBarAlwaysVisible},this.setVScrollBarAlwaysVisible=function(e){this.setOption("vScrollBarAlwaysVisible",e)},this.$updateScrollBarV=function(){var e=this.layerConfig.maxHeight,t=this.$size.scrollerHeight;!this.$maxLines&&this.$scrollPastEnd&&(e-=(t-this.lineHeight)*this.$scrollPastEnd,this.scrollTop>e-t&&(e=this.scrollTop+t,this.scrollBarV.scrollTop=null)),this.scrollBarV.setScrollHeight(e+this.scrollMargin.v),this.scrollBarV.setScrollTop(this.scrollTop+this.scrollMargin.top)},this.$updateScrollBarH=function(){this.scrollBarH.setScrollWidth(this.layerConfig.width+2*this.$padding+this.scrollMargin.h),this.scrollBarH.setScrollLeft(this.scrollLeft+this.scrollMargin.left)},this.$frozen=!1,this.freeze=function(){this.$frozen=!0},this.unfreeze=function(){this.$frozen=!1},this.$renderChanges=function(e,t){if(this.$changes&&(e|=this.$changes,this.$changes=0),this.session&&this.container.offsetWidth&&!this.$frozen&&(e||t)){if(this.$size.$dirty)return this.$changes|=e,this.onResize(!0);this.lineHeight||this.$textLayer.checkForSizeChanges(),this._signal("beforeRender",e),this.session&&this.session.$bidiHandler&&this.session.$bidiHandler.updateCharacterWidths(this.$fontMetrics);var n=this.layerConfig;if(e&this.CHANGE_FULL||e&this.CHANGE_SIZE||e&this.CHANGE_TEXT||e&this.CHANGE_LINES||e&this.CHANGE_SCROLL||e&this.CHANGE_H_SCROLL){if(e|=this.$computeLayerConfig()|this.$loop.clear(),n.firstRow!=this.layerConfig.firstRow&&n.firstRowScreen==this.layerConfig.firstRowScreen){var r=this.scrollTop+(n.firstRow-this.layerConfig.firstRow)*this.lineHeight;r>0&&(this.scrollTop=r,e|=this.CHANGE_SCROLL,e|=this.$computeLayerConfig()|this.$loop.clear())}n=this.layerConfig,this.$updateScrollBarV(),e&this.CHANGE_H_SCROLL&&this.$updateScrollBarH(),i.translate(this.content,-this.scrollLeft,-n.offset);var o=n.width+2*this.$padding+"px",a=n.minHeight+"px";i.setStyle(this.content.style,"width",o),i.setStyle(this.content.style,"height",a)}if(e&this.CHANGE_H_SCROLL&&(i.translate(this.content,-this.scrollLeft,-n.offset),this.scroller.className=this.scrollLeft<=0?"ace_scroller":"ace_scroller ace_scroll-left"),e&this.CHANGE_FULL)return this.$changedLines=null,this.$textLayer.update(n),this.$showGutter&&this.$gutterLayer.update(n),this.$markerBack.update(n),this.$markerFront.update(n),this.$cursorLayer.update(n),this.$moveTextAreaToCursor(),void this._signal("afterRender",e);if(e&this.CHANGE_SCROLL)return this.$changedLines=null,e&this.CHANGE_TEXT||e&this.CHANGE_LINES?this.$textLayer.update(n):this.$textLayer.scrollLines(n),this.$showGutter&&(e&this.CHANGE_GUTTER||e&this.CHANGE_LINES?this.$gutterLayer.update(n):this.$gutterLayer.scrollLines(n)),this.$markerBack.update(n),this.$markerFront.update(n),this.$cursorLayer.update(n),this.$moveTextAreaToCursor(),void this._signal("afterRender",e);e&this.CHANGE_TEXT?(this.$changedLines=null,this.$textLayer.update(n),this.$showGutter&&this.$gutterLayer.update(n)):e&this.CHANGE_LINES?(this.$updateLines()||e&this.CHANGE_GUTTER&&this.$showGutter)&&this.$gutterLayer.update(n):e&this.CHANGE_TEXT||e&this.CHANGE_GUTTER?this.$showGutter&&this.$gutterLayer.update(n):e&this.CHANGE_CURSOR&&this.$highlightGutterLine&&this.$gutterLayer.updateLineHighlight(n),e&this.CHANGE_CURSOR&&(this.$cursorLayer.update(n),this.$moveTextAreaToCursor()),e&(this.CHANGE_MARKER|this.CHANGE_MARKER_FRONT)&&this.$markerFront.update(n),e&(this.CHANGE_MARKER|this.CHANGE_MARKER_BACK)&&this.$markerBack.update(n),this._signal("afterRender",e)}else this.$changes|=e},this.$autosize=function(){var e=this.session.getScreenLength()*this.lineHeight,t=this.$maxLines*this.lineHeight,n=Math.min(t,Math.max((this.$minLines||1)*this.lineHeight,e))+this.scrollMargin.v+(this.$extraHeight||0);this.$horizScroll&&(n+=this.scrollBarH.getHeight()),this.$maxPixelHeight&&n>this.$maxPixelHeight&&(n=this.$maxPixelHeight);var r=!(n<=2*this.lineHeight)&&e>t;if(n!=this.desiredHeight||this.$size.height!=this.desiredHeight||r!=this.$vScroll){r!=this.$vScroll&&(this.$vScroll=r,this.scrollBarV.setVisible(r));var i=this.container.clientWidth;this.container.style.height=n+"px",this.$updateCachedSize(!0,this.$gutterWidth,i,n),this.desiredHeight=n,this._signal("autosize")}},this.$computeLayerConfig=function(){var e=this.session,t=this.$size,n=t.height<=2*this.lineHeight,r=this.session.getScreenLength()*this.lineHeight,i=this.$getLongestLine(),o=!n&&(this.$hScrollBarAlwaysVisible||t.scrollerWidth-i-2*this.$padding<0),a=this.$horizScroll!==o;a&&(this.$horizScroll=o,this.scrollBarH.setVisible(o));var s=this.$vScroll;this.$maxLines&&this.lineHeight>1&&this.$autosize();var l=t.scrollerHeight+this.lineHeight,c=!this.$maxLines&&this.$scrollPastEnd?(t.scrollerHeight-this.lineHeight)*this.$scrollPastEnd:0;r+=c;var u=this.scrollMargin;this.session.setScrollTop(Math.max(-u.top,Math.min(this.scrollTop,r-t.scrollerHeight+u.bottom))),this.session.setScrollLeft(Math.max(-u.left,Math.min(this.scrollLeft,i+2*this.$padding-t.scrollerWidth+u.right)));var d=!n&&(this.$vScrollBarAlwaysVisible||t.scrollerHeight-r+c<0||this.scrollTop>u.top),f=s!==d;f&&(this.$vScroll=d,this.scrollBarV.setVisible(d));var h,p,m=this.scrollTop%this.lineHeight,g=Math.ceil(l/this.lineHeight)-1,v=Math.max(0,Math.round((this.scrollTop-m)/this.lineHeight)),y=v+g,b=this.lineHeight;v=e.screenToDocumentRow(v,0);var x=e.getFoldLine(v);x&&(v=x.start.row),h=e.documentToScreenRow(v,0),p=e.getRowLength(v)*b,y=Math.min(e.screenToDocumentRow(y,0),e.getLength()-1),l=t.scrollerHeight+e.getRowLength(y)*b+p,m=this.scrollTop-h*b;var w=0;return(this.layerConfig.width!=i||a)&&(w=this.CHANGE_H_SCROLL),(a||f)&&(w|=this.$updateCachedSize(!0,this.gutterWidth,t.width,t.height),this._signal("scrollbarVisibilityChanged"),f&&(i=this.$getLongestLine())),this.layerConfig={width:i,padding:this.$padding,firstRow:v,firstRowScreen:h,lastRow:y,lineHeight:b,characterWidth:this.characterWidth,minHeight:l,maxHeight:r,offset:m,gutterOffset:b?Math.max(0,Math.ceil((m+t.height-t.scrollerHeight)/b)):0,height:this.$size.scrollerHeight},this.session.$bidiHandler&&this.session.$bidiHandler.setContentWidth(i-this.$padding),w},this.$updateLines=function(){if(this.$changedLines){var e=this.$changedLines.firstRow,t=this.$changedLines.lastRow;this.$changedLines=null;var n=this.layerConfig;if(!(e>n.lastRow+1)&&!(tthis.$textLayer.MAX_LINE_LENGTH&&(e=this.$textLayer.MAX_LINE_LENGTH+30),Math.max(this.$size.scrollerWidth-2*this.$padding,Math.round(e*this.characterWidth))},this.updateFrontMarkers=function(){this.$markerFront.setMarkers(this.session.getMarkers(!0)),this.$loop.schedule(this.CHANGE_MARKER_FRONT)},this.updateBackMarkers=function(){this.$markerBack.setMarkers(this.session.getMarkers()),this.$loop.schedule(this.CHANGE_MARKER_BACK)},this.addGutterDecoration=function(e,t){this.$gutterLayer.addGutterDecoration(e,t)},this.removeGutterDecoration=function(e,t){this.$gutterLayer.removeGutterDecoration(e,t)},this.updateBreakpoints=function(e){this.$loop.schedule(this.CHANGE_GUTTER)},this.setAnnotations=function(e){this.$gutterLayer.setAnnotations(e),this.$loop.schedule(this.CHANGE_GUTTER)},this.updateCursor=function(){this.$loop.schedule(this.CHANGE_CURSOR)},this.hideCursor=function(){this.$cursorLayer.hideCursor()},this.showCursor=function(){this.$cursorLayer.showCursor()},this.scrollSelectionIntoView=function(e,t,n){this.scrollCursorIntoView(e,n),this.scrollCursorIntoView(t,n)},this.scrollCursorIntoView=function(e,t,n){if(0!==this.$size.scrollerHeight){var r=this.$cursorLayer.getPixelPosition(e),i=r.left,o=r.top,a=n&&n.top||0,s=n&&n.bottom||0,l=this.$scrollAnimation?this.session.getScrollTop():this.scrollTop;l+a>o?(t&&l+a>o+this.lineHeight&&(o-=t*this.$size.scrollerHeight),0===o&&(o=-this.scrollMargin.top),this.session.setScrollTop(o)):l+this.$size.scrollerHeight-si?(i=1-this.scrollMargin.top||(t>0&&this.session.getScrollTop()+this.$size.scrollerHeight-this.layerConfig.maxHeight<-1+this.scrollMargin.bottom||(e<0&&this.session.getScrollLeft()>=1-this.scrollMargin.left||(e>0&&this.session.getScrollLeft()+this.$size.scrollerWidth-this.layerConfig.width<-1+this.scrollMargin.right||void 0)))},this.pixelToScreenCoordinates=function(e,t){var n;if(this.$hasCssTransforms){n={top:0,left:0};var r=this.$fontMetrics.transformCoordinates([e,t]);e=r[1]-this.gutterWidth-this.margin.left,t=r[0]}else n=this.scroller.getBoundingClientRect();var i=e+this.scrollLeft-n.left-this.$padding,o=i/this.characterWidth,a=Math.floor((t+this.scrollTop-n.top)/this.lineHeight),s=this.$blockCursor?Math.floor(o):Math.round(o);return{row:a,column:s,side:o-s>0?1:-1,offsetX:i}},this.screenToTextCoordinates=function(e,t){var n;if(this.$hasCssTransforms){n={top:0,left:0};var r=this.$fontMetrics.transformCoordinates([e,t]);e=r[1]-this.gutterWidth-this.margin.left,t=r[0]}else n=this.scroller.getBoundingClientRect();var i=e+this.scrollLeft-n.left-this.$padding,o=i/this.characterWidth,a=this.$blockCursor?Math.floor(o):Math.round(o),s=Math.floor((t+this.scrollTop-n.top)/this.lineHeight);return this.session.screenToDocumentPosition(s,Math.max(a,0),i)},this.textToScreenCoordinates=function(e,t){var n=this.scroller.getBoundingClientRect(),r=this.session.documentToScreenPosition(e,t),i=this.$padding+(this.session.$bidiHandler.isBidiRow(r.row,e)?this.session.$bidiHandler.getPosLeft(r.column):Math.round(r.column*this.characterWidth)),o=r.row*this.lineHeight;return{pageX:n.left+i-this.scrollLeft,pageY:n.top+o-this.scrollTop}},this.visualizeFocus=function(){i.addCssClass(this.container,"ace_focus")},this.visualizeBlur=function(){i.removeCssClass(this.container,"ace_focus")},this.showComposition=function(e){this.$composition=e,e.cssText||(e.cssText=this.textarea.style.cssText),void 0==e.useTextareaForIME&&(e.useTextareaForIME=this.$useTextareaForIME),this.$useTextareaForIME?(i.addCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText="",this.$moveTextAreaToCursor(),this.$cursorLayer.element.style.display="none"):e.markerId=this.session.addMarker(e.markerRange,"ace_composition_marker","text")},this.setCompositionText=function(e){var t=this.session.selection.cursor;this.addToken(e,"composition_placeholder",t.row,t.column),this.$moveTextAreaToCursor()},this.hideComposition=function(){if(this.$composition){this.$composition.markerId&&this.session.removeMarker(this.$composition.markerId),i.removeCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText=this.$composition.cssText;var e=this.session.selection.cursor;this.removeExtraToken(e.row,e.column),this.$composition=null,this.$cursorLayer.element.style.display=""}},this.addToken=function(e,t,n,r){var i=this.session;i.bgTokenizer.lines[n]=null;var o={type:t,value:e},a=i.getTokens(n);if(null==r)a.push(o);else for(var s=0,l=0;l50&&e.length>this.$doc.getLength()>>1?this.call("setValue",[this.$doc.getValue()]):this.emit("change",{data:e}))}}).call(l.prototype);t.UIWorkerClient=function(e,t,n){var r=null,i=!1,s=Object.create(o),c=[],u=new l({messageBuffer:c,terminate:function(){},postMessage:function(e){c.push(e),r&&(i?setTimeout(d):d())}});u.setEmitSync=function(e){i=e};var d=function(){var e=c.shift();e.command?r[e.command].apply(r,e.args):e.event&&s._signal(e.event,e.data)};return s.postMessage=function(e){u.onMessage({data:e})},s.callback=function(e,t){this.postMessage({type:"call",id:t,data:e})},s.emit=function(e,t){this.postMessage({type:"event",name:e,data:t})},a.loadModule(["worker",t],(function(e){for(r=new e[n](s);c.length;)d()})),u},t.WorkerClient=l,t.createWorker=s})),ace.define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"],(function(e,t,n){"use strict";var r=e("./range").Range,i=e("./lib/event_emitter").EventEmitter,o=e("./lib/oop"),a=function(e,t,n,r,i,o){var a=this;this.length=t,this.session=e,this.doc=e.getDocument(),this.mainClass=i,this.othersClass=o,this.$onUpdate=this.onUpdate.bind(this),this.doc.on("change",this.$onUpdate),this.$others=r,this.$onCursorChange=function(){setTimeout((function(){a.onCursorChange()}))},this.$pos=n;var s=e.getUndoManager().$undoStack||e.getUndoManager().$undostack||{length:-1};this.$undoStackDepth=s.length,this.setup(),e.selection.on("changeCursor",this.$onCursorChange)};(function(){o.implement(this,i),this.setup=function(){var e=this,t=this.doc,n=this.session;this.selectionBefore=n.selection.toJSON(),n.selection.inMultiSelectMode&&n.selection.toSingleRange(),this.pos=t.createAnchor(this.$pos.row,this.$pos.column);var i=this.pos;i.$insertRight=!0,i.detach(),i.markerId=n.addMarker(new r(i.row,i.column,i.row,i.column+this.length),this.mainClass,null,!1),this.others=[],this.$others.forEach((function(n){var r=t.createAnchor(n.row,n.column);r.$insertRight=!0,r.detach(),e.others.push(r)})),n.setUndoSelect(!1)},this.showOtherMarkers=function(){if(!this.othersActive){var e=this.session,t=this;this.othersActive=!0,this.others.forEach((function(n){n.markerId=e.addMarker(new r(n.row,n.column,n.row,n.column+t.length),t.othersClass,null,!1)}))}},this.hideOtherMarkers=function(){if(this.othersActive){this.othersActive=!1;for(var e=0;e=this.pos.column&&t.start.column<=this.pos.column+this.length+1,o=t.start.column-this.pos.column;if(this.updateAnchors(e),i&&(this.length+=n),i&&!this.session.$fromUndo)if("insert"===e.action)for(var a=this.others.length-1;a>=0;a--){var s={row:(l=this.others[a]).row,column:l.column+o};this.doc.insertMergedLines(s,e.lines)}else if("remove"===e.action)for(a=this.others.length-1;a>=0;a--){var l;s={row:(l=this.others[a]).row,column:l.column+o};this.doc.remove(new r(s.row,s.column,s.row,s.column-n))}this.$updating=!1,this.updateMarkers()}},this.updateAnchors=function(e){this.pos.onChange(e);for(var t=this.others.length;t--;)this.others[t].onChange(e);this.updateMarkers()},this.updateMarkers=function(){if(!this.$updating){var e=this,t=this.session,n=function(n,i){t.removeMarker(n.markerId),n.markerId=t.addMarker(new r(n.row,n.column,n.row,n.column+e.length),i,null,!1)};n(this.pos,this.mainClass);for(var i=this.others.length;i--;)n(this.others[i],this.othersClass)}},this.onCursorChange=function(e){if(!this.$updating&&this.session){var t=this.session.selection.getCursor();t.row===this.pos.row&&t.column>=this.pos.column&&t.column<=this.pos.column+this.length?(this.showOtherMarkers(),this._emit("cursorEnter",e)):(this.hideOtherMarkers(),this._emit("cursorLeave",e))}},this.detach=function(){this.session.removeMarker(this.pos&&this.pos.markerId),this.hideOtherMarkers(),this.doc.off("change",this.$onUpdate),this.session.selection.off("changeCursor",this.$onCursorChange),this.session.setUndoSelect(!0),this.session=null},this.cancel=function(){if(-1!==this.$undoStackDepth){for(var e=this.session.getUndoManager(),t=(e.$undoStack||e.$undostack).length-this.$undoStackDepth,n=0;n1?e.multiSelect.joinSelections():e.multiSelect.splitIntoLines()},bindKey:{win:"Ctrl-Alt-L",mac:"Ctrl-Alt-L"},readOnly:!0},{name:"splitSelectionIntoLines",description:"Split into lines",exec:function(e){e.multiSelect.splitIntoLines()},readOnly:!0},{name:"alignCursors",description:"Align cursors",exec:function(e){e.alignCursors()},bindKey:{win:"Ctrl-Alt-A",mac:"Ctrl-Alt-A"},scrollIntoView:"cursor"},{name:"findAll",description:"Find all",exec:function(e){e.findAll()},bindKey:{win:"Ctrl-Alt-K",mac:"Ctrl-Alt-G"},scrollIntoView:"cursor",readOnly:!0}],t.multiSelectCommands=[{name:"singleSelection",description:"Single selection",bindKey:"esc",exec:function(e){e.exitMultiSelectMode()},scrollIntoView:"cursor",readOnly:!0,isAvailable:function(e){return e&&e.inMultiSelectMode}}];var r=e("../keyboard/hash_handler").HashHandler;t.keyboardHandler=new r(t.multiSelectCommands)})),ace.define("ace/multi_select",["require","exports","module","ace/range_list","ace/range","ace/selection","ace/mouse/multi_select_handler","ace/lib/event","ace/lib/lang","ace/commands/multi_select_commands","ace/search","ace/edit_session","ace/editor","ace/config"],(function(e,t,n){var r=e("./range_list").RangeList,i=e("./range").Range,o=e("./selection").Selection,a=e("./mouse/multi_select_handler").onMouseDown,s=e("./lib/event"),l=e("./lib/lang"),c=e("./commands/multi_select_commands");t.commands=c.defaultCommands.concat(c.multiSelectCommands);var u=new(0,e("./search").Search);var d=e("./edit_session").EditSession;(function(){this.getSelectionMarkers=function(){return this.$selectionMarkers}}).call(d.prototype),function(){this.ranges=null,this.rangeList=null,this.addRange=function(e,t){if(e){if(!this.inMultiSelectMode&&0===this.rangeCount){var n=this.toOrientedRange();if(this.rangeList.add(n),this.rangeList.add(e),2!=this.rangeList.ranges.length)return this.rangeList.removeAll(),t||this.fromOrientedRange(e);this.rangeList.removeAll(),this.rangeList.add(n),this.$onAddRange(n)}e.cursor||(e.cursor=e.end);var r=this.rangeList.add(e);return this.$onAddRange(e),r.length&&this.$onRemoveRange(r),this.rangeCount>1&&!this.inMultiSelectMode&&(this._signal("multiSelect"),this.inMultiSelectMode=!0,this.session.$undoSelect=!1,this.rangeList.attach(this.session)),t||this.fromOrientedRange(e)}},this.toSingleRange=function(e){e=e||this.ranges[0];var t=this.rangeList.removeAll();t.length&&this.$onRemoveRange(t),e&&this.fromOrientedRange(e)},this.substractPoint=function(e){var t=this.rangeList.substractPoint(e);if(t)return this.$onRemoveRange(t),t[0]},this.mergeOverlappingRanges=function(){var e=this.rangeList.merge();e.length&&this.$onRemoveRange(e)},this.$onAddRange=function(e){this.rangeCount=this.rangeList.ranges.length,this.ranges.unshift(e),this._signal("addRange",{range:e})},this.$onRemoveRange=function(e){if(this.rangeCount=this.rangeList.ranges.length,1==this.rangeCount&&this.inMultiSelectMode){var t=this.rangeList.ranges.pop();e.push(t),this.rangeCount=0}for(var n=e.length;n--;){var r=this.ranges.indexOf(e[n]);this.ranges.splice(r,1)}this._signal("removeRange",{ranges:e}),0===this.rangeCount&&this.inMultiSelectMode&&(this.inMultiSelectMode=!1,this._signal("singleSelect"),this.session.$undoSelect=!0,this.rangeList.detach(this.session)),(t=t||this.ranges[0])&&!t.isEqual(this.getRange())&&this.fromOrientedRange(t)},this.$initRangeList=function(){this.rangeList||(this.rangeList=new r,this.ranges=[],this.rangeCount=0)},this.getAllRanges=function(){return this.rangeCount?this.rangeList.ranges.concat():[this.getRange()]},this.splitIntoLines=function(){for(var e=this.ranges.length?this.ranges:[this.getRange()],t=[],n=0;n1){var e=this.rangeList.ranges,t=e[e.length-1],n=i.fromPoints(e[0].start,t.end);this.toSingleRange(),this.setSelectionRange(n,t.cursor==t.start)}else{var r=this.session.documentToScreenPosition(this.cursor),o=this.session.documentToScreenPosition(this.anchor);this.rectangularRangeBlock(r,o).forEach(this.addRange,this)}},this.rectangularRangeBlock=function(e,t,n){var r=[],o=e.column0;)y--;if(y>0)for(var b=0;r[b].isEmpty();)b++;for(var x=y;x>=b;x--)r[x].isEmpty()&&r.splice(x,1)}return r}}.call(o.prototype);var f=e("./editor").Editor;function h(e){e.$multiselectOnSessionChange||(e.$onAddRange=e.$onAddRange.bind(e),e.$onRemoveRange=e.$onRemoveRange.bind(e),e.$onMultiSelect=e.$onMultiSelect.bind(e),e.$onSingleSelect=e.$onSingleSelect.bind(e),e.$multiselectOnSessionChange=t.onSessionChange.bind(e),e.$checkMultiselectChange=e.$checkMultiselectChange.bind(e),e.$multiselectOnSessionChange(e),e.on("changeSession",e.$multiselectOnSessionChange),e.on("mousedown",a),e.commands.addCommands(c.defaultCommands),function(e){if(!e.textInput)return;var t=e.textInput.getElement(),n=!1;function r(t){n&&(e.renderer.setMouseCursor(""),n=!1)}s.addListener(t,"keydown",(function(t){var i=18==t.keyCode&&!(t.ctrlKey||t.shiftKey||t.metaKey);e.$blockSelectEnabled&&i?n||(e.renderer.setMouseCursor("crosshair"),n=!0):n&&r()}),e),s.addListener(t,"keyup",r,e),s.addListener(t,"blur",r,e)}(e))}(function(){this.updateSelectionMarkers=function(){this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.addSelectionMarker=function(e){e.cursor||(e.cursor=e.end);var t=this.getSelectionStyle();return e.marker=this.session.addMarker(e,"ace_selection",t),this.session.$selectionMarkers.push(e),this.session.selectionMarkerCount=this.session.$selectionMarkers.length,e},this.removeSelectionMarker=function(e){if(e.marker){this.session.removeMarker(e.marker);var t=this.session.$selectionMarkers.indexOf(e);-1!=t&&this.session.$selectionMarkers.splice(t,1),this.session.selectionMarkerCount=this.session.$selectionMarkers.length}},this.removeSelectionMarkers=function(e){for(var t=this.session.$selectionMarkers,n=e.length;n--;){var r=e[n];if(r.marker){this.session.removeMarker(r.marker);var i=t.indexOf(r);-1!=i&&t.splice(i,1)}}this.session.selectionMarkerCount=t.length},this.$onAddRange=function(e){this.addSelectionMarker(e.range),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onRemoveRange=function(e){this.removeSelectionMarkers(e.ranges),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onMultiSelect=function(e){this.inMultiSelectMode||(this.inMultiSelectMode=!0,this.setStyle("ace_multiselect"),this.keyBinding.addKeyboardHandler(c.keyboardHandler),this.commands.setDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers())},this.$onSingleSelect=function(e){this.session.multiSelect.inVirtualMode||(this.inMultiSelectMode=!1,this.unsetStyle("ace_multiselect"),this.keyBinding.removeKeyboardHandler(c.keyboardHandler),this.commands.removeDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers(),this._emit("changeSelection"))},this.$onMultiSelectExec=function(e){var t=e.command,n=e.editor;if(n.multiSelect){if(t.multiSelectAction)"forEach"==t.multiSelectAction?r=n.forEachSelection(t,e.args):"forEachLine"==t.multiSelectAction?r=n.forEachSelection(t,e.args,!0):"single"==t.multiSelectAction?(n.exitMultiSelectMode(),r=t.exec(n,e.args||{})):r=t.multiSelectAction(n,e.args||{});else{var r=t.exec(n,e.args||{});n.multiSelect.addRange(n.multiSelect.toOrientedRange()),n.multiSelect.mergeOverlappingRanges()}return r}},this.forEachSelection=function(e,t,n){if(!this.inVirtualSelectionMode){var r,i=n&&n.keepOrder,a=1==n||n&&n.$byLines,s=this.session,l=this.selection,c=l.rangeList,u=(i?l:c).ranges;if(!u.length)return e.exec?e.exec(this,t||{}):e(this,t||{});var d=l._eventRegistry;l._eventRegistry={};var f=new o(s);this.inVirtualSelectionMode=!0;for(var h=u.length;h--;){if(a)for(;h>0&&u[h].start.row==u[h-1].end.row;)h--;f.fromOrientedRange(u[h]),f.index=h,this.selection=s.selection=f;var p=e.exec?e.exec(this,t||{}):e(this,t||{});r||void 0===p||(r=p),f.toOrientedRange(u[h])}f.detach(),this.selection=s.selection=l,this.inVirtualSelectionMode=!1,l._eventRegistry=d,l.mergeOverlappingRanges(),l.ranges[0]&&l.fromOrientedRange(l.ranges[0]);var m=this.renderer.$scrollAnimation;return this.onCursorChange(),this.onSelectionChange(),m&&m.from==m.to&&this.renderer.animateScrolling(m.from),r}},this.exitMultiSelectMode=function(){this.inMultiSelectMode&&!this.inVirtualSelectionMode&&this.multiSelect.toSingleRange()},this.getSelectedText=function(){var e="";if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){for(var t=this.multiSelect.rangeList.ranges,n=[],r=0;ra&&(a=n.column),ru?e.insert(r,l.stringRepeat(" ",o-u)):e.remove(new i(r.row,r.column,r.row,r.column-o+u)),t.start.column=t.end.column=a,t.start.row=t.end.row=r.row,t.cursor=t.end})),t.fromOrientedRange(n[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers()}else{var u=this.selection.getRange(),d=u.start.row,f=u.end.row,h=d==f;if(h){var p,m=this.session.getLength();do{p=this.session.getLine(f)}while(/[=:]/.test(p)&&++f0);d<0&&(d=0),f>=m&&(f=m-1)}var g=this.session.removeFullLines(d,f);g=this.$reAlignText(g,h),this.session.insert({row:d,column:0},g.join("\n")+"\n"),h||(u.start.column=0,u.end.column=g[g.length-1].length),this.selection.setRange(u)}},this.$reAlignText=function(e,t){var n,r,i,o=!0,a=!0;return e.map((function(e){var t=e.match(/(\s*)(.*?)(\s*)([=:].*)/);return t?null==n?(n=t[1].length,r=t[2].length,i=t[3].length,t):(n+r+i!=t[1].length+t[2].length+t[3].length&&(a=!1),n!=t[1].length&&(o=!1),n>t[1].length&&(n=t[1].length),rt[3].length&&(i=t[3].length),t):[e]})).map(t?c:o?a?function(e){return e[2]?s(n+r-e[2].length)+e[2]+s(i)+e[4].replace(/^([=:])\s+/,"$1 "):e[0]}:c:function(e){return e[2]?s(n)+e[2]+s(i)+e[4].replace(/^([=:])\s+/,"$1 "):e[0]});function s(e){return l.stringRepeat(" ",e)}function c(e){return e[2]?s(n)+e[2]+s(r-e[2].length+i)+e[4].replace(/^([=:])\s+/,"$1 "):e[0]}}}).call(f.prototype),t.onSessionChange=function(e){var t=e.session;t&&!t.multiSelect&&(t.$selectionMarkers=[],t.selection.$initRangeList(),t.multiSelect=t.selection),this.multiSelect=t&&t.multiSelect;var n=e.oldSession;n&&(n.multiSelect.off("addRange",this.$onAddRange),n.multiSelect.off("removeRange",this.$onRemoveRange),n.multiSelect.off("multiSelect",this.$onMultiSelect),n.multiSelect.off("singleSelect",this.$onSingleSelect),n.multiSelect.lead.off("change",this.$checkMultiselectChange),n.multiSelect.anchor.off("change",this.$checkMultiselectChange)),t&&(t.multiSelect.on("addRange",this.$onAddRange),t.multiSelect.on("removeRange",this.$onRemoveRange),t.multiSelect.on("multiSelect",this.$onMultiSelect),t.multiSelect.on("singleSelect",this.$onSingleSelect),t.multiSelect.lead.on("change",this.$checkMultiselectChange),t.multiSelect.anchor.on("change",this.$checkMultiselectChange)),t&&this.inMultiSelectMode!=t.selection.inMultiSelectMode&&(t.selection.inMultiSelectMode?this.$onMultiSelect():this.$onSingleSelect())},t.MultiSelect=h,e("./config").defineOptions(f.prototype,"editor",{enableMultiselect:{set:function(e){h(this),e?(this.on("changeSession",this.$multiselectOnSessionChange),this.on("mousedown",a)):(this.off("changeSession",this.$multiselectOnSessionChange),this.off("mousedown",a))},value:!0},enableBlockSelect:{set:function(e){this.$blockSelectEnabled=e},value:!0}})})),ace.define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],(function(e,t,n){"use strict";var r=e("../../range").Range,i=t.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);return this.foldingStartMarker.test(r)?"start":"markbeginend"==t&&this.foldingStopMarker&&this.foldingStopMarker.test(r)?"end":""},this.getFoldWidgetRange=function(e,t,n){return null},this.indentationBlock=function(e,t,n){var i=/\S/,o=e.getLine(t),a=o.search(i);if(-1!=a){for(var s=n||o.length,l=e.getLength(),c=t,u=t;++tc){var h=e.getLine(u).length;return new r(c,s,u,h)}}},this.openingBracketBlock=function(e,t,n,i,o){var a={row:n,column:i+1},s=e.$findClosingBracket(t,a,o);if(s){var l=e.foldWidgets[s.row];return null==l&&(l=e.getFoldWidget(s.row)),"start"==l&&s.row>a.row&&(s.row--,s.column=e.getLine(s.row).length),r.fromPoints(a,s)}},this.closingBracketBlock=function(e,t,n,i,o){var a={row:n,column:i},s=e.$findOpeningBracket(t,a);if(s)return s.column++,a.column--,r.fromPoints(s,a)}}).call(i.prototype)})),ace.define("ace/theme/textmate",["require","exports","module","ace/lib/dom"],(function(e,t,n){"use strict";t.isDark=!1,t.cssClass="ace-tm",t.cssText='.ace-tm .ace_gutter {background: #f0f0f0;color: #333;}.ace-tm .ace_print-margin {width: 1px;background: #e8e8e8;}.ace-tm .ace_fold {background-color: #6B72E6;}.ace-tm {background-color: #FFFFFF;color: black;}.ace-tm .ace_cursor {color: black;}.ace-tm .ace_invisible {color: rgb(191, 191, 191);}.ace-tm .ace_storage,.ace-tm .ace_keyword {color: blue;}.ace-tm .ace_constant {color: rgb(197, 6, 11);}.ace-tm .ace_constant.ace_buildin {color: rgb(88, 72, 246);}.ace-tm .ace_constant.ace_language {color: rgb(88, 92, 246);}.ace-tm .ace_constant.ace_library {color: rgb(6, 150, 14);}.ace-tm .ace_invalid {background-color: rgba(255, 0, 0, 0.1);color: red;}.ace-tm .ace_support.ace_function {color: rgb(60, 76, 114);}.ace-tm .ace_support.ace_constant {color: rgb(6, 150, 14);}.ace-tm .ace_support.ace_type,.ace-tm .ace_support.ace_class {color: rgb(109, 121, 222);}.ace-tm .ace_keyword.ace_operator {color: rgb(104, 118, 135);}.ace-tm .ace_string {color: rgb(3, 106, 7);}.ace-tm .ace_comment {color: rgb(76, 136, 107);}.ace-tm .ace_comment.ace_doc {color: rgb(0, 102, 255);}.ace-tm .ace_comment.ace_doc.ace_tag {color: rgb(128, 159, 191);}.ace-tm .ace_constant.ace_numeric {color: rgb(0, 0, 205);}.ace-tm .ace_variable {color: rgb(49, 132, 149);}.ace-tm .ace_xml-pe {color: rgb(104, 104, 91);}.ace-tm .ace_entity.ace_name.ace_function {color: #0000A2;}.ace-tm .ace_heading {color: rgb(12, 7, 255);}.ace-tm .ace_list {color:rgb(185, 6, 144);}.ace-tm .ace_meta.ace_tag {color:rgb(0, 22, 142);}.ace-tm .ace_string.ace_regex {color: rgb(255, 0, 0)}.ace-tm .ace_marker-layer .ace_selection {background: rgb(181, 213, 255);}.ace-tm.ace_multiselect .ace_selection.ace_start {box-shadow: 0 0 3px 0px white;}.ace-tm .ace_marker-layer .ace_step {background: rgb(252, 255, 0);}.ace-tm .ace_marker-layer .ace_stack {background: rgb(164, 229, 101);}.ace-tm .ace_marker-layer .ace_bracket {margin: -1px 0 0 -1px;border: 1px solid rgb(192, 192, 192);}.ace-tm .ace_marker-layer .ace_active-line {background: rgba(0, 0, 0, 0.07);}.ace-tm .ace_gutter-active-line {background-color : #dcdcdc;}.ace-tm .ace_marker-layer .ace_selected-word {background: rgb(250, 250, 255);border: 1px solid rgb(200, 200, 250);}.ace-tm .ace_indent-guide {background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y;}',t.$id="ace/theme/textmate",e("../lib/dom").importCssString(t.cssText,t.cssClass)})),ace.define("ace/line_widgets",["require","exports","module","ace/lib/dom"],(function(e,t,n){"use strict";var r=e("./lib/dom");function i(e){this.session=e,this.session.widgetManager=this,this.session.getRowLength=this.getRowLength,this.session.$getWidgetScreenLength=this.$getWidgetScreenLength,this.updateOnChange=this.updateOnChange.bind(this),this.renderWidgets=this.renderWidgets.bind(this),this.measureWidgets=this.measureWidgets.bind(this),this.session._changedWidgets=[],this.$onChangeEditor=this.$onChangeEditor.bind(this),this.session.on("change",this.updateOnChange),this.session.on("changeFold",this.updateOnFold),this.session.on("changeEditor",this.$onChangeEditor)}(function(){this.getRowLength=function(e){var t;return t=this.lineWidgets&&this.lineWidgets[e]&&this.lineWidgets[e].rowCount||0,this.$useWrapMode&&this.$wrapData[e]?this.$wrapData[e].length+1+t:1+t},this.$getWidgetScreenLength=function(){var e=0;return this.lineWidgets.forEach((function(t){t&&t.rowCount&&!t.hidden&&(e+=t.rowCount)})),e},this.$onChangeEditor=function(e){this.attach(e.editor)},this.attach=function(e){e&&e.widgetManager&&e.widgetManager!=this&&e.widgetManager.detach(),this.editor!=e&&(this.detach(),this.editor=e,e&&(e.widgetManager=this,e.renderer.on("beforeRender",this.measureWidgets),e.renderer.on("afterRender",this.renderWidgets)))},this.detach=function(e){var t=this.editor;if(t){this.editor=null,t.widgetManager=null,t.renderer.off("beforeRender",this.measureWidgets),t.renderer.off("afterRender",this.renderWidgets);var n=this.session.lineWidgets;n&&n.forEach((function(e){e&&e.el&&e.el.parentNode&&(e._inDocument=!1,e.el.parentNode.removeChild(e.el))}))}},this.updateOnFold=function(e,t){var n=t.lineWidgets;if(n&&e.action){for(var r=e.data,i=r.start.row,o=r.end.row,a="add"==e.action,s=i+1;st[n].column&&n++,o.unshift(n,0),t.splice.apply(t,o),this.$updateRows()}}},this.$updateRows=function(){var e=this.session.lineWidgets;if(e){var t=!0;e.forEach((function(e,n){if(e)for(t=!1,e.row=n;e.$oldWidget;)e.$oldWidget.row=n,e=e.$oldWidget})),t&&(this.session.lineWidgets=null)}},this.$registerLineWidget=function(e){this.session.lineWidgets||(this.session.lineWidgets=new Array(this.session.getLength()));var t=this.session.lineWidgets[e.row];return t&&(e.$oldWidget=t,t.el&&t.el.parentNode&&(t.el.parentNode.removeChild(t.el),t._inDocument=!1)),this.session.lineWidgets[e.row]=e,e},this.addLineWidget=function(e){if(this.$registerLineWidget(e),e.session=this.session,!this.editor)return e;var t=this.editor.renderer;e.html&&!e.el&&(e.el=r.createElement("div"),e.el.innerHTML=e.html),e.el&&(r.addCssClass(e.el,"ace_lineWidgetContainer"),e.el.style.position="absolute",e.el.style.zIndex=5,t.container.appendChild(e.el),e._inDocument=!0,e.coverGutter||(e.el.style.zIndex=3),null==e.pixelHeight&&(e.pixelHeight=e.el.offsetHeight)),null==e.rowCount&&(e.rowCount=e.pixelHeight/t.layerConfig.lineHeight);var n=this.session.getFoldAt(e.row,0);if(e.$fold=n,n){var i=this.session.lineWidgets;e.row!=n.end.row||i[n.start.row]?e.hidden=!0:i[n.start.row]=e}return this.session._emit("changeFold",{data:{start:{row:e.row}}}),this.$updateRows(),this.renderWidgets(null,t),this.onWidgetChanged(e),e},this.removeLineWidget=function(e){if(e._inDocument=!1,e.session=null,e.el&&e.el.parentNode&&e.el.parentNode.removeChild(e.el),e.editor&&e.editor.destroy)try{e.editor.destroy()}catch(n){}if(this.session.lineWidgets){var t=this.session.lineWidgets[e.row];if(t==e)this.session.lineWidgets[e.row]=e.$oldWidget,e.$oldWidget&&this.onWidgetChanged(e.$oldWidget);else for(;t;){if(t.$oldWidget==e){t.$oldWidget=e.$oldWidget;break}t=t.$oldWidget}}this.session._emit("changeFold",{data:{start:{row:e.row}}}),this.$updateRows()},this.getWidgetsAtRow=function(e){for(var t=this.session.lineWidgets,n=t&&t[e],r=[];n;)r.push(n),n=n.$oldWidget;return r},this.onWidgetChanged=function(e){this.session._changedWidgets.push(e),this.editor&&this.editor.renderer.updateFull()},this.measureWidgets=function(e,t){var n=this.session._changedWidgets,r=t.layerConfig;if(n&&n.length){for(var i=1/0,o=0;o0&&!r[i];)i--;this.firstRow=n.firstRow,this.lastRow=n.lastRow,t.$cursorLayer.config=n;for(var a=i;a<=o;a++){var s=r[a];if(s&&s.el)if(s.hidden)s.el.style.top=-100-(s.pixelHeight||0)+"px";else{s._inDocument||(s._inDocument=!0,t.container.appendChild(s.el));var l=t.$cursorLayer.getPixelPosition({row:a,column:0},!0).top;s.coverLine||(l+=n.lineHeight*this.session.getRowLineCount(s.row)),s.el.style.top=l-n.offset+"px";var c=s.coverGutter?0:t.gutterWidth;s.fixedWidth||(c-=t.scrollLeft),s.el.style.left=c+"px",s.fullWidth&&s.screenWidth&&(s.el.style.minWidth=n.width+2*n.padding+"px"),s.fixedWidth?s.el.style.right=t.scrollBar.getWidth()+"px":s.el.style.right=""}}}}}).call(i.prototype),t.LineWidgets=i})),ace.define("ace/ext/error_marker",["require","exports","module","ace/line_widgets","ace/lib/dom","ace/range"],(function(e,t,n){"use strict";var r=e("../line_widgets").LineWidgets,i=e("../lib/dom"),o=e("../range").Range;t.showErrorMarker=function(e,t){var n=e.session;n.widgetManager||(n.widgetManager=new r(n),n.widgetManager.attach(e));var a=e.getCursorPosition(),s=a.row,l=n.widgetManager.getWidgetsAtRow(s).filter((function(e){return"errorMarker"==e.type}))[0];l?l.destroy():s-=t;var c,u=function(e,t,n){var r=e.getAnnotations().sort(o.comparePoints);if(r.length){var i=function(e,t,n){for(var r=0,i=e.length-1;r<=i;){var o=r+i>>1,a=n(t,e[o]);if(a>0)r=o+1;else{if(!(a<0))return o;i=o-1}}return-(r+1)}(r,{row:t,column:-1},o.comparePoints);i<0&&(i=-i-1),i>=r.length?i=n>0?0:r.length-1:0===i&&n<0&&(i=r.length-1);var a=r[i];if(a&&n){if(a.row===t){do{a=r[i+=n]}while(a&&a.row===t);if(!a)return r.slice()}var s=[];t=a.row;do{s[n<0?"unshift":"push"](a),a=r[i+=n]}while(a&&a.row==t);return s.length&&s}}}(n,s,t);if(u){var d=u[0];a.column=(d.pos&&"number"!=typeof d.column?d.pos.sc:d.column)||0,a.row=d.row,c=e.renderer.$gutterLayer.$annotations[a.row]}else{if(l)return;c={text:["Looks good!"],className:"ace_ok"}}e.session.unfold(a.row),e.selection.moveToPosition(a);var f={row:a.row,fixedWidth:!0,coverGutter:!0,el:i.createElement("div"),type:"errorMarker"},h=f.el.appendChild(i.createElement("div")),p=f.el.appendChild(i.createElement("div"));p.className="error_widget_arrow "+c.className;var m=e.renderer.$cursorLayer.getPixelPosition(a).left;p.style.left=m+e.renderer.gutterWidth-5+"px",f.el.className="error_widget_wrapper",h.className="error_widget "+c.className,h.innerHTML=c.text.join("
"),h.appendChild(i.createElement("div"));var g=function(e,t,n){if(0===t&&("esc"===n||"return"===n))return f.destroy(),{command:"null"}};f.destroy=function(){e.$mouseHandler.isMousePressed||(e.keyBinding.removeKeyboardHandler(g),n.widgetManager.removeLineWidget(f),e.off("changeSelection",f.destroy),e.off("changeSession",f.destroy),e.off("mouseup",f.destroy),e.off("change",f.destroy))},e.keyBinding.addKeyboardHandler(g),e.on("changeSelection",f.destroy),e.on("changeSession",f.destroy),e.on("mouseup",f.destroy),e.on("change",f.destroy),e.session.widgetManager.addLineWidget(f),f.el.onmousedown=e.focus.bind(e),e.renderer.scrollCursorIntoView(null,.5,{bottom:f.el.offsetHeight})},i.importCssString(" .error_widget_wrapper { background: inherit; color: inherit; border:none } .error_widget { border-top: solid 2px; border-bottom: solid 2px; margin: 5px 0; padding: 10px 40px; white-space: pre-wrap; } .error_widget.ace_error, .error_widget_arrow.ace_error{ border-color: #ff5a5a } .error_widget.ace_warning, .error_widget_arrow.ace_warning{ border-color: #F1D817 } .error_widget.ace_info, .error_widget_arrow.ace_info{ border-color: #5a5a5a } .error_widget.ace_ok, .error_widget_arrow.ace_ok{ border-color: #5aaa5a } .error_widget_arrow { position: absolute; border: solid 5px; border-top-color: transparent!important; border-right-color: transparent!important; border-left-color: transparent!important; top: -5px; }","")})),ace.define("ace/ace",["require","exports","module","ace/lib/fixoldbrowsers","ace/lib/dom","ace/lib/event","ace/range","ace/editor","ace/edit_session","ace/undomanager","ace/virtual_renderer","ace/worker/worker_client","ace/keyboard/hash_handler","ace/placeholder","ace/multi_select","ace/mode/folding/fold_mode","ace/theme/textmate","ace/ext/error_marker","ace/config"],(function(e,t,r){"use strict";e("./lib/fixoldbrowsers");var i=e("./lib/dom"),o=e("./lib/event"),a=e("./range").Range,s=e("./editor").Editor,l=e("./edit_session").EditSession,c=e("./undomanager").UndoManager,u=e("./virtual_renderer").VirtualRenderer;e("./worker/worker_client"),e("./keyboard/hash_handler"),e("./placeholder"),e("./multi_select"),e("./mode/folding/fold_mode"),e("./theme/textmate"),e("./ext/error_marker"),t.config=e("./config"),t.require=e,t.define=n.amdD,t.edit=function(e,n){if("string"==typeof e){var r=e;if(!(e=document.getElementById(r)))throw new Error("ace.edit can't find div #"+r)}if(e&&e.env&&e.env.editor instanceof s)return e.env.editor;var a="";if(e&&/input|textarea/i.test(e.tagName)){var l=e;a=l.value,e=i.createElement("pre"),l.parentNode.replaceChild(e,l)}else e&&(a=e.textContent,e.innerHTML="");var c=t.createEditSession(a),d=new s(new u(e),c,n),f={document:c,editor:d,onResize:d.resize.bind(d,null)};return l&&(f.textarea=l),o.addListener(window,"resize",f.onResize),d.on("destroy",(function(){o.removeListener(window,"resize",f.onResize),f.editor.container.env=null})),d.container.env=d.env=f,d},t.createEditSession=function(e,t){var n=new l(e,t);return n.setUndoManager(new c),n},t.Range=a,t.Editor=s,t.EditSession=l,t.UndoManager=c,t.VirtualRenderer=u,t.version=t.config.version})),ace.require(["ace/ace"],(function(t){for(var n in t&&(t.config.init(!0),t.define=ace.define),window.ace||(window.ace=t),t)t.hasOwnProperty(n)&&(window.ace[n]=t[n]);window.ace.default=window.ace,e&&(e.exports=window.ace)}))},16866:function(e,t,n){e=n.nmd(e),ace.define("ace/split",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/editor","ace/virtual_renderer","ace/edit_session"],(function(e,t,n){"use strict";var r=e("./lib/oop"),i=(e("./lib/lang"),e("./lib/event_emitter").EventEmitter),o=e("./editor").Editor,a=e("./virtual_renderer").VirtualRenderer,s=e("./edit_session").EditSession,l=function(e,t,n){this.BELOW=1,this.BESIDE=0,this.$container=e,this.$theme=t,this.$splits=0,this.$editorCSS="",this.$editors=[],this.$orientation=this.BESIDE,this.setSplits(n||1),this.$cEditor=this.$editors[0],this.on("focus",function(e){this.$cEditor=e}.bind(this))};(function(){r.implement(this,i),this.$createEditor=function(){var e=document.createElement("div");e.className=this.$editorCSS,e.style.cssText="position: absolute; top:0px; bottom:0px",this.$container.appendChild(e);var t=new o(new a(e,this.$theme));return t.on("focus",function(){this._emit("focus",t)}.bind(this)),this.$editors.push(t),t.setFontSize(this.$fontSize),t},this.setSplits=function(e){var t;if(e<1)throw"The number of splits have to be > 0!";if(e!=this.$splits){if(e>this.$splits){for(;this.$splitse;)t=this.$editors[this.$splits-1],this.$container.removeChild(t.container),this.$splits--;this.resize()}},this.getSplits=function(){return this.$splits},this.getEditor=function(e){return this.$editors[e]},this.getCurrentEditor=function(){return this.$cEditor},this.focus=function(){this.$cEditor.focus()},this.blur=function(){this.$cEditor.blur()},this.setTheme=function(e){this.$editors.forEach((function(t){t.setTheme(e)}))},this.setKeyboardHandler=function(e){this.$editors.forEach((function(t){t.setKeyboardHandler(e)}))},this.forEach=function(e,t){this.$editors.forEach(e,t)},this.$fontSize="",this.setFontSize=function(e){this.$fontSize=e,this.forEach((function(t){t.setFontSize(e)}))},this.$cloneSession=function(e){var t=new s(e.getDocument(),e.getMode()),n=e.getUndoManager();return t.setUndoManager(n),t.setTabSize(e.getTabSize()),t.setUseSoftTabs(e.getUseSoftTabs()),t.setOverwrite(e.getOverwrite()),t.setBreakpoints(e.getBreakpoints()),t.setUseWrapMode(e.getUseWrapMode()),t.setUseWorker(e.getUseWorker()),t.setWrapLimitRange(e.$wrapLimitRange.min,e.$wrapLimitRange.max),t.$foldData=e.$cloneFoldData(),t},this.setSession=function(e,t){var n;n=null==t?this.$cEditor:this.$editors[t];var r=this.$editors.some((function(t){return t.session===e}));return r&&(e=this.$cloneSession(e)),n.setSession(e),e},this.getOrientation=function(){return this.$orientation},this.setOrientation=function(e){this.$orientation!=e&&(this.$orientation=e,this.resize())},this.resize=function(){var e,t=this.$container.clientWidth,n=this.$container.clientHeight;if(this.$orientation==this.BESIDE)for(var r=t/this.$splits,i=0;i/,next:"start"},{token:"keyword.operator",regex:/--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/,next:"start"},{token:"punctuation.operator",regex:/[?:,;.]/,next:"start"},{token:"paren.lparen",regex:/[\[({]/,next:"start"},{token:"paren.rparen",regex:/[\])}]/},{token:"comment",regex:/^#!.*$/}],property:[{token:"text",regex:"\\s+"},{token:["storage.type","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","entity.name.function","text","paren.lparen"],regex:"("+a+")(\\.)("+a+")(\\s*)(=)(\\s*)(function)(?:(\\s+)(\\w+))?(\\s*)(\\()",next:"function_arguments"},{token:"punctuation.operator",regex:/[.](?![.])/},{token:"support.function",regex:/(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/},{token:"support.function.dom",regex:/(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/},{token:"support.constant",regex:/(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/},{token:"identifier",regex:a},{regex:"",token:"empty",next:"no_regex"}],start:[i.getStartRule("doc-start"),c("start"),{token:"string.regexp",regex:"\\/",next:"regex"},{token:"text",regex:"\\s+|^$",next:"start"},{token:"empty",regex:"",next:"no_regex"}],regex:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"string.regexp",regex:"/[sxngimy]*",next:"no_regex"},{token:"invalid",regex:/\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/},{token:"constant.language.escape",regex:/\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/},{token:"constant.language.delimiter",regex:/\|/},{token:"constant.language.escape",regex:/\[\^?/,next:"regex_character_class"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp"}],regex_character_class:[{token:"regexp.charclass.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"constant.language.escape",regex:"]",next:"regex"},{token:"constant.language.escape",regex:"-"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp.charachterclass"}],function_arguments:[{token:"variable.parameter",regex:a},{token:"punctuation.operator",regex:"[, ]+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],qqstring:[{token:"constant.language.escape",regex:n},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:n},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}]},e&&e.noES6||(this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(e,t,n){if(this.next="{"==e?this.nextState:"","{"==e&&n.length)n.unshift("start",t);else if("}"==e&&n.length&&(n.shift(),this.next=n.shift(),-1!=this.next.indexOf("string")||-1!=this.next.indexOf("jsx")))return"paren.quasi.end";return"{"==e?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:n},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]}),e&&0==e.jsx||l.call(this)),this.embedRules(i,"doc-",[i.getEndRule("no_regex")]),this.normalizeRules()};function l(){var e=a.replace("\\d","\\d\\-"),t={onMatch:function(e,t,n){var r="/"==e.charAt(1)?2:1;return 1==r?(t!=this.nextState?n.unshift(this.next,this.nextState,0):n.unshift(this.next),n[2]++):2==r&&t==this.nextState&&(n[1]--,(!n[1]||n[1]<0)&&(n.shift(),n.shift())),[{type:"meta.tag.punctuation."+(1==r?"":"end-")+"tag-open.xml",value:e.slice(0,r)},{type:"meta.tag.tag-name.xml",value:e.substr(r)}]},regex:"",onMatch:function(e,t,n){return t==n[0]&&n.shift(),2==e.length&&(n[0]==this.nextState&&n[1]--,(!n[1]||n[1]<0)&&n.splice(0,2)),this.next=n[0]||"start",[{type:this.token,value:e}]},nextState:"jsx"},n,c("jsxAttributes"),{token:"entity.other.attribute-name.xml",regex:e},{token:"keyword.operator.attribute-equals.xml",regex:"="},{token:"text.tag-whitespace.xml",regex:"\\s+"},{token:"string.attribute-value.xml",regex:"'",stateName:"jsx_attr_q",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',stateName:"jsx_attr_qq",push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},t],this.$rules.reference=[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}]}function c(e){return[{token:"comment",regex:/\/\*/,next:[i.getTagRule(),{token:"comment",regex:"\\*\\/",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]},{token:"comment",regex:"\\/\\/",next:[i.getTagRule(),{token:"comment",regex:"$|^",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]}]}r.inherits(s,o),t.JavaScriptHighlightRules=s})),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],(function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return!!/^\s+$/.test(e)&&/^\s*\}/.test(t)},this.autoOutdent=function(e,t){var n=e.getLine(t).match(/^(\s*\})/);if(!n)return 0;var i=n[1].length,o=e.findMatchingBracket({row:t,column:i});if(!o||o.row==t)return 0;var a=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,i-1),a)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i})),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],(function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,o=e("./fold_mode").FoldMode,a=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(a,o),function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i,o=e.getLine(n);if(this.startRegionRe.test(o))return this.getCommentRegionBlock(e,o,n);if(i=o.match(this.foldingStartMarker)){var a=i.index;if(i[1])return this.openingBracketBlock(e,i[1],n,a);var s=e.getCommentFoldRange(n,a+i[0].length,1);return s&&!s.isMultiLine()&&(r?s=this.getSectionRange(e,n):"all"!=t&&(s=null)),s}if("markbegin"!==t&&(i=o.match(this.foldingStopMarker))){a=i.index+i[0].length;return i[1]?this.closingBracketBlock(e,i[1],n,a):e.getCommentFoldRange(n,a,-1)}},this.getSectionRange=function(e,t){for(var n=e.getLine(t),r=n.search(/\S/),o=t,a=n.length,s=t+=1,l=e.getLength();++tc)break;var u=this.getFoldWidgetRange(e,"all",t);if(u){if(u.start.row<=o)break;if(u.isMultiLine())t=u.end.row;else if(r==c)break}s=t}}return new i(o,a,s,e.getLine(s).length)},this.getCommentRegionBlock=function(e,t,n){for(var r=t.search(/\s*$/),o=e.getLength(),a=n,s=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,l=1;++na)return new i(a,r,n,t.length)}}.call(a.prototype)})),ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"],(function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,o=e("./javascript_highlight_rules").JavaScriptHighlightRules,a=e("./matching_brace_outdent").MatchingBraceOutdent,s=e("../worker/worker_client").WorkerClient,l=e("./behaviour/cstyle").CstyleBehaviour,c=e("./folding/cstyle").FoldMode,u=function(){this.HighlightRules=o,this.$outdent=new a,this.$behaviour=new l,this.foldingRules=new c};r.inherits(u,i),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$quotes={'"':'"',"'":"'","`":"`"},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e),o=i.tokens,a=i.state;if(o.length&&"comment"==o[o.length-1].type)return r;if("start"==e||"no_regex"==e)(s=t.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/))&&(r+=n);else if("doc-start"==e){if("start"==a||"no_regex"==a)return"";var s;(s=t.match(/^\s*(\/?)\*/))&&(s[1]&&(r+=" "),r+="* ")}return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){var t=new s(["ace"],"ace/mode/javascript_worker","JavaScriptWorker");return t.attachToDocument(e.getDocument()),t.on("annotate",(function(t){e.setAnnotations(t.data)})),t.on("terminate",(function(){e.clearAnnotations()})),t},this.$id="ace/mode/javascript",this.snippetFileId="ace/snippets/javascript"}.call(u.prototype),t.Mode=u})),ace.require(["ace/mode/javascript"],(function(t){e&&(e.exports=t)}))},66027:function(e,t,n){e=n.nmd(e),ace.define("ace/mode/json_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],(function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,o=function(){this.$rules={start:[{token:"variable",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]\\s*(?=:)'},{token:"string",regex:'"',next:"string"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:"text",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"comment",regex:"\\/\\/.*$"},{token:"comment.start",regex:"\\/\\*",next:"comment"},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]"},{token:"text",regex:"\\s+"}],string:[{token:"constant.language.escape",regex:/\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|["\\\/bfnrt])/},{token:"string",regex:'"|$',next:"start"},{defaultToken:"string"}],comment:[{token:"comment.end",regex:"\\*\\/",next:"start"},{defaultToken:"comment"}]}};r.inherits(o,i),t.JsonHighlightRules=o})),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],(function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return!!/^\s+$/.test(e)&&/^\s*\}/.test(t)},this.autoOutdent=function(e,t){var n=e.getLine(t).match(/^(\s*\})/);if(!n)return 0;var i=n[1].length,o=e.findMatchingBracket({row:t,column:i});if(!o||o.row==t)return 0;var a=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,i-1),a)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i})),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],(function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,o=e("./fold_mode").FoldMode,a=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(a,o),function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i,o=e.getLine(n);if(this.startRegionRe.test(o))return this.getCommentRegionBlock(e,o,n);if(i=o.match(this.foldingStartMarker)){var a=i.index;if(i[1])return this.openingBracketBlock(e,i[1],n,a);var s=e.getCommentFoldRange(n,a+i[0].length,1);return s&&!s.isMultiLine()&&(r?s=this.getSectionRange(e,n):"all"!=t&&(s=null)),s}if("markbegin"!==t&&(i=o.match(this.foldingStopMarker))){a=i.index+i[0].length;return i[1]?this.closingBracketBlock(e,i[1],n,a):e.getCommentFoldRange(n,a,-1)}},this.getSectionRange=function(e,t){for(var n=e.getLine(t),r=n.search(/\S/),o=t,a=n.length,s=t+=1,l=e.getLength();++tc)break;var u=this.getFoldWidgetRange(e,"all",t);if(u){if(u.start.row<=o)break;if(u.isMultiLine())t=u.end.row;else if(r==c)break}s=t}}return new i(o,a,s,e.getLine(s).length)},this.getCommentRegionBlock=function(e,t,n){for(var r=t.search(/\s*$/),o=e.getLength(),a=n,s=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,l=1;++na)return new i(a,r,n,t.length)}}.call(a.prototype)})),ace.define("ace/mode/json",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/json_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle","ace/worker/worker_client"],(function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,o=e("./json_highlight_rules").JsonHighlightRules,a=e("./matching_brace_outdent").MatchingBraceOutdent,s=e("./behaviour/cstyle").CstyleBehaviour,l=e("./folding/cstyle").FoldMode,c=e("../worker/worker_client").WorkerClient,u=function(){this.HighlightRules=o,this.$outdent=new a,this.$behaviour=new s,this.foldingRules=new l};r.inherits(u,i),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t);"start"==e&&(t.match(/^.*[\{\(\[]\s*$/)&&(r+=n));return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){var t=new c(["ace"],"ace/mode/json_worker","JsonWorker");return t.attachToDocument(e.getDocument()),t.on("annotate",(function(t){e.setAnnotations(t.data)})),t.on("terminate",(function(){e.clearAnnotations()})),t},this.$id="ace/mode/json"}.call(u.prototype),t.Mode=u})),ace.require(["ace/mode/json"],(function(t){e&&(e.exports=t)}))},92205:function(e,t,n){e=n.nmd(e),ace.define("ace/theme/github",["require","exports","module","ace/lib/dom"],(function(e,t,n){t.isDark=!1,t.cssClass="ace-github",t.cssText='.ace-github .ace_gutter {background: #e8e8e8;color: #AAA;}.ace-github {background: #fff;color: #000;}.ace-github .ace_keyword {font-weight: bold;}.ace-github .ace_string {color: #D14;}.ace-github .ace_variable.ace_class {color: teal;}.ace-github .ace_constant.ace_numeric {color: #099;}.ace-github .ace_constant.ace_buildin {color: #0086B3;}.ace-github .ace_support.ace_function {color: #0086B3;}.ace-github .ace_comment {color: #998;font-style: italic;}.ace-github .ace_variable.ace_language {color: #0086B3;}.ace-github .ace_paren {font-weight: bold;}.ace-github .ace_boolean {font-weight: bold;}.ace-github .ace_string.ace_regexp {color: #009926;font-weight: normal;}.ace-github .ace_variable.ace_instance {color: teal;}.ace-github .ace_constant.ace_language {font-weight: bold;}.ace-github .ace_cursor {color: black;}.ace-github.ace_focus .ace_marker-layer .ace_active-line {background: rgb(255, 255, 204);}.ace-github .ace_marker-layer .ace_active-line {background: rgb(245, 245, 245);}.ace-github .ace_marker-layer .ace_selection {background: rgb(181, 213, 255);}.ace-github.ace_multiselect .ace_selection.ace_start {box-shadow: 0 0 3px 0px white;}.ace-github.ace_nobold .ace_line > span {font-weight: normal !important;}.ace-github .ace_marker-layer .ace_step {background: rgb(252, 255, 0);}.ace-github .ace_marker-layer .ace_stack {background: rgb(164, 229, 101);}.ace-github .ace_marker-layer .ace_bracket {margin: -1px 0 0 -1px;border: 1px solid rgb(192, 192, 192);}.ace-github .ace_gutter-active-line {background-color : rgba(0, 0, 0, 0.07);}.ace-github .ace_marker-layer .ace_selected-word {background: rgb(250, 250, 255);border: 1px solid rgb(200, 200, 250);}.ace-github .ace_invisible {color: #BFBFBF}.ace-github .ace_print-margin {width: 1px;background: #e8e8e8;}.ace-github .ace_indent-guide {background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y;}',e("../lib/dom").importCssString(t.cssText,t.cssClass)})),ace.require(["ace/theme/github"],(function(t){e&&(e.exports=t)}))},41941:function(e,t,n){e=n.nmd(e),ace.define("ace/theme/monokai",["require","exports","module","ace/lib/dom"],(function(e,t,n){t.isDark=!0,t.cssClass="ace-monokai",t.cssText=".ace-monokai .ace_gutter {background: #2F3129;color: #8F908A}.ace-monokai .ace_print-margin {width: 1px;background: #555651}.ace-monokai {background-color: #272822;color: #F8F8F2}.ace-monokai .ace_cursor {color: #F8F8F0}.ace-monokai .ace_marker-layer .ace_selection {background: #49483E}.ace-monokai.ace_multiselect .ace_selection.ace_start {box-shadow: 0 0 3px 0px #272822;}.ace-monokai .ace_marker-layer .ace_step {background: rgb(102, 82, 0)}.ace-monokai .ace_marker-layer .ace_bracket {margin: -1px 0 0 -1px;border: 1px solid #49483E}.ace-monokai .ace_marker-layer .ace_active-line {background: #202020}.ace-monokai .ace_gutter-active-line {background-color: #272727}.ace-monokai .ace_marker-layer .ace_selected-word {border: 1px solid #49483E}.ace-monokai .ace_invisible {color: #52524d}.ace-monokai .ace_entity.ace_name.ace_tag,.ace-monokai .ace_keyword,.ace-monokai .ace_meta.ace_tag,.ace-monokai .ace_storage {color: #F92672}.ace-monokai .ace_punctuation,.ace-monokai .ace_punctuation.ace_tag {color: #fff}.ace-monokai .ace_constant.ace_character,.ace-monokai .ace_constant.ace_language,.ace-monokai .ace_constant.ace_numeric,.ace-monokai .ace_constant.ace_other {color: #AE81FF}.ace-monokai .ace_invalid {color: #F8F8F0;background-color: #F92672}.ace-monokai .ace_invalid.ace_deprecated {color: #F8F8F0;background-color: #AE81FF}.ace-monokai .ace_support.ace_constant,.ace-monokai .ace_support.ace_function {color: #66D9EF}.ace-monokai .ace_fold {background-color: #A6E22E;border-color: #F8F8F2}.ace-monokai .ace_storage.ace_type,.ace-monokai .ace_support.ace_class,.ace-monokai .ace_support.ace_type {font-style: italic;color: #66D9EF}.ace-monokai .ace_entity.ace_name.ace_function,.ace-monokai .ace_entity.ace_other,.ace-monokai .ace_entity.ace_other.ace_attribute-name,.ace-monokai .ace_variable {color: #A6E22E}.ace-monokai .ace_variable.ace_parameter {font-style: italic;color: #FD971F}.ace-monokai .ace_string {color: #E6DB74}.ace-monokai .ace_comment {color: #75715E}.ace-monokai .ace_indent-guide {background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWPQ0FD0ZXBzd/wPAAjVAoxeSgNeAAAAAElFTkSuQmCC) right repeat-y}",e("../lib/dom").importCssString(t.cssText,t.cssClass)})),ace.require(["ace/theme/monokai"],(function(t){e&&(e.exports=t)}))},33165:function(e,t,n){e=n.nmd(e),ace.define("ace/theme/xcode",["require","exports","module","ace/lib/dom"],(function(e,t,n){t.isDark=!1,t.cssClass="ace-xcode",t.cssText=".ace-xcode .ace_gutter {background: #e8e8e8;color: #333}.ace-xcode .ace_print-margin {width: 1px;background: #e8e8e8}.ace-xcode {background-color: #FFFFFF;color: #000000}.ace-xcode .ace_cursor {color: #000000}.ace-xcode .ace_marker-layer .ace_selection {background: #B5D5FF}.ace-xcode.ace_multiselect .ace_selection.ace_start {box-shadow: 0 0 3px 0px #FFFFFF;}.ace-xcode .ace_marker-layer .ace_step {background: rgb(198, 219, 174)}.ace-xcode .ace_marker-layer .ace_bracket {margin: -1px 0 0 -1px;border: 1px solid #BFBFBF}.ace-xcode .ace_marker-layer .ace_active-line {background: rgba(0, 0, 0, 0.071)}.ace-xcode .ace_gutter-active-line {background-color: rgba(0, 0, 0, 0.071)}.ace-xcode .ace_marker-layer .ace_selected-word {border: 1px solid #B5D5FF}.ace-xcode .ace_constant.ace_language,.ace-xcode .ace_keyword,.ace-xcode .ace_meta,.ace-xcode .ace_variable.ace_language {color: #C800A4}.ace-xcode .ace_invisible {color: #BFBFBF}.ace-xcode .ace_constant.ace_character,.ace-xcode .ace_constant.ace_other {color: #275A5E}.ace-xcode .ace_constant.ace_numeric {color: #3A00DC}.ace-xcode .ace_entity.ace_other.ace_attribute-name,.ace-xcode .ace_support.ace_constant,.ace-xcode .ace_support.ace_function {color: #450084}.ace-xcode .ace_fold {background-color: #C800A4;border-color: #000000}.ace-xcode .ace_entity.ace_name.ace_tag,.ace-xcode .ace_support.ace_class,.ace-xcode .ace_support.ace_type {color: #790EAD}.ace-xcode .ace_storage {color: #C900A4}.ace-xcode .ace_string {color: #DF0002}.ace-xcode .ace_comment {color: #008E00}.ace-xcode .ace_indent-guide {background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==) right repeat-y}",e("../lib/dom").importCssString(t.cssText,t.cssClass)})),ace.require(["ace/theme/xcode"],(function(t){e&&(e.exports=t)}))},68077:function(e){function t(e){e=e||{},this.ms=e.min||100,this.max=e.max||1e4,this.factor=e.factor||2,this.jitter=e.jitter>0&&e.jitter<=1?e.jitter:0,this.attempts=0}e.exports=t,t.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=0==(1&Math.floor(10*t))?e-n:e+n}return 0|Math.min(e,this.max)},t.prototype.reset=function(){this.attempts=0},t.prototype.setMin=function(e){this.ms=e},t.prototype.setMax=function(e){this.max=e},t.prototype.setJitter=function(e){this.jitter=e}},28182:function(e,t,n){"use strict";function r(e){var t,n,i="";if("string"===typeof e||"number"===typeof e)i+=e;else if("object"===typeof e)if(Array.isArray(e))for(t=0;tt?1:e>=t?0:NaN}function o(e){var t;return 1===e.length&&(t=e,e=function(e,n){return i(t(e),n)}),{left:function(t,n,r,i){for(null==r&&(r=0),null==i&&(i=t.length);r>>1;e(t[o],n)<0?r=o+1:i=o}return r},right:function(t,n,r,i){for(null==r&&(r=0),null==i&&(i=t.length);r>>1;e(t[o],n)>0?i=o:r=o+1}return r}}}var a=o(i),s=a.right,l=a.left,c=s;function u(e,t){null==t&&(t=d);for(var n=0,r=e.length-1,i=e[0],o=new Array(r<0?0:r);ne?1:t>=e?0:NaN}function p(e){return null===e?NaN:+e}function m(e,t){var n,r,i=e.length,o=0,a=-1,s=0,l=0;if(null==t)for(;++a1)return l/(o-1)}function g(e,t){var n=m(e,t);return n?Math.sqrt(n):n}function v(e,t){var n,r,i,o=e.length,a=-1;if(null==t){for(;++a=n)for(r=i=n;++an&&(r=n),i=n)for(r=i=n;++an&&(r=n),i0)return[e];if((r=t0)for(e=Math.ceil(e/a),t=Math.floor(t/a),o=new Array(i=Math.ceil(t-e+1));++s=0?(o>=S?10:o>=C?5:o>=j?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(o>=S?10:o>=C?5:o>=j?2:1)}function M(e,t,n){var r=Math.abs(t-e)/Math.max(0,n),i=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),o=r/i;return o>=S?i*=10:o>=C?i*=5:o>=j&&(i*=2),td;)f.pop(),--h;var p,m=new Array(h+1);for(i=0;i<=h;++i)(p=m[i]=[]).x0=i>0?f[i-1]:u,p.x1=i=1)return+n(e[r-1],r-1,e);var r,i=(r-1)*t,o=Math.floor(i),a=+n(e[o],o,e);return a+(+n(e[o+1],o+1,e)-a)*(i-o)}}function Z(e,t,n){return e=x.call(e,p).sort(i),Math.ceil((n-t)/(2*(O(e,.75)-O(e,.25))*Math.pow(e.length,-1/3)))}function I(e,t,n){return Math.ceil((n-t)/(3.5*g(e)*Math.pow(e.length,-1/3)))}function P(e,t){var n,r,i=e.length,o=-1;if(null==t){for(;++o=n)for(r=n;++or&&(r=n)}else for(;++o=n)for(r=n;++or&&(r=n);return r}function L(e,t){var n,r=e.length,i=r,o=-1,a=0;if(null==t)for(;++o=0;)for(t=(r=e[i]).length;--t>=0;)n[--a]=r[t];return n}function $(e,t){var n,r,i=e.length,o=-1;if(null==t){for(;++o=n)for(r=n;++on&&(r=n)}else for(;++o=n)for(r=n;++on&&(r=n);return r}function F(e,t){for(var n=t.length,r=new Array(n);n--;)r[n]=e[t[n]];return r}function z(e,t){if(n=e.length){var n,r,o=0,a=0,s=e[a];for(null==t&&(t=i);++o=0&&(n=e.slice(r+1),e=e.slice(0,r)),e&&!t.hasOwnProperty(e))throw new Error("unknown type: "+e);return{type:e,name:n}}))}function ue(e,t){for(var n,r=0,i=e.length;r0)for(var n,r,i=new Array(n),o=0;ot?1:e>=t?0:NaN}var _e="http://www.w3.org/1999/xhtml",Se={svg:"http://www.w3.org/2000/svg",xhtml:_e,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Ce(e){var t=e+="",n=t.indexOf(":");return n>=0&&"xmlns"!==(t=e.slice(0,n))&&(e=e.slice(n+1)),Se.hasOwnProperty(t)?{space:Se[t],local:e}:e}function je(e){return function(){this.removeAttribute(e)}}function Ee(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Te(e,t){return function(){this.setAttribute(e,t)}}function Me(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function Ae(e,t){return function(){var n=t.apply(this,arguments);null==n?this.removeAttribute(e):this.setAttribute(e,n)}}function Re(e,t){return function(){var n=t.apply(this,arguments);null==n?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function Oe(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function Ze(e){return function(){this.style.removeProperty(e)}}function Ie(e,t,n){return function(){this.style.setProperty(e,t,n)}}function Pe(e,t,n){return function(){var r=t.apply(this,arguments);null==r?this.style.removeProperty(e):this.style.setProperty(e,r,n)}}function Le(e,t){return e.style.getPropertyValue(t)||Oe(e).getComputedStyle(e,null).getPropertyValue(t)}function De(e){return function(){delete this[e]}}function Ne(e,t){return function(){this[e]=t}}function $e(e,t){return function(){var n=t.apply(this,arguments);null==n?delete this[e]:this[e]=n}}function Fe(e){return e.trim().split(/^|\s+/)}function ze(e){return e.classList||new Be(e)}function Be(e){this._node=e,this._names=Fe(e.getAttribute("class")||"")}function We(e,t){for(var n=ze(e),r=-1,i=t.length;++r=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};var ct={},ut=null;"undefined"!==typeof document&&("onmouseenter"in document.documentElement||(ct={mouseenter:"mouseover",mouseleave:"mouseout"}));function dt(e,t,n){return e=ft(e,t,n),function(t){var n=t.relatedTarget;n&&(n===this||8&n.compareDocumentPosition(this))||e.call(this,t)}}function ft(e,t,n){return function(r){var i=ut;ut=r;try{e.call(this,this.__data__,t,n)}finally{ut=i}}}function ht(e){return e.trim().split(/^|\s+/).map((function(e){var t="",n=e.indexOf(".");return n>=0&&(t=e.slice(n+1),e=e.slice(0,n)),{type:e,name:t}}))}function pt(e){return function(){var t=this.__on;if(t){for(var n,r=0,i=-1,o=t.length;r=x&&(x=b+1);!(y=g[x])&&++x=0;)(r=i[o])&&(a&&4^r.compareDocumentPosition(a)&&a.parentNode.insertBefore(r,a),a=r);return this},sort:function(e){function t(t,n){return t&&n?e(t.__data__,n.__data__):!t-!n}e||(e=ke);for(var n=this._groups,r=n.length,i=new Array(r),o=0;o1?this.each((null==t?Ze:"function"===typeof t?Pe:Ie)(e,t,null==n?"":n)):Le(this.node(),e)},property:function(e,t){return arguments.length>1?this.each((null==t?De:"function"===typeof t?$e:Ne)(e,t)):this.node()[e]},classed:function(e,t){var n=Fe(e+"");if(arguments.length<2){for(var r=ze(this.node()),i=-1,o=n.length;++i>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?Kt(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?Kt(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=Nt.exec(e))?new Xt(t[1],t[2],t[3],1):(t=$t.exec(e))?new Xt(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=Ft.exec(e))?Kt(t[1],t[2],t[3],t[4]):(t=zt.exec(e))?Kt(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=Bt.exec(e))?nn(t[1],t[2]/100,t[3]/100,1):(t=Wt.exec(e))?nn(t[1],t[2]/100,t[3]/100,t[4]):Ht.hasOwnProperty(e)?Gt(Ht[e]):"transparent"===e?new Xt(NaN,NaN,NaN,0):null}function Gt(e){return new Xt(e>>16&255,e>>8&255,255&e,1)}function Kt(e,t,n,r){return r<=0&&(e=t=n=NaN),new Xt(e,t,n,r)}function Qt(e){return e instanceof Rt||(e=qt(e)),e?new Xt((e=e.rgb()).r,e.g,e.b,e.opacity):new Xt}function Yt(e,t,n,r){return 1===arguments.length?Qt(e):new Xt(e,t,n,null==r?1:r)}function Xt(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function Jt(){return"#"+tn(this.r)+tn(this.g)+tn(this.b)}function en(){var e=this.opacity;return(1===(e=isNaN(e)?1:Math.max(0,Math.min(1,e)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===e?")":", "+e+")")}function tn(e){return((e=Math.max(0,Math.min(255,Math.round(e)||0)))<16?"0":"")+e.toString(16)}function nn(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new an(e,t,n,r)}function rn(e){if(e instanceof an)return new an(e.h,e.s,e.l,e.opacity);if(e instanceof Rt||(e=qt(e)),!e)return new an;if(e instanceof an)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),o=Math.max(t,n,r),a=NaN,s=o-i,l=(o+i)/2;return s?(a=t===o?(n-r)/s+6*(n0&&l<1?0:a,new an(a,s,l,e.opacity)}function on(e,t,n,r){return 1===arguments.length?rn(e):new an(e,t,n,null==r?1:r)}function an(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function sn(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}function ln(e,t,n,r,i){var o=e*e,a=o*e;return((1-3*e+3*o-a)*t+(4-6*o+3*a)*n+(1+3*e+3*o-3*a)*r+a*i)/6}function cn(e){var t=e.length-1;return function(n){var r=n<=0?n=0:n>=1?(n=1,t-1):Math.floor(n*t),i=e[r],o=e[r+1],a=r>0?e[r-1]:2*i-o,s=r180||n<-180?n-360*Math.round(n/360):n):dn(isNaN(e)?t:e)}function pn(e){return 1===(e=+e)?mn:function(t,n){return n-t?function(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}(t,n,e):dn(isNaN(t)?n:t)}}function mn(e,t){var n=t-e;return n?fn(e,n):dn(isNaN(e)?t:e)}Mt(Rt,qt,{copy:function(e){return Object.assign(new this.constructor,this,e)},displayable:function(){return this.rgb().displayable()},hex:Ut,formatHex:Ut,formatHsl:function(){return rn(this).formatHsl()},formatRgb:Vt,toString:Vt}),Mt(Xt,Yt,At(Rt,{brighter:function(e){return e=null==e?Zt:Math.pow(Zt,e),new Xt(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=null==e?Ot:Math.pow(Ot,e),new Xt(this.r*e,this.g*e,this.b*e,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Jt,formatHex:Jt,formatRgb:en,toString:en})),Mt(an,on,At(Rt,{brighter:function(e){return e=null==e?Zt:Math.pow(Zt,e),new an(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?Ot:Math.pow(Ot,e),new an(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new Xt(sn(e>=240?e-240:e+120,i,r),sn(e,i,r),sn(e<120?e+240:e-120,i,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var e=this.opacity;return(1===(e=isNaN(e)?1:Math.max(0,Math.min(1,e)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===e?")":", "+e+")")}}));var gn=function e(t){var n=pn(t);function r(e,t){var r=n((e=Yt(e)).r,(t=Yt(t)).r),i=n(e.g,t.g),o=n(e.b,t.b),a=mn(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=i(t),e.b=o(t),e.opacity=a(t),e+""}}return r.gamma=e,r}(1);function vn(e){return function(t){var n,r,i=t.length,o=new Array(i),a=new Array(i),s=new Array(i);for(n=0;no&&(i=t.slice(o,i),s[a]?s[a]+=i:s[++a]=i),(n=n[0])===(r=r[0])?s[a]?s[a]+=r:s[++a]=r:(s[++a]=null,l.push({i:a,x:Cn(n,r)})),o=Tn.lastIndex;return o=0&&t._call.call(null,e),t=t._next;--Dn}function Qn(){zn=(Fn=Wn.now())+Bn,Dn=Nn=0;try{Kn()}finally{Dn=0,function(){var e,t,n=Pn,r=1/0;for(;n;)n._call?(r>n._time&&(r=n._time),e=n,n=n._next):(t=n._next,n._next=null,n=e?e._next=t:Pn=t);Ln=e,Xn(r)}(),zn=0}}function Yn(){var e=Wn.now(),t=e-Fn;t>1e3&&(Bn-=t,Fn=e)}function Xn(e){Dn||(Nn&&(Nn=clearTimeout(Nn)),e-zn>24?(e<1/0&&(Nn=setTimeout(Qn,e-Wn.now()-Bn)),$n&&($n=clearInterval($n))):($n||(Fn=Wn.now(),$n=setInterval(Yn,1e3)),Dn=1,Hn(Qn)))}function Jn(e,t,n){var r=new qn;return t=null==t?0:+t,r.restart((function(n){r.stop(),e(n+t)}),t,n),r}qn.prototype=Gn.prototype={constructor:qn,restart:function(e,t,n){if("function"!==typeof e)throw new TypeError("callback is not a function");n=(null==n?Un():+n)+(null==t?0:+t),this._next||Ln===this||(Ln?Ln._next=this:Pn=this,Ln=this),this._call=e,this._time=n,Xn()},stop:function(){this._call&&(this._call=null,this._time=1/0,Xn())}};var er=fe("start","end","cancel","interrupt"),tr=[];function nr(e,t,n,r,i,o){var a=e.__transition;if(a){if(n in a)return}else e.__transition={};!function(e,t,n){var r,i=e.__transition;function o(e){n.state=1,n.timer.restart(a,n.delay,n.time),n.delay<=e&&a(e-n.delay)}function a(o){var c,u,d,f;if(1!==n.state)return l();for(c in i)if((f=i[c]).name===n.name){if(3===f.state)return Jn(a);4===f.state?(f.state=6,f.timer.stop(),f.on.call("interrupt",e,e.__data__,f.index,f.group),delete i[c]):+c0)throw new Error("too late; already scheduled");return n}function ir(e,t){var n=or(e,t);if(n.state>3)throw new Error("too late; already running");return n}function or(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function ar(e,t){var n,r,i,o=e.__transition,a=!0;if(o){for(i in t=null==t?null:t+"",o)(n=o[i]).name===t?(r=n.state>2&&n.state<5,n.state=6,n.timer.stop(),n.on.call(r?"interrupt":"cancel",e,e.__data__,n.index,n.group),delete o[i]):a=!1;a&&delete e.__transition}}var sr,lr,cr,ur,dr=180/Math.PI,fr={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function hr(e,t,n,r,i,o){var a,s,l;return(a=Math.sqrt(e*e+t*t))&&(e/=a,t/=a),(l=e*n+t*r)&&(n-=e*l,r-=t*l),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,l/=s),e*r180?t+=360:t-e>180&&(e+=360),o.push({i:n.push(i(n)+"rotate(",null,r)-2,x:Cn(e,t)})):t&&n.push(i(n)+"rotate("+t+r)}(o.rotate,a.rotate,s,l),function(e,t,n,o){e!==t?o.push({i:n.push(i(n)+"skewX(",null,r)-2,x:Cn(e,t)}):t&&n.push(i(n)+"skewX("+t+r)}(o.skewX,a.skewX,s,l),function(e,t,n,r,o,a){if(e!==n||t!==r){var s=o.push(i(o)+"scale(",null,",",null,")");a.push({i:s-4,x:Cn(e,n)},{i:s-2,x:Cn(t,r)})}else 1===n&&1===r||o.push(i(o)+"scale("+n+","+r+")")}(o.scaleX,o.scaleY,a.scaleX,a.scaleY,s,l),o=a=null,function(e){for(var t,n=-1,r=l.length;++n=0&&(e=e.slice(0,t)),!e||"start"===e}))}(t)?rr:ir;return function(){var a=o(this,e),s=a.on;s!==r&&(i=(r=s).copy()).on(t,n),a.on=i}}var Dr=_t.prototype.constructor;function Nr(e){return function(){this.style.removeProperty(e)}}function $r(e,t,n){return function(r){this.style.setProperty(e,t.call(this,r),n)}}function Fr(e,t,n){var r,i;function o(){var o=t.apply(this,arguments);return o!==i&&(r=(i=o)&&$r(e,o,n)),r}return o._value=t,o}function zr(e){return function(t){this.textContent=e.call(this,t)}}function Br(e){var t,n;function r(){var r=e.apply(this,arguments);return r!==n&&(t=(n=r)&&zr(r)),t}return r._value=e,r}var Wr=0;function Hr(e,t,n,r){this._groups=e,this._parents=t,this._name=n,this._id=r}function Ur(e){return _t().transition(e)}function Vr(){return++Wr}var qr=_t.prototype;function Gr(e){return e*e*e}function Kr(e){return--e*e*e+1}function Qr(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}Hr.prototype=Ur.prototype={constructor:Hr,select:function(e){var t=this._name,n=this._id;"function"!==typeof e&&(e=pe(e));for(var r=this._groups,i=r.length,o=new Array(i),a=0;a1&&n.name===t)return new Hr([[e]],Jr,t,+r);return null}function ti(e){return function(){return e}}function ni(e,t,n){this.target=e,this.type=t,this.selection=n}function ri(){ut.stopImmediatePropagation()}function ii(){ut.preventDefault(),ut.stopImmediatePropagation()}var oi={name:"drag"},ai={name:"space"},si={name:"handle"},li={name:"center"};function ci(e){return[+e[0],+e[1]]}function ui(e){return[ci(e[0]),ci(e[1])]}function di(e){return function(t){return Zn(t,ut.touches,e)}}var fi={name:"x",handles:["w","e"].map(xi),input:function(e,t){return null==e?null:[[+e[0],t[0][1]],[+e[1],t[1][1]]]},output:function(e){return e&&[e[0][0],e[1][0]]}},hi={name:"y",handles:["n","s"].map(xi),input:function(e,t){return null==e?null:[[t[0][0],+e[0]],[t[1][0],+e[1]]]},output:function(e){return e&&[e[0][1],e[1][1]]}},pi={name:"xy",handles:["n","w","e","s","nw","ne","sw","se"].map(xi),input:function(e){return null==e?null:ui(e)},output:function(e){return e}},mi={overlay:"crosshair",selection:"move",n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},gi={e:"w",w:"e",nw:"ne",ne:"nw",se:"sw",sw:"se"},vi={n:"s",s:"n",nw:"sw",ne:"se",se:"ne",sw:"nw"},yi={overlay:1,selection:1,n:null,e:1,s:null,w:-1,nw:-1,ne:1,se:1,sw:-1},bi={overlay:1,selection:1,n:-1,e:null,s:1,w:null,nw:-1,ne:-1,se:1,sw:1};function xi(e){return{type:e}}function wi(){return!ut.ctrlKey&&!ut.button}function ki(){var e=this.ownerSVGElement||this;return e.hasAttribute("viewBox")?[[(e=e.viewBox.baseVal).x,e.y],[e.x+e.width,e.y+e.height]]:[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]}function _i(){return navigator.maxTouchPoints||"ontouchstart"in this}function Si(e){for(;!e.__brush;)if(!(e=e.parentNode))return;return e.__brush}function Ci(e){return e[0][0]===e[1][0]||e[0][1]===e[1][1]}function ji(e){var t=e.__brush;return t?t.dim.output(t.selection):null}function Ei(){return Ai(fi)}function Ti(){return Ai(hi)}function Mi(){return Ai(pi)}function Ai(e){var t,n=ki,r=wi,i=_i,o=!0,a=fe("start","brush","end"),s=6;function l(t){var n=t.property("__brush",m).selectAll(".overlay").data([xi("overlay")]);n.enter().append("rect").attr("class","overlay").attr("pointer-events","all").attr("cursor",mi.overlay).merge(n).each((function(){var e=Si(this).extent;St(this).attr("x",e[0][0]).attr("y",e[0][1]).attr("width",e[1][0]-e[0][0]).attr("height",e[1][1]-e[0][1])})),t.selectAll(".selection").data([xi("selection")]).enter().append("rect").attr("class","selection").attr("cursor",mi.selection).attr("fill","#777").attr("fill-opacity",.3).attr("stroke","#fff").attr("shape-rendering","crispEdges");var r=t.selectAll(".handle").data(e.handles,(function(e){return e.type}));r.exit().remove(),r.enter().append("rect").attr("class",(function(e){return"handle handle--"+e.type})).attr("cursor",(function(e){return mi[e.type]})),t.each(c).attr("fill","none").attr("pointer-events","all").on("mousedown.brush",f).filter(i).on("touchstart.brush",f).on("touchmove.brush",h).on("touchend.brush touchcancel.brush",p).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function c(){var e=St(this),t=Si(this).selection;t?(e.selectAll(".selection").style("display",null).attr("x",t[0][0]).attr("y",t[0][1]).attr("width",t[1][0]-t[0][0]).attr("height",t[1][1]-t[0][1]),e.selectAll(".handle").style("display",null).attr("x",(function(e){return"e"===e.type[e.type.length-1]?t[1][0]-s/2:t[0][0]-s/2})).attr("y",(function(e){return"s"===e.type[0]?t[1][1]-s/2:t[0][1]-s/2})).attr("width",(function(e){return"n"===e.type||"s"===e.type?t[1][0]-t[0][0]+s:s})).attr("height",(function(e){return"e"===e.type||"w"===e.type?t[1][1]-t[0][1]+s:s}))):e.selectAll(".selection,.handle").style("display","none").attr("x",null).attr("y",null).attr("width",null).attr("height",null)}function u(e,t,n){var r=e.__brush.emitter;return!r||n&&r.clean?new d(e,t,n):r}function d(e,t,n){this.that=e,this.args=t,this.state=e.__brush,this.active=0,this.clean=n}function f(){if((!t||ut.touches)&&r.apply(this,arguments)){var n,i,a,s,l,d,f,h,p,m,g,v=this,y=ut.target.__data__.type,b="selection"===(o&&ut.metaKey?y="overlay":y)?oi:o&&ut.altKey?li:si,x=e===hi?null:yi[y],w=e===fi?null:bi[y],k=Si(v),_=k.extent,S=k.selection,C=_[0][0],j=_[0][1],E=_[1][0],T=_[1][1],M=0,A=0,R=x&&w&&o&&ut.shiftKey,O=ut.touches?di(ut.changedTouches[0].identifier):In,Z=O(v),I=Z,P=u(v,arguments,!0).beforestart();"overlay"===y?(S&&(p=!0),k.selection=S=[[n=e===hi?C:Z[0],a=e===fi?j:Z[1]],[l=e===hi?E:n,f=e===fi?T:a]]):(n=S[0][0],a=S[0][1],l=S[1][0],f=S[1][1]),i=n,s=a,d=l,h=f;var L=St(v).attr("pointer-events","none"),D=L.selectAll(".overlay").attr("cursor",mi[y]);if(ut.touches)P.moved=$,P.ended=z;else{var N=St(ut.view).on("mousemove.brush",$,!0).on("mouseup.brush",z,!0);o&&N.on("keydown.brush",B,!0).on("keyup.brush",W,!0),Et(ut.view)}ri(),ar(v),c.call(v),P.start()}function $(){var e=O(v);!R||m||g||(Math.abs(e[0]-I[0])>Math.abs(e[1]-I[1])?g=!0:m=!0),I=e,p=!0,ii(),F()}function F(){var e;switch(M=I[0]-Z[0],A=I[1]-Z[1],b){case ai:case oi:x&&(M=Math.max(C-n,Math.min(E-l,M)),i=n+M,d=l+M),w&&(A=Math.max(j-a,Math.min(T-f,A)),s=a+A,h=f+A);break;case si:x<0?(M=Math.max(C-n,Math.min(E-n,M)),i=n+M,d=l):x>0&&(M=Math.max(C-l,Math.min(E-l,M)),i=n,d=l+M),w<0?(A=Math.max(j-a,Math.min(T-a,A)),s=a+A,h=f):w>0&&(A=Math.max(j-f,Math.min(T-f,A)),s=a,h=f+A);break;case li:x&&(i=Math.max(C,Math.min(E,n-M*x)),d=Math.max(C,Math.min(E,l+M*x))),w&&(s=Math.max(j,Math.min(T,a-A*w)),h=Math.max(j,Math.min(T,f+A*w)))}d0&&(n=i-M),w<0?f=h-A:w>0&&(a=s-A),b=ai,D.attr("cursor",mi.selection),F());break;default:return}ii()}function W(){switch(ut.keyCode){case 16:R&&(m=g=R=!1,F());break;case 18:b===li&&(x<0?l=d:x>0&&(n=i),w<0?f=h:w>0&&(a=s),b=si,F());break;case 32:b===ai&&(ut.altKey?(x&&(l=d-M*x,n=i+M*x),w&&(f=h-A*w,a=s+A*w),b=li):(x<0?l=d:x>0&&(n=i),w<0?f=h:w>0&&(a=s),b=si),D.attr("cursor",mi[y]),F());break;default:return}ii()}}function h(){u(this,arguments).moved()}function p(){u(this,arguments).ended()}function m(){var t=this.__brush||{selection:null};return t.extent=ui(n.apply(this,arguments)),t.dim=e,t}return l.move=function(t,n){t.selection?t.on("start.brush",(function(){u(this,arguments).beforestart().start()})).on("interrupt.brush end.brush",(function(){u(this,arguments).end()})).tween("brush",(function(){var t=this,r=t.__brush,i=u(t,arguments),o=r.selection,a=e.input("function"===typeof n?n.apply(this,arguments):n,r.extent),s=An(o,a);function l(e){r.selection=1===e&&null===a?null:s(e),c.call(t),i.brush()}return null!==o&&null!==a?l:l(1)})):t.each((function(){var t=this,r=arguments,i=t.__brush,o=e.input("function"===typeof n?n.apply(t,r):n,i.extent),a=u(t,r).beforestart();ar(t),i.selection=null===o?null:o,c.call(t),a.start().brush().end()}))},l.clear=function(e){l.move(e,null)},d.prototype={beforestart:function(){return 1===++this.active&&(this.state.emitter=this,this.starting=!0),this},start:function(){return this.starting?(this.starting=!1,this.emit("start")):this.emit("brush"),this},brush:function(){return this.emit("brush"),this},end:function(){return 0===--this.active&&(delete this.state.emitter,this.emit("end")),this},emit:function(t){gt(new ni(l,t,e.output(this.state.selection)),a.apply,a,[t,this.that,this.args])}},l.extent=function(e){return arguments.length?(n="function"===typeof e?e:ti(ui(e)),l):n},l.filter=function(e){return arguments.length?(r="function"===typeof e?e:ti(!!e),l):r},l.touchable=function(e){return arguments.length?(i="function"===typeof e?e:ti(!!e),l):i},l.handleSize=function(e){return arguments.length?(s=+e,l):s},l.keyModifiers=function(e){return arguments.length?(o=!!e,l):o},l.on=function(){var e=a.on.apply(a,arguments);return e===a?l:e},l}var Ri=Math.cos,Oi=Math.sin,Zi=Math.PI,Ii=Zi/2,Pi=2*Zi,Li=Math.max;function Di(e){return function(t,n){return e(t.source.value+t.target.value,n.source.value+n.target.value)}}function Ni(){var e=0,t=null,n=null,r=null;function i(i){var o,a,s,l,c,u,d=i.length,f=[],h=_(d),p=[],m=[],g=m.groups=new Array(d),v=new Array(d*d);for(o=0,c=-1;++cWi)if(Math.abs(u*s-l*c)>Wi&&i){var f=n-o,h=r-a,p=s*s+l*l,m=f*f+h*h,g=Math.sqrt(p),v=Math.sqrt(d),y=i*Math.tan((zi-Math.acos((p+d-m)/(2*g*v)))/2),b=y/v,x=y/g;Math.abs(b-1)>Wi&&(this._+="L"+(e+b*c)+","+(t+b*u)),this._+="A"+i+","+i+",0,0,"+ +(u*f>c*h)+","+(this._x1=e+x*s)+","+(this._y1=t+x*l)}else this._+="L"+(this._x1=e)+","+(this._y1=t);else;},arc:function(e,t,n,r,i,o){e=+e,t=+t,o=!!o;var a=(n=+n)*Math.cos(r),s=n*Math.sin(r),l=e+a,c=t+s,u=1^o,d=o?r-i:i-r;if(n<0)throw new Error("negative radius: "+n);null===this._x1?this._+="M"+l+","+c:(Math.abs(this._x1-l)>Wi||Math.abs(this._y1-c)>Wi)&&(this._+="L"+l+","+c),n&&(d<0&&(d=d%Bi+Bi),d>Hi?this._+="A"+n+","+n+",0,1,"+u+","+(e-a)+","+(t-s)+"A"+n+","+n+",0,1,"+u+","+(this._x1=l)+","+(this._y1=c):d>Wi&&(this._+="A"+n+","+n+",0,"+ +(d>=zi)+","+u+","+(this._x1=e+n*Math.cos(i))+","+(this._y1=t+n*Math.sin(i))))},rect:function(e,t,n,r){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)+"h"+ +n+"v"+ +r+"h"+-n+"Z"},toString:function(){return this._}};var qi=Vi;function Gi(e){return e.source}function Ki(e){return e.target}function Qi(e){return e.radius}function Yi(e){return e.startAngle}function Xi(e){return e.endAngle}function Ji(){var e=Gi,t=Ki,n=Qi,r=Yi,i=Xi,o=null;function a(){var a,s=$i.call(arguments),l=e.apply(this,s),c=t.apply(this,s),u=+n.apply(this,(s[0]=l,s)),d=r.apply(this,s)-Ii,f=i.apply(this,s)-Ii,h=u*Ri(d),p=u*Oi(d),m=+n.apply(this,(s[0]=c,s)),g=r.apply(this,s)-Ii,v=i.apply(this,s)-Ii;if(o||(o=a=qi()),o.moveTo(h,p),o.arc(0,0,u,d,f),d===g&&f===v||(o.quadraticCurveTo(0,0,m*Ri(g),m*Oi(g)),o.arc(0,0,m,g,v)),o.quadraticCurveTo(0,0,h,p),o.closePath(),a)return o=null,a+""||null}return a.radius=function(e){return arguments.length?(n="function"===typeof e?e:Fi(+e),a):n},a.startAngle=function(e){return arguments.length?(r="function"===typeof e?e:Fi(+e),a):r},a.endAngle=function(e){return arguments.length?(i="function"===typeof e?e:Fi(+e),a):i},a.source=function(t){return arguments.length?(e=t,a):e},a.target=function(e){return arguments.length?(t=e,a):t},a.context=function(e){return arguments.length?(o=null==e?null:e,a):o},a}var eo="$";function to(){}function no(e,t){var n=new to;if(e instanceof to)e.each((function(e,t){n.set(t,e)}));else if(Array.isArray(e)){var r,i=-1,o=e.length;if(null==t)for(;++i=r.length)return null!=e&&n.sort(e),null!=t?t(n):n;for(var l,c,u,d=-1,f=n.length,h=r[i++],p=ro(),m=a();++dr.length)return e;var o,s=i[n-1];return null!=t&&n>=r.length?o=e.entries():(o=[],e.each((function(e,t){o.push({key:t,values:a(e,n)})}))),null!=s?o.sort((function(e,t){return s(e.key,t.key)})):o}return n={object:function(e){return o(e,0,oo,ao)},map:function(e){return o(e,0,so,lo)},entries:function(e){return a(o(e,0,so,lo),0)},key:function(e){return r.push(e),n},sortKeys:function(e){return i[r.length-1]=e,n},sortValues:function(t){return e=t,n},rollup:function(e){return t=e,n}}}function oo(){return{}}function ao(e,t,n){e[t]=n}function so(){return ro()}function lo(e,t,n){e.set(t,n)}function co(){}var uo=ro.prototype;function fo(e,t){var n=new co;if(e instanceof co)e.each((function(e){n.add(e)}));else if(e){var r=-1,i=e.length;if(null==t)for(;++r.008856451679035631?Math.pow(e,1/3):e/_o+wo}function Mo(e){return e>ko?e*e*e:_o*(e-wo)}function Ao(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function Ro(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function Oo(e){if(e instanceof Po)return new Po(e.h,e.c,e.l,e.opacity);if(e instanceof Eo||(e=So(e)),0===e.a&&0===e.b)return new Po(NaN,0r!==h>r&&n<(f-c)*(r-u)/(h-u)+c&&(i=-i)}return i}function Jo(e,t,n){var r;return function(e,t,n){return(t[0]-e[0])*(n[1]-e[1])===(n[0]-e[0])*(t[1]-e[1])}(e,t,n)&&function(e,t,n){return e<=t&&t<=n||n<=t&&t<=e}(e[r=+(e[0]===t[0])],n[r],t[r])}function ea(){}var ta=[[],[[[1,1.5],[.5,1]]],[[[1.5,1],[1,1.5]]],[[[1.5,1],[.5,1]]],[[[1,.5],[1.5,1]]],[[[1,1.5],[.5,1]],[[1,.5],[1.5,1]]],[[[1,.5],[1,1.5]]],[[[1,.5],[.5,1]]],[[[.5,1],[1,.5]]],[[[1,1.5],[1,.5]]],[[[.5,1],[1,.5]],[[1.5,1],[1,1.5]]],[[[1.5,1],[1,.5]]],[[[.5,1],[1.5,1]]],[[[1,1.5],[1.5,1]]],[[[.5,1],[1,1.5]]],[]];function na(){var e=1,t=1,n=A,r=s;function i(e){var t=n(e);if(Array.isArray(t))t=t.slice().sort(Ko);else{var r=v(e),i=r[0],a=r[1];t=M(i,a,t),t=_(Math.floor(i/t)*t,Math.floor(a/t)*t,t)}return t.map((function(t){return o(e,t)}))}function o(n,i){var o=[],s=[];return function(n,r,i){var o,s,l,c,u,d,f=new Array,h=new Array;o=s=-1,c=n[0]>=r,ta[c<<1].forEach(p);for(;++o=r,ta[l|c<<1].forEach(p);ta[c<<0].forEach(p);for(;++s=r,u=n[s*e]>=r,ta[c<<1|u<<2].forEach(p);++o=r,d=u,u=n[s*e+o+1]>=r,ta[l|c<<1|u<<2|d<<3].forEach(p);ta[c|u<<3].forEach(p)}o=-1,u=n[s*e]>=r,ta[u<<2].forEach(p);for(;++o=r,ta[u<<2|d<<3].forEach(p);function p(e){var t,n,r=[e[0][0]+o,e[0][1]+s],l=[e[1][0]+o,e[1][1]+s],c=a(r),u=a(l);(t=h[c])?(n=f[u])?(delete h[t.end],delete f[n.start],t===n?(t.ring.push(l),i(t.ring)):f[t.start]=h[n.end]={start:t.start,end:n.end,ring:t.ring.concat(n.ring)}):(delete h[t.end],t.ring.push(l),h[t.end=u]=t):(t=f[u])?(n=h[c])?(delete f[t.start],delete h[n.end],t===n?(t.ring.push(l),i(t.ring)):f[n.start]=h[t.end]={start:n.start,end:t.end,ring:n.ring.concat(t.ring)}):(delete f[t.start],t.ring.unshift(r),f[t.start=c]=t):f[c]=h[u]={start:c,end:u,ring:[r,l]}}ta[u<<3].forEach(p)}(n,i,(function(e){r(e,n,i),function(e){for(var t=0,n=e.length,r=e[n-1][1]*e[0][0]-e[n-1][0]*e[0][1];++t0?o.push([e]):s.push(e)})),s.forEach((function(e){for(var t,n=0,r=o.length;n0&&a0&&s0)||!(o>0))throw new Error("invalid size");return e=r,t=o,i},i.thresholds=function(e){return arguments.length?(n="function"===typeof e?e:Array.isArray(e)?Qo(Go.call(e)):Qo(e),i):n},i.smooth=function(e){return arguments.length?(r=e?s:ea,i):r===s},i}function ra(e,t,n){for(var r=e.width,i=e.height,o=1+(n<<1),a=0;a=n&&(s>=o&&(l-=e.data[s-o+a*r]),t.data[s-n+a*r]=l/Math.min(s+1,r-1+o-s,o))}function ia(e,t,n){for(var r=e.width,i=e.height,o=1+(n<<1),a=0;a=n&&(s>=o&&(l-=e.data[a+(s-o)*r]),t.data[a+(s-n)*r]=l/Math.min(s+1,i-1+o-s,o))}function oa(e){return e[0]}function aa(e){return e[1]}function sa(){return 1}function la(){var e=oa,t=aa,n=sa,r=960,i=500,o=20,a=2,s=3*o,l=r+2*s>>a,c=i+2*s>>a,u=Qo(20);function d(r){var i=new Float32Array(l*c),d=new Float32Array(l*c);r.forEach((function(r,o,u){var d=+e(r,o,u)+s>>a,f=+t(r,o,u)+s>>a,h=+n(r,o,u);d>=0&&d=0&&f>a),ia({width:l,height:c,data:d},{width:l,height:c,data:i},o>>a),ra({width:l,height:c,data:i},{width:l,height:c,data:d},o>>a),ia({width:l,height:c,data:d},{width:l,height:c,data:i},o>>a),ra({width:l,height:c,data:i},{width:l,height:c,data:d},o>>a),ia({width:l,height:c,data:d},{width:l,height:c,data:i},o>>a);var h=u(i);if(!Array.isArray(h)){var p=P(i);h=M(0,p,h),(h=_(0,Math.floor(p/h)*h,h)).shift()}return na().thresholds(h).size([l,c])(i).map(f)}function f(e){return e.value*=Math.pow(2,-2*a),e.coordinates.forEach(h),e}function h(e){e.forEach(p)}function p(e){e.forEach(m)}function m(e){e[0]=e[0]*Math.pow(2,a)-s,e[1]=e[1]*Math.pow(2,a)-s}function g(){return l=r+2*(s=3*o)>>a,c=i+2*s>>a,d}return d.x=function(t){return arguments.length?(e="function"===typeof t?t:Qo(+t),d):e},d.y=function(e){return arguments.length?(t="function"===typeof e?e:Qo(+e),d):t},d.weight=function(e){return arguments.length?(n="function"===typeof e?e:Qo(+e),d):n},d.size=function(e){if(!arguments.length)return[r,i];var t=Math.ceil(e[0]),n=Math.ceil(e[1]);if(!(t>=0)&&!(t>=0))throw new Error("invalid size");return r=t,i=n,g()},d.cellSize=function(e){if(!arguments.length)return 1<=1))throw new Error("invalid cell size");return a=Math.floor(Math.log(e)/Math.LN2),g()},d.thresholds=function(e){return arguments.length?(u="function"===typeof e?e:Array.isArray(e)?Qo(Go.call(e)):Qo(e),d):u},d.bandwidth=function(e){if(!arguments.length)return Math.sqrt(o*(o+1));if(!((e=+e)>=0))throw new Error("invalid bandwidth");return o=Math.round((Math.sqrt(4*e*e+1)-1)/2),g()},d}function ca(e){return function(){return e}}function ua(e,t,n,r,i,o,a,s,l,c){this.target=e,this.type=t,this.subject=n,this.identifier=r,this.active=i,this.x=o,this.y=a,this.dx=s,this.dy=l,this._=c}function da(){return!ut.ctrlKey&&!ut.button}function fa(){return this.parentNode}function ha(e){return null==e?{x:ut.x,y:ut.y}:e}function pa(){return navigator.maxTouchPoints||"ontouchstart"in this}function ma(){var e,t,n,r,i=da,o=fa,a=ha,s=pa,l={},c=fe("start","drag","end"),u=0,d=0;function f(e){e.on("mousedown.drag",h).filter(s).on("touchstart.drag",g).on("touchmove.drag",v).on("touchend.drag touchcancel.drag",y).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function h(){if(!r&&i.apply(this,arguments)){var a=b("mouse",o.apply(this,arguments),In,this,arguments);a&&(St(ut.view).on("mousemove.drag",p,!0).on("mouseup.drag",m,!0),Et(ut.view),Ct(),n=!1,e=ut.clientX,t=ut.clientY,a("start"))}}function p(){if(jt(),!n){var r=ut.clientX-e,i=ut.clientY-t;n=r*r+i*i>d}l.mouse("drag")}function m(){St(ut.view).on("mousemove.drag mouseup.drag",null),Tt(ut.view,n),jt(),l.mouse("end")}function g(){if(i.apply(this,arguments)){var e,t,n=ut.changedTouches,r=o.apply(this,arguments),a=n.length;for(e=0;e9999?"+"+xa(e,6):xa(e,4)}(e.getUTCFullYear())+"-"+xa(e.getUTCMonth()+1,2)+"-"+xa(e.getUTCDate(),2)+(i?"T"+xa(t,2)+":"+xa(n,2)+":"+xa(r,2)+"."+xa(i,3)+"Z":r?"T"+xa(t,2)+":"+xa(n,2)+":"+xa(r,2)+"Z":n||t?"T"+xa(t,2)+":"+xa(n,2)+"Z":"")}function ka(e){var t=new RegExp('["'+e+"\n\r]"),n=e.charCodeAt(0);function r(e,t){var r,i=[],o=e.length,a=0,s=0,l=o<=0,c=!1;function u(){if(l)return va;if(c)return c=!1,ga;var t,r,i=a;if(34===e.charCodeAt(i)){for(;a++=o?l=!0:10===(r=e.charCodeAt(a++))?c=!0:13===r&&(c=!0,10===e.charCodeAt(a)&&++a),e.slice(i+1,t-1).replace(/""/g,'"')}for(;a=(o=(m+v)/2))?m=o:v=o,(u=n>=(a=(g+y)/2))?g=a:y=a,i=h,!(h=h[d=u<<1|c]))return i[d]=p,e;if(s=+e._x.call(null,h.data),l=+e._y.call(null,h.data),t===s&&n===l)return p.next=h,i?i[d]=p:e._root=p,e;do{i=i?i[d]=new Array(4):e._root=new Array(4),(c=t>=(o=(m+v)/2))?m=o:v=o,(u=n>=(a=(g+y)/2))?g=a:y=a}while((d=u<<1|c)===(f=(l>=a)<<1|s>=o));return i[f]=h,i[d]=p,e}function Fs(e,t,n,r,i){this.node=e,this.x0=t,this.y0=n,this.x1=r,this.y1=i}function zs(e){return e[0]}function Bs(e){return e[1]}function Ws(e,t,n){var r=new Hs(null==t?zs:t,null==n?Bs:n,NaN,NaN,NaN,NaN);return null==e?r:r.addAll(e)}function Hs(e,t,n,r,i,o){this._x=e,this._y=t,this._x0=n,this._y0=r,this._x1=i,this._y1=o,this._root=void 0}function Us(e){for(var t={data:e.data},n=t;e=e.next;)n=n.next={data:e.data};return t}var Vs=Ws.prototype=Hs.prototype;function qs(e){return e.x+e.vx}function Gs(e){return e.y+e.vy}function Ks(e){var t,n,r=1,i=1;function o(){for(var e,o,s,l,c,u,d,f=t.length,h=0;hl+h||ic+h||os.index){var p=l-a.x-a.vx,m=c-a.y-a.vy,g=p*p+m*m;ge.r&&(e.r=e[t].r)}function s(){if(t){var r,i,o=t.length;for(n=new Array(o),r=0;ru&&(u=r),id&&(d=i));if(l>u||c>d)return this;for(this.cover(l,c).cover(u,d),n=0;ne||e>=i||r>t||t>=o;)switch(s=(tf||(o=l.y0)>h||(a=l.x1)=v)<<1|e>=g)&&(l=p[p.length-1],p[p.length-1]=p[p.length-1-c],p[p.length-1-c]=l)}else{var y=e-+this._x.call(null,m.data),b=t-+this._y.call(null,m.data),x=y*y+b*b;if(x=(s=(p+g)/2))?p=s:g=s,(u=a>=(l=(m+v)/2))?m=l:v=l,t=h,!(h=h[d=u<<1|c]))return this;if(!h.length)break;(t[d+1&3]||t[d+2&3]||t[d+3&3])&&(n=t,f=d)}for(;h.data!==e;)if(r=h,!(h=h.next))return this;return(i=h.next)&&delete h.next,r?(i?r.next=i:delete r.next,this):t?(i?t[d]=i:delete t[d],(h=t[0]||t[1]||t[2]||t[3])&&h===(t[3]||t[2]||t[1]||t[0])&&!h.length&&(n?n[f]=h:this._root=h),this):(this._root=i,this)},Vs.removeAll=function(e){for(var t=0,n=e.length;t1?(null==n?s.remove(e):s.set(e,h(n)),t):s.get(e)},find:function(t,n,r){var i,o,a,s,l,c=0,u=e.length;for(null==r?r=1/0:r*=r,c=0;c1?(c.on(e,n),t):c.on(e)}}}function rl(){var e,t,n,r,i=Ds(-30),o=1,a=1/0,s=.81;function l(r){var i,o=e.length,a=Ws(e,Js,el).visitAfter(u);for(n=r,i=0;i=a)){(e.data!==t||e.next)&&(0===u&&(h+=(u=Ns())*u),0===d&&(h+=(d=Ns())*d),h1?r[0]+r.slice(2):r,+e.slice(n+1)]}function ll(e){return(e=sl(Math.abs(e)))?e[1]:NaN}var cl,ul=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function dl(e){if(!(t=ul.exec(e)))throw new Error("invalid format: "+e);var t;return new fl({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}function fl(e){this.fill=void 0===e.fill?" ":e.fill+"",this.align=void 0===e.align?">":e.align+"",this.sign=void 0===e.sign?"-":e.sign+"",this.symbol=void 0===e.symbol?"":e.symbol+"",this.zero=!!e.zero,this.width=void 0===e.width?void 0:+e.width,this.comma=!!e.comma,this.precision=void 0===e.precision?void 0:+e.precision,this.trim=!!e.trim,this.type=void 0===e.type?"":e.type+""}function hl(e,t){var n=sl(e,t);if(!n)return e+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}dl.prototype=fl.prototype,fl.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var pl={"%":function(e,t){return(100*e).toFixed(t)},b:function(e){return Math.round(e).toString(2)},c:function(e){return e+""},d:function(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)},e:function(e,t){return e.toExponential(t)},f:function(e,t){return e.toFixed(t)},g:function(e,t){return e.toPrecision(t)},o:function(e){return Math.round(e).toString(8)},p:function(e,t){return hl(100*e,t)},r:hl,s:function(e,t){var n=sl(e,t);if(!n)return e+"";var r=n[0],i=n[1],o=i-(cl=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,a=r.length;return o===a?r:o>a?r+new Array(o-a+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+sl(e,Math.max(0,t+o-1))[0]},X:function(e){return Math.round(e).toString(16).toUpperCase()},x:function(e){return Math.round(e).toString(16)}};function ml(e){return e}var gl,vl,yl,bl=Array.prototype.map,xl=["y","z","a","f","p","n","\xb5","m","","k","M","G","T","P","E","Z","Y"];function wl(e){var t,n,r=void 0===e.grouping||void 0===e.thousands?ml:(t=bl.call(e.grouping,Number),n=e.thousands+"",function(e,r){for(var i=e.length,o=[],a=0,s=t[0],l=0;i>0&&s>0&&(l+s+1>r&&(s=Math.max(1,r-l)),o.push(e.substring(i-=s,i+s)),!((l+=s+1)>r));)s=t[a=(a+1)%t.length];return o.reverse().join(n)}),i=void 0===e.currency?"":e.currency[0]+"",o=void 0===e.currency?"":e.currency[1]+"",a=void 0===e.decimal?".":e.decimal+"",s=void 0===e.numerals?ml:function(e){return function(t){return t.replace(/[0-9]/g,(function(t){return e[+t]}))}}(bl.call(e.numerals,String)),l=void 0===e.percent?"%":e.percent+"",c=void 0===e.minus?"-":e.minus+"",u=void 0===e.nan?"NaN":e.nan+"";function d(e){var t=(e=dl(e)).fill,n=e.align,d=e.sign,f=e.symbol,h=e.zero,p=e.width,m=e.comma,g=e.precision,v=e.trim,y=e.type;"n"===y?(m=!0,y="g"):pl[y]||(void 0===g&&(g=12),v=!0,y="g"),(h||"0"===t&&"="===n)&&(h=!0,t="0",n="=");var b="$"===f?i:"#"===f&&/[boxX]/.test(y)?"0"+y.toLowerCase():"",x="$"===f?o:/[%p]/.test(y)?l:"",w=pl[y],k=/[defgprs%]/.test(y);function _(e){var i,o,l,f=b,_=x;if("c"===y)_=w(e)+_,e="";else{var S=(e=+e)<0||1/e<0;if(e=isNaN(e)?u:w(Math.abs(e),g),v&&(e=function(e){e:for(var t,n=e.length,r=1,i=-1;r0&&(i=0)}return i>0?e.slice(0,i)+e.slice(t+1):e}(e)),S&&0===+e&&"+"!==d&&(S=!1),f=(S?"("===d?d:c:"-"===d||"("===d?"":d)+f,_=("s"===y?xl[8+cl/3]:"")+_+(S&&"("===d?")":""),k)for(i=-1,o=e.length;++i(l=e.charCodeAt(i))||l>57){_=(46===l?a+e.slice(i+1):e.slice(i))+_,e=e.slice(0,i);break}}m&&!h&&(e=r(e,1/0));var C=f.length+e.length+_.length,j=C>1)+f+e+_+j.slice(C);break;default:e=j+f+e+_}return s(e)}return g=void 0===g?6:/[gprs]/.test(y)?Math.max(1,Math.min(21,g)):Math.max(0,Math.min(20,g)),_.toString=function(){return e+""},_}return{format:d,formatPrefix:function(e,t){var n=d(((e=dl(e)).type="f",e)),r=3*Math.max(-8,Math.min(8,Math.floor(ll(t)/3))),i=Math.pow(10,-r),o=xl[8+r/3];return function(e){return n(i*e)+o}}}}function kl(e){return gl=wl(e),vl=gl.format,yl=gl.formatPrefix,gl}function _l(e){return Math.max(0,-ll(Math.abs(e)))}function Sl(e,t){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(ll(t)/3)))-ll(Math.abs(e)))}function Cl(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,ll(t)-ll(e))+1}function jl(){return new El}function El(){this.reset()}kl({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"}),El.prototype={constructor:El,reset:function(){this.s=this.t=0},add:function(e){Ml(Tl,e,this.t),Ml(this,Tl.s,this.s),this.s?this.t+=Tl.t:this.s=Tl.t},valueOf:function(){return this.s}};var Tl=new El;function Ml(e,t,n){var r=e.s=t+n,i=r-t,o=r-i;e.t=t-o+(n-i)}var Al=1e-6,Rl=1e-12,Ol=Math.PI,Zl=Ol/2,Il=Ol/4,Pl=2*Ol,Ll=180/Ol,Dl=Ol/180,Nl=Math.abs,$l=Math.atan,Fl=Math.atan2,zl=Math.cos,Bl=Math.ceil,Wl=Math.exp,Hl=(Math.floor,Math.log),Ul=Math.pow,Vl=Math.sin,ql=Math.sign||function(e){return e>0?1:e<0?-1:0},Gl=Math.sqrt,Kl=Math.tan;function Ql(e){return e>1?0:e<-1?Ol:Math.acos(e)}function Yl(e){return e>1?Zl:e<-1?-Zl:Math.asin(e)}function Xl(e){return(e=Vl(e/2))*e}function Jl(){}function ec(e,t){e&&nc.hasOwnProperty(e.type)&&nc[e.type](e,t)}var tc={Feature:function(e,t){ec(e.geometry,t)},FeatureCollection:function(e,t){for(var n=e.features,r=-1,i=n.length;++r=0?1:-1,i=r*n,o=zl(t=(t*=Dl)/2+Il),a=Vl(t),s=uc*a,l=cc*o+s*zl(i),c=s*r*Vl(i);dc.add(Fl(c,l)),lc=e,cc=o,uc=a}function yc(e){return fc.reset(),oc(e,hc),2*fc}function bc(e){return[Fl(e[1],e[0]),Yl(e[2])]}function xc(e){var t=e[0],n=e[1],r=zl(n);return[r*zl(t),r*Vl(t),Vl(n)]}function wc(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function kc(e,t){return[e[1]*t[2]-e[2]*t[1],e[2]*t[0]-e[0]*t[2],e[0]*t[1]-e[1]*t[0]]}function _c(e,t){e[0]+=t[0],e[1]+=t[1],e[2]+=t[2]}function Sc(e,t){return[e[0]*t,e[1]*t,e[2]*t]}function Cc(e){var t=Gl(e[0]*e[0]+e[1]*e[1]+e[2]*e[2]);e[0]/=t,e[1]/=t,e[2]/=t}var jc,Ec,Tc,Mc,Ac,Rc,Oc,Zc,Ic,Pc,Lc,Dc,Nc,$c,Fc,zc,Bc,Wc,Hc,Uc,Vc,qc,Gc,Kc,Qc,Yc,Xc=jl(),Jc={point:eu,lineStart:nu,lineEnd:ru,polygonStart:function(){Jc.point=iu,Jc.lineStart=ou,Jc.lineEnd=au,Xc.reset(),hc.polygonStart()},polygonEnd:function(){hc.polygonEnd(),Jc.point=eu,Jc.lineStart=nu,Jc.lineEnd=ru,dc<0?(jc=-(Tc=180),Ec=-(Mc=90)):Xc>Al?Mc=90:Xc<-1e-6&&(Ec=-90),Pc[0]=jc,Pc[1]=Tc},sphere:function(){jc=-(Tc=180),Ec=-(Mc=90)}};function eu(e,t){Ic.push(Pc=[jc=e,Tc=e]),tMc&&(Mc=t)}function tu(e,t){var n=xc([e*Dl,t*Dl]);if(Zc){var r=kc(Zc,n),i=kc([r[1],-r[0],0],r);Cc(i),i=bc(i);var o,a=e-Ac,s=a>0?1:-1,l=i[0]*Ll*s,c=Nl(a)>180;c^(s*AcMc&&(Mc=o):c^(s*Ac<(l=(l+360)%360-180)&&lMc&&(Mc=t)),c?esu(jc,Tc)&&(Tc=e):su(e,Tc)>su(jc,Tc)&&(jc=e):Tc>=jc?(eTc&&(Tc=e)):e>Ac?su(jc,e)>su(jc,Tc)&&(Tc=e):su(e,Tc)>su(jc,Tc)&&(jc=e)}else Ic.push(Pc=[jc=e,Tc=e]);tMc&&(Mc=t),Zc=n,Ac=e}function nu(){Jc.point=tu}function ru(){Pc[0]=jc,Pc[1]=Tc,Jc.point=eu,Zc=null}function iu(e,t){if(Zc){var n=e-Ac;Xc.add(Nl(n)>180?n+(n>0?360:-360):n)}else Rc=e,Oc=t;hc.point(e,t),tu(e,t)}function ou(){hc.lineStart()}function au(){iu(Rc,Oc),hc.lineEnd(),Nl(Xc)>Al&&(jc=-(Tc=180)),Pc[0]=jc,Pc[1]=Tc,Zc=null}function su(e,t){return(t-=e)<0?t+360:t}function lu(e,t){return e[0]-t[0]}function cu(e,t){return e[0]<=e[1]?e[0]<=t&&t<=e[1]:tsu(r[0],r[1])&&(r[1]=i[1]),su(i[0],r[1])>su(r[0],r[1])&&(r[0]=i[0])):o.push(r=i);for(a=-1/0,t=0,r=o[n=o.length-1];t<=n;r=i,++t)i=o[t],(s=su(r[1],i[0]))>a&&(a=s,jc=i[0],Tc=r[1])}return Ic=Pc=null,jc===1/0||Ec===1/0?[[NaN,NaN],[NaN,NaN]]:[[jc,Ec],[Tc,Mc]]}var du={sphere:Jl,point:fu,lineStart:pu,lineEnd:vu,polygonStart:function(){du.lineStart=yu,du.lineEnd=bu},polygonEnd:function(){du.lineStart=pu,du.lineEnd=vu}};function fu(e,t){e*=Dl;var n=zl(t*=Dl);hu(n*zl(e),n*Vl(e),Vl(t))}function hu(e,t,n){++Lc,Nc+=(e-Nc)/Lc,$c+=(t-$c)/Lc,Fc+=(n-Fc)/Lc}function pu(){du.point=mu}function mu(e,t){e*=Dl;var n=zl(t*=Dl);Kc=n*zl(e),Qc=n*Vl(e),Yc=Vl(t),du.point=gu,hu(Kc,Qc,Yc)}function gu(e,t){e*=Dl;var n=zl(t*=Dl),r=n*zl(e),i=n*Vl(e),o=Vl(t),a=Fl(Gl((a=Qc*o-Yc*i)*a+(a=Yc*r-Kc*o)*a+(a=Kc*i-Qc*r)*a),Kc*r+Qc*i+Yc*o);Dc+=a,zc+=a*(Kc+(Kc=r)),Bc+=a*(Qc+(Qc=i)),Wc+=a*(Yc+(Yc=o)),hu(Kc,Qc,Yc)}function vu(){du.point=fu}function yu(){du.point=xu}function bu(){wu(qc,Gc),du.point=fu}function xu(e,t){qc=e,Gc=t,e*=Dl,t*=Dl,du.point=wu;var n=zl(t);Kc=n*zl(e),Qc=n*Vl(e),Yc=Vl(t),hu(Kc,Qc,Yc)}function wu(e,t){e*=Dl;var n=zl(t*=Dl),r=n*zl(e),i=n*Vl(e),o=Vl(t),a=Qc*o-Yc*i,s=Yc*r-Kc*o,l=Kc*i-Qc*r,c=Gl(a*a+s*s+l*l),u=Yl(c),d=c&&-u/c;Hc+=d*a,Uc+=d*s,Vc+=d*l,Dc+=u,zc+=u*(Kc+(Kc=r)),Bc+=u*(Qc+(Qc=i)),Wc+=u*(Yc+(Yc=o)),hu(Kc,Qc,Yc)}function ku(e){Lc=Dc=Nc=$c=Fc=zc=Bc=Wc=Hc=Uc=Vc=0,oc(e,du);var t=Hc,n=Uc,r=Vc,i=t*t+n*n+r*r;return iOl?e+Math.round(-e/Pl)*Pl:e,t]}function ju(e,t,n){return(e%=Pl)?t||n?Su(Tu(e),Mu(t,n)):Tu(e):t||n?Mu(t,n):Cu}function Eu(e){return function(t,n){return[(t+=e)>Ol?t-Pl:t<-Ol?t+Pl:t,n]}}function Tu(e){var t=Eu(e);return t.invert=Eu(-e),t}function Mu(e,t){var n=zl(e),r=Vl(e),i=zl(t),o=Vl(t);function a(e,t){var a=zl(t),s=zl(e)*a,l=Vl(e)*a,c=Vl(t),u=c*n+s*r;return[Fl(l*i-u*o,s*n-c*r),Yl(u*i+l*o)]}return a.invert=function(e,t){var a=zl(t),s=zl(e)*a,l=Vl(e)*a,c=Vl(t),u=c*i-l*o;return[Fl(l*i+c*o,s*n+u*r),Yl(u*n-s*r)]},a}function Au(e){function t(t){return(t=e(t[0]*Dl,t[1]*Dl))[0]*=Ll,t[1]*=Ll,t}return e=ju(e[0]*Dl,e[1]*Dl,e.length>2?e[2]*Dl:0),t.invert=function(t){return(t=e.invert(t[0]*Dl,t[1]*Dl))[0]*=Ll,t[1]*=Ll,t},t}function Ru(e,t,n,r,i,o){if(n){var a=zl(t),s=Vl(t),l=r*n;null==i?(i=t+r*Pl,o=t-l/2):(i=Ou(a,i),o=Ou(a,o),(r>0?io)&&(i+=r*Pl));for(var c,u=i;r>0?u>o:u1&&t.push(t.pop().concat(t.shift()))},result:function(){var n=t;return t=[],e=null,n}}}function Pu(e,t){return Nl(e[0]-t[0])=0;--o)i.point((u=c[o])[0],u[1]);else r(f.x,f.p.x,-1,i);f=f.p}c=(f=f.o).z,h=!h}while(!f.v);i.lineEnd()}}}function Nu(e){if(t=e.length){for(var t,n,r=0,i=e[0];++r=0?1:-1,C=S*_,j=C>Ol,E=m*w;if($u.add(Fl(E*S*Vl(C),g*k+E*zl(C))),a+=j?_+S*Pl:_,j^h>=n^b>=n){var T=kc(xc(f),xc(y));Cc(T);var M=kc(o,T);Cc(M);var A=(j^_>=0?-1:1)*Yl(M[2]);(r>A||r===A&&(T[0]||T[1]))&&(s+=j^_>=0?1:-1)}}return(a<-1e-6||a0){for(d||(i.polygonStart(),d=!0),i.lineStart(),e=0;e1&&2&l&&f.push(f.pop().concat(f.shift())),a.push(f.filter(Wu))}return f}}function Wu(e){return e.length>1}function Hu(e,t){return((e=e.x)[0]<0?e[1]-Zl-Al:Zl-e[1])-((t=t.x)[0]<0?t[1]-Zl-Al:Zl-t[1])}var Uu=Bu((function(){return!0}),(function(e){var t,n=NaN,r=NaN,i=NaN;return{lineStart:function(){e.lineStart(),t=1},point:function(o,a){var s=o>0?Ol:-Ol,l=Nl(o-n);Nl(l-Ol)0?Zl:-Zl),e.point(i,r),e.lineEnd(),e.lineStart(),e.point(s,r),e.point(o,r),t=0):i!==s&&l>=Ol&&(Nl(n-i)Al?$l((Vl(t)*(o=zl(r))*Vl(n)-Vl(r)*(i=zl(t))*Vl(e))/(i*o*a)):(t+r)/2}(n,r,o,a),e.point(i,r),e.lineEnd(),e.lineStart(),e.point(s,r),t=0),e.point(n=o,r=a),i=s},lineEnd:function(){e.lineEnd(),n=r=NaN},clean:function(){return 2-t}}}),(function(e,t,n,r){var i;if(null==e)i=n*Zl,r.point(-Ol,i),r.point(0,i),r.point(Ol,i),r.point(Ol,0),r.point(Ol,-i),r.point(0,-i),r.point(-Ol,-i),r.point(-Ol,0),r.point(-Ol,i);else if(Nl(e[0]-t[0])>Al){var o=e[0]0,i=Nl(t)>Al;function o(e,n){return zl(e)*zl(n)>t}function a(e,n,r){var i=[1,0,0],o=kc(xc(e),xc(n)),a=wc(o,o),s=o[0],l=a-s*s;if(!l)return!r&&e;var c=t*a/l,u=-t*s/l,d=kc(i,o),f=Sc(i,c);_c(f,Sc(o,u));var h=d,p=wc(f,h),m=wc(h,h),g=p*p-m*(wc(f,f)-1);if(!(g<0)){var v=Gl(g),y=Sc(h,(-p-v)/m);if(_c(y,f),y=bc(y),!r)return y;var b,x=e[0],w=n[0],k=e[1],_=n[1];w0^y[1]<(Nl(y[0]-x)Ol^(x<=y[0]&&y[0]<=w)){var j=Sc(h,(-p+v)/m);return _c(j,f),[y,bc(j)]}}}function s(t,n){var i=r?e:Ol-e,o=0;return t<-i?o|=1:t>i&&(o|=2),n<-i?o|=4:n>i&&(o|=8),o}return Bu(o,(function(e){var t,n,l,c,u;return{lineStart:function(){c=l=!1,u=1},point:function(d,f){var h,p=[d,f],m=o(d,f),g=r?m?0:s(d,f):m?s(d+(d<0?Ol:-Ol),f):0;if(!t&&(c=l=m)&&e.lineStart(),m!==l&&(!(h=a(t,p))||Pu(t,h)||Pu(p,h))&&(p[2]=1),m!==l)u=0,m?(e.lineStart(),h=a(p,t),e.point(h[0],h[1])):(h=a(t,p),e.point(h[0],h[1],2),e.lineEnd()),t=h;else if(i&&t&&r^m){var v;g&n||!(v=a(p,t,!0))||(u=0,r?(e.lineStart(),e.point(v[0][0],v[0][1]),e.point(v[1][0],v[1][1]),e.lineEnd()):(e.point(v[1][0],v[1][1]),e.lineEnd(),e.lineStart(),e.point(v[0][0],v[0][1],3)))}!m||t&&Pu(t,p)||e.point(p[0],p[1]),t=p,l=m,n=g},lineEnd:function(){l&&e.lineEnd(),t=null},clean:function(){return u|(c&&l)<<1}}}),(function(t,r,i,o){Ru(o,e,n,i,t,r)}),r?[0,-e]:[-Ol,e-Ol])}var qu=1e9,Gu=-qu;function Ku(e,t,n,r){function i(i,o){return e<=i&&i<=n&&t<=o&&o<=r}function o(i,o,s,c){var u=0,d=0;if(null==i||(u=a(i,s))!==(d=a(o,s))||l(i,o)<0^s>0)do{c.point(0===u||3===u?e:n,u>1?r:t)}while((u=(u+s+4)%4)!==d);else c.point(o[0],o[1])}function a(r,i){return Nl(r[0]-e)0?0:3:Nl(r[0]-n)0?2:1:Nl(r[1]-t)0?1:0:i>0?3:2}function s(e,t){return l(e.x,t.x)}function l(e,t){var n=a(e,1),r=a(t,1);return n!==r?n-r:0===n?t[1]-e[1]:1===n?e[0]-t[0]:2===n?e[1]-t[1]:t[0]-e[0]}return function(a){var l,c,u,d,f,h,p,m,g,v,y,b=a,x=Iu(),w={point:k,lineStart:function(){w.point=_,c&&c.push(u=[]);v=!0,g=!1,p=m=NaN},lineEnd:function(){l&&(_(d,f),h&&g&&x.rejoin(),l.push(x.result()));w.point=k,g&&b.lineEnd()},polygonStart:function(){b=x,l=[],c=[],y=!0},polygonEnd:function(){var t=function(){for(var t=0,n=0,i=c.length;nr&&(f-o)*(r-a)>(h-a)*(e-o)&&++t:h<=r&&(f-o)*(r-a)<(h-a)*(e-o)&&--t;return t}(),n=y&&t,i=(l=N(l)).length;(n||i)&&(a.polygonStart(),n&&(a.lineStart(),o(null,null,1,a),a.lineEnd()),i&&Du(l,s,t,o,a),a.polygonEnd());b=a,l=c=u=null}};function k(e,t){i(e,t)&&b.point(e,t)}function _(o,a){var s=i(o,a);if(c&&u.push([o,a]),v)d=o,f=a,h=s,v=!1,s&&(b.lineStart(),b.point(o,a));else if(s&&g)b.point(o,a);else{var l=[p=Math.max(Gu,Math.min(qu,p)),m=Math.max(Gu,Math.min(qu,m))],x=[o=Math.max(Gu,Math.min(qu,o)),a=Math.max(Gu,Math.min(qu,a))];!function(e,t,n,r,i,o){var a,s=e[0],l=e[1],c=0,u=1,d=t[0]-s,f=t[1]-l;if(a=n-s,d||!(a>0)){if(a/=d,d<0){if(a0){if(a>u)return;a>c&&(c=a)}if(a=i-s,d||!(a<0)){if(a/=d,d<0){if(a>u)return;a>c&&(c=a)}else if(d>0){if(a0)){if(a/=f,f<0){if(a0){if(a>u)return;a>c&&(c=a)}if(a=o-l,f||!(a<0)){if(a/=f,f<0){if(a>u)return;a>c&&(c=a)}else if(f>0){if(a0&&(e[0]=s+c*d,e[1]=l+c*f),u<1&&(t[0]=s+u*d,t[1]=l+u*f),!0}}}}}(l,x,e,t,n,r)?s&&(b.lineStart(),b.point(o,a),y=!1):(g||(b.lineStart(),b.point(l[0],l[1])),b.point(x[0],x[1]),s||b.lineEnd(),y=!1)}p=o,m=a,g=s}return w}}function Qu(){var e,t,n,r=0,i=0,o=960,a=500;return n={stream:function(n){return e&&t===n?e:e=Ku(r,i,o,a)(t=n)},extent:function(s){return arguments.length?(r=+s[0][0],i=+s[0][1],o=+s[1][0],a=+s[1][1],e=t=null,n):[[r,i],[o,a]]}}}var Yu,Xu,Ju,ed=jl(),td={sphere:Jl,point:Jl,lineStart:function(){td.point=rd,td.lineEnd=nd},lineEnd:Jl,polygonStart:Jl,polygonEnd:Jl};function nd(){td.point=td.lineEnd=Jl}function rd(e,t){Yu=e*=Dl,Xu=Vl(t*=Dl),Ju=zl(t),td.point=id}function id(e,t){e*=Dl;var n=Vl(t*=Dl),r=zl(t),i=Nl(e-Yu),o=zl(i),a=r*Vl(i),s=Ju*n-Xu*r*o,l=Xu*n+Ju*r*o;ed.add(Fl(Gl(a*a+s*s),l)),Yu=e,Xu=n,Ju=r}function od(e){return ed.reset(),oc(e,td),+ed}var ad=[null,null],sd={type:"LineString",coordinates:ad};function ld(e,t){return ad[0]=e,ad[1]=t,od(sd)}var cd={Feature:function(e,t){return dd(e.geometry,t)},FeatureCollection:function(e,t){for(var n=e.features,r=-1,i=n.length;++r0&&(i=ld(e[o],e[o-1]))>0&&n<=i&&r<=i&&(n+r-i)*(1-Math.pow((n-r)/i,2))Al})).map(l)).concat(_(Bl(o/h)*h,i,h).filter((function(e){return Nl(e%m)>Al})).map(c))}return v.lines=function(){return y().map((function(e){return{type:"LineString",coordinates:e}}))},v.outline=function(){return{type:"Polygon",coordinates:[u(r).concat(d(a).slice(1),u(n).reverse().slice(1),d(s).reverse().slice(1))]}},v.extent=function(e){return arguments.length?v.extentMajor(e).extentMinor(e):v.extentMinor()},v.extentMajor=function(e){return arguments.length?(r=+e[0][0],n=+e[1][0],s=+e[0][1],a=+e[1][1],r>n&&(e=r,r=n,n=e),s>a&&(e=s,s=a,a=e),v.precision(g)):[[r,s],[n,a]]},v.extentMinor=function(n){return arguments.length?(t=+n[0][0],e=+n[1][0],o=+n[0][1],i=+n[1][1],t>e&&(n=t,t=e,e=n),o>i&&(n=o,o=i,i=n),v.precision(g)):[[t,o],[e,i]]},v.step=function(e){return arguments.length?v.stepMajor(e).stepMinor(e):v.stepMinor()},v.stepMajor=function(e){return arguments.length?(p=+e[0],m=+e[1],v):[p,m]},v.stepMinor=function(e){return arguments.length?(f=+e[0],h=+e[1],v):[f,h]},v.precision=function(f){return arguments.length?(g=+f,l=yd(o,i,90),c=bd(t,e,g),u=yd(s,a,90),d=bd(r,n,g),v):g},v.extentMajor([[-180,-89.999999],[180,89.999999]]).extentMinor([[-180,-80.000001],[180,80.000001]])}function wd(){return xd()()}function kd(e,t){var n=e[0]*Dl,r=e[1]*Dl,i=t[0]*Dl,o=t[1]*Dl,a=zl(r),s=Vl(r),l=zl(o),c=Vl(o),u=a*zl(n),d=a*Vl(n),f=l*zl(i),h=l*Vl(i),p=2*Yl(Gl(Xl(o-r)+a*l*Xl(i-n))),m=Vl(p),g=p?function(e){var t=Vl(e*=p)/m,n=Vl(p-e)/m,r=n*u+t*f,i=n*d+t*h,o=n*s+t*c;return[Fl(i,r)*Ll,Fl(o,Gl(r*r+i*i))*Ll]}:function(){return[n*Ll,r*Ll]};return g.distance=p,g}function _d(e){return e}var Sd,Cd,jd,Ed,Td=jl(),Md=jl(),Ad={point:Jl,lineStart:Jl,lineEnd:Jl,polygonStart:function(){Ad.lineStart=Rd,Ad.lineEnd=Id},polygonEnd:function(){Ad.lineStart=Ad.lineEnd=Ad.point=Jl,Td.add(Nl(Md)),Md.reset()},result:function(){var e=Td/2;return Td.reset(),e}};function Rd(){Ad.point=Od}function Od(e,t){Ad.point=Zd,Sd=jd=e,Cd=Ed=t}function Zd(e,t){Md.add(Ed*e-jd*t),jd=e,Ed=t}function Id(){Zd(Sd,Cd)}var Pd=Ad,Ld=1/0,Dd=Ld,Nd=-Ld,$d=Nd,Fd={point:function(e,t){eNd&&(Nd=e);t$d&&($d=t)},lineStart:Jl,lineEnd:Jl,polygonStart:Jl,polygonEnd:Jl,result:function(){var e=[[Ld,Dd],[Nd,$d]];return Nd=$d=-(Dd=Ld=1/0),e}};var zd,Bd,Wd,Hd,Ud=Fd,Vd=0,qd=0,Gd=0,Kd=0,Qd=0,Yd=0,Xd=0,Jd=0,ef=0,tf={point:nf,lineStart:rf,lineEnd:sf,polygonStart:function(){tf.lineStart=lf,tf.lineEnd=cf},polygonEnd:function(){tf.point=nf,tf.lineStart=rf,tf.lineEnd=sf},result:function(){var e=ef?[Xd/ef,Jd/ef]:Yd?[Kd/Yd,Qd/Yd]:Gd?[Vd/Gd,qd/Gd]:[NaN,NaN];return Vd=qd=Gd=Kd=Qd=Yd=Xd=Jd=ef=0,e}};function nf(e,t){Vd+=e,qd+=t,++Gd}function rf(){tf.point=of}function of(e,t){tf.point=af,nf(Wd=e,Hd=t)}function af(e,t){var n=e-Wd,r=t-Hd,i=Gl(n*n+r*r);Kd+=i*(Wd+e)/2,Qd+=i*(Hd+t)/2,Yd+=i,nf(Wd=e,Hd=t)}function sf(){tf.point=nf}function lf(){tf.point=uf}function cf(){df(zd,Bd)}function uf(e,t){tf.point=df,nf(zd=Wd=e,Bd=Hd=t)}function df(e,t){var n=e-Wd,r=t-Hd,i=Gl(n*n+r*r);Kd+=i*(Wd+e)/2,Qd+=i*(Hd+t)/2,Yd+=i,Xd+=(i=Hd*e-Wd*t)*(Wd+e),Jd+=i*(Hd+t),ef+=3*i,nf(Wd=e,Hd=t)}var ff=tf;function hf(e){this._context=e}hf.prototype={_radius:4.5,pointRadius:function(e){return this._radius=e,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._context.closePath(),this._point=NaN},point:function(e,t){switch(this._point){case 0:this._context.moveTo(e,t),this._point=1;break;case 1:this._context.lineTo(e,t);break;default:this._context.moveTo(e+this._radius,t),this._context.arc(e,t,this._radius,0,Pl)}},result:Jl};var pf,mf,gf,vf,yf,bf=jl(),xf={point:Jl,lineStart:function(){xf.point=wf},lineEnd:function(){pf&&kf(mf,gf),xf.point=Jl},polygonStart:function(){pf=!0},polygonEnd:function(){pf=null},result:function(){var e=+bf;return bf.reset(),e}};function wf(e,t){xf.point=kf,mf=vf=e,gf=yf=t}function kf(e,t){vf-=e,yf-=t,bf.add(Gl(vf*vf+yf*yf)),vf=e,yf=t}var _f=xf;function Sf(){this._string=[]}function Cf(e){return"m0,"+e+"a"+e+","+e+" 0 1,1 0,"+-2*e+"a"+e+","+e+" 0 1,1 0,"+2*e+"z"}function jf(e,t){var n,r,i=4.5;function o(e){return e&&("function"===typeof i&&r.pointRadius(+i.apply(this,arguments)),oc(e,n(r))),r.result()}return o.area=function(e){return oc(e,n(Pd)),Pd.result()},o.measure=function(e){return oc(e,n(_f)),_f.result()},o.bounds=function(e){return oc(e,n(Ud)),Ud.result()},o.centroid=function(e){return oc(e,n(ff)),ff.result()},o.projection=function(t){return arguments.length?(n=null==t?(e=null,_d):(e=t).stream,o):e},o.context=function(e){return arguments.length?(r=null==e?(t=null,new Sf):new hf(t=e),"function"!==typeof i&&r.pointRadius(i),o):t},o.pointRadius=function(e){return arguments.length?(i="function"===typeof e?e:(r.pointRadius(+e),+e),o):i},o.projection(e).context(t)}function Ef(e){return{stream:Tf(e)}}function Tf(e){return function(t){var n=new Mf;for(var r in e)n[r]=e[r];return n.stream=t,n}}function Mf(){}function Af(e,t,n){var r=e.clipExtent&&e.clipExtent();return e.scale(150).translate([0,0]),null!=r&&e.clipExtent(null),oc(n,e.stream(Ud)),t(Ud.result()),null!=r&&e.clipExtent(r),e}function Rf(e,t,n){return Af(e,(function(n){var r=t[1][0]-t[0][0],i=t[1][1]-t[0][1],o=Math.min(r/(n[1][0]-n[0][0]),i/(n[1][1]-n[0][1])),a=+t[0][0]+(r-o*(n[1][0]+n[0][0]))/2,s=+t[0][1]+(i-o*(n[1][1]+n[0][1]))/2;e.scale(150*o).translate([a,s])}),n)}function Of(e,t,n){return Rf(e,[[0,0],t],n)}function Zf(e,t,n){return Af(e,(function(n){var r=+t,i=r/(n[1][0]-n[0][0]),o=(r-i*(n[1][0]+n[0][0]))/2,a=-i*n[0][1];e.scale(150*i).translate([o,a])}),n)}function If(e,t,n){return Af(e,(function(n){var r=+t,i=r/(n[1][1]-n[0][1]),o=-i*n[0][0],a=(r-i*(n[1][1]+n[0][1]))/2;e.scale(150*i).translate([o,a])}),n)}Sf.prototype={_radius:4.5,_circle:Cf(4.5),pointRadius:function(e){return(e=+e)!==this._radius&&(this._radius=e,this._circle=null),this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._string.push("Z"),this._point=NaN},point:function(e,t){switch(this._point){case 0:this._string.push("M",e,",",t),this._point=1;break;case 1:this._string.push("L",e,",",t);break;default:null==this._circle&&(this._circle=Cf(this._radius)),this._string.push("M",e,",",t,this._circle)}},result:function(){if(this._string.length){var e=this._string.join("");return this._string=[],e}return null}},Mf.prototype={constructor:Mf,point:function(e,t){this.stream.point(e,t)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};var Pf=zl(30*Dl);function Lf(e,t){return+t?function(e,t){function n(r,i,o,a,s,l,c,u,d,f,h,p,m,g){var v=c-r,y=u-i,b=v*v+y*y;if(b>4*t&&m--){var x=a+f,w=s+h,k=l+p,_=Gl(x*x+w*w+k*k),S=Yl(k/=_),C=Nl(Nl(k)-1)t||Nl((v*M+y*A)/b-.5)>.3||a*f+s*h+l*p2?e[2]%360*Dl:0,M()):[g*Ll,v*Ll,y*Ll]},E.angle=function(e){return arguments.length?(b=e%360*Dl,M()):b*Ll},E.reflectX=function(e){return arguments.length?(x=e?-1:1,M()):x<0},E.reflectY=function(e){return arguments.length?(w=e?-1:1,M()):w<0},E.precision=function(e){return arguments.length?(a=Lf(s,j=e*e),A()):Gl(j)},E.fitExtent=function(e,t){return Rf(E,e,t)},E.fitSize=function(e,t){return Of(E,e,t)},E.fitWidth=function(e,t){return Zf(E,e,t)},E.fitHeight=function(e,t){return If(E,e,t)},function(){return t=e.apply(this,arguments),E.invert=t.invert&&T,M()}}function Bf(e){var t=0,n=Ol/3,r=zf(e),i=r(t,n);return i.parallels=function(e){return arguments.length?r(t=e[0]*Dl,n=e[1]*Dl):[t*Ll,n*Ll]},i}function Wf(e,t){var n=Vl(e),r=(n+Vl(t))/2;if(Nl(r)=.12&&i<.234&&r>=-.425&&r<-.214?s:i>=.166&&i<.234&&r>=-.214&&r<-.115?l:a).invert(e)},u.stream=function(n){return e&&t===n?e:e=function(e){var t=e.length;return{point:function(n,r){for(var i=-1;++i0?t<-Zl+Al&&(t=-Zl+Al):t>Zl-Al&&(t=Zl-Al);var n=i/Ul(nh(t),r);return[n*Vl(r*e),i-n*zl(r*e)]}return o.invert=function(e,t){var n=i-t,o=ql(r)*Gl(e*e+n*n),a=Fl(e,Nl(n))*ql(n);return n*r<0&&(a-=Ol*ql(e)*ql(n)),[a/r,2*$l(Ul(i/o,1/r))-Zl]},o}function ih(){return Bf(rh).scale(109.5).parallels([30,30])}function oh(e,t){return[e,t]}function ah(){return Ff(oh).scale(152.63)}function sh(e,t){var n=zl(e),r=e===t?Vl(e):(n-zl(t))/(t-e),i=n/r+e;if(Nl(r)2?e[2]+90:90]):[(e=n())[0],e[1],e[2]-90]},n([0,0,90]).scale(159.155)}function Eh(e,t){return e.parent===t.parent?1:2}function Th(e,t){return e+t.x}function Mh(e,t){return Math.max(e,t.y)}function Ah(){var e=Eh,t=1,n=1,r=!1;function i(i){var o,a=0;i.eachAfter((function(t){var n=t.children;n?(t.x=function(e){return e.reduce(Th,0)/e.length}(n),t.y=function(e){return 1+e.reduce(Mh,0)}(n)):(t.x=o?a+=e(t,o):0,t.y=0,o=t)}));var s=function(e){for(var t;t=e.children;)e=t[0];return e}(i),l=function(e){for(var t;t=e.children;)e=t[t.length-1];return e}(i),c=s.x-e(s,l)/2,u=l.x+e(l,s)/2;return i.eachAfter(r?function(e){e.x=(e.x-i.x)*t,e.y=(i.y-e.y)*n}:function(e){e.x=(e.x-c)/(u-c)*t,e.y=(1-(i.y?e.y/i.y:1))*n})}return i.separation=function(t){return arguments.length?(e=t,i):e},i.size=function(e){return arguments.length?(r=!1,t=+e[0],n=+e[1],i):r?null:[t,n]},i.nodeSize=function(e){return arguments.length?(r=!0,t=+e[0],n=+e[1],i):r?[t,n]:null},i}function Rh(e){var t=0,n=e.children,r=n&&n.length;if(r)for(;--r>=0;)t+=n[r].value;else t=1;e.value=t}function Oh(e,t){var n,r,i,o,a,s=new Lh(e),l=+e.value&&(s.value=e.value),c=[s];for(null==t&&(t=Zh);n=c.pop();)if(l&&(n.value=+n.data.value),(i=t(n.data))&&(a=i.length))for(n.children=new Array(a),o=a-1;o>=0;--o)c.push(r=n.children[o]=new Lh(i[o])),r.parent=n,r.depth=n.depth+1;return s.eachBefore(Ph)}function Zh(e){return e.children}function Ih(e){e.data=e.data.data}function Ph(e){var t=0;do{e.height=t}while((e=e.parent)&&e.height<++t)}function Lh(e){this.data=e,this.depth=this.height=0,this.parent=null}ph.invert=function(e,t){for(var n,r=t,i=r*r,o=i*i*i,a=0;a<12&&(o=(i=(r-=n=(r*(ch+uh*i+o*(dh+fh*i))-t)/(ch+3*uh*i+o*(7*dh+9*fh*i)))*r)*i*i,!(Nl(n)Al&&--i>0);return[e/(.8707+(o=r*r)*(o*(o*o*o*(.003971-.001529*o)-.013791)-.131979)),r]},wh.invert=Gf(Yl),_h.invert=Gf((function(e){return 2*$l(e)})),Ch.invert=function(e,t){return[-t,2*$l(Wl(e))-Zl]},Lh.prototype=Oh.prototype={constructor:Lh,count:function(){return this.eachAfter(Rh)},each:function(e){var t,n,r,i,o=this,a=[o];do{for(t=a.reverse(),a=[];o=t.pop();)if(e(o),n=o.children)for(r=0,i=n.length;r=0;--n)i.push(t[n]);return this},sum:function(e){return this.eachAfter((function(t){for(var n=+e(t.data)||0,r=t.children,i=r&&r.length;--i>=0;)n+=r[i].value;t.value=n}))},sort:function(e){return this.eachBefore((function(t){t.children&&t.children.sort(e)}))},path:function(e){for(var t=this,n=function(e,t){if(e===t)return e;var n=e.ancestors(),r=t.ancestors(),i=null;e=n.pop(),t=r.pop();for(;e===t;)i=e,e=n.pop(),t=r.pop();return i}(t,e),r=[t];t!==n;)t=t.parent,r.push(t);for(var i=r.length;e!==n;)r.splice(i,0,e),e=e.parent;return r},ancestors:function(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t},descendants:function(){var e=[];return this.each((function(t){e.push(t)})),e},leaves:function(){var e=[];return this.eachBefore((function(t){t.children||e.push(t)})),e},links:function(){var e=this,t=[];return e.each((function(n){n!==e&&t.push({source:n.parent,target:n})})),t},copy:function(){return Oh(this).eachBefore(Ih)}};var Dh=Array.prototype.slice;function Nh(e){for(var t,n,r=0,i=(e=function(e){for(var t,n,r=e.length;r;)n=Math.random()*r--|0,t=e[r],e[r]=e[n],e[n]=t;return e}(Dh.call(e))).length,o=[];r0&&n*n>r*r+i*i}function Bh(e,t){for(var n=0;n(a*=a)?(r=(c+a-i)/(2*c),o=Math.sqrt(Math.max(0,a/c-r*r)),n.x=e.x-r*s-o*l,n.y=e.y-r*l+o*s):(r=(c+i-a)/(2*c),o=Math.sqrt(Math.max(0,i/c-r*r)),n.x=t.x+r*s-o*l,n.y=t.y+r*l+o*s)):(n.x=t.x+n.r,n.y=t.y)}function qh(e,t){var n=e.r+t.r-1e-6,r=t.x-e.x,i=t.y-e.y;return n>0&&n*n>r*r+i*i}function Gh(e){var t=e._,n=e.next._,r=t.r+n.r,i=(t.x*n.r+n.x*t.r)/r,o=(t.y*n.r+n.y*t.r)/r;return i*i+o*o}function Kh(e){this._=e,this.next=null,this.previous=null}function Qh(e){if(!(i=e.length))return 0;var t,n,r,i,o,a,s,l,c,u,d;if((t=e[0]).x=0,t.y=0,!(i>1))return t.r;if(n=e[1],t.x=-n.r,n.x=t.r,n.y=0,!(i>2))return t.r+n.r;Vh(n,t,r=e[2]),t=new Kh(t),n=new Kh(n),r=new Kh(r),t.next=r.previous=n,n.next=t.previous=r,r.next=n.previous=t;e:for(s=3;s0)throw new Error("cycle");return o}return n.id=function(t){return arguments.length?(e=Jh(t),n):e},n.parentId=function(e){return arguments.length?(t=Jh(e),n):t},n}function mp(e,t){return e.parent===t.parent?1:2}function gp(e){var t=e.children;return t?t[0]:e.t}function vp(e){var t=e.children;return t?t[t.length-1]:e.t}function yp(e,t,n){var r=n/(t.i-e.i);t.c-=r,t.s+=n,e.c+=r,t.z+=n,t.m+=n}function bp(e,t,n){return e.a.parent===t.parent?e.a:n}function xp(e,t){this._=e,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=t}function wp(){var e=mp,t=1,n=1,r=null;function i(i){var l=function(e){for(var t,n,r,i,o,a=new xp(e,0),s=[a];t=s.pop();)if(r=t._.children)for(t.children=new Array(o=r.length),i=o-1;i>=0;--i)s.push(n=t.children[i]=new xp(r[i],i)),n.parent=t;return(a.parent=new xp(null,0)).children=[a],a}(i);if(l.eachAfter(o),l.parent.m=-l.z,l.eachBefore(a),r)i.eachBefore(s);else{var c=i,u=i,d=i;i.eachBefore((function(e){e.xu.x&&(u=e),e.depth>d.depth&&(d=e)}));var f=c===u?1:e(c,u)/2,h=f-c.x,p=t/(u.x+f+h),m=n/(d.depth||1);i.eachBefore((function(e){e.x=(e.x+h)*p,e.y=e.depth*m}))}return i}function o(t){var n=t.children,r=t.parent.children,i=t.i?r[t.i-1]:null;if(n){!function(e){for(var t,n=0,r=0,i=e.children,o=i.length;--o>=0;)(t=i[o]).z+=n,t.m+=n,n+=t.s+(r+=t.c)}(t);var o=(n[0].z+n[n.length-1].z)/2;i?(t.z=i.z+e(t._,i._),t.m=t.z-o):t.z=o}else i&&(t.z=i.z+e(t._,i._));t.parent.A=function(t,n,r){if(n){for(var i,o=t,a=t,s=n,l=o.parent.children[0],c=o.m,u=a.m,d=s.m,f=l.m;s=vp(s),o=gp(o),s&&o;)l=gp(l),(a=vp(a)).a=t,(i=s.z+d-o.z-c+e(s._,o._))>0&&(yp(bp(s,t,r),t,i),c+=i,u+=i),d+=s.m,c+=o.m,f+=l.m,u+=a.m;s&&!vp(a)&&(a.t=s,a.m+=d-u),o&&!gp(l)&&(l.t=o,l.m+=c-f,r=t)}return r}(t,i,t.parent.A||r[0])}function a(e){e._.x=e.z+e.parent.m,e.m+=e.parent.m}function s(e){e.x*=t,e.y=e.depth*n}return i.separation=function(t){return arguments.length?(e=t,i):e},i.size=function(e){return arguments.length?(r=!1,t=+e[0],n=+e[1],i):r?null:[t,n]},i.nodeSize=function(e){return arguments.length?(r=!0,t=+e[0],n=+e[1],i):r?[t,n]:null},i}function kp(e,t,n,r,i){for(var o,a=e.children,s=-1,l=a.length,c=e.value&&(i-n)/e.value;++sf&&(f=s),g=u*u*m,(h=Math.max(f/g,g/d))>p){u-=s;break}p=h}v.push(a={value:u,dice:l1?t:1)},n}(_p);function jp(){var e=Cp,t=!1,n=1,r=1,i=[0],o=ep,a=ep,s=ep,l=ep,c=ep;function u(e){return e.x0=e.y0=0,e.x1=n,e.y1=r,e.eachBefore(d),i=[0],t&&e.eachBefore(sp),e}function d(t){var n=i[t.depth],r=t.x0+n,u=t.y0+n,d=t.x1-n,f=t.y1-n;d=n-1){var u=s[t];return u.x0=i,u.y0=o,u.x1=a,void(u.y1=l)}var d=c[t],f=r/2+d,h=t+1,p=n-1;for(;h>>1;c[m]l-o){var y=(i*v+a*g)/r;e(t,h,g,i,o,y,l),e(h,n,v,y,o,a,l)}else{var b=(o*v+l*g)/r;e(t,h,g,i,o,a,b),e(h,n,v,i,b,a,l)}}(0,l,e.value,t,n,r,i)}function Tp(e,t,n,r,i){(1&e.depth?kp:lp)(e,t,n,r,i)}var Mp=function e(t){function n(e,n,r,i,o){if((a=e._squarify)&&a.ratio===t)for(var a,s,l,c,u,d=-1,f=a.length,h=e.value;++d1?t:1)},n}(_p);function Ap(e){var t=e.length;return function(n){return e[Math.max(0,Math.min(t-1,Math.floor(n*t)))]}}function Rp(e,t){var n=hn(+e,+t);return function(e){var t=n(e);return t-360*Math.floor(t/360)}}function Op(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}var Zp=Math.SQRT2;function Ip(e){return((e=Math.exp(e))+1/e)/2}function Pp(e,t){var n,r,i=e[0],o=e[1],a=e[2],s=t[0],l=t[1],c=t[2],u=s-i,d=l-o,f=u*u+d*d;if(f<1e-12)r=Math.log(c/a)/Zp,n=function(e){return[i+e*u,o+e*d,a*Math.exp(Zp*e*r)]};else{var h=Math.sqrt(f),p=(c*c-a*a+4*f)/(2*a*2*h),m=(c*c-a*a-4*f)/(2*c*2*h),g=Math.log(Math.sqrt(p*p+1)-p),v=Math.log(Math.sqrt(m*m+1)-m);r=(v-g)/Zp,n=function(e){var t=e*r,n=Ip(g),s=a/(2*h)*(n*function(e){return((e=Math.exp(2*e))-1)/(e+1)}(Zp*t+g)-function(e){return((e=Math.exp(e))-1/e)/2}(g));return[i+s*u,o+s*d,a*n/Ip(Zp*t+g)]}}return n.duration=1e3*r,n}function Lp(e){return function(t,n){var r=e((t=on(t)).h,(n=on(n)).h),i=mn(t.s,n.s),o=mn(t.l,n.l),a=mn(t.opacity,n.opacity);return function(e){return t.h=r(e),t.s=i(e),t.l=o(e),t.opacity=a(e),t+""}}}var Dp=Lp(hn),Np=Lp(mn);function $p(e,t){var n=mn((e=jo(e)).l,(t=jo(t)).l),r=mn(e.a,t.a),i=mn(e.b,t.b),o=mn(e.opacity,t.opacity);return function(t){return e.l=n(t),e.a=r(t),e.b=i(t),e.opacity=o(t),e+""}}function Fp(e){return function(t,n){var r=e((t=Io(t)).h,(n=Io(n)).h),i=mn(t.c,n.c),o=mn(t.l,n.l),a=mn(t.opacity,n.opacity);return function(e){return t.h=r(e),t.c=i(e),t.l=o(e),t.opacity=a(e),t+""}}}var zp=Fp(hn),Bp=Fp(mn);function Wp(e){return function t(n){function r(t,r){var i=e((t=Vo(t)).h,(r=Vo(r)).h),o=mn(t.s,r.s),a=mn(t.l,r.l),s=mn(t.opacity,r.opacity);return function(e){return t.h=i(e),t.s=o(e),t.l=a(Math.pow(e,n)),t.opacity=s(e),t+""}}return n=+n,r.gamma=t,r}(1)}var Hp=Wp(hn),Up=Wp(mn);function Vp(e,t){for(var n=0,r=t.length-1,i=t[0],o=new Array(r<0?0:r);n1&&Qp(e[n[r-2]],e[n[r-1]],e[i])<=0;)--r;n[r++]=i}return n.slice(0,r)}function Jp(e){if((n=e.length)<3)return null;var t,n,r=new Array(n),i=new Array(n);for(t=0;t=0;--t)c.push(e[r[o[t]][2]]);for(t=+s;ts!==c>s&&a<(l-n)*(s-r)/(c-r)+n&&(u=!u),l=n,c=r;return u}function tm(e){for(var t,n,r=-1,i=e.length,o=e[i-1],a=o[0],s=o[1],l=0;++r1);return e+n*o*Math.sqrt(-2*Math.log(i)/i)}}return n.source=e,n}(nm),om=function e(t){function n(){var e=im.source(t).apply(this,arguments);return function(){return Math.exp(e())}}return n.source=e,n}(nm),am=function e(t){function n(e){return function(){for(var n=0,r=0;rr&&(t=n,n=r,r=t),function(e){return Math.max(n,Math.min(r,e))}}function Sm(e,t,n){var r=e[0],i=e[1],o=t[0],a=t[1];return i2?Cm:Sm,i=o=null,d}function d(t){return isNaN(t=+t)?n:(i||(i=r(a.map(e),s,l)))(e(c(t)))}return d.invert=function(n){return c(t((o||(o=r(s,a.map(e),Cn)))(n)))},d.domain=function(e){return arguments.length?(a=fm.call(e,bm),c===wm||(c=_m(a)),u()):a.slice()},d.range=function(e){return arguments.length?(s=hm.call(e),u()):s.slice()},d.rangeRound=function(e){return s=hm.call(e),l=Op,u()},d.clamp=function(e){return arguments.length?(c=e?_m(a):wm,d):c!==wm},d.interpolate=function(e){return arguments.length?(l=e,u()):l},d.unknown=function(e){return arguments.length?(n=e,d):n},function(n,r){return e=n,t=r,u()}}function Tm(e,t){return Em()(e,t)}function Mm(e,t,n,r){var i,o=M(e,t,n);switch((r=dl(null==r?",f":r)).type){case"s":var a=Math.max(Math.abs(e),Math.abs(t));return null!=r.precision||isNaN(i=Sl(o,a))||(r.precision=i),yl(r,a);case"":case"e":case"g":case"p":case"r":null!=r.precision||isNaN(i=Cl(o,Math.max(Math.abs(e),Math.abs(t))))||(r.precision=i-("e"===r.type));break;case"f":case"%":null!=r.precision||isNaN(i=_l(o))||(r.precision=i-2*("%"===r.type))}return vl(r)}function Am(e){var t=e.domain;return e.ticks=function(e){var n=t();return E(n[0],n[n.length-1],null==e?10:e)},e.tickFormat=function(e,n){var r=t();return Mm(r[0],r[r.length-1],null==e?10:e,n)},e.nice=function(n){null==n&&(n=10);var r,i=t(),o=0,a=i.length-1,s=i[o],l=i[a];return l0?r=T(s=Math.floor(s/r)*r,l=Math.ceil(l/r)*r,n):r<0&&(r=T(s=Math.ceil(s*r)/r,l=Math.floor(l*r)/r,n)),r>0?(i[o]=Math.floor(s/r)*r,i[a]=Math.ceil(l/r)*r,t(i)):r<0&&(i[o]=Math.ceil(s*r)/r,i[a]=Math.floor(l*r)/r,t(i)),e},e}function Rm(){var e=Tm(wm,wm);return e.copy=function(){return jm(e,Rm())},cm.apply(e,arguments),Am(e)}function Om(e){var t;function n(e){return isNaN(e=+e)?t:e}return n.invert=n,n.domain=n.range=function(t){return arguments.length?(e=fm.call(t,bm),n):e.slice()},n.unknown=function(e){return arguments.length?(t=e,n):t},n.copy=function(){return Om(e).unknown(t)},e=arguments.length?fm.call(e,bm):[0,1],Am(n)}function Zm(e,t){var n,r=0,i=(e=e.slice()).length-1,o=e[r],a=e[i];return a0){for(;fl)break;m.push(d)}}else for(;f=1;--u)if(!((d=c*u)l)break;m.push(d)}}else m=E(f,h,Math.min(h-f,p)).map(n);return r?m.reverse():m},r.tickFormat=function(e,i){if(null==i&&(i=10===o?".0e":","),"function"!==typeof i&&(i=vl(i)),e===1/0)return i;null==e&&(e=10);var a=Math.max(1,o*e/r.ticks().length);return function(e){var r=e/n(Math.round(t(e)));return r*o0?r[i-1]:t[0],i=r?[i[r-1],n]:[i[a-1],i[a]]},a.unknown=function(t){return arguments.length?(e=t,a):a},a.thresholds=function(){return i.slice()},a.copy=function(){return Jm().domain([t,n]).range(o).unknown(e)},cm.apply(Am(a),arguments)}function eg(){var e,t=[.5],n=[0,1],r=1;function i(i){return i<=i?n[c(t,i,0,r)]:e}return i.domain=function(e){return arguments.length?(t=hm.call(e),r=Math.min(t.length,n.length-1),i):t.slice()},i.range=function(e){return arguments.length?(n=hm.call(e),r=Math.min(t.length,n.length-1),i):n.slice()},i.invertExtent=function(e){var r=n.indexOf(e);return[t[r-1],t[r]]},i.unknown=function(t){return arguments.length?(e=t,i):e},i.copy=function(){return eg().domain(t).range(n).unknown(e)},cm.apply(i,arguments)}var tg=new Date,ng=new Date;function rg(e,t,n,r){function i(t){return e(t=0===arguments.length?new Date:new Date(+t)),t}return i.floor=function(t){return e(t=new Date(+t)),t},i.ceil=function(n){return e(n=new Date(n-1)),t(n,1),e(n),n},i.round=function(e){var t=i(e),n=i.ceil(e);return e-t0))return s;do{s.push(a=new Date(+n)),t(n,o),e(n)}while(a=t)for(;e(t),!n(t);)t.setTime(t-1)}),(function(e,r){if(e>=e)if(r<0)for(;++r<=0;)for(;t(e,-1),!n(e););else for(;--r>=0;)for(;t(e,1),!n(e););}))},n&&(i.count=function(t,r){return tg.setTime(+t),ng.setTime(+r),e(tg),e(ng),Math.floor(n(tg,ng))},i.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?i.filter(r?function(t){return r(t)%e===0}:function(t){return i.count(0,t)%e===0}):i:null}),i}var ig=rg((function(e){e.setMonth(0,1),e.setHours(0,0,0,0)}),(function(e,t){e.setFullYear(e.getFullYear()+t)}),(function(e,t){return t.getFullYear()-e.getFullYear()}),(function(e){return e.getFullYear()}));ig.every=function(e){return isFinite(e=Math.floor(e))&&e>0?rg((function(t){t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)}),(function(t,n){t.setFullYear(t.getFullYear()+n*e)})):null};var og=ig,ag=ig.range,sg=rg((function(e){e.setDate(1),e.setHours(0,0,0,0)}),(function(e,t){e.setMonth(e.getMonth()+t)}),(function(e,t){return t.getMonth()-e.getMonth()+12*(t.getFullYear()-e.getFullYear())}),(function(e){return e.getMonth()})),lg=sg,cg=sg.range,ug=1e3,dg=6e4,fg=36e5,hg=864e5,pg=6048e5;function mg(e){return rg((function(t){t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)}),(function(e,t){e.setDate(e.getDate()+7*t)}),(function(e,t){return(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*dg)/pg}))}var gg=mg(0),vg=mg(1),yg=mg(2),bg=mg(3),xg=mg(4),wg=mg(5),kg=mg(6),_g=gg.range,Sg=vg.range,Cg=yg.range,jg=bg.range,Eg=xg.range,Tg=wg.range,Mg=kg.range,Ag=rg((function(e){e.setHours(0,0,0,0)}),(function(e,t){e.setDate(e.getDate()+t)}),(function(e,t){return(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*dg)/hg}),(function(e){return e.getDate()-1})),Rg=Ag,Og=Ag.range,Zg=rg((function(e){e.setTime(e-e.getMilliseconds()-e.getSeconds()*ug-e.getMinutes()*dg)}),(function(e,t){e.setTime(+e+t*fg)}),(function(e,t){return(t-e)/fg}),(function(e){return e.getHours()})),Ig=Zg,Pg=Zg.range,Lg=rg((function(e){e.setTime(e-e.getMilliseconds()-e.getSeconds()*ug)}),(function(e,t){e.setTime(+e+t*dg)}),(function(e,t){return(t-e)/dg}),(function(e){return e.getMinutes()})),Dg=Lg,Ng=Lg.range,$g=rg((function(e){e.setTime(e-e.getMilliseconds())}),(function(e,t){e.setTime(+e+t*ug)}),(function(e,t){return(t-e)/ug}),(function(e){return e.getUTCSeconds()})),Fg=$g,zg=$g.range,Bg=rg((function(){}),(function(e,t){e.setTime(+e+t)}),(function(e,t){return t-e}));Bg.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?rg((function(t){t.setTime(Math.floor(t/e)*e)}),(function(t,n){t.setTime(+t+n*e)}),(function(t,n){return(n-t)/e})):Bg:null};var Wg=Bg,Hg=Bg.range;function Ug(e){return rg((function(t){t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCDate(e.getUTCDate()+7*t)}),(function(e,t){return(t-e)/pg}))}var Vg=Ug(0),qg=Ug(1),Gg=Ug(2),Kg=Ug(3),Qg=Ug(4),Yg=Ug(5),Xg=Ug(6),Jg=Vg.range,ev=qg.range,tv=Gg.range,nv=Kg.range,rv=Qg.range,iv=Yg.range,ov=Xg.range,av=rg((function(e){e.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCDate(e.getUTCDate()+t)}),(function(e,t){return(t-e)/hg}),(function(e){return e.getUTCDate()-1})),sv=av,lv=av.range,cv=rg((function(e){e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCFullYear(e.getUTCFullYear()+t)}),(function(e,t){return t.getUTCFullYear()-e.getUTCFullYear()}),(function(e){return e.getUTCFullYear()}));cv.every=function(e){return isFinite(e=Math.floor(e))&&e>0?rg((function(t){t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),(function(t,n){t.setUTCFullYear(t.getUTCFullYear()+n*e)})):null};var uv=cv,dv=cv.range;function fv(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function hv(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function pv(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function mv(e){var t=e.dateTime,n=e.date,r=e.time,i=e.periods,o=e.days,a=e.shortDays,s=e.months,l=e.shortMonths,c=Ev(i),u=Tv(i),d=Ev(o),f=Tv(o),h=Ev(a),p=Tv(a),m=Ev(s),g=Tv(s),v=Ev(l),y=Tv(l),b={a:function(e){return a[e.getDay()]},A:function(e){return o[e.getDay()]},b:function(e){return l[e.getMonth()]},B:function(e){return s[e.getMonth()]},c:null,d:Kv,e:Kv,f:ey,g:dy,G:hy,H:Qv,I:Yv,j:Xv,L:Jv,m:ty,M:ny,p:function(e){return i[+(e.getHours()>=12)]},q:function(e){return 1+~~(e.getMonth()/3)},Q:Ly,s:Dy,S:ry,u:iy,U:oy,V:sy,w:ly,W:cy,x:null,X:null,y:uy,Y:fy,Z:py,"%":Py},x={a:function(e){return a[e.getUTCDay()]},A:function(e){return o[e.getUTCDay()]},b:function(e){return l[e.getUTCMonth()]},B:function(e){return s[e.getUTCMonth()]},c:null,d:my,e:my,f:xy,g:Ry,G:Zy,H:gy,I:vy,j:yy,L:by,m:wy,M:ky,p:function(e){return i[+(e.getUTCHours()>=12)]},q:function(e){return 1+~~(e.getUTCMonth()/3)},Q:Ly,s:Dy,S:_y,u:Sy,U:Cy,V:Ey,w:Ty,W:My,x:null,X:null,y:Ay,Y:Oy,Z:Iy,"%":Py},w={a:function(e,t,n){var r=h.exec(t.slice(n));return r?(e.w=p[r[0].toLowerCase()],n+r[0].length):-1},A:function(e,t,n){var r=d.exec(t.slice(n));return r?(e.w=f[r[0].toLowerCase()],n+r[0].length):-1},b:function(e,t,n){var r=v.exec(t.slice(n));return r?(e.m=y[r[0].toLowerCase()],n+r[0].length):-1},B:function(e,t,n){var r=m.exec(t.slice(n));return r?(e.m=g[r[0].toLowerCase()],n+r[0].length):-1},c:function(e,n,r){return S(e,t,n,r)},d:$v,e:$v,f:Uv,g:Pv,G:Iv,H:zv,I:zv,j:Fv,L:Hv,m:Nv,M:Bv,p:function(e,t,n){var r=c.exec(t.slice(n));return r?(e.p=u[r[0].toLowerCase()],n+r[0].length):-1},q:Dv,Q:qv,s:Gv,S:Wv,u:Av,U:Rv,V:Ov,w:Mv,W:Zv,x:function(e,t,r){return S(e,n,t,r)},X:function(e,t,n){return S(e,r,t,n)},y:Pv,Y:Iv,Z:Lv,"%":Vv};function k(e,t){return function(n){var r,i,o,a=[],s=-1,l=0,c=e.length;for(n instanceof Date||(n=new Date(+n));++s53)return null;"w"in o||(o.w=1),"Z"in o?(i=(r=hv(pv(o.y,0,1))).getUTCDay(),r=i>4||0===i?qg.ceil(r):qg(r),r=sv.offset(r,7*(o.V-1)),o.y=r.getUTCFullYear(),o.m=r.getUTCMonth(),o.d=r.getUTCDate()+(o.w+6)%7):(i=(r=fv(pv(o.y,0,1))).getDay(),r=i>4||0===i?vg.ceil(r):vg(r),r=Rg.offset(r,7*(o.V-1)),o.y=r.getFullYear(),o.m=r.getMonth(),o.d=r.getDate()+(o.w+6)%7)}else("W"in o||"U"in o)&&("w"in o||(o.w="u"in o?o.u%7:"W"in o?1:0),i="Z"in o?hv(pv(o.y,0,1)).getUTCDay():fv(pv(o.y,0,1)).getDay(),o.m=0,o.d="W"in o?(o.w+6)%7+7*o.W-(i+5)%7:o.w+7*o.U-(i+6)%7);return"Z"in o?(o.H+=o.Z/100|0,o.M+=o.Z%100,hv(o)):fv(o)}}function S(e,t,n,r){for(var i,o,a=0,s=t.length,l=n.length;a=l)return-1;if(37===(i=t.charCodeAt(a++))){if(i=t.charAt(a++),!(o=w[i in wv?t.charAt(a++):i])||(r=o(e,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}return b.x=k(n,b),b.X=k(r,b),b.c=k(t,b),x.x=k(n,x),x.X=k(r,x),x.c=k(t,x),{format:function(e){var t=k(e+="",b);return t.toString=function(){return e},t},parse:function(e){var t=_(e+="",!1);return t.toString=function(){return e},t},utcFormat:function(e){var t=k(e+="",x);return t.toString=function(){return e},t},utcParse:function(e){var t=_(e+="",!0);return t.toString=function(){return e},t}}}var gv,vv,yv,bv,xv,wv={"-":"",_:" ",0:"0"},kv=/^\s*\d+/,_v=/^%/,Sv=/[\\^$*+?|[\]().{}]/g;function Cv(e,t,n){var r=e<0?"-":"",i=(r?-e:e)+"",o=i.length;return r+(o68?1900:2e3),n+r[0].length):-1}function Lv(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function Dv(e,t,n){var r=kv.exec(t.slice(n,n+1));return r?(e.q=3*r[0]-3,n+r[0].length):-1}function Nv(e,t,n){var r=kv.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function $v(e,t,n){var r=kv.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function Fv(e,t,n){var r=kv.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function zv(e,t,n){var r=kv.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function Bv(e,t,n){var r=kv.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function Wv(e,t,n){var r=kv.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function Hv(e,t,n){var r=kv.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function Uv(e,t,n){var r=kv.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function Vv(e,t,n){var r=_v.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function qv(e,t,n){var r=kv.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function Gv(e,t,n){var r=kv.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function Kv(e,t){return Cv(e.getDate(),t,2)}function Qv(e,t){return Cv(e.getHours(),t,2)}function Yv(e,t){return Cv(e.getHours()%12||12,t,2)}function Xv(e,t){return Cv(1+Rg.count(og(e),e),t,3)}function Jv(e,t){return Cv(e.getMilliseconds(),t,3)}function ey(e,t){return Jv(e,t)+"000"}function ty(e,t){return Cv(e.getMonth()+1,t,2)}function ny(e,t){return Cv(e.getMinutes(),t,2)}function ry(e,t){return Cv(e.getSeconds(),t,2)}function iy(e){var t=e.getDay();return 0===t?7:t}function oy(e,t){return Cv(gg.count(og(e)-1,e),t,2)}function ay(e){var t=e.getDay();return t>=4||0===t?xg(e):xg.ceil(e)}function sy(e,t){return e=ay(e),Cv(xg.count(og(e),e)+(4===og(e).getDay()),t,2)}function ly(e){return e.getDay()}function cy(e,t){return Cv(vg.count(og(e)-1,e),t,2)}function uy(e,t){return Cv(e.getFullYear()%100,t,2)}function dy(e,t){return Cv((e=ay(e)).getFullYear()%100,t,2)}function fy(e,t){return Cv(e.getFullYear()%1e4,t,4)}function hy(e,t){var n=e.getDay();return Cv((e=n>=4||0===n?xg(e):xg.ceil(e)).getFullYear()%1e4,t,4)}function py(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Cv(t/60|0,"0",2)+Cv(t%60,"0",2)}function my(e,t){return Cv(e.getUTCDate(),t,2)}function gy(e,t){return Cv(e.getUTCHours(),t,2)}function vy(e,t){return Cv(e.getUTCHours()%12||12,t,2)}function yy(e,t){return Cv(1+sv.count(uv(e),e),t,3)}function by(e,t){return Cv(e.getUTCMilliseconds(),t,3)}function xy(e,t){return by(e,t)+"000"}function wy(e,t){return Cv(e.getUTCMonth()+1,t,2)}function ky(e,t){return Cv(e.getUTCMinutes(),t,2)}function _y(e,t){return Cv(e.getUTCSeconds(),t,2)}function Sy(e){var t=e.getUTCDay();return 0===t?7:t}function Cy(e,t){return Cv(Vg.count(uv(e)-1,e),t,2)}function jy(e){var t=e.getUTCDay();return t>=4||0===t?Qg(e):Qg.ceil(e)}function Ey(e,t){return e=jy(e),Cv(Qg.count(uv(e),e)+(4===uv(e).getUTCDay()),t,2)}function Ty(e){return e.getUTCDay()}function My(e,t){return Cv(qg.count(uv(e)-1,e),t,2)}function Ay(e,t){return Cv(e.getUTCFullYear()%100,t,2)}function Ry(e,t){return Cv((e=jy(e)).getUTCFullYear()%100,t,2)}function Oy(e,t){return Cv(e.getUTCFullYear()%1e4,t,4)}function Zy(e,t){var n=e.getUTCDay();return Cv((e=n>=4||0===n?Qg(e):Qg.ceil(e)).getUTCFullYear()%1e4,t,4)}function Iy(){return"+0000"}function Py(){return"%"}function Ly(e){return+e}function Dy(e){return Math.floor(+e/1e3)}function Ny(e){return gv=mv(e),vv=gv.format,yv=gv.parse,bv=gv.utcFormat,xv=gv.utcParse,gv}Ny({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});var $y=1e3,Fy=6e4,zy=36e5,By=864e5,Wy=2592e6,Hy=31536e6;function Uy(e){return new Date(e)}function Vy(e){return e instanceof Date?+e:+new Date(+e)}function qy(e,t,n,r,i,a,s,l,c){var u=Tm(wm,wm),d=u.invert,f=u.domain,h=c(".%L"),p=c(":%S"),m=c("%I:%M"),g=c("%I %p"),v=c("%a %d"),y=c("%b %d"),b=c("%B"),x=c("%Y"),w=[[s,1,$y],[s,5,5e3],[s,15,15e3],[s,30,3e4],[a,1,Fy],[a,5,3e5],[a,15,9e5],[a,30,18e5],[i,1,zy],[i,3,108e5],[i,6,216e5],[i,12,432e5],[r,1,By],[r,2,1728e5],[n,1,6048e5],[t,1,Wy],[t,3,7776e6],[e,1,Hy]];function k(o){return(s(o)1)&&(e-=Math.floor(e));var t=Math.abs(e-.5);return Px.h=360*e-100,Px.s=1.5-1.5*t,Px.l=.8-.9*t,Px+""}var Dx=Yt(),Nx=Math.PI/3,$x=2*Math.PI/3;function Fx(e){var t;return e=(.5-e)*Math.PI,Dx.r=255*(t=Math.sin(e))*t,Dx.g=255*(t=Math.sin(e+Nx))*t,Dx.b=255*(t=Math.sin(e+$x))*t,Dx+""}function zx(e){return e=Math.max(0,Math.min(1,e)),"rgb("+Math.max(0,Math.min(255,Math.round(34.61+e*(1172.33-e*(10793.56-e*(33300.12-e*(38394.49-14825.05*e)))))))+", "+Math.max(0,Math.min(255,Math.round(23.31+e*(557.33+e*(1225.33-e*(3574.96-e*(1073.77+707.56*e)))))))+", "+Math.max(0,Math.min(255,Math.round(27.2+e*(3211.1-e*(15327.97-e*(27814-e*(22569.18-6838.66*e)))))))+")"}function Bx(e){var t=e.length;return function(n){return e[Math.max(0,Math.min(t-1,Math.floor(n*t)))]}}var Wx=Bx(bb("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725")),Hx=Bx(bb("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),Ux=Bx(bb("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),Vx=Bx(bb("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921"));function qx(e){return St(it(e).call(document.documentElement))}var Gx=0;function Kx(){return new Qx}function Qx(){this._="@"+(++Gx).toString(36)}function Yx(e){return"string"===typeof e?new wt([document.querySelectorAll(e)],[document.documentElement]):new wt([null==e?[]:e],xt)}function Xx(e,t){null==t&&(t=Rn().touches);for(var n=0,r=t?t.length:0,i=new Array(r);n1?0:e<-1?lw:Math.acos(e)}function fw(e){return e>=1?cw:e<=-1?-cw:Math.asin(e)}function hw(e){return e.innerRadius}function pw(e){return e.outerRadius}function mw(e){return e.startAngle}function gw(e){return e.endAngle}function vw(e){return e&&e.padAngle}function yw(e,t,n,r,i,o,a,s){var l=n-e,c=r-t,u=a-i,d=s-o,f=d*l-u*c;if(!(f*fA*A+R*R&&(S=j,C=E),{cx:S,cy:C,x01:-u,y01:-d,x11:S*(i/w-1),y11:C*(i/w-1)}}function xw(){var e=hw,t=pw,n=Jx(0),r=null,i=mw,o=gw,a=vw,s=null;function l(){var l,c,u=+e.apply(this,arguments),d=+t.apply(this,arguments),f=i.apply(this,arguments)-cw,h=o.apply(this,arguments)-cw,p=ew(h-f),m=h>f;if(s||(s=l=qi()),dsw)if(p>uw-sw)s.moveTo(d*nw(f),d*ow(f)),s.arc(0,0,d,f,h,!m),u>sw&&(s.moveTo(u*nw(h),u*ow(h)),s.arc(0,0,u,h,f,m));else{var g,v,y=f,b=h,x=f,w=h,k=p,_=p,S=a.apply(this,arguments)/2,C=S>sw&&(r?+r.apply(this,arguments):aw(u*u+d*d)),j=iw(ew(d-u)/2,+n.apply(this,arguments)),E=j,T=j;if(C>sw){var M=fw(C/u*ow(S)),A=fw(C/d*ow(S));(k-=2*M)>sw?(x+=M*=m?1:-1,w-=M):(k=0,x=w=(f+h)/2),(_-=2*A)>sw?(y+=A*=m?1:-1,b-=A):(_=0,y=b=(f+h)/2)}var R=d*nw(y),O=d*ow(y),Z=u*nw(w),I=u*ow(w);if(j>sw){var P,L=d*nw(b),D=d*ow(b),N=u*nw(x),$=u*ow(x);if(psw?T>sw?(g=bw(N,$,R,O,d,T,m),v=bw(L,D,Z,I,d,T,m),s.moveTo(g.cx+g.x01,g.cy+g.y01),Tsw&&k>sw?E>sw?(g=bw(Z,I,L,D,u,-E,m),v=bw(R,O,N,$,u,-E,m),s.lineTo(g.cx+g.x01,g.cy+g.y01),E=u;--d)s.point(g[d],v[d]);s.lineEnd(),s.areaEnd()}m&&(g[c]=+e(f,c,l),v[c]=+n(f,c,l),s.point(t?+t(f,c,l):g[c],r?+r(f,c,l):v[c]))}if(h)return s=null,h+""||null}function c(){return Cw().defined(i).curve(a).context(o)}return l.x=function(n){return arguments.length?(e="function"===typeof n?n:Jx(+n),t=null,l):e},l.x0=function(t){return arguments.length?(e="function"===typeof t?t:Jx(+t),l):e},l.x1=function(e){return arguments.length?(t=null==e?null:"function"===typeof e?e:Jx(+e),l):t},l.y=function(e){return arguments.length?(n="function"===typeof e?e:Jx(+e),r=null,l):n},l.y0=function(e){return arguments.length?(n="function"===typeof e?e:Jx(+e),l):n},l.y1=function(e){return arguments.length?(r=null==e?null:"function"===typeof e?e:Jx(+e),l):r},l.lineX0=l.lineY0=function(){return c().x(e).y(n)},l.lineY1=function(){return c().x(e).y(r)},l.lineX1=function(){return c().x(t).y(n)},l.defined=function(e){return arguments.length?(i="function"===typeof e?e:Jx(!!e),l):i},l.curve=function(e){return arguments.length?(a=e,null!=o&&(s=a(o)),l):a},l.context=function(e){return arguments.length?(null==e?o=s=null:s=a(o=e),l):o},l}function Ew(e,t){return te?1:t>=e?0:NaN}function Tw(e){return e}function Mw(){var e=Tw,t=Ew,n=null,r=Jx(0),i=Jx(uw),o=Jx(0);function a(a){var s,l,c,u,d,f=a.length,h=0,p=new Array(f),m=new Array(f),g=+r.apply(this,arguments),v=Math.min(uw,Math.max(-uw,i.apply(this,arguments)-g)),y=Math.min(Math.abs(v)/f,o.apply(this,arguments)),b=y*(v<0?-1:1);for(s=0;s0&&(h+=d);for(null!=t?p.sort((function(e,n){return t(m[e],m[n])})):null!=n&&p.sort((function(e,t){return n(a[e],a[t])})),s=0,c=h?(v-f*b)/h:0;s0?d*c:0)+b,m[l]={data:a[l],index:s,value:d,startAngle:g,endAngle:u,padAngle:y};return m}return a.value=function(t){return arguments.length?(e="function"===typeof t?t:Jx(+t),a):e},a.sortValues=function(e){return arguments.length?(t=e,n=null,a):t},a.sort=function(e){return arguments.length?(n=e,t=null,a):n},a.startAngle=function(e){return arguments.length?(r="function"===typeof e?e:Jx(+e),a):r},a.endAngle=function(e){return arguments.length?(i="function"===typeof e?e:Jx(+e),a):i},a.padAngle=function(e){return arguments.length?(o="function"===typeof e?e:Jx(+e),a):o},a}ww.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t)}}};var Aw=Ow(kw);function Rw(e){this._curve=e}function Ow(e){function t(t){return new Rw(e(t))}return t._curve=e,t}function Zw(e){var t=e.curve;return e.angle=e.x,delete e.x,e.radius=e.y,delete e.y,e.curve=function(e){return arguments.length?t(Ow(e)):t()._curve},e}function Iw(){return Zw(Cw().curve(Aw))}function Pw(){var e=jw().curve(Aw),t=e.curve,n=e.lineX0,r=e.lineX1,i=e.lineY0,o=e.lineY1;return e.angle=e.x,delete e.x,e.startAngle=e.x0,delete e.x0,e.endAngle=e.x1,delete e.x1,e.radius=e.y,delete e.y,e.innerRadius=e.y0,delete e.y0,e.outerRadius=e.y1,delete e.y1,e.lineStartAngle=function(){return Zw(n())},delete e.lineX0,e.lineEndAngle=function(){return Zw(r())},delete e.lineX1,e.lineInnerRadius=function(){return Zw(i())},delete e.lineY0,e.lineOuterRadius=function(){return Zw(o())},delete e.lineY1,e.curve=function(e){return arguments.length?t(Ow(e)):t()._curve},e}function Lw(e,t){return[(t=+t)*Math.cos(e-=Math.PI/2),t*Math.sin(e)]}Rw.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(e,t){this._curve.point(t*Math.sin(e),t*-Math.cos(e))}};var Dw=Array.prototype.slice;function Nw(e){return e.source}function $w(e){return e.target}function Fw(e){var t=Nw,n=$w,r=_w,i=Sw,o=null;function a(){var a,s=Dw.call(arguments),l=t.apply(this,s),c=n.apply(this,s);if(o||(o=a=qi()),e(o,+r.apply(this,(s[0]=l,s)),+i.apply(this,s),+r.apply(this,(s[0]=c,s)),+i.apply(this,s)),a)return o=null,a+""||null}return a.source=function(e){return arguments.length?(t=e,a):t},a.target=function(e){return arguments.length?(n=e,a):n},a.x=function(e){return arguments.length?(r="function"===typeof e?e:Jx(+e),a):r},a.y=function(e){return arguments.length?(i="function"===typeof e?e:Jx(+e),a):i},a.context=function(e){return arguments.length?(o=null==e?null:e,a):o},a}function zw(e,t,n,r,i){e.moveTo(t,n),e.bezierCurveTo(t=(t+r)/2,n,t,i,r,i)}function Bw(e,t,n,r,i){e.moveTo(t,n),e.bezierCurveTo(t,n=(n+i)/2,r,n,r,i)}function Ww(e,t,n,r,i){var o=Lw(t,n),a=Lw(t,n=(n+i)/2),s=Lw(r,n),l=Lw(r,i);e.moveTo(o[0],o[1]),e.bezierCurveTo(a[0],a[1],s[0],s[1],l[0],l[1])}function Hw(){return Fw(zw)}function Uw(){return Fw(Bw)}function Vw(){var e=Fw(Ww);return e.angle=e.x,delete e.x,e.radius=e.y,delete e.y,e}var qw={draw:function(e,t){var n=Math.sqrt(t/lw);e.moveTo(n,0),e.arc(0,0,n,0,uw)}},Gw={draw:function(e,t){var n=Math.sqrt(t/5)/2;e.moveTo(-3*n,-n),e.lineTo(-n,-n),e.lineTo(-n,-3*n),e.lineTo(n,-3*n),e.lineTo(n,-n),e.lineTo(3*n,-n),e.lineTo(3*n,n),e.lineTo(n,n),e.lineTo(n,3*n),e.lineTo(-n,3*n),e.lineTo(-n,n),e.lineTo(-3*n,n),e.closePath()}},Kw=Math.sqrt(1/3),Qw=2*Kw,Yw={draw:function(e,t){var n=Math.sqrt(t/Qw),r=n*Kw;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}},Xw=Math.sin(lw/10)/Math.sin(7*lw/10),Jw=Math.sin(uw/10)*Xw,ek=-Math.cos(uw/10)*Xw,tk={draw:function(e,t){var n=Math.sqrt(.8908130915292852*t),r=Jw*n,i=ek*n;e.moveTo(0,-n),e.lineTo(r,i);for(var o=1;o<5;++o){var a=uw*o/5,s=Math.cos(a),l=Math.sin(a);e.lineTo(l*n,-s*n),e.lineTo(s*r-l*i,l*r+s*i)}e.closePath()}},nk={draw:function(e,t){var n=Math.sqrt(t),r=-n/2;e.rect(r,r,n,n)}},rk=Math.sqrt(3),ik={draw:function(e,t){var n=-Math.sqrt(t/(3*rk));e.moveTo(0,2*n),e.lineTo(-rk*n,-n),e.lineTo(rk*n,-n),e.closePath()}},ok=-.5,ak=Math.sqrt(3)/2,sk=1/Math.sqrt(12),lk=3*(sk/2+1),ck={draw:function(e,t){var n=Math.sqrt(t/lk),r=n/2,i=n*sk,o=r,a=n*sk+n,s=-o,l=a;e.moveTo(r,i),e.lineTo(o,a),e.lineTo(s,l),e.lineTo(ok*r-ak*i,ak*r+ok*i),e.lineTo(ok*o-ak*a,ak*o+ok*a),e.lineTo(ok*s-ak*l,ak*s+ok*l),e.lineTo(ok*r+ak*i,ok*i-ak*r),e.lineTo(ok*o+ak*a,ok*a-ak*o),e.lineTo(ok*s+ak*l,ok*l-ak*s),e.closePath()}},uk=[qw,Gw,Yw,nk,tk,ik,ck];function dk(){var e=Jx(qw),t=Jx(64),n=null;function r(){var r;if(n||(n=r=qi()),e.apply(this,arguments).draw(n,+t.apply(this,arguments)),r)return n=null,r+""||null}return r.type=function(t){return arguments.length?(e="function"===typeof t?t:Jx(t),r):e},r.size=function(e){return arguments.length?(t="function"===typeof e?e:Jx(+e),r):t},r.context=function(e){return arguments.length?(n=null==e?null:e,r):n},r}function fk(){}function hk(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function pk(e){this._context=e}function mk(e){return new pk(e)}function gk(e){this._context=e}function vk(e){return new gk(e)}function yk(e){this._context=e}function bk(e){return new yk(e)}function xk(e,t){this._basis=new pk(e),this._beta=t}pk.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:hk(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:hk(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}},gk.prototype={areaStart:fk,areaEnd:fk,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:hk(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}},yk.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:hk(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}},xk.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var e=this._x,t=this._y,n=e.length-1;if(n>0)for(var r,i=e[0],o=t[0],a=e[n]-i,s=t[n]-o,l=-1;++l<=n;)r=l/n,this._basis.point(this._beta*e[l]+(1-this._beta)*(i+r*a),this._beta*t[l]+(1-this._beta)*(o+r*s));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};var wk=function e(t){function n(e){return 1===t?new pk(e):new xk(e,t)}return n.beta=function(t){return e(+t)},n}(.85);function kk(e,t,n){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-n),e._x2,e._y2)}function _k(e,t){this._context=e,this._k=(1-t)/6}_k.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:kk(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:kk(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var Sk=function e(t){function n(e){return new _k(e,t)}return n.tension=function(t){return e(+t)},n}(0);function Ck(e,t){this._context=e,this._k=(1-t)/6}Ck.prototype={areaStart:fk,areaEnd:fk,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:kk(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var jk=function e(t){function n(e){return new Ck(e,t)}return n.tension=function(t){return e(+t)},n}(0);function Ek(e,t){this._context=e,this._k=(1-t)/6}Ek.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:kk(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var Tk=function e(t){function n(e){return new Ek(e,t)}return n.tension=function(t){return e(+t)},n}(0);function Mk(e,t,n){var r=e._x1,i=e._y1,o=e._x2,a=e._y2;if(e._l01_a>sw){var s=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,l=3*e._l01_a*(e._l01_a+e._l12_a);r=(r*s-e._x0*e._l12_2a+e._x2*e._l01_2a)/l,i=(i*s-e._y0*e._l12_2a+e._y2*e._l01_2a)/l}if(e._l23_a>sw){var c=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,u=3*e._l23_a*(e._l23_a+e._l12_a);o=(o*c+e._x1*e._l23_2a-t*e._l12_2a)/u,a=(a*c+e._y1*e._l23_2a-n*e._l12_2a)/u}e._context.bezierCurveTo(r,i,o,a,e._x2,e._y2)}function Ak(e,t){this._context=e,this._alpha=t}Ak.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:Mk(this,e,t)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var Rk=function e(t){function n(e){return t?new Ak(e,t):new _k(e,0)}return n.alpha=function(t){return e(+t)},n}(.5);function Ok(e,t){this._context=e,this._alpha=t}Ok.prototype={areaStart:fk,areaEnd:fk,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:Mk(this,e,t)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var Zk=function e(t){function n(e){return t?new Ok(e,t):new Ck(e,0)}return n.alpha=function(t){return e(+t)},n}(.5);function Ik(e,t){this._context=e,this._alpha=t}Ik.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Mk(this,e,t)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var Pk=function e(t){function n(e){return t?new Ik(e,t):new Ek(e,0)}return n.alpha=function(t){return e(+t)},n}(.5);function Lk(e){this._context=e}function Dk(e){return new Lk(e)}function Nk(e){return e<0?-1:1}function $k(e,t,n){var r=e._x1-e._x0,i=t-e._x1,o=(e._y1-e._y0)/(r||i<0&&-0),a=(n-e._y1)/(i||r<0&&-0),s=(o*i+a*r)/(r+i);return(Nk(o)+Nk(a))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs(s))||0}function Fk(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function zk(e,t,n){var r=e._x0,i=e._y0,o=e._x1,a=e._y1,s=(o-r)/3;e._context.bezierCurveTo(r+s,i+s*t,o-s,a-s*n,o,a)}function Bk(e){this._context=e}function Wk(e){this._context=new Hk(e)}function Hk(e){this._context=e}function Uk(e){return new Bk(e)}function Vk(e){return new Wk(e)}function qk(e){this._context=e}function Gk(e){var t,n,r=e.length-1,i=new Array(r),o=new Array(r),a=new Array(r);for(i[0]=0,o[0]=2,a[0]=e[0]+2*e[1],t=1;t=0;--t)i[t]=(a[t]-i[t+1])/o[t];for(o[r-1]=(e[r]+i[r-1])/2,t=0;t1)for(var n,r,i,o=1,a=e[t[0]],s=a.length;o=0;)n[t]=t;return n}function n_(e,t){return e[t]}function r_(){var e=Jx([]),t=t_,n=e_,r=n_;function i(i){var o,a,s=e.apply(this,arguments),l=i.length,c=s.length,u=new Array(c);for(o=0;o0){for(var n,r,i,o=0,a=e[0].length;o0)for(var n,r,i,o,a,s,l=0,c=e[t[0]].length;l0?(r[0]=o,r[1]=o+=i):i<0?(r[1]=a,r[0]=a+=i):(r[0]=0,r[1]=i)}function a_(e,t){if((n=e.length)>0){for(var n,r=0,i=e[t[0]],o=i.length;r0&&(r=(n=e[t[0]]).length)>0){for(var n,r,i,o=0,a=1;ao&&(o=t,r=n);return r}function u_(e){var t=e.map(d_);return t_(e).sort((function(e,n){return t[e]-t[n]}))}function d_(e){for(var t,n=0,r=-1,i=e.length;++r=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}}this._x=e,this._y=t}};var m_="%Y-%m-%dT%H:%M:%S.%LZ";var g_=Date.prototype.toISOString?function(e){return e.toISOString()}:bv(m_),v_=g_;var y_=+new Date("2000-01-01T00:00:00.000Z")?function(e){var t=new Date(e);return isNaN(t)?null:t}:xv(m_),b_=y_;function x_(e,t,n){var r=new qn,i=t;return null==t?(r.restart(e,t,n),r):(t=+t,n=null==n?Un():+n,r.restart((function o(a){a+=i,r.restart(o,i+=t,n),e(a)}),t,n),r)}function w_(e){return function(){return e}}function k_(e){return e[0]}function __(e){return e[1]}function S_(){this._=null}function C_(e){e.U=e.C=e.L=e.R=e.P=e.N=null}function j_(e,t){var n=t,r=t.R,i=n.U;i?i.L===n?i.L=r:i.R=r:e._=r,r.U=i,n.U=r,n.R=r.L,n.R&&(n.R.U=n),r.L=n}function E_(e,t){var n=t,r=t.L,i=n.U;i?i.L===n?i.L=r:i.R=r:e._=r,r.U=i,n.U=r,n.L=r.R,n.L&&(n.L.U=n),r.R=n}function T_(e){for(;e.L;)e=e.L;return e}S_.prototype={constructor:S_,insert:function(e,t){var n,r,i;if(e){if(t.P=e,t.N=e.N,e.N&&(e.N.P=t),e.N=t,e.R){for(e=e.R;e.L;)e=e.L;e.L=t}else e.R=t;n=e}else this._?(e=T_(this._),t.P=null,t.N=e,e.P=e.L=t,n=e):(t.P=t.N=null,this._=t,n=null);for(t.L=t.R=null,t.U=n,t.C=!0,e=t;n&&n.C;)n===(r=n.U).L?(i=r.R)&&i.C?(n.C=i.C=!1,r.C=!0,e=r):(e===n.R&&(j_(this,n),n=(e=n).U),n.C=!1,r.C=!0,E_(this,r)):(i=r.L)&&i.C?(n.C=i.C=!1,r.C=!0,e=r):(e===n.L&&(E_(this,n),n=(e=n).U),n.C=!1,r.C=!0,j_(this,r)),n=e.U;this._.C=!1},remove:function(e){e.N&&(e.N.P=e.P),e.P&&(e.P.N=e.N),e.N=e.P=null;var t,n,r,i=e.U,o=e.L,a=e.R;if(n=o?a?T_(a):o:a,i?i.L===e?i.L=n:i.R=n:this._=n,o&&a?(r=n.C,n.C=e.C,n.L=o,o.U=n,n!==a?(i=n.U,n.U=e.U,e=n.R,i.L=e,n.R=a,a.U=n):(n.U=i,i=n,e=n.R)):(r=e.C,e=n),e&&(e.U=i),!r)if(e&&e.C)e.C=!1;else{do{if(e===this._)break;if(e===i.L){if((t=i.R).C&&(t.C=!1,i.C=!0,j_(this,i),t=i.R),t.L&&t.L.C||t.R&&t.R.C){t.R&&t.R.C||(t.L.C=!1,t.C=!0,E_(this,t),t=i.R),t.C=i.C,i.C=t.R.C=!1,j_(this,i),e=this._;break}}else if((t=i.L).C&&(t.C=!1,i.C=!0,E_(this,i),t=i.L),t.L&&t.L.C||t.R&&t.R.C){t.L&&t.L.C||(t.R.C=!1,t.C=!0,j_(this,t),t=i.L),t.C=i.C,i.C=t.L.C=!1,E_(this,i),e=this._;break}t.C=!0,e=i,i=i.U}while(!e.C);e&&(e.C=!1)}}};var M_=S_;function A_(e,t,n,r){var i=[null,null],o=eS.push(i)-1;return i.left=e,i.right=t,n&&O_(i,e,t,n),r&&O_(i,t,e,r),X_[e.index].halfedges.push(o),X_[t.index].halfedges.push(o),i}function R_(e,t,n){var r=[t,n];return r.left=e,r}function O_(e,t,n,r){e[0]||e[1]?e.left===n?e[1]=r:e[0]=r:(e[0]=r,e.left=t,e.right=n)}function Z_(e,t,n,r,i){var o,a=e[0],s=e[1],l=a[0],c=a[1],u=0,d=1,f=s[0]-l,h=s[1]-c;if(o=t-l,f||!(o>0)){if(o/=f,f<0){if(o0){if(o>d)return;o>u&&(u=o)}if(o=r-l,f||!(o<0)){if(o/=f,f<0){if(o>d)return;o>u&&(u=o)}else if(f>0){if(o0)){if(o/=h,h<0){if(o0){if(o>d)return;o>u&&(u=o)}if(o=i-c,h||!(o<0)){if(o/=h,h<0){if(o>d)return;o>u&&(u=o)}else if(h>0){if(o0||d<1)||(u>0&&(e[0]=[l+u*f,c+u*h]),d<1&&(e[1]=[l+d*f,c+d*h]),!0)}}}}}function I_(e,t,n,r,i){var o=e[1];if(o)return!0;var a,s,l=e[0],c=e.left,u=e.right,d=c[0],f=c[1],h=u[0],p=u[1],m=(d+h)/2,g=(f+p)/2;if(p===f){if(m=r)return;if(d>h){if(l){if(l[1]>=i)return}else l=[m,n];o=[m,i]}else{if(l){if(l[1]1)if(d>h){if(l){if(l[1]>=i)return}else l=[(n-s)/a,n];o=[(i-s)/a,i]}else{if(l){if(l[1]=r)return}else l=[t,a*t+s];o=[r,a*r+s]}else{if(l){if(l[0]=-nS)){var h=l*l+c*c,p=u*u+d*d,m=(d*h-c*p)/f,g=(l*p-u*h)/f,v=$_.pop()||new F_;v.arc=e,v.site=i,v.x=m+a,v.y=(v.cy=g+s)+Math.sqrt(m*m+g*g),e.circle=v;for(var y=null,b=J_._;b;)if(v.ytS)s=s.L;else{if(!((i=o-Q_(s,a))>tS)){r>-tS?(t=s.P,n=s):i>-tS?(t=s,n=s.N):t=n=s;break}if(!s.R){t=s;break}s=s.R}!function(e){X_[e.index]={site:e,halfedges:[]}}(e);var l=U_(e);if(Y_.insert(t,l),t||n){if(t===n)return B_(t),n=U_(t.site),Y_.insert(l,n),l.edge=n.edge=A_(t.site,l.site),z_(t),void z_(n);if(n){B_(t),B_(n);var c=t.site,u=c[0],d=c[1],f=e[0]-u,h=e[1]-d,p=n.site,m=p[0]-u,g=p[1]-d,v=2*(f*g-h*m),y=f*f+h*h,b=m*m+g*g,x=[(g*y-h*b)/v+u,(f*b-m*y)/v+d];O_(n.edge,c,p,x),l.edge=A_(c,e,null,x),n.edge=A_(e,p,null,x),z_(t),z_(n)}else l.edge=A_(t.site,l.site)}}function K_(e,t){var n=e.site,r=n[0],i=n[1],o=i-t;if(!o)return r;var a=e.P;if(!a)return-1/0;var s=(n=a.site)[0],l=n[1],c=l-t;if(!c)return s;var u=s-r,d=1/o-1/c,f=u/c;return d?(-f+Math.sqrt(f*f-2*d*(u*u/(-2*c)-l+c/2+i-o/2)))/d+r:(r+s)/2}function Q_(e,t){var n=e.N;if(n)return K_(n,t);var r=e.site;return r[1]===t?r[0]:1/0}var Y_,X_,J_,eS,tS=1e-6,nS=1e-12;function rS(e,t,n){return(e[0]-n[0])*(t[1]-e[1])-(e[0]-t[0])*(n[1]-e[1])}function iS(e,t){return t[1]-e[1]||t[0]-e[0]}function oS(e,t){var n,r,i,o=e.sort(iS).pop();for(eS=[],X_=new Array(e.length),Y_=new M_,J_=new M_;;)if(i=N_,o&&(!i||o[1]tS||Math.abs(i[0][1]-i[1][1])>tS)||delete eS[o]}(a,s,l,c),function(e,t,n,r){var i,o,a,s,l,c,u,d,f,h,p,m,g=X_.length,v=!0;for(i=0;itS||Math.abs(m-f)>tS)&&(l.splice(s,0,eS.push(R_(a,h,Math.abs(p-e)tS?[e,Math.abs(d-e)tS?[Math.abs(f-r)tS?[n,Math.abs(d-n)tS?[Math.abs(f-t)=s)return null;var l=e-i.site[0],c=t-i.site[1],u=l*l+c*c;do{i=o.cells[r=a],a=null,i.halfedges.forEach((function(n){var r=o.edges[n],s=r.left;if(s!==i.site&&s||(s=r.right)){var l=e-s[0],c=t-s[1],d=l*l+c*c;dr?(r+i)/2:Math.min(0,r)||Math.max(0,i),a>o?(o+a)/2:Math.min(0,o)||Math.max(0,a))}function xS(){var e,t,n=pS,r=mS,i=bS,o=vS,a=yS,s=[0,1/0],l=[[-1/0,-1/0],[1/0,1/0]],c=250,u=Pp,d=fe("start","zoom","end"),f=500,h=0;function p(e){e.property("__zoom",gS).on("wheel.zoom",w).on("mousedown.zoom",k).on("dblclick.zoom",_).filter(a).on("touchstart.zoom",S).on("touchmove.zoom",C).on("touchend.zoom touchcancel.zoom",j).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function m(e,t){return(t=Math.max(s[0],Math.min(s[1],t)))===e.k?e:new cS(t,e.x,e.y)}function g(e,t,n){var r=t[0]-n[0]*e.k,i=t[1]-n[1]*e.k;return r===e.x&&i===e.y?e:new cS(e.k,r,i)}function v(e){return[(+e[0][0]+ +e[1][0])/2,(+e[0][1]+ +e[1][1])/2]}function y(e,t,n){e.on("start.zoom",(function(){b(this,arguments).start()})).on("interrupt.zoom end.zoom",(function(){b(this,arguments).end()})).tween("zoom",(function(){var e=this,i=arguments,o=b(e,i),a=r.apply(e,i),s=null==n?v(a):"function"===typeof n?n.apply(e,i):n,l=Math.max(a[1][0]-a[0][0],a[1][1]-a[0][1]),c=e.__zoom,d="function"===typeof t?t.apply(e,i):t,f=u(c.invert(s).concat(l/c.k),d.invert(s).concat(l/d.k));return function(e){if(1===e)e=d;else{var t=f(e),n=l/t[2];e=new cS(n,s[0]-t[0]*n,s[1]-t[1]*n)}o.zoom(null,e)}}))}function b(e,t,n){return!n&&e.__zooming||new x(e,t)}function x(e,t){this.that=e,this.args=t,this.active=0,this.extent=r.apply(e,t),this.taps=0}function w(){if(n.apply(this,arguments)){var e=b(this,arguments),t=this.__zoom,r=Math.max(s[0],Math.min(s[1],t.k*Math.pow(2,o.apply(this,arguments)))),a=In(this);if(e.wheel)e.mouse[0][0]===a[0]&&e.mouse[0][1]===a[1]||(e.mouse[1]=t.invert(e.mouse[0]=a)),clearTimeout(e.wheel);else{if(t.k===r)return;e.mouse=[a,t.invert(a)],ar(this),e.start()}hS(),e.wheel=setTimeout(c,150),e.zoom("mouse",i(g(m(t,r),e.mouse[0],e.mouse[1]),e.extent,l))}function c(){e.wheel=null,e.end()}}function k(){if(!t&&n.apply(this,arguments)){var e=b(this,arguments,!0),r=St(ut.view).on("mousemove.zoom",c,!0).on("mouseup.zoom",u,!0),o=In(this),a=ut.clientX,s=ut.clientY;Et(ut.view),fS(),e.mouse=[o,this.__zoom.invert(o)],ar(this),e.start()}function c(){if(hS(),!e.moved){var t=ut.clientX-a,n=ut.clientY-s;e.moved=t*t+n*n>h}e.zoom("mouse",i(g(e.that.__zoom,e.mouse[0]=In(e.that),e.mouse[1]),e.extent,l))}function u(){r.on("mousemove.zoom mouseup.zoom",null),Tt(ut.view,e.moved),hS(),e.end()}}function _(){if(n.apply(this,arguments)){var e=this.__zoom,t=In(this),o=e.invert(t),a=e.k*(ut.shiftKey?.5:2),s=i(g(m(e,a),t,o),r.apply(this,arguments),l);hS(),c>0?St(this).transition().duration(c).call(y,s,t):St(this).call(p.transform,s)}}function S(){if(n.apply(this,arguments)){var t,r,i,o,a=ut.touches,s=a.length,l=b(this,arguments,ut.changedTouches.length===s);for(fS(),r=0;r0}e.exports=function(e,n,r,i){var o,a,s,l,c,u,d,f,h,p,m,g,v;if(o=n.y-e.y,s=e.x-n.x,c=n.x*e.y-e.x*n.y,h=o*r.x+s*r.y+c,p=o*i.x+s*i.y+c,0!==h&&0!==p&&t(h,p))return;if(a=i.y-r.y,l=r.x-i.x,u=i.x*r.y-r.x*i.y,d=a*e.x+l*e.y+u,f=a*n.x+l*n.y+u,0!==d&&0!==f&&t(d,f))return;if(0===(m=o*l-a*s))return;return g=Math.abs(m/2),{x:(v=s*u-l*c)<0?(v-g)/m:(v+g)/m,y:(v=a*c-o*u)<0?(v-g)/m:(v+g)/m}}},42788:function(e){e.exports=function(e,t){return e.intersect(t)}},50618:function(e,t,n){var r=n(13564);e.exports=function(e,t,n){var i=e.x,o=e.y,a=[],s=Number.POSITIVE_INFINITY,l=Number.POSITIVE_INFINITY;t.forEach((function(e){s=Math.min(s,e.x),l=Math.min(l,e.y)}));for(var c=i-e.width/2-s,u=o-e.height/2-l,d=0;d1&&a.sort((function(e,t){var r=e.x-n.x,i=e.y-n.y,o=Math.sqrt(r*r+i*i),a=t.x-n.x,s=t.y-n.y,l=Math.sqrt(a*a+s*s);return oMath.abs(a)*c?(s<0&&(c=-c),n=0===s?0:c*a/s,r=c):(a<0&&(l=-l),n=l,r=0===a?0:l*s/a);return{x:i+n,y:o+r}}},44203:function(e,t,n){var r=n(80630);e.exports=function(e,t){var n=e.append("foreignObject").attr("width","100000"),i=n.append("xhtml:div");i.attr("xmlns","http://www.w3.org/1999/xhtml");var o=t.label;switch(typeof o){case"function":i.insert(o);break;case"object":i.insert((function(){return o}));break;default:i.html(o)}r.applyStyle(i,t.labelStyle),i.style("display","inline-block"),i.style("white-space","nowrap");var a=i.node().getBoundingClientRect();return n.attr("width",a.width).attr("height",a.height),n}},75844:function(e,t,n){var r=n(38312),i=n(44203),o=n(42365);e.exports=function(e,t,n){var a=t.label,s=e.append("g");"svg"===t.labelType?o(s,t):"string"!==typeof a||"html"===t.labelType?i(s,t):r(s,t);var l,c=s.node().getBBox();switch(n){case"top":l=-t.height/2;break;case"bottom":l=t.height/2-c.height;break;default:l=-c.height/2}return s.attr("transform","translate("+-c.width/2+","+l+")"),s}},42365:function(e,t,n){var r=n(80630);e.exports=function(e,t){var n=e;return n.node().appendChild(t.label),r.applyStyle(n,t.labelStyle),n}},38312:function(e,t,n){var r=n(80630);e.exports=function(e,t){for(var n=e.append("text"),i=function(e){for(var t,n="",r=!1,i=0;i0;--l)if(r=t[l].dequeue()){i=i.concat(s(e,t,n,r,!0));break}}return i}(n.graph,n.buckets,n.zeroIdx);return r.flatten(r.map(c,(function(t){return e.outEdges(t.v,t.w)})),!0)};var a=r.constant(1);function s(e,t,n,i,o){var a=o?[]:void 0;return r.forEach(e.inEdges(i.v),(function(r){var i=e.edge(r),s=e.node(r.v);o&&a.push({v:r.v,w:r.w}),s.out-=i,l(t,n,s)})),r.forEach(e.outEdges(i.v),(function(r){var i=e.edge(r),o=r.w,a=e.node(o);a.in-=i,l(t,n,a)})),e.removeNode(i.v),a}function l(e,t,n){n.out?n.in?e[n.out-n.in+t].enqueue(n):e[e.length-1].enqueue(n):e[0].enqueue(n)}},26456:function(e,t,n){"use strict";var r=n(38899),i=n(2212),o=n(81898),a=n(56744),s=n(48392).normalizeRanks,l=n(77652),c=n(48392).removeEmptyRanks,u=n(51652),d=n(24093),f=n(87523),h=n(57348),p=n(13090),m=n(48392),g=n(2990).Graph;e.exports=function(e,t){var n=t&&t.debugTiming?m.time:m.notime;n("layout",(function(){var t=n(" buildLayoutGraph",(function(){return function(e){var t=new g({multigraph:!0,compound:!0}),n=j(e.graph());return t.setGraph(r.merge({},y,C(n,v),r.pick(n,b))),r.forEach(e.nodes(),(function(n){var i=j(e.node(n));t.setNode(n,r.defaults(C(i,x),w)),t.setParent(n,e.parent(n))})),r.forEach(e.edges(),(function(n){var i=j(e.edge(n));t.setEdge(n,r.merge({},_,C(i,k),r.pick(i,S)))})),t}(e)}));n(" runLayout",(function(){!function(e,t){t(" makeSpaceForEdgeLabels",(function(){!function(e){var t=e.graph();t.ranksep/=2,r.forEach(e.edges(),(function(n){var r=e.edge(n);r.minlen*=2,"c"!==r.labelpos.toLowerCase()&&("TB"===t.rankdir||"BT"===t.rankdir?r.width+=r.labeloffset:r.height+=r.labeloffset)}))}(e)})),t(" removeSelfEdges",(function(){!function(e){r.forEach(e.edges(),(function(t){if(t.v===t.w){var n=e.node(t.v);n.selfEdges||(n.selfEdges=[]),n.selfEdges.push({e:t,label:e.edge(t)}),e.removeEdge(t)}}))}(e)})),t(" acyclic",(function(){i.run(e)})),t(" nestingGraph.run",(function(){u.run(e)})),t(" rank",(function(){a(m.asNonCompoundGraph(e))})),t(" injectEdgeLabelProxies",(function(){!function(e){r.forEach(e.edges(),(function(t){var n=e.edge(t);if(n.width&&n.height){var r=e.node(t.v),i={rank:(e.node(t.w).rank-r.rank)/2+r.rank,e:t};m.addDummyNode(e,"edge-proxy",i,"_ep")}}))}(e)})),t(" removeEmptyRanks",(function(){c(e)})),t(" nestingGraph.cleanup",(function(){u.cleanup(e)})),t(" normalizeRanks",(function(){s(e)})),t(" assignRankMinMax",(function(){!function(e){var t=0;r.forEach(e.nodes(),(function(n){var i=e.node(n);i.borderTop&&(i.minRank=e.node(i.borderTop).rank,i.maxRank=e.node(i.borderBottom).rank,t=r.max(t,i.maxRank))})),e.graph().maxRank=t}(e)})),t(" removeEdgeLabelProxies",(function(){!function(e){r.forEach(e.nodes(),(function(t){var n=e.node(t);"edge-proxy"===n.dummy&&(e.edge(n.e).labelRank=n.rank,e.removeNode(t))}))}(e)})),t(" normalize.run",(function(){o.run(e)})),t(" parentDummyChains",(function(){l(e)})),t(" addBorderSegments",(function(){d(e)})),t(" order",(function(){h(e)})),t(" insertSelfEdges",(function(){!function(e){var t=m.buildLayerMatrix(e);r.forEach(t,(function(t){var n=0;r.forEach(t,(function(t,i){var o=e.node(t);o.order=i+n,r.forEach(o.selfEdges,(function(t){m.addDummyNode(e,"selfedge",{width:t.label.width,height:t.label.height,rank:o.rank,order:i+ ++n,e:t.e,label:t.label},"_se")})),delete o.selfEdges}))}))}(e)})),t(" adjustCoordinateSystem",(function(){f.adjust(e)})),t(" position",(function(){p(e)})),t(" positionSelfEdges",(function(){!function(e){r.forEach(e.nodes(),(function(t){var n=e.node(t);if("selfedge"===n.dummy){var r=e.node(n.e.v),i=r.x+r.width/2,o=r.y,a=n.x-i,s=r.height/2;e.setEdge(n.e,n.label),e.removeNode(t),n.label.points=[{x:i+2*a/3,y:o-s},{x:i+5*a/6,y:o-s},{x:i+a,y:o},{x:i+5*a/6,y:o+s},{x:i+2*a/3,y:o+s}],n.label.x=n.x,n.label.y=n.y}}))}(e)})),t(" removeBorderNodes",(function(){!function(e){r.forEach(e.nodes(),(function(t){if(e.children(t).length){var n=e.node(t),i=e.node(n.borderTop),o=e.node(n.borderBottom),a=e.node(r.last(n.borderLeft)),s=e.node(r.last(n.borderRight));n.width=Math.abs(s.x-a.x),n.height=Math.abs(o.y-i.y),n.x=a.x+n.width/2,n.y=i.y+n.height/2}})),r.forEach(e.nodes(),(function(t){"border"===e.node(t).dummy&&e.removeNode(t)}))}(e)})),t(" normalize.undo",(function(){o.undo(e)})),t(" fixupEdgeLabelCoords",(function(){!function(e){r.forEach(e.edges(),(function(t){var n=e.edge(t);if(r.has(n,"x"))switch("l"!==n.labelpos&&"r"!==n.labelpos||(n.width-=n.labeloffset),n.labelpos){case"l":n.x-=n.width/2+n.labeloffset;break;case"r":n.x+=n.width/2+n.labeloffset}}))}(e)})),t(" undoCoordinateSystem",(function(){f.undo(e)})),t(" translateGraph",(function(){!function(e){var t=Number.POSITIVE_INFINITY,n=0,i=Number.POSITIVE_INFINITY,o=0,a=e.graph(),s=a.marginx||0,l=a.marginy||0;function c(e){var r=e.x,a=e.y,s=e.width,l=e.height;t=Math.min(t,r-s/2),n=Math.max(n,r+s/2),i=Math.min(i,a-l/2),o=Math.max(o,a+l/2)}r.forEach(e.nodes(),(function(t){c(e.node(t))})),r.forEach(e.edges(),(function(t){var n=e.edge(t);r.has(n,"x")&&c(n)})),t-=s,i-=l,r.forEach(e.nodes(),(function(n){var r=e.node(n);r.x-=t,r.y-=i})),r.forEach(e.edges(),(function(n){var o=e.edge(n);r.forEach(o.points,(function(e){e.x-=t,e.y-=i})),r.has(o,"x")&&(o.x-=t),r.has(o,"y")&&(o.y-=i)})),a.width=n-t+s,a.height=o-i+l}(e)})),t(" assignNodeIntersects",(function(){!function(e){r.forEach(e.edges(),(function(t){var n,r,i=e.edge(t),o=e.node(t.v),a=e.node(t.w);i.points?(n=i.points[0],r=i.points[i.points.length-1]):(i.points=[],n=a,r=o),i.points.unshift(m.intersectRect(o,n)),i.points.push(m.intersectRect(a,r))}))}(e)})),t(" reversePoints",(function(){!function(e){r.forEach(e.edges(),(function(t){var n=e.edge(t);n.reversed&&n.points.reverse()}))}(e)})),t(" acyclic.undo",(function(){i.undo(e)}))}(t,n)})),n(" updateInputGraph",(function(){!function(e,t){r.forEach(e.nodes(),(function(n){var r=e.node(n),i=t.node(n);r&&(r.x=i.x,r.y=i.y,t.children(n).length&&(r.width=i.width,r.height=i.height))})),r.forEach(e.edges(),(function(n){var i=e.edge(n),o=t.edge(n);i.points=o.points,r.has(o,"x")&&(i.x=o.x,i.y=o.y)})),e.graph().width=t.graph().width,e.graph().height=t.graph().height}(e,t)}))}))};var v=["nodesep","edgesep","ranksep","marginx","marginy"],y={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},b=["acyclicer","ranker","rankdir","align"],x=["width","height"],w={width:0,height:0},k=["minlen","weight","width","height","labeloffset"],_={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},S=["labelpos"];function C(e,t){return r.mapValues(r.pick(e,t),Number)}function j(e){var t={};return r.forEach(e,(function(e,n){t[n.toLowerCase()]=e})),t}},38899:function(e,t,n){var r;try{r={cloneDeep:n(58121),constant:n(71547),defaults:n(66933),each:n(29430),filter:n(80086),find:n(61211),flatten:n(25506),forEach:n(36514),forIn:n(69144),has:n(17805),isUndefined:n(42530),last:n(15727),map:n(72034),mapValues:n(37702),max:n(29627),merge:n(79286),min:n(66452),minBy:n(43638),now:n(50072),pick:n(36460),range:n(66222),reduce:n(25080),sortBy:n(64286),uniqueId:n(30804),values:n(92063),zipObject:n(84827)}}catch(i){}r||(r=window._),e.exports=r},51652:function(e,t,n){var r=n(38899),i=n(48392);function o(e,t,n,a,s,l,c){var u=e.children(c);if(u.length){var d=i.addBorderNode(e,"_bt"),f=i.addBorderNode(e,"_bb"),h=e.node(c);e.setParent(d,c),h.borderTop=d,e.setParent(f,c),h.borderBottom=f,r.forEach(u,(function(r){o(e,t,n,a,s,l,r);var i=e.node(r),u=i.borderTop?i.borderTop:r,h=i.borderBottom?i.borderBottom:r,p=i.borderTop?a:2*a,m=u!==h?1:s-l[c]+1;e.setEdge(d,u,{weight:p,minlen:m,nestingEdge:!0}),e.setEdge(h,f,{weight:p,minlen:m,nestingEdge:!0})})),e.parent(c)||e.setEdge(t,d,{weight:0,minlen:s+l[c]})}else c!==t&&e.setEdge(t,c,{weight:0,minlen:n})}e.exports={run:function(e){var t=i.addDummyNode(e,"root",{},"_root"),n=function(e){var t={};function n(i,o){var a=e.children(i);a&&a.length&&r.forEach(a,(function(e){n(e,o+1)})),t[i]=o}return r.forEach(e.children(),(function(e){n(e,1)})),t}(e),a=r.max(r.values(n))-1,s=2*a+1;e.graph().nestingRoot=t,r.forEach(e.edges(),(function(t){e.edge(t).minlen*=s}));var l=function(e){return r.reduce(e.edges(),(function(t,n){return t+e.edge(n).weight}),0)}(e)+1;r.forEach(e.children(),(function(r){o(e,t,s,l,a,n,r)})),e.graph().nodeRankFactor=s},cleanup:function(e){var t=e.graph();e.removeNode(t.nestingRoot),delete t.nestingRoot,r.forEach(e.edges(),(function(t){e.edge(t).nestingEdge&&e.removeEdge(t)}))}}},81898:function(e,t,n){"use strict";var r=n(38899),i=n(48392);e.exports={run:function(e){e.graph().dummyChains=[],r.forEach(e.edges(),(function(t){!function(e,t){var n,r,o,a=t.v,s=e.node(a).rank,l=t.w,c=e.node(l).rank,u=t.name,d=e.edge(t),f=d.labelRank;if(c===s+1)return;for(e.removeEdge(t),o=0,++s;s0;)t%2&&(n+=l[t+1]),l[t=t-1>>1]+=e.weight;c+=e.weight*n}))),c}e.exports=function(e,t){for(var n=0,r=1;r=2),s=u.buildLayerMatrix(e);var g=o(e,s);g=e.barycenter)&&function(e,t){var n=0,r=0;e.weight&&(n+=e.barycenter*e.weight,r+=e.weight);t.weight&&(n+=t.barycenter*t.weight,r+=t.weight);e.vs=t.vs.concat(e.vs),e.barycenter=n/r,e.weight=r,e.i=Math.min(t.i,e.i),t.merged=!0}(e,t)}}function i(t){return function(n){n.in.push(t),0===--n.indegree&&e.push(n)}}for(;e.length;){var o=e.pop();t.push(o),r.forEach(o.in.reverse(),n(o)),r.forEach(o.out,i(o))}return r.map(r.filter(t,(function(e){return!e.merged})),(function(e){return r.pick(e,["vs","i","barycenter","weight"])}))}(r.filter(n,(function(e){return!e.indegree})))}},83616:function(e,t,n){var r=n(38899),i=n(85213),o=n(31982),a=n(54929);e.exports=function e(t,n,s,l){var c=t.children(n),u=t.node(n),d=u?u.borderLeft:void 0,f=u?u.borderRight:void 0,h={};d&&(c=r.filter(c,(function(e){return e!==d&&e!==f})));var p=i(t,c);r.forEach(p,(function(n){if(t.children(n.v).length){var i=e(t,n.v,s,l);h[n.v]=i,r.has(i,"barycenter")&&(o=n,a=i,r.isUndefined(o.barycenter)?(o.barycenter=a.barycenter,o.weight=a.weight):(o.barycenter=(o.barycenter*o.weight+a.barycenter*a.weight)/(o.weight+a.weight),o.weight+=a.weight))}var o,a}));var m=o(p,s);!function(e,t){r.forEach(e,(function(e){e.vs=r.flatten(e.vs.map((function(e){return t[e]?t[e].vs:e})),!0)}))}(m,h);var g=a(m,l);if(d&&(g.vs=r.flatten([d,g.vs,f],!0),t.predecessors(d).length)){var v=t.node(t.predecessors(d)[0]),y=t.node(t.predecessors(f)[0]);r.has(g,"barycenter")||(g.barycenter=0,g.weight=0),g.barycenter=(g.barycenter*g.weight+v.order+y.order)/(g.weight+2),g.weight+=2}return g}},54929:function(e,t,n){var r=n(38899),i=n(48392);function o(e,t,n){for(var i;t.length&&(i=r.last(t)).i<=n;)t.pop(),e.push(i.vs),n++;return n}e.exports=function(e,t){var n=i.partition(e,(function(e){return r.has(e,"barycenter")})),a=n.lhs,s=r.sortBy(n.rhs,(function(e){return-e.i})),l=[],c=0,u=0,d=0;a.sort((f=!!t,function(e,t){return e.barycentert.barycenter?1:f?t.i-e.i:e.i-t.i})),d=o(l,s,d),r.forEach(a,(function(e){d+=e.vs.length,l.push(e.vs),c+=e.barycenter*e.weight,u+=e.weight,d=o(l,s,d)}));var f;var h={vs:r.flatten(l,!0)};u&&(h.barycenter=c/u,h.weight=u);return h}},77652:function(e,t,n){var r=n(38899);e.exports=function(e){var t=function(e){var t={},n=0;function i(o){var a=n;r.forEach(e.children(o),i),t[o]={low:a,lim:n++}}return r.forEach(e.children(),i),t}(e);r.forEach(e.graph().dummyChains,(function(n){for(var r=e.node(n),i=r.edgeObj,o=function(e,t,n,r){var i,o,a=[],s=[],l=Math.min(t[n].low,t[r].low),c=Math.max(t[n].lim,t[r].lim);i=n;do{i=e.parent(i),a.push(i)}while(i&&(t[i].low>l||c>t[i].lim));o=i,i=r;for(;(i=e.parent(i))!==o;)s.push(i);return{path:a.concat(s.reverse()),lca:o}}(e,t,i.v,i.w),a=o.path,s=o.lca,l=0,c=a[l],u=!0;n!==i.w;){if(r=e.node(n),u){for(;(c=a[l])!==s&&e.node(c).maxRanks)&&l(n,t,c)}))}))}return r.reduce(t,(function(t,n){var o,a=-1,s=0;return r.forEach(n,(function(r,l){if("border"===e.node(r).dummy){var c=e.predecessors(r);c.length&&(o=e.node(c[0]).order,i(n,s,l,a,o),s=l,a=o)}i(n,s,n.length,o,t.length)})),n})),n}function l(e,t,n){if(t>n){var r=t;t=n,n=r}var i=e[t];i||(e[t]=i={}),i[n]=!0}function c(e,t,n){if(t>n){var i=t;t=n,n=i}return r.has(e[t],n)}function u(e,t,n,i){var o={},a={},s={};return r.forEach(t,(function(e){r.forEach(e,(function(e,t){o[e]=e,a[e]=e,s[e]=t}))})),r.forEach(t,(function(e){var t=-1;r.forEach(e,(function(e){var l=i(e);if(l.length){l=r.sortBy(l,(function(e){return s[e]}));for(var u=(l.length-1)/2,d=Math.floor(u),f=Math.ceil(u);d<=f;++d){var h=l[d];a[e]===e&&tl.lim&&(c=l,u=!0);var d=r.filter(t.edges(),(function(t){return u===y(e,e.node(t.v),c)&&u!==y(e,e.node(t.w),c)}));return r.minBy(d,(function(e){return o(t,e)}))}function v(e,t,n,i){var o=n.v,a=n.w;e.removeEdge(o,a),e.setEdge(i.v,i.w,{}),h(e),d(e,t),function(e,t){var n=r.find(e.nodes(),(function(e){return!t.node(e).parent})),i=s(e,n);i=i.slice(1),r.forEach(i,(function(n){var r=e.node(n).parent,i=t.edge(n,r),o=!1;i||(i=t.edge(r,n),o=!0),t.node(n).rank=t.node(r).rank+(o?i.minlen:-i.minlen)}))}(e,t)}function y(e,t,n){return n.low<=t.lim&&t.lim<=n.lim}e.exports=u,u.initLowLimValues=h,u.initCutValues=d,u.calcCutValue=f,u.leaveEdge=m,u.enterEdge=g,u.exchangeEdges=v},64441:function(e,t,n){"use strict";var r=n(38899);e.exports={longestPath:function(e){var t={};r.forEach(e.sources(),(function n(i){var o=e.node(i);if(r.has(t,i))return o.rank;t[i]=!0;var a=r.min(r.map(e.outEdges(i),(function(t){return n(t.w)-e.edge(t).minlen})));return a!==Number.POSITIVE_INFINITY&&void 0!==a&&null!==a||(a=0),o.rank=a}))},slack:function(e,t){return e.node(t.w).rank-e.node(t.v).rank-e.edge(t).minlen}}},48392:function(e,t,n){"use strict";var r=n(38899),i=n(2990).Graph;function o(e,t,n,i){var o;do{o=r.uniqueId(i)}while(e.hasNode(o));return n.dummy=t,e.setNode(o,n),o}function a(e){return r.max(r.map(e.nodes(),(function(t){var n=e.node(t).rank;if(!r.isUndefined(n))return n})))}e.exports={addDummyNode:o,simplify:function(e){var t=(new i).setGraph(e.graph());return r.forEach(e.nodes(),(function(n){t.setNode(n,e.node(n))})),r.forEach(e.edges(),(function(n){var r=t.edge(n.v,n.w)||{weight:0,minlen:1},i=e.edge(n);t.setEdge(n.v,n.w,{weight:r.weight+i.weight,minlen:Math.max(r.minlen,i.minlen)})})),t},asNonCompoundGraph:function(e){var t=new i({multigraph:e.isMultigraph()}).setGraph(e.graph());return r.forEach(e.nodes(),(function(n){e.children(n).length||t.setNode(n,e.node(n))})),r.forEach(e.edges(),(function(n){t.setEdge(n,e.edge(n))})),t},successorWeights:function(e){var t=r.map(e.nodes(),(function(t){var n={};return r.forEach(e.outEdges(t),(function(t){n[t.w]=(n[t.w]||0)+e.edge(t).weight})),n}));return r.zipObject(e.nodes(),t)},predecessorWeights:function(e){var t=r.map(e.nodes(),(function(t){var n={};return r.forEach(e.inEdges(t),(function(t){n[t.v]=(n[t.v]||0)+e.edge(t).weight})),n}));return r.zipObject(e.nodes(),t)},intersectRect:function(e,t){var n,r,i=e.x,o=e.y,a=t.x-i,s=t.y-o,l=e.width/2,c=e.height/2;if(!a&&!s)throw new Error("Not possible to find intersection inside of the rectangle");Math.abs(s)*l>Math.abs(a)*c?(s<0&&(c=-c),n=c*a/s,r=c):(a<0&&(l=-l),n=l,r=l*s/a);return{x:i+n,y:o+r}},buildLayerMatrix:function(e){var t=r.map(r.range(a(e)+1),(function(){return[]}));return r.forEach(e.nodes(),(function(n){var i=e.node(n),o=i.rank;r.isUndefined(o)||(t[o][i.order]=n)})),t},normalizeRanks:function(e){var t=r.min(r.map(e.nodes(),(function(t){return e.node(t).rank})));r.forEach(e.nodes(),(function(n){var i=e.node(n);r.has(i,"rank")&&(i.rank-=t)}))},removeEmptyRanks:function(e){var t=r.min(r.map(e.nodes(),(function(t){return e.node(t).rank}))),n=[];r.forEach(e.nodes(),(function(r){var i=e.node(r).rank-t;n[i]||(n[i]=[]),n[i].push(r)}));var i=0,o=e.graph().nodeRankFactor;r.forEach(n,(function(t,n){r.isUndefined(t)&&n%o!==0?--i:i&&r.forEach(t,(function(t){e.node(t).rank+=i}))}))},addBorderNode:function(e,t,n,r){var i={width:0,height:0};arguments.length>=4&&(i.rank=n,i.order=r);return o(e,"border",i,t)},maxRank:a,partition:function(e,t){var n={lhs:[],rhs:[]};return r.forEach(e,(function(e){t(e)?n.lhs.push(e):n.rhs.push(e)})),n},time:function(e,t){var n=r.now();try{return t()}finally{console.log(e+" time: "+(r.now()-n)+"ms")}},notime:function(e,t){return t()}}},6206:function(e){e.exports="0.8.5"},91535:function(e,t){"use strict";function n(e,t){switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}}function r(e,t){switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i={p:r,P:function(e,t){var i,o=e.match(/(P+)(p+)?/)||[],a=o[1],s=o[2];if(!s)return n(e,t);switch(a){case"P":i=t.dateTime({width:"short"});break;case"PP":i=t.dateTime({width:"medium"});break;case"PPP":i=t.dateTime({width:"long"});break;default:i=t.dateTime({width:"full"})}return i.replace("{{date}}",n(a,t)).replace("{{time}}",r(s,t))}};t.default=i,e.exports=t.default},33484:function(e){var t=function(){this.Diff_Timeout=1,this.Diff_EditCost=4,this.Match_Threshold=.5,this.Match_Distance=1e3,this.Patch_DeleteThreshold=.5,this.Patch_Margin=4,this.Match_MaxBits=32},n=-1;t.Diff=function(e,t){return[e,t]},t.prototype.diff_main=function(e,n,r,i){"undefined"==typeof i&&(i=this.Diff_Timeout<=0?Number.MAX_VALUE:(new Date).getTime()+1e3*this.Diff_Timeout);var o=i;if(null==e||null==n)throw new Error("Null input. (diff_main)");if(e==n)return e?[new t.Diff(0,e)]:[];"undefined"==typeof r&&(r=!0);var a=r,s=this.diff_commonPrefix(e,n),l=e.substring(0,s);e=e.substring(s),n=n.substring(s),s=this.diff_commonSuffix(e,n);var c=e.substring(e.length-s);e=e.substring(0,e.length-s),n=n.substring(0,n.length-s);var u=this.diff_compute_(e,n,a,o);return l&&u.unshift(new t.Diff(0,l)),c&&u.push(new t.Diff(0,c)),this.diff_cleanupMerge(u),u},t.prototype.diff_compute_=function(e,r,i,o){var a;if(!e)return[new t.Diff(1,r)];if(!r)return[new t.Diff(n,e)];var s=e.length>r.length?e:r,l=e.length>r.length?r:e,c=s.indexOf(l);if(-1!=c)return a=[new t.Diff(1,s.substring(0,c)),new t.Diff(0,l),new t.Diff(1,s.substring(c+l.length))],e.length>r.length&&(a[0][0]=a[2][0]=n),a;if(1==l.length)return[new t.Diff(n,e),new t.Diff(1,r)];var u=this.diff_halfMatch_(e,r);if(u){var d=u[0],f=u[1],h=u[2],p=u[3],m=u[4],g=this.diff_main(d,h,i,o),v=this.diff_main(f,p,i,o);return g.concat([new t.Diff(0,m)],v)}return i&&e.length>100&&r.length>100?this.diff_lineMode_(e,r,o):this.diff_bisect_(e,r,o)},t.prototype.diff_lineMode_=function(e,r,i){var o=this.diff_linesToChars_(e,r);e=o.chars1,r=o.chars2;var a=o.lineArray,s=this.diff_main(e,r,!1,i);this.diff_charsToLines_(s,a),this.diff_cleanupSemantic(s),s.push(new t.Diff(0,""));for(var l=0,c=0,u=0,d="",f="";l=1&&u>=1){s.splice(l-c-u,c+u),l=l-c-u;for(var h=this.diff_main(d,f,!1,i),p=h.length-1;p>=0;p--)s.splice(l,0,h[p]);l+=h.length}u=0,c=0,d="",f=""}l++}return s.pop(),s},t.prototype.diff_bisect_=function(e,r,i){for(var o=e.length,a=r.length,s=Math.ceil((o+a)/2),l=s,c=2*s,u=new Array(c),d=new Array(c),f=0;fi);b++){for(var x=-b+m;x<=b-g;x+=2){for(var w=l+x,k=(E=x==-b||x!=b&&u[w-1]o)g+=2;else if(k>a)m+=2;else if(p){if((C=l+h-x)>=0&&C=(S=o-d[C]))return this.diff_bisectSplit_(e,r,E,k,i)}}for(var _=-b+v;_<=b-y;_+=2){for(var S,C=l+_,j=(S=_==-b||_!=b&&d[C-1]o)y+=2;else if(j>a)v+=2;else if(!p){if((w=l+h-_)>=0&&w=(S=o-S))return this.diff_bisectSplit_(e,r,E,k,i)}}}}return[new t.Diff(n,e),new t.Diff(1,r)]},t.prototype.diff_bisectSplit_=function(e,t,n,r,i){var o=e.substring(0,n),a=t.substring(0,r),s=e.substring(n),l=t.substring(r),c=this.diff_main(o,a,!1,i),u=this.diff_main(s,l,!1,i);return c.concat(u)},t.prototype.diff_linesToChars_=function(e,t){var n=[],r={};function i(e){for(var t="",i=0,a=-1,s=n.length;ar?e=e.substring(n-r):nt.length?e:t,r=e.length>t.length?t:e;if(n.length<4||2*r.length=e.length?[r,o,a,s,u]:null}var a,s,l,c,u,d=o(n,r,Math.ceil(n.length/4)),f=o(n,r,Math.ceil(n.length/2));return d||f?(a=f?d&&d[4].length>f[4].length?d:f:d,e.length>t.length?(s=a[0],l=a[1],c=a[2],u=a[3]):(c=a[0],u=a[1],s=a[2],l=a[3]),[s,l,c,u,a[4]]):null},t.prototype.diff_cleanupSemantic=function(e){for(var r=!1,i=[],o=0,a=null,s=0,l=0,c=0,u=0,d=0;s0?i[o-1]:-1,l=0,c=0,u=0,d=0,a=null,r=!0)),s++;for(r&&this.diff_cleanupMerge(e),this.diff_cleanupSemanticLossless(e),s=1;s=m?(p>=f.length/2||p>=h.length/2)&&(e.splice(s,0,new t.Diff(0,h.substring(0,p))),e[s-1][1]=f.substring(0,f.length-p),e[s+1][1]=h.substring(p),s++):(m>=f.length/2||m>=h.length/2)&&(e.splice(s,0,new t.Diff(0,f.substring(0,m))),e[s-1][0]=1,e[s-1][1]=h.substring(0,h.length-m),e[s+1][0]=n,e[s+1][1]=f.substring(m),s++),s++}s++}},t.prototype.diff_cleanupSemanticLossless=function(e){function n(e,n){if(!e||!n)return 6;var r=e.charAt(e.length-1),i=n.charAt(0),o=r.match(t.nonAlphaNumericRegex_),a=i.match(t.nonAlphaNumericRegex_),s=o&&r.match(t.whitespaceRegex_),l=a&&i.match(t.whitespaceRegex_),c=s&&r.match(t.linebreakRegex_),u=l&&i.match(t.linebreakRegex_),d=c&&e.match(t.blanklineEndRegex_),f=u&&n.match(t.blanklineStartRegex_);return d||f?5:c||u?4:o&&!s&&l?3:s||l?2:o||a?1:0}for(var r=1;r=f&&(f=h,c=i,u=o,d=a)}e[r-1][1]!=c&&(c?e[r-1][1]=c:(e.splice(r-1,1),r--),e[r][1]=u,d?e[r+1][1]=d:(e.splice(r+1,1),r--))}r++}},t.nonAlphaNumericRegex_=/[^a-zA-Z0-9]/,t.whitespaceRegex_=/\s/,t.linebreakRegex_=/[\r\n]/,t.blanklineEndRegex_=/\n\r?\n$/,t.blanklineStartRegex_=/^\r?\n\r?\n/,t.prototype.diff_cleanupEfficiency=function(e){for(var r=!1,i=[],o=0,a=null,s=0,l=!1,c=!1,u=!1,d=!1;s0?i[o-1]:-1,u=d=!1),r=!0)),s++;r&&this.diff_cleanupMerge(e)},t.prototype.diff_cleanupMerge=function(e){e.push(new t.Diff(0,""));for(var r,i=0,o=0,a=0,s="",l="";i1?(0!==o&&0!==a&&(0!==(r=this.diff_commonPrefix(l,s))&&(i-o-a>0&&0==e[i-o-a-1][0]?e[i-o-a-1][1]+=l.substring(0,r):(e.splice(0,0,new t.Diff(0,l.substring(0,r))),i++),l=l.substring(r),s=s.substring(r)),0!==(r=this.diff_commonSuffix(l,s))&&(e[i][1]=l.substring(l.length-r)+e[i][1],l=l.substring(0,l.length-r),s=s.substring(0,s.length-r))),i-=o+a,e.splice(i,o+a),s.length&&(e.splice(i,0,new t.Diff(n,s)),i++),l.length&&(e.splice(i,0,new t.Diff(1,l)),i++),i++):0!==i&&0==e[i-1][0]?(e[i-1][1]+=e[i][1],e.splice(i,1)):i++,a=0,o=0,s="",l=""}""===e[e.length-1][1]&&e.pop();var c=!1;for(i=1;it));r++)a=i,s=o;return e.length!=r&&e[r][0]===n?s:s+(t-a)},t.prototype.diff_prettyHtml=function(e){for(var t=[],r=/&/g,i=//g,a=/\n/g,s=0;s");switch(l){case 1:t[s]=''+c+"";break;case n:t[s]=''+c+"";break;case 0:t[s]=""+c+""}}return t.join("")},t.prototype.diff_text1=function(e){for(var t=[],n=0;nthis.Match_MaxBits)throw new Error("Pattern too long for this browser.");var r=this.match_alphabet_(t),i=this;function o(e,r){var o=e/t.length,a=Math.abs(n-r);return i.Match_Distance?o+a/i.Match_Distance:a?1:o}var a=this.Match_Threshold,s=e.indexOf(t,n);-1!=s&&(a=Math.min(o(0,s),a),-1!=(s=e.lastIndexOf(t,n+t.length))&&(a=Math.min(o(0,s),a)));var l,c,u=1<=p;v--){var y=r[e.charAt(v-1)];if(g[v]=0===h?(g[v+1]<<1|1)&y:(g[v+1]<<1|1)&y|(d[v+1]|d[v])<<1|1|d[v+1],g[v]&u){var b=o(h,v-1);if(b<=a){if(a=b,!((s=v-1)>n))break;p=Math.max(1,2*n-s)}}}if(o(h+1,n)>a)break;d=g}return s},t.prototype.match_alphabet_=function(e){for(var t={},n=0;n2&&(this.diff_cleanupSemantic(a),this.diff_cleanupEfficiency(a));else if(e&&"object"==typeof e&&"undefined"==typeof r&&"undefined"==typeof i)a=e,o=this.diff_text1(a);else if("string"==typeof e&&r&&"object"==typeof r&&"undefined"==typeof i)o=e,a=r;else{if("string"!=typeof e||"string"!=typeof r||!i||"object"!=typeof i)throw new Error("Unknown call format to patch_make.");o=e,a=i}if(0===a.length)return[];for(var s=[],l=new t.patch_obj,c=0,u=0,d=0,f=o,h=o,p=0;p=2*this.Patch_Margin&&c&&(this.patch_addContext_(l,f),s.push(l),l=new t.patch_obj,c=0,f=h,u=d)}1!==m&&(u+=g.length),m!==n&&(d+=g.length)}return c&&(this.patch_addContext_(l,f),s.push(l)),s},t.prototype.patch_deepCopy=function(e){for(var n=[],r=0;rthis.Match_MaxBits?-1!=(s=this.match_main(t,u.substring(0,this.Match_MaxBits),c))&&(-1==(d=this.match_main(t,u.substring(u.length-this.Match_MaxBits),c+u.length-this.Match_MaxBits))||s>=d)&&(s=-1):s=this.match_main(t,u,c),-1==s)o[a]=!1,i-=e[a].length2-e[a].length1;else if(o[a]=!0,i=s-c,u==(l=-1==d?t.substring(s,s+u.length):t.substring(s,d+this.Match_MaxBits)))t=t.substring(0,s)+this.diff_text2(e[a].diffs)+t.substring(s+u.length);else{var f=this.diff_main(u,l,!1);if(u.length>this.Match_MaxBits&&this.diff_levenshtein(f)/u.length>this.Patch_DeleteThreshold)o[a]=!1;else{this.diff_cleanupSemanticLossless(f);for(var h,p=0,m=0;ma[0][1].length){var s=n-a[0][1].length;a[0][1]=r.substring(a[0][1].length)+a[0][1],o.start1-=s,o.start2-=s,o.length1+=s,o.length2+=s}if(0==(a=(o=e[e.length-1]).diffs).length||0!=a[a.length-1][0])a.push(new t.Diff(0,r)),o.length1+=n,o.length2+=n;else if(n>a[a.length-1][1].length){s=n-a[a.length-1][1].length;a[a.length-1][1]+=r.substring(0,s),o.length1+=s,o.length2+=s}return r},t.prototype.patch_splitMax=function(e){for(var r=this.Match_MaxBits,i=0;i2*r?(c.length1+=f.length,a+=f.length,u=!1,c.diffs.push(new t.Diff(d,f)),o.diffs.shift()):(f=f.substring(0,r-c.length1-this.Patch_Margin),c.length1+=f.length,a+=f.length,0===d?(c.length2+=f.length,s+=f.length):u=!1,c.diffs.push(new t.Diff(d,f)),f==o.diffs[0][1]?o.diffs.shift():o.diffs[0][1]=o.diffs[0][1].substring(f.length))}l=(l=this.diff_text2(c.diffs)).substring(l.length-this.Patch_Margin);var h=this.diff_text1(o.diffs).substring(0,this.Patch_Margin);""!==h&&(c.length1+=h.length,c.length2+=h.length,0!==c.diffs.length&&0===c.diffs[c.diffs.length-1][0]?c.diffs[c.diffs.length-1][1]+=h:c.diffs.push(new t.Diff(0,h))),u||e.splice(++i,0,c)}}},t.prototype.patch_toText=function(e){for(var t=[],n=0;ne.high)}},{key:"touches",value:function(e){return!(this.high+1e.high)}},{key:"add",value:function(t){return new e(Math.min(this.low,t.low),Math.max(this.high,t.high))}},{key:"subtract",value:function(t){return t.low<=this.low&&t.high>=this.high?[]:t.low>this.low&&t.high0&&(o=l.removeMin(),(a=s[o]).distance!==Number.POSITIVE_INFINITY);)r(o).forEach(c);return s}(e,String(t),n||o,r||function(t){return e.outEdges(t)})};var o=r.constant(1)},86050:function(e,t,n){var r=n(90980),i=n(18172);e.exports=function(e){return r.filter(i(e),(function(t){return t.length>1||1===t.length&&e.hasEdge(t[0],t[0])}))}},65053:function(e,t,n){var r=n(90980);e.exports=function(e,t,n){return function(e,t,n){var r={},i=e.nodes();return i.forEach((function(e){r[e]={},r[e][e]={distance:0},i.forEach((function(t){e!==t&&(r[e][t]={distance:Number.POSITIVE_INFINITY})})),n(e).forEach((function(n){var i=n.v===e?n.w:n.v,o=t(n);r[e][i]={distance:o,predecessor:e}}))})),i.forEach((function(e){var t=r[e];i.forEach((function(n){var o=r[n];i.forEach((function(n){var r=o[e],i=t[n],a=o[n],s=r.distance+i.distance;s0;){if(n=l.removeMin(),r.has(s,n))a.setEdge(n,s[n]);else{if(u)throw new Error("Input graph is not connected: "+e);u=!0}e.nodeEdges(n).forEach(c)}return a}},18172:function(e,t,n){var r=n(90980);e.exports=function(e){var t=0,n=[],i={},o=[];function a(s){var l=i[s]={onStack:!0,lowlink:t,index:t++};if(n.push(s),e.successors(s).forEach((function(e){r.has(i,e)?i[e].onStack&&(l.lowlink=Math.min(l.lowlink,i[e].index)):(a(e),l.lowlink=Math.min(l.lowlink,i[e].lowlink))})),l.lowlink===l.index){var c,u=[];do{c=n.pop(),i[c].onStack=!1,u.push(c)}while(s!==c);o.push(u)}}return e.nodes().forEach((function(e){r.has(i,e)||a(e)})),o}},11731:function(e,t,n){var r=n(90980);function i(e){var t={},n={},i=[];if(r.each(e.sinks(),(function a(s){if(r.has(n,s))throw new o;r.has(t,s)||(n[s]=!0,t[s]=!0,r.each(e.predecessors(s),a),delete n[s],i.push(s))})),r.size(t)!==e.nodeCount())throw new o;return i}function o(){}e.exports=i,i.CycleException=o,o.prototype=new Error},96071:function(e,t,n){var r=n(90980);function i(){this._arr=[],this._keyIndices={}}e.exports=i,i.prototype.size=function(){return this._arr.length},i.prototype.keys=function(){return this._arr.map((function(e){return e.key}))},i.prototype.has=function(e){return r.has(this._keyIndices,e)},i.prototype.priority=function(e){var t=this._keyIndices[e];if(void 0!==t)return this._arr[t].priority},i.prototype.min=function(){if(0===this.size())throw new Error("Queue underflow");return this._arr[0].key},i.prototype.add=function(e,t){var n=this._keyIndices;if(e=String(e),!r.has(n,e)){var i=this._arr,o=i.length;return n[e]=o,i.push({key:e,priority:t}),this._decrease(o),!0}return!1},i.prototype.removeMin=function(){this._swap(0,this._arr.length-1);var e=this._arr.pop();return delete this._keyIndices[e.key],this._heapify(0),e.key},i.prototype.decrease=function(e,t){var n=this._keyIndices[e];if(t>this._arr[n].priority)throw new Error("New priority is greater than current priority. Key: "+e+" Old: "+this._arr[n].priority+" New: "+t);this._arr[n].priority=t,this._decrease(n)},i.prototype._heapify=function(e){var t=this._arr,n=2*e,r=n+1,i=e;n>1].prioritya){var s=o;o=a,a=s}return o+"\x01"+a+"\x01"+(r.isUndefined(i)?"\0":i)}function c(e,t,n,r){var i=""+t,o=""+n;if(!e&&i>o){var a=i;i=o,o=a}var s={v:i,w:o};return r&&(s.name=r),s}function u(e,t){return l(e,t.v,t.w,t.name)}o.prototype._nodeCount=0,o.prototype._edgeCount=0,o.prototype.isDirected=function(){return this._isDirected},o.prototype.isMultigraph=function(){return this._isMultigraph},o.prototype.isCompound=function(){return this._isCompound},o.prototype.setGraph=function(e){return this._label=e,this},o.prototype.graph=function(){return this._label},o.prototype.setDefaultNodeLabel=function(e){return r.isFunction(e)||(e=r.constant(e)),this._defaultNodeLabelFn=e,this},o.prototype.nodeCount=function(){return this._nodeCount},o.prototype.nodes=function(){return r.keys(this._nodes)},o.prototype.sources=function(){var e=this;return r.filter(this.nodes(),(function(t){return r.isEmpty(e._in[t])}))},o.prototype.sinks=function(){var e=this;return r.filter(this.nodes(),(function(t){return r.isEmpty(e._out[t])}))},o.prototype.setNodes=function(e,t){var n=arguments,i=this;return r.each(e,(function(e){n.length>1?i.setNode(e,t):i.setNode(e)})),this},o.prototype.setNode=function(e,t){return r.has(this._nodes,e)?(arguments.length>1&&(this._nodes[e]=t),this):(this._nodes[e]=arguments.length>1?t:this._defaultNodeLabelFn(e),this._isCompound&&(this._parent[e]=i,this._children[e]={},this._children["\0"][e]=!0),this._in[e]={},this._preds[e]={},this._out[e]={},this._sucs[e]={},++this._nodeCount,this)},o.prototype.node=function(e){return this._nodes[e]},o.prototype.hasNode=function(e){return r.has(this._nodes,e)},o.prototype.removeNode=function(e){var t=this;if(r.has(this._nodes,e)){var n=function(e){t.removeEdge(t._edgeObjs[e])};delete this._nodes[e],this._isCompound&&(this._removeFromParentsChildList(e),delete this._parent[e],r.each(this.children(e),(function(e){t.setParent(e)})),delete this._children[e]),r.each(r.keys(this._in[e]),n),delete this._in[e],delete this._preds[e],r.each(r.keys(this._out[e]),n),delete this._out[e],delete this._sucs[e],--this._nodeCount}return this},o.prototype.setParent=function(e,t){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(r.isUndefined(t))t=i;else{for(var n=t+="";!r.isUndefined(n);n=this.parent(n))if(n===e)throw new Error("Setting "+t+" as parent of "+e+" would create a cycle");this.setNode(t)}return this.setNode(e),this._removeFromParentsChildList(e),this._parent[e]=t,this._children[t][e]=!0,this},o.prototype._removeFromParentsChildList=function(e){delete this._children[this._parent[e]][e]},o.prototype.parent=function(e){if(this._isCompound){var t=this._parent[e];if(t!==i)return t}},o.prototype.children=function(e){if(r.isUndefined(e)&&(e=i),this._isCompound){var t=this._children[e];if(t)return r.keys(t)}else{if(e===i)return this.nodes();if(this.hasNode(e))return[]}},o.prototype.predecessors=function(e){var t=this._preds[e];if(t)return r.keys(t)},o.prototype.successors=function(e){var t=this._sucs[e];if(t)return r.keys(t)},o.prototype.neighbors=function(e){var t=this.predecessors(e);if(t)return r.union(t,this.successors(e))},o.prototype.isLeaf=function(e){return 0===(this.isDirected()?this.successors(e):this.neighbors(e)).length},o.prototype.filterNodes=function(e){var t=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});t.setGraph(this.graph());var n=this;r.each(this._nodes,(function(n,r){e(r)&&t.setNode(r,n)})),r.each(this._edgeObjs,(function(e){t.hasNode(e.v)&&t.hasNode(e.w)&&t.setEdge(e,n.edge(e))}));var i={};function o(e){var r=n.parent(e);return void 0===r||t.hasNode(r)?(i[e]=r,r):r in i?i[r]:o(r)}return this._isCompound&&r.each(t.nodes(),(function(e){t.setParent(e,o(e))})),t},o.prototype.setDefaultEdgeLabel=function(e){return r.isFunction(e)||(e=r.constant(e)),this._defaultEdgeLabelFn=e,this},o.prototype.edgeCount=function(){return this._edgeCount},o.prototype.edges=function(){return r.values(this._edgeObjs)},o.prototype.setPath=function(e,t){var n=this,i=arguments;return r.reduce(e,(function(e,r){return i.length>1?n.setEdge(e,r,t):n.setEdge(e,r),r})),this},o.prototype.setEdge=function(){var e,t,n,i,o=!1,s=arguments[0];"object"===typeof s&&null!==s&&"v"in s?(e=s.v,t=s.w,n=s.name,2===arguments.length&&(i=arguments[1],o=!0)):(e=s,t=arguments[1],n=arguments[3],arguments.length>2&&(i=arguments[2],o=!0)),e=""+e,t=""+t,r.isUndefined(n)||(n=""+n);var u=l(this._isDirected,e,t,n);if(r.has(this._edgeLabels,u))return o&&(this._edgeLabels[u]=i),this;if(!r.isUndefined(n)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(e),this.setNode(t),this._edgeLabels[u]=o?i:this._defaultEdgeLabelFn(e,t,n);var d=c(this._isDirected,e,t,n);return e=d.v,t=d.w,Object.freeze(d),this._edgeObjs[u]=d,a(this._preds[t],e),a(this._sucs[e],t),this._in[t][u]=d,this._out[e][u]=d,this._edgeCount++,this},o.prototype.edge=function(e,t,n){var r=1===arguments.length?u(this._isDirected,arguments[0]):l(this._isDirected,e,t,n);return this._edgeLabels[r]},o.prototype.hasEdge=function(e,t,n){var i=1===arguments.length?u(this._isDirected,arguments[0]):l(this._isDirected,e,t,n);return r.has(this._edgeLabels,i)},o.prototype.removeEdge=function(e,t,n){var r=1===arguments.length?u(this._isDirected,arguments[0]):l(this._isDirected,e,t,n),i=this._edgeObjs[r];return i&&(e=i.v,t=i.w,delete this._edgeLabels[r],delete this._edgeObjs[r],s(this._preds[t],e),s(this._sucs[e],t),delete this._in[t][r],delete this._out[e][r],this._edgeCount--),this},o.prototype.inEdges=function(e,t){var n=this._in[e];if(n){var i=r.values(n);return t?r.filter(i,(function(e){return e.v===t})):i}},o.prototype.outEdges=function(e,t){var n=this._out[e];if(n){var i=r.values(n);return t?r.filter(i,(function(e){return e.w===t})):i}},o.prototype.nodeEdges=function(e,t){var n=this.inEdges(e,t);if(n)return n.concat(this.outEdges(e,t))}},95828:function(e,t,n){e.exports={Graph:n(41311),version:n(54161)}},15710:function(e,t,n){var r=n(90980),i=n(41311);function o(e){return r.map(e.nodes(),(function(t){var n=e.node(t),i=e.parent(t),o={v:t};return r.isUndefined(n)||(o.value=n),r.isUndefined(i)||(o.parent=i),o}))}function a(e){return r.map(e.edges(),(function(t){var n=e.edge(t),i={v:t.v,w:t.w};return r.isUndefined(t.name)||(i.name=t.name),r.isUndefined(n)||(i.value=n),i}))}e.exports={write:function(e){var t={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:o(e),edges:a(e)};r.isUndefined(e.graph())||(t.value=r.clone(e.graph()));return t},read:function(e){var t=new i(e.options).setGraph(e.value);return r.each(e.nodes,(function(e){t.setNode(e.v,e.value),e.parent&&t.setParent(e.v,e.parent)})),r.each(e.edges,(function(e){t.setEdge({v:e.v,w:e.w,name:e.name},e.value)})),t}}},90980:function(e,t,n){var r;try{r={clone:n(68787),constant:n(71547),each:n(29430),filter:n(80086),has:n(17805),isArray:n(93629),isEmpty:n(66364),isFunction:n(74786),isUndefined:n(42530),keys:n(12742),map:n(72034),reduce:n(25080),size:n(69467),transform:n(25653),union:n(26310),values:n(92063)}}catch(i){}r||(r=window._),e.exports=r},54161:function(e){e.exports="2.1.8"},62110:function(e,t,n){"use strict";var r=n(48309),i={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},o={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function l(e){return r.isMemo(e)?a:s[e.$$typeof]||i}s[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[r.Memo]=a;var c=Object.defineProperty,u=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,f=Object.getOwnPropertyDescriptor,h=Object.getPrototypeOf,p=Object.prototype;e.exports=function e(t,n,r){if("string"!==typeof n){if(p){var i=h(n);i&&i!==p&&e(t,i,r)}var a=u(n);d&&(a=a.concat(d(n)));for(var s=l(t),m=l(n),g=0;g-1},R.prototype.set=function(e,t){var n=this.__data__,r=Z(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},O.prototype.clear=function(){this.__data__={hash:new A,map:new(j||R),string:new A}},O.prototype.delete=function(e){return L(this,e).delete(e)},O.prototype.get=function(e){return L(this,e).get(e)},O.prototype.has=function(e){return L(this,e).has(e)},O.prototype.set=function(e,t){return L(this,e).set(e,t),this};var N=F((function(e){var t;e=null==(t=e)?"":function(e){if("string"==typeof e)return e;if(W(e))return M?M.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}(t);var n=[];return l.test(e)&&n.push(""),e.replace(c,(function(e,t,r,i){n.push(r?i.replace(u,"$1"):t||e)})),n}));function $(e){if("string"==typeof e||W(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function F(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function n(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=e.apply(this,r);return n.cache=o.set(i,a),a};return n.cache=new(F.Cache||O),n}F.Cache=O;var z=Array.isArray;function B(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function W(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==k.call(e)}e.exports=function(e,t,n){var r=null==e?void 0:I(e,t);return void 0===r?n:r}},32467:function(e,t,n){e=n.nmd(e);var r="__lodash_hash_undefined__",i=9007199254740991,o="[object Arguments]",a="[object Array]",s="[object Boolean]",l="[object Date]",c="[object Error]",u="[object Function]",d="[object Map]",f="[object Number]",h="[object Object]",p="[object Promise]",m="[object RegExp]",g="[object Set]",v="[object String]",y="[object Symbol]",b="[object WeakMap]",x="[object ArrayBuffer]",w="[object DataView]",k=/^\[object .+?Constructor\]$/,_=/^(?:0|[1-9]\d*)$/,S={};S["[object Float32Array]"]=S["[object Float64Array]"]=S["[object Int8Array]"]=S["[object Int16Array]"]=S["[object Int32Array]"]=S["[object Uint8Array]"]=S["[object Uint8ClampedArray]"]=S["[object Uint16Array]"]=S["[object Uint32Array]"]=!0,S[o]=S[a]=S[x]=S[s]=S[w]=S[l]=S[c]=S[u]=S[d]=S[f]=S[h]=S[m]=S[g]=S[v]=S[b]=!1;var C="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,j="object"==typeof self&&self&&self.Object===Object&&self,E=C||j||Function("return this")(),T=t&&!t.nodeType&&t,M=T&&e&&!e.nodeType&&e,A=M&&M.exports===T,R=A&&C.process,O=function(){try{return R&&R.binding&&R.binding("util")}catch(e){}}(),Z=O&&O.isTypedArray;function I(e,t){for(var n=-1,r=null==e?0:e.length;++ns))return!1;var c=o.get(e);if(c&&o.get(t))return c==t;var u=-1,d=!0,f=2&n?new be:void 0;for(o.set(e,t),o.set(t,e);++u-1},ve.prototype.set=function(e,t){var n=this.__data__,r=ke(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},ye.prototype.clear=function(){this.size=0,this.__data__={hash:new ge,map:new(ie||ve),string:new ge}},ye.prototype.delete=function(e){var t=Ae(this,e).delete(e);return this.size-=t?1:0,t},ye.prototype.get=function(e){return Ae(this,e).get(e)},ye.prototype.has=function(e){return Ae(this,e).has(e)},ye.prototype.set=function(e,t){var n=Ae(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},be.prototype.add=be.prototype.push=function(e){return this.__data__.set(e,r),this},be.prototype.has=function(e){return this.__data__.has(e)},xe.prototype.clear=function(){this.__data__=new ve,this.size=0},xe.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},xe.prototype.get=function(e){return this.__data__.get(e)},xe.prototype.has=function(e){return this.__data__.has(e)},xe.prototype.set=function(e,t){var n=this.__data__;if(n instanceof ve){var r=n.__data__;if(!ie||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new ye(r)}return n.set(e,t),this.size=n.size,this};var Oe=ee?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var n=-1,r=null==e?0:e.length,i=0,o=[];++n-1&&e%1==0&&e-1&&e%1==0&&e<=i}function Be(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function We(e){return null!=e&&"object"==typeof e}var He=Z?function(e){return function(t){return e(t)}}(Z):function(e){return We(e)&&ze(e.length)&&!!S[_e(e)]};function Ue(e){return null!=(t=e)&&ze(t.length)&&!Fe(t)?we(e):Ee(e);var t}e.exports=function(e,t){return Ce(e,t)}},50908:function(e,t,n){var r=n(68136)(n(97009),"DataView");e.exports=r},29676:function(e,t,n){var r=n(85403),i=n(62747),o=n(16037),a=n(94154),s=n(77728);function l(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t-1}},32683:function(e){e.exports=function(e,t,n){for(var r=-1,i=null==e?0:e.length;++r0&&o(u)?n>1?e(u,n-1,o,a,s):r(s,u):a||(s[s.length]=u)}return s}},85099:function(e,t,n){var r=n(30372)();e.exports=r},15358:function(e,t,n){var r=n(85099),i=n(12742);e.exports=function(e,t){return e&&r(e,t,i)}},98667:function(e,t,n){var r=n(43082),i=n(69793);e.exports=function(e,t){for(var n=0,o=(t=r(t,e)).length;null!=e&&nt}},97852:function(e){var t=Object.prototype.hasOwnProperty;e.exports=function(e,n){return null!=e&&t.call(e,n)}},90529:function(e){e.exports=function(e,t){return null!=e&&t in Object(e)}},24842:function(e,t,n){var r=n(2045),i=n(50505),o=n(77167);e.exports=function(e,t,n){return t===t?o(e,t,n):r(e,i,n)}},4906:function(e,t,n){var r=n(39066),i=n(43141);e.exports=function(e){return i(e)&&"[object Arguments]"==r(e)}},71848:function(e,t,n){var r=n(93355),i=n(43141);e.exports=function e(t,n,o,a,s){return t===n||(null==t||null==n||!i(t)&&!i(n)?t!==t&&n!==n:r(t,n,o,a,e,s))}},93355:function(e,t,n){var r=n(22854),i=n(15305),o=n(92206),a=n(88078),s=n(88383),l=n(93629),c=n(5174),u=n(19102),d="[object Arguments]",f="[object Array]",h="[object Object]",p=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,m,g,v){var y=l(e),b=l(t),x=y?f:s(e),w=b?f:s(t),k=(x=x==d?h:x)==h,_=(w=w==d?h:w)==h,S=x==w;if(S&&c(e)){if(!c(t))return!1;y=!0,k=!1}if(S&&!k)return v||(v=new r),y||u(e)?i(e,t,n,m,g,v):o(e,t,x,n,m,g,v);if(!(1&n)){var C=k&&p.call(e,"__wrapped__"),j=_&&p.call(t,"__wrapped__");if(C||j){var E=C?e.value():e,T=j?t.value():t;return v||(v=new r),g(E,T,n,m,v)}}return!!S&&(v||(v=new r),a(e,t,n,m,g,v))}},53085:function(e,t,n){var r=n(88383),i=n(43141);e.exports=function(e){return i(e)&&"[object Map]"==r(e)}},8856:function(e,t,n){var r=n(22854),i=n(71848);e.exports=function(e,t,n,o){var a=n.length,s=a,l=!o;if(null==e)return!s;for(e=Object(e);a--;){var c=n[a];if(l&&c[2]?c[1]!==e[c[0]]:!(c[0]in e))return!1}for(;++a=200){var m=t?null:s(e);if(m)return l(m);f=!1,u=a,p=new r}else p=t?[]:h;e:for(;++ct||a&&s&&c&&!l&&!u||i&&s&&c||!n&&c||!o)return 1;if(!i&&!a&&!u&&e=l?c:c*("desc"==n[i]?-1:1)}return e.index-t.index}},10291:function(e){e.exports=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n1?n[o-1]:void 0,s=o>2?n[2]:void 0;for(a=e.length>3&&"function"==typeof a?(o--,a):void 0,s&&i(n[0],n[1],s)&&(a=o<3?void 0:a,o=1),t=Object(t);++r-1?s[l?t[c]:c]:void 0}}},56381:function(e,t,n){var r=n(7255),i=n(3195),o=n(91495);e.exports=function(e){return function(t,n,a){return a&&"number"!=typeof a&&i(t,n,a)&&(n=a=void 0),t=o(t),void 0===n?(n=t,t=0):n=o(n),a=void 0===a?tu))return!1;var f=l.get(e),h=l.get(t);if(f&&h)return f==t&&h==e;var p=-1,m=!0,g=2&n?new r:void 0;for(l.set(e,t),l.set(t,e);++p-1&&e%1==0&&e-1}},87109:function(e,t,n){var r=n(27112);e.exports=function(e,t){var n=this.__data__,i=r(n,e);return i<0?(++this.size,n.push([e,t])):n[i][1]=t,this}},34086:function(e,t,n){var r=n(29676),i=n(38384),o=n(95797);e.exports=function(){this.size=0,this.__data__={hash:new r,map:new(o||i),string:new r}}},9255:function(e,t,n){var r=n(32799);e.exports=function(e){var t=r(this,e).delete(e);return this.size-=t?1:0,t}},29186:function(e,t,n){var r=n(32799);e.exports=function(e){return r(this,e).get(e)}},13423:function(e,t,n){var r=n(32799);e.exports=function(e){return r(this,e).has(e)}},73739:function(e,t,n){var r=n(32799);e.exports=function(e,t){var n=r(this,e),i=n.size;return n.set(e,t),this.size+=n.size==i?0:1,this}},90234:function(e){e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}},50284:function(e){e.exports=function(e,t){return function(n){return null!=n&&(n[e]===t&&(void 0!==t||e in Object(n)))}}},14634:function(e,t,n){var r=n(49151);e.exports=function(e){var t=r(e,(function(e){return 500===n.size&&n.clear(),e})),n=t.cache;return t}},49620:function(e,t,n){var r=n(68136)(Object,"create");e.exports=r},75964:function(e,t,n){var r=n(12709)(Object.keys,Object);e.exports=r},4221:function(e){e.exports=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}},49494:function(e,t,n){e=n.nmd(e);var r=n(31032),i=t&&!t.nodeType&&t,o=i&&e&&!e.nodeType&&e,a=o&&o.exports===i&&r.process,s=function(){try{var e=o&&o.require&&o.require("util").types;return e||a&&a.binding&&a.binding("util")}catch(t){}}();e.exports=s},43581:function(e){var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},12709:function(e){e.exports=function(e,t){return function(n){return e(t(n))}}},64262:function(e,t,n){var r=n(13665),i=Math.max;e.exports=function(e,t,n){return t=i(void 0===t?e.length-1:t,0),function(){for(var o=arguments,a=-1,s=i(o.length-t,0),l=Array(s);++a0){if(++n>=800)return arguments[0]}else n=0;return e.apply(void 0,arguments)}}},20511:function(e,t,n){var r=n(38384);e.exports=function(){this.__data__=new r,this.size=0}},50835:function(e){e.exports=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}},90707:function(e){e.exports=function(e){return this.__data__.get(e)}},18832:function(e){e.exports=function(e){return this.__data__.has(e)}},35077:function(e,t,n){var r=n(38384),i=n(95797),o=n(78059);e.exports=function(e,t){var n=this.__data__;if(n instanceof r){var a=n.__data__;if(!i||a.length<199)return a.push([e,t]),this.size=++n.size,this;n=this.__data__=new o(a)}return n.set(e,t),this.size=n.size,this}},77167:function(e){e.exports=function(e,t,n){for(var r=n-1,i=e.length;++r2?t[2]:void 0;for(c&&o(t[0],t[1],c)&&(r=1);++n-1&&e%1==0&&e<=9007199254740991}},60103:function(e,t,n){var r=n(53085),i=n(16194),o=n(49494),a=o&&o.isMap,s=a?i(a):r;e.exports=s},8092:function(e){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},43141:function(e){e.exports=function(e){return null!=e&&"object"==typeof e}},93977:function(e,t,n){var r=n(39066),i=n(31137),o=n(43141),a=Function.prototype,s=Object.prototype,l=a.toString,c=s.hasOwnProperty,u=l.call(Object);e.exports=function(e){if(!o(e)||"[object Object]"!=r(e))return!1;var t=i(e);if(null===t)return!0;var n=c.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&l.call(n)==u}},36995:function(e,t,n){var r=n(48680),i=n(16194),o=n(49494),a=o&&o.isSet,s=a?i(a):r;e.exports=s},26769:function(e,t,n){var r=n(39066),i=n(93629),o=n(43141);e.exports=function(e){return"string"==typeof e||!i(e)&&o(e)&&"[object String]"==r(e)}},70152:function(e,t,n){var r=n(39066),i=n(43141);e.exports=function(e){return"symbol"==typeof e||i(e)&&"[object Symbol]"==r(e)}},19102:function(e,t,n){var r=n(68150),i=n(16194),o=n(49494),a=o&&o.isTypedArray,s=a?i(a):r;e.exports=s},42530:function(e){e.exports=function(e){return void 0===e}},12742:function(e,t,n){var r=n(47538),i=n(43654),o=n(21473);e.exports=function(e){return o(e)?r(e):i(e)}},73961:function(e,t,n){var r=n(47538),i=n(8664),o=n(21473);e.exports=function(e){return o(e)?r(e,!0):i(e)}},15727:function(e){e.exports=function(e){var t=null==e?0:e.length;return t?e[t-1]:void 0}},72034:function(e,t,n){var r=n(68950),i=n(56025),o=n(53849),a=n(93629);e.exports=function(e,t){return(a(e)?r:o)(e,i(t,3))}},37702:function(e,t,n){var r=n(32526),i=n(15358),o=n(56025);e.exports=function(e,t){var n={};return t=o(t,3),i(e,(function(e,i,o){r(n,i,t(e,i,o))})),n}},29627:function(e,t,n){var r=n(43079),i=n(81954),o=n(2100);e.exports=function(e){return e&&e.length?r(e,o,i):void 0}},49151:function(e,t,n){var r=n(78059);function i(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function n(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=e.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(i.Cache||r),n}i.Cache=r,e.exports=i},79286:function(e,t,n){var r=n(64173),i=n(39934)((function(e,t,n){r(e,t,n)}));e.exports=i},66452:function(e,t,n){var r=n(43079),i=n(92580),o=n(2100);e.exports=function(e){return e&&e.length?r(e,o,i):void 0}},43638:function(e,t,n){var r=n(43079),i=n(56025),o=n(92580);e.exports=function(e,t){return e&&e.length?r(e,i(t,2),o):void 0}},19694:function(e){e.exports=function(){}},50072:function(e,t,n){var r=n(97009);e.exports=function(){return r.Date.now()}},36460:function(e,t,n){var r=n(14980),i=n(27038)((function(e,t){return null==e?{}:r(e,t)}));e.exports=i},10038:function(e,t,n){var r=n(9586),i=n(4084),o=n(25823),a=n(69793);e.exports=function(e){return o(e)?r(a(e)):i(e)}},66222:function(e,t,n){var r=n(56381)();e.exports=r},25080:function(e,t,n){var r=n(32095),i=n(87927),o=n(56025),a=n(10750),s=n(93629);e.exports=function(e,t,n){var l=s(e)?r:a,c=arguments.length<3;return l(e,o(t,4),n,c,i)}},69467:function(e,t,n){var r=n(43654),i=n(88383),o=n(21473),a=n(26769),s=n(64651);e.exports=function(e){if(null==e)return 0;if(o(e))return a(e)?s(e):e.length;var t=i(e);return"[object Map]"==t||"[object Set]"==t?e.size:r(e).length}},64286:function(e,t,n){var r=n(55182),i=n(93226),o=n(58794),a=n(3195),s=o((function(e,t){if(null==e)return[];var n=t.length;return n>1&&a(e,t[0],t[1])?t=[]:n>2&&a(t[0],t[1],t[2])&&(t=[t[0]]),i(e,r(t,1),[])}));e.exports=s},68174:function(e){e.exports=function(){return[]}},49488:function(e){e.exports=function(){return!1}},91495:function(e,t,n){var r=n(42582),i=1/0;e.exports=function(e){return e?(e=r(e))===i||e===-1/0?17976931348623157e292*(e<0?-1:1):e===e?e:0:0===e?e:0}},39753:function(e,t,n){var r=n(91495);e.exports=function(e){var t=r(e),n=t%1;return t===t?n?t-n:t:0}},42582:function(e,t,n){var r=n(20821),i=n(8092),o=n(70152),a=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,l=/^0o[0-7]+$/i,c=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(o(e))return NaN;if(i(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=i(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=r(e);var n=s.test(e);return n||l.test(e)?c(e.slice(2),n?2:8):a.test(e)?NaN:+e}},6576:function(e,t,n){var r=n(64503),i=n(73961);e.exports=function(e){return r(e,i(e))}},63518:function(e,t,n){var r=n(2446);e.exports=function(e){return null==e?"":r(e)}},25653:function(e,t,n){var r=n(4550),i=n(65763),o=n(15358),a=n(56025),s=n(31137),l=n(93629),c=n(5174),u=n(74786),d=n(8092),f=n(19102);e.exports=function(e,t,n){var h=l(e),p=h||c(e)||f(e);if(t=a(t,4),null==n){var m=e&&e.constructor;n=p?h?new m:[]:d(e)&&u(m)?i(s(e)):{}}return(p?r:o)(e,(function(e,r,i){return t(n,e,r,i)})),n}},26310:function(e,t,n){var r=n(55182),i=n(58794),o=n(39602),a=n(56279),s=i((function(e){return o(r(e,1,a,!0))}));e.exports=s},30804:function(e,t,n){var r=n(63518),i=0;e.exports=function(e){var t=++i;return r(e)+t}},92063:function(e,t,n){var r=n(28019),i=n(12742);e.exports=function(e){return null==e?[]:r(e,i(e))}},84827:function(e,t,n){var r=n(18463),i=n(74166);e.exports=function(e,t){return i(e||[],t||[],r)}},31725:function(e){"use strict";var t=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;function i(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(i){return!1}}()?Object.assign:function(e,o){for(var a,s,l=i(e),c=1;cthis.max;)this.delete(this.oldest.key)},e.prototype.delete=function(e){var t=this.map.get(e);return!!t&&(t===this.newest&&(this.newest=t.older),t===this.oldest&&(this.oldest=t.newer),t.newer&&(t.newer.older=t.older),t.older&&(t.older.newer=t.newer),this.map.delete(e),this.dispose(t.value,e),!0)},e}(),f=new l.g7,h=Object.prototype.hasOwnProperty,p=void 0===(u=Array.from)?function(e){var t=[];return e.forEach((function(e){return t.push(e)})),t}:u;function m(e){var t=e.unsubscribe;"function"===typeof t&&(e.unsubscribe=void 0,t())}var g=[];function v(e,t){if(!e)throw new Error(t||"assertion failure")}function y(e){switch(e.length){case 0:throw new Error("unknown value");case 1:return e[0];case 2:throw e[1]}}var b=function(){function e(t){this.fn=t,this.parents=new Set,this.childValues=new Map,this.dirtyChildren=null,this.dirty=!0,this.recomputing=!1,this.value=[],this.deps=null,++e.count}return e.prototype.peek=function(){if(1===this.value.length&&!k(this))return x(this),this.value[0]},e.prototype.recompute=function(e){return v(!this.recomputing,"already recomputing"),x(this),k(this)?function(e,t){M(e),f.withValue(e,w,[e,t]),function(e,t){if("function"===typeof e.subscribe)try{m(e),e.unsubscribe=e.subscribe.apply(null,t)}catch(n){return e.setDirty(),!1}return!0}(e,t)&&function(e){if(e.dirty=!1,k(e))return;S(e)}(e);return y(e.value)}(this,e):y(this.value)},e.prototype.setDirty=function(){this.dirty||(this.dirty=!0,this.value.length=0,_(this),m(this))},e.prototype.dispose=function(){var e=this;this.setDirty(),M(this),C(this,(function(t,n){t.setDirty(),A(t,e)}))},e.prototype.forget=function(){this.dispose()},e.prototype.dependOn=function(e){e.add(this),this.deps||(this.deps=g.pop()||new Set),this.deps.add(e)},e.prototype.forgetDeps=function(){var e=this;this.deps&&(p(this.deps).forEach((function(t){return t.delete(e)})),this.deps.clear(),g.push(this.deps),this.deps=null)},e.count=0,e}();function x(e){var t=f.getValue();if(t)return e.parents.add(t),t.childValues.has(e)||t.childValues.set(e,[]),k(e)?j(t,e):E(t,e),t}function w(e,t){e.recomputing=!0,e.value.length=0;try{e.value[0]=e.fn.apply(null,t)}catch(n){e.value[1]=n}e.recomputing=!1}function k(e){return e.dirty||!(!e.dirtyChildren||!e.dirtyChildren.size)}function _(e){C(e,j)}function S(e){C(e,E)}function C(e,t){var n=e.parents.size;if(n)for(var r=p(e.parents),i=0;i0&&n===t.length&&e[n-1]===t[n-1]}(n,t.value)||e.setDirty(),T(e,t),k(e)||S(e)}function T(e,t){var n=e.dirtyChildren;n&&(n.delete(t),0===n.size&&(g.length<100&&g.push(n),e.dirtyChildren=null))}function M(e){e.childValues.size>0&&e.childValues.forEach((function(t,n){A(e,n)})),e.forgetDeps(),v(null===e.dirtyChildren)}function A(e,t){t.parents.delete(e),e.childValues.delete(t),T(e,t)}var R={setDirty:!0,dispose:!0,forget:!0};function O(e){var t=new Map,n=e&&e.subscribe;function r(e){var r=f.getValue();if(r){var i=t.get(e);i||t.set(e,i=new Set),r.dependOn(i),"function"===typeof n&&(m(i),i.unsubscribe=n(e))}}return r.dirty=function(e,n){var r=t.get(e);if(r){var i=n&&h.call(R,n)?n:"setDirty";p(r).forEach((function(e){return e[i]()})),t.delete(e),m(r)}},r}function Z(){var e=new s("function"===typeof WeakMap);return function(){return e.lookupArray(arguments)}}Z();var I=new Set;function P(e,t){void 0===t&&(t=Object.create(null));var n=new d(t.max||Math.pow(2,16),(function(e){return e.dispose()})),r=t.keyArgs,i=t.makeCacheKey||Z(),o=function(){var o=i.apply(null,r?r.apply(null,arguments):arguments);if(void 0===o)return e.apply(null,arguments);var a=n.get(o);a||(n.set(o,a=new b(e)),a.subscribe=t.subscribe,a.forget=function(){return n.delete(o)});var s=a.recompute(Array.prototype.slice.call(arguments));return n.set(o,a),I.add(n),f.hasValue()||(I.forEach((function(e){return e.clean()})),I.clear()),s};function a(e){var t=n.get(e);t&&t.setDirty()}function s(e){var t=n.get(e);if(t)return t.peek()}function l(e){return n.delete(e)}return Object.defineProperty(o,"size",{get:function(){return n.map.size},configurable:!1,enumerable:!1}),o.dirtyKey=a,o.dirty=function(){a(i.apply(null,arguments))},o.peekKey=s,o.peek=function(){return s(i.apply(null,arguments))},o.forgetKey=l,o.forget=function(){return l(i.apply(null,arguments))},o.makeCacheKey=i,o.getKey=r?function(){return i.apply(null,r.apply(null,arguments))}:i,Object.freeze(o)}},66151:function(e,t,n){var r=n(41571);e.exports=h,e.exports.parse=o,e.exports.compile=function(e,t){return s(o(e,t),t)},e.exports.tokensToFunction=s,e.exports.tokensToRegExp=f;var i=new RegExp(["(\\\\.)","([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))"].join("|"),"g");function o(e,t){for(var n,r=[],o=0,a=0,s="",u=t&&t.delimiter||"/";null!=(n=i.exec(e));){var d=n[0],f=n[1],h=n.index;if(s+=e.slice(a,h),a=h+d.length,f)s+=f[1];else{var p=e[a],m=n[2],g=n[3],v=n[4],y=n[5],b=n[6],x=n[7];s&&(r.push(s),s="");var w=null!=m&&null!=p&&p!==m,k="+"===b||"*"===b,_="?"===b||"*"===b,S=n[2]||u,C=v||y;r.push({name:g||o++,prefix:m||"",delimiter:S,optional:_,repeat:k,partial:w,asterisk:!!x,pattern:C?c(C):x?".*":"[^"+l(S)+"]+?"})}}return a0&&this.handleMarkers(k);var j=this.editor.$options;c.editorOptions.forEach((function(t){j.hasOwnProperty(t)?e.editor.setOption(t,e.props[t]):e.props[t]&&console.warn("ReactAce: editor option "+t+" was activated but not found. Did you need to import a related tool or did you possibly mispell the option?")})),this.handleOptions(this.props),Array.isArray(x)&&x.forEach((function(t){"string"===typeof t.exec?e.editor.commands.bindKey(t.bindKey,t.exec):e.editor.commands.addCommand(t)})),y&&this.editor.setKeyboardHandler("ace/keyboard/"+y),n&&(this.refEditor.className+=" "+n),b&&b(this.editor),this.editor.resize(),a&&this.editor.focus()},t.prototype.componentDidUpdate=function(e){for(var t=e,n=this.props,r=0;r0&&e.handleMarkers(w,t);for(r=0;r