/*

Elfsight Instagram Feed
Version: 3.2.1
Release date: Wed Mar 14 2018

https://elfsight.com

Copyright (c) 2018 Elfsight, LLC. ALL RIGHTS RESERVED

*/!function(e){function t(e,t,n,i,r){this._listener=t,this._isOnce=n,this.context=i,this._signal=e,this._priority=r||0}function n(e,t){if("function"!=typeof e)throw Error("listener is a required param of {fn}() and should be a Function.".replace("{fn}",t))}function i(){this._bindings=[],this._prevParams=null;var e=this;this.dispatch=function(){i.prototype.dispatch.apply(e,arguments)}}t.prototype={active:!0,params:null,execute:function(e){var t;return this.active&&this._listener&&(e=this.params?this.params.concat(e):e,t=this._listener.apply(this.context,e),this._isOnce&&this.detach()),t},detach:function(){return this.isBound()?this._signal.remove(this._listener,this.context):null},isBound:function(){return!!this._signal&&!!this._listener},isOnce:function(){return this._isOnce},getListener:function(){return this._listener},getSignal:function(){return this._signal},_destroy:function(){delete this._signal,delete this._listener,delete this.context},toString:function(){return"[SignalBinding isOnce:"+this._isOnce+", isBound:"+this.isBound()+", active:"+this.active+"]"}},i.prototype={VERSION:"1.0.0",memorize:!1,_shouldPropagate:!0,active:!0,_registerListener:function(e,n,i,r){var o=this._indexOfListener(e,i);if(-1!==o){if((e=this._bindings[o]).isOnce()!==n)throw Error("You cannot add"+(n?"":"Once")+"() then add"+(n?"Once":"")+"() the same listener without removing the relationship first.")}else e=new t(this,e,n,i,r),this._addBinding(e);return this.memorize&&this._prevParams&&e.execute(this._prevParams),e},_addBinding:function(e){var t=this._bindings.length;do{--t}while(this._bindings[t]&&e._priority<=this._bindings[t]._priority);this._bindings.splice(t+1,0,e)},_indexOfListener:function(e,t){for(var n,i=this._bindings.length;i--;)if((n=this._bindings[i])._listener===e&&n.context===t)return i;return-1},has:function(e,t){return-1!==this._indexOfListener(e,t)},add:function(e,t,i){return n(e,"add"),this._registerListener(e,!1,t,i)},addOnce:function(e,t,i){return n(e,"addOnce"),this._registerListener(e,!0,t,i)},remove:function(e,t){n(e,"remove");var i=this._indexOfListener(e,t);return-1!==i&&(this._bindings[i]._destroy(),this._bindings.splice(i,1)),e},removeAll:function(){for(var e=this._bindings.length;e--;)this._bindings[e]._destroy();this._bindings.length=0},getNumListeners:function(){return this._bindings.length},halt:function(){this._shouldPropagate=!1},dispatch:function(e){if(this.active){var t,n=Array.prototype.slice.call(arguments),i=this._bindings.length;if(this.memorize&&(this._prevParams=n),i){t=this._bindings.slice(),this._shouldPropagate=!0;do{i--}while(t[i]&&this._shouldPropagate&&!1!==t[i].execute(n))}}},forget:function(){this._prevParams=null},dispose:function(){this.removeAll(),delete this._bindings,delete this._prevParams},toString:function(){return"[Signal active:"+this.active+" numListeners:"+this.getNumListeners()+"]"}};var r=i;r.Signal=i,"function"==typeof define&&define.amd?define(function(){return r}):"undefined"!=typeof module&&module.exports?module.exports=r:e.signals=r}(this),function(){var e=function(e){function t(e,t){if(e.indexOf)return e.indexOf(t);for(var n=e.length;n--;)if(e[n]===t)return n;return-1}function n(e,n){var i=t(e,n);-1!==i&&e.splice(i,1)}function i(e,t){return"[object "+t+"]"===Object.prototype.toString.call(e)}function r(e){return i(e,"RegExp")}function o(e){return i(e,"Array")}function s(e){return"function"==typeof e}function a(e){return null===e||"null"===e?null:"true"===e||"false"!==e&&(e===p||"undefined"===e?p:""===e||isNaN(e)?e:parseFloat(e))}function l(e,t){for(var n,i,r,s,l=(e||"").replace("?","").split("&"),c=-1,u={};i=l[++c];)n=i.indexOf("="),s=i.substring(0,n),r=decodeURIComponent(i.substring(n+1)),!1!==t&&(r=a(r)),s in u?o(u[s])?u[s].push(r):u[s]=[u[s],r]:u[s]=r;return u}function c(){this.bypassed=new e.Signal,this.routed=new e.Signal,this._routes=[],this._prevRoutes=[],this._piped=[],this.resetState()}function u(t,n,i,o){var s=r(t),a=o.patternLexer;this._router=o,this._pattern=t,this._paramsIds=s?null:a.getParamIds(t),this._optionalParamsIds=s?null:a.getOptionalParamsIds(t),this._matchRegexp=s?t:a.compilePattern(t,o.ignoreCase),this.matched=new e.Signal,this.switched=new e.Signal,n&&this.matched.add(n),this._priority=i||0}var h,d,p;return d=""===/t(.+)?/.exec("t")[1],c.prototype={greedy:!1,greedyEnabled:!0,ignoreCase:!0,ignoreState:!1,shouldTypecast:!1,normalizeFn:null,resetState:function(){this._prevRoutes.length=0,this._prevMatchedRequest=null,this._prevBypassedRequest=null},create:function(){return new c},addRoute:function(e,t,n){var i=new u(e,t,n,this);return this._sortedInsert(i),i},removeRoute:function(e){n(this._routes,e),e._destroy()},removeAllRoutes:function(){for(var e=this.getNumRoutes();e--;)this._routes[e]._destroy();this._routes.length=0},parse:function(e,t){if(e=e||"",t=t||[],this.ignoreState||e!==this._prevMatchedRequest&&e!==this._prevBypassedRequest){var n,i=this._getMatchedRoutes(e),r=0,o=i.length;if(o)for(this._prevMatchedRequest=e,this._notifyPrevRoutes(i,e),this._prevRoutes=i;r<o;)(n=i[r]).route.matched.dispatch.apply(n.route.matched,t.concat(n.params)),n.isFirst=!r,this.routed.dispatch.apply(this.routed,t.concat([e,n])),r+=1;else this._prevBypassedRequest=e,this.bypassed.dispatch.apply(this.bypassed,t.concat([e]));this._pipeParse(e,t)}},_notifyPrevRoutes:function(e,t){for(var n,i=0;n=this._prevRoutes[i++];)n.route.switched&&this._didSwitch(n.route,e)&&n.route.switched.dispatch(t)},_didSwitch:function(e,t){for(var n,i=0;n=t[i++];)if(n.route===e)return!1;return!0},_pipeParse:function(e,t){for(var n,i=0;n=this._piped[i++];)n.parse(e,t)},getNumRoutes:function(){return this._routes.length},_sortedInsert:function(e){var t=this._routes,n=t.length;do{--n}while(t[n]&&e._priority<=t[n]._priority);t.splice(n+1,0,e)},_getMatchedRoutes:function(e){for(var t,n=[],i=this._routes,r=i.length;(t=i[--r])&&((!n.length||this.greedy||t.greedy)&&t.match(e)&&n.push({route:t,params:t._getParamsArray(e)}),this.greedyEnabled||!n.length););return n},pipe:function(e){this._piped.push(e)},unpipe:function(e){n(this._piped,e)},toString:function(){return"[crossroads numRoutes:"+this.getNumRoutes()+"]"}},h=new c,h.VERSION="0.12.2",h.NORM_AS_ARRAY=function(e,t){return[t.vals_]},h.NORM_AS_OBJECT=function(e,t){return[t]},u.prototype={greedy:!1,rules:void 0,match:function(e){return e=e||"",this._matchRegexp.test(e)&&this._validateParams(e)},_validateParams:function(e){var t,n=this.rules,i=this._getParamsObject(e);for(t in n)if("normalize_"!==t&&n.hasOwnProperty(t)&&!this._isValidParam(e,t,i))return!1;return!0},_isValidParam:function(e,n,i){var a=this.rules[n],l=i[n],c=!1,u=0===n.indexOf("?");return null==l&&this._optionalParamsIds&&-1!==t(this._optionalParamsIds,n)?c=!0:r(a)?(u&&(l=i[n+"_"]),c=a.test(l)):o(a)?(u&&(l=i[n+"_"]),c=this._isValidArrayRule(a,l)):s(a)&&(c=a(l,e,i)),c},_isValidArrayRule:function(e,n){if(!this._router.ignoreCase)return-1!==t(e,n);"string"==typeof n&&(n=n.toLowerCase());for(var i,r=e.length;r--;)if(i=e[r],("string"==typeof i?i.toLowerCase():i)===n)return!0;return!1},_getParamsObject:function(e){for(var n,i,r=this._router.shouldTypecast,o=this._router.patternLexer.getParamValues(e,this._matchRegexp,r),s={},c=o.length;c--;)i=o[c],this._paramsIds&&(0===(n=this._paramsIds[c]).indexOf("?")&&i&&(s[n+"_"]=i,i=l(i,r),o[c]=i),d&&""===i&&-1!==t(this._optionalParamsIds,n)&&(i=void 0,o[c]=i),s[n]=i),s[c]=i;return s.request_=r?a(e):e,s.vals_=o,s},_getParamsArray:function(e){var t=this.rules?this.rules.normalize_:null;return t=t||this._router.normalizeFn,t&&s(t)?t(e,this._getParamsObject(e)):this._getParamsObject(e).vals_},interpolate:function(e){var t=this._router.patternLexer.interpolate(this._pattern,e);if(!this._validateParams(t))throw new Error("Generated string doesn't validate against `Route.rules`.");return t},dispose:function(){this._router.removeRoute(this)},_destroy:function(){this.matched.dispose(),this.switched.dispose(),this.matched=this.switched=this._pattern=this._matchRegexp=null},toString:function(){return'[Route pattern:"'+this._pattern+'", numListeners:'+this.matched.getNumListeners()+"]"}},c.prototype.patternLexer=function(){function e(e,t){var n,i=[];for(e.lastIndex=0;n=e.exec(t);)i.push(n[1]);return i}function t(e,t,n){var i,r;for(r in l)l.hasOwnProperty(r)&&(i=l[r],e=e.replace(i[t],i[n]));return e}var n=/[\\.+*?\^$\[\](){}\/'#]/g,i=/^\/|\/$/g,r=/\/$/g,s=/(?:\{|:)([^}:]+)(?:\}|:)/g,l={OS:{rgx:/([:}]|\w(?=\/))\/?(:|(?:\{\?))/g,save:"$1{{id}}$2",res:"\\/?"},RS:{rgx:/([:}])\/?(\{)/g,save:"$1{{id}}$2",res:"\\/"},RQ:{rgx:/\{\?([^}]+)\}/g,res:"\\?([^#]+)"},OQ:{rgx:/:\?([^:]+):/g,res:"(?:\\?([^#]*))?"},OR:{rgx:/:([^:]+)\*:/g,res:"(.*)?"},RR:{rgx:/\{([^}]+)\*\}/g,res:"(.+)"},RP:{rgx:/\{([^}]+)\}/g,res:"([^\\/?]+)"},OP:{rgx:/:([^:]+):/g,res:"([^\\/?]+)?/?"}},c=1,u=2,h=3,d=c;return function(){var e,t;for(e in l)l.hasOwnProperty(e)&&(t=l[e],t.id="__CR_"+e+"__",t.save="save"in t?t.save.replace("{{id}}",t.id):t.id,t.rRestore=new RegExp(t.id,"g"))}(),{strict:function(){d=u},loose:function(){d=c},legacy:function(){d=h},getParamIds:function(t){return e(s,t)},getOptionalParamsIds:function(t){return e(l.OP.rgx,t)},getParamValues:function(e,t,n){var i=t.exec(e);return i&&(i.shift(),n&&(i=function(e){for(var t=e.length,n=[];t--;)n[t]=a(e[t]);return n}(i))),i},compilePattern:function(e,o){return(e=e||"")&&(d===c?e=e.replace(i,""):d===h&&(e=e.replace(r,"")),e=t(e,"rgx","save"),e=e.replace(n,"\\$&"),e=t(e,"rRestore","res"),d===c&&(e="\\/?"+e)),d!==u&&(e+="\\/?"),new RegExp("^"+e+"$",o?"i":"")},interpolate:function(e,t){if(t=t||{},"string"!=typeof e)throw new Error("Route pattern should be a string.");return l.OS.trail||(l.OS.trail=new RegExp("(?:"+l.OS.id+")+$")),e.replace(l.OS.rgx,l.OS.save).replace(s,function(e,n){var i;if(n="?"===n.substr(0,1)?n.substr(1):n,null!=t[n]){if("object"==typeof t[n]){var r,s=[];for(var a in t[n])if(r=t[n][a],o(r))for(var l in r)"[]"==a.slice(-2)?s.push(encodeURI(a.slice(0,-2))+"[]="+encodeURI(r[l])):s.push(encodeURI(a+"="+r[l]));else s.push(encodeURI(a+"="+r));i="?"+s.join("&")}else i=String(t[n]);if(-1===e.indexOf("*")&&-1!==i.indexOf("/"))throw new Error('Invalid value "'+i+'" for segment "'+e+'".')}else{if(-1!==e.indexOf("{"))throw new Error("The segment "+e+" is required.");i=""}return i}).replace(l.OS.trail,"").replace(l.OS.rRestore,"/")}}}(),h};"function"==typeof define&&define.amd?define(["signals"],e):"undefined"!=typeof module&&module.exports?module.exports=e(require("signals")):window.crossroads=e(window.signals)}(),function(){var e=function(e){return function(t){function n(e){return String(e||"").replace(/\W/g,"\\$&")}function i(e){if(!e)return"";var t=new RegExp("^"+n(u.prependHash)+"|"+n(u.appendHash)+"$","g");return e.replace(t,"")}function r(){var e=w.exec(u.getURL()),t=e&&e[1]||"";try{return u.raw?t:decodeURIComponent(t)}catch(e){return t}}function o(){return f?f.contentWindow.frameHash:null}function s(){if(f&&h!==o()){var e=f.contentWindow.document;e.open(),e.write("<html><head><title>"+m.title+'</title><script type="text/javascript">var frameHash="'+h+'";<\/script></head><body>&nbsp;</body></html>'),e.close()}}function a(e,t){if(h!==e){var n=h;h=e,C&&(t?f.contentWindow.frameHash=e:s()),u.changed.dispatch(i(e),i(n))}}function l(e){var t=Array.prototype.slice.call(arguments).join(u.separator);return t=t?u.prependHash+t.replace(y,"")+u.appendHash:t}function c(e){return e=encodeURI(e),A&&x&&(e=e.replace(/\?/,"%3F")),e}var u,h,d,p,f,g,m=t.document,v=(t.history,e.Signal),w=/#(.*)$/,b=/(\?.*)|(\#.*)/,y=/^\#/,A=!1,$="onhashchange"in t&&7!==m.documentMode,C=A&&!$,x="file:"===location.protocol;return g=C?function(){var e=r(),t=o();t!==h&&t!==e?u.setHash(i(t)):e!==h&&a(e)}:function(){var e=r();e!==h&&a(e)},u={VERSION:"1.2.0",raw:!1,appendHash:"",prependHash:"/",separator:"/",changed:new v,stopped:new v,initialized:new v,init:function(){p||(h=r(),$?function(e,t,n){e.addEventListener?e.addEventListener(t,n,!1):e.attachEvent&&e.attachEvent("on"+t,n)}(t,"hashchange",g):(C&&(f||((f=m.createElement("iframe")).src="about:blank",f.style.display="none",m.body.appendChild(f)),s()),d=setInterval(g,25)),p=!0,u.initialized.dispatch(i(h)))},stop:function(){p&&($?function(e,t,n){e.removeEventListener?e.removeEventListener(t,n,!1):e.detachEvent&&e.detachEvent("on"+t,n)}(t,"hashchange",g):(clearInterval(d),d=null),p=!1,u.stopped.dispatch(i(h)))},isActive:function(){return p},getURL:function(){return t.location.href},getBaseURL:function(){return u.getURL().replace(b,"")},setHash:function(e){(e=l.apply(null,arguments))!==h&&(a(e),e===h&&(u.raw||(e=c(e)),t.location.hash="#"+e))},replaceHash:function(e){(e=l.apply(null,arguments))!==h&&(a(e,!0),e===h&&(u.raw||(e=c(e)),t.location.replace("#"+e)))},getHash:function(){return i(h)},getHashAsArray:function(){return u.getHash().split(u.separator)},dispose:function(){u.stop(),u.initialized.dispose(),u.stopped.dispose(),u.changed.dispose(),f=u=t.hasher=null},toString:function(){return'[hasher version="'+u.VERSION+'" hash="'+u.getHash()+'"]'}},u.initialized.memorize=!0,u}(window)};"function"==typeof define&&define.amd?define(["signals"],e):"object"==typeof exports?module.exports=e(require("signals")):window.hasher=e(window.signals)}(),function($){$.extend({tablesorter:new function(){function benchmark(e,t){log(e+","+((new Date).getTime()-t.getTime())+"ms")}function log(e){"undefined"!=typeof console&&void 0!==console.debug?console.log(e):alert(e)}function buildParserCache(e,t){if(e.config.debug)var n="";if(0!=e.tBodies.length){var i=e.tBodies[0].rows;if(i[0])for(var r=[],o=i[0].cells.length,s=0;s<o;s++){var a=!1;$.metadata&&$(t[s]).metadata()&&$(t[s]).metadata().sorter?a=getParserById($(t[s]).metadata().sorter):e.config.headers[s]&&e.config.headers[s].sorter&&(a=getParserById(e.config.headers[s].sorter)),a||(a=detectParserForColumn(e,i,-1,s)),e.config.debug&&(n+="column:"+s+" parser:"+a.id+"\n"),r.push(a)}return e.config.debug&&log(n),r}}function detectParserForColumn(e,t,n,i){for(var r=parsers.length,o=!1,s=!1,a=!0;""==s&&a;)t[++n]?(o=getNodeFromRowAndCellIndex(t,n,i),s=trimAndGetNodeText(e.config,o),e.config.debug&&log("Checking if value was empty on row:"+n)):a=!1;for(var l=1;l<r;l++)if(parsers[l].is(s,e,o))return parsers[l];return parsers[0]}function getNodeFromRowAndCellIndex(e,t,n){return e[t].cells[n]}function trimAndGetNodeText(e,t){return $.trim(getElementText(e,t))}function getParserById(e){for(var t=parsers.length,n=0;n<t;n++)if(parsers[n].id.toLowerCase()==e.toLowerCase())return parsers[n];return!1}function buildCache(e){if(e.config.debug)var t=new Date;for(var n=e.tBodies[0]&&e.tBodies[0].rows.length||0,i=e.tBodies[0].rows[0]&&e.tBodies[0].rows[0].cells.length||0,r=e.config.parsers,o={row:[],normalized:[]},s=0;s<n;++s){var a=$(e.tBodies[0].rows[s]),l=[];if(a.hasClass(e.config.cssChildRow))o.row[o.row.length-1]=o.row[o.row.length-1].add(a);else{o.row.push(a);for(var c=0;c<i;++c)l.push(r[c].format(getElementText(e.config,a[0].cells[c]),e,a[0].cells[c]));l.push(o.normalized.length),o.normalized.push(l),l=null}}return e.config.debug&&benchmark("Building cache for "+n+" rows:",t),o}function getElementText(e,t){return t?(e.supportsTextContent||(e.supportsTextContent=t.textContent||!1),"simple"==e.textExtraction?e.supportsTextContent?t.textContent:t.childNodes[0]&&t.childNodes[0].hasChildNodes()?t.childNodes[0].innerHTML:t.innerHTML:"function"==typeof e.textExtraction?e.textExtraction(t):$(t).text()):""}function appendToTable(e,t){if(e.config.debug)var n=new Date;for(var i=t,r=i.row,o=i.normalized,s=o.length,a=o[0].length-1,l=$(e.tBodies[0]),c=[],u=0;u<s;u++){var h=o[u][a];if(c.push(r[h]),!e.config.appender)for(var d=r[h].length,p=0;p<d;p++)l[0].appendChild(r[h][p])}e.config.appender&&e.config.appender(e,c),c=null,e.config.debug&&benchmark("Rebuilt table:",n),applyWidget(e),setTimeout(function(){$(e).trigger("sortEnd")},0)}function buildHeaders(e){if(e.config.debug)var t=new Date;$.metadata;var n=computeTableHeaderCellIndexes(e);return $tableHeaders=$(e.config.selectorHeaders,e).each(function(t){if(this.column=n[this.parentNode.rowIndex+"-"+this.cellIndex],this.order=formatSortingOrder(e.config.sortInitialOrder),this.count=this.order,(checkHeaderMetadata(this)||checkHeaderOptions(e,t))&&(this.sortDisabled=!0),checkHeaderOptionsSortingLocked(e,t)&&(this.order=this.lockedOrder=checkHeaderOptionsSortingLocked(e,t)),!this.sortDisabled){var i=$(this).addClass(e.config.cssHeader);e.config.onRenderHeader&&e.config.onRenderHeader.apply(i)}e.config.headerList[t]=this}),e.config.debug&&(benchmark("Built headers:",t),log($tableHeaders)),$tableHeaders}function computeTableHeaderCellIndexes(e){for(var t=[],n={},i=e.getElementsByTagName("THEAD")[0].getElementsByTagName("TR"),r=0;r<i.length;r++)for(var o=i[r].cells,s=0;s<o.length;s++){var a,l=o[s],c=l.parentNode.rowIndex,u=c+"-"+l.cellIndex,h=l.rowSpan||1,d=l.colSpan||1;void 0===t[c]&&(t[c]=[]);for(var p=0;p<t[c].length+1;p++)if(void 0===t[c][p]){a=p;break}n[u]=a;for(p=c;p<c+h;p++){void 0===t[p]&&(t[p]=[]);for(var f=t[p],g=a;g<a+d;g++)f[g]="x"}}return n}function checkCellColSpan(e,t,n){for(var i=[],r=e.tHead.rows,o=r[n].cells,s=0;s<o.length;s++){var a=o[s];a.colSpan>1?i=i.concat(checkCellColSpan(e,headerArr,n++)):(1==e.tHead.length||a.rowSpan>1||!r[n+1])&&i.push(a)}return i}function checkHeaderMetadata(e){return!(!$.metadata||!1!==$(e).metadata().sorter)}function checkHeaderOptions(e,t){return!(!e.config.headers[t]||!1!==e.config.headers[t].sorter)}function checkHeaderOptionsSortingLocked(e,t){return!(!e.config.headers[t]||!e.config.headers[t].lockedOrder)&&e.config.headers[t].lockedOrder}function applyWidget(e){for(var t=e.config.widgets,n=t.length,i=0;i<n;i++)getWidgetById(t[i]).format(e)}function getWidgetById(e){for(var t=widgets.length,n=0;n<t;n++)if(widgets[n].id.toLowerCase()==e.toLowerCase())return widgets[n]}function formatSortingOrder(e){return"Number"!=typeof e?"desc"==e.toLowerCase()?1:0:1==e?1:0}function isValueInArray(e,t){for(var n=t.length,i=0;i<n;i++)if(t[i][0]==e)return!0;return!1}function setHeadersCss(e,t,n,i){t.removeClass(i[0]).removeClass(i[1]);var r=[];t.each(function(e){this.sortDisabled||(r[this.column]=$(this))});for(var o=n.length,s=0;s<o;s++)r[n[s][0]].addClass(i[n[s][1]])}function fixColumnWidth(e,t){if(e.config.widthFixed){var n=$("<colgroup>");$("tr:first td",e.tBodies[0]).each(function(){n.append($("<col>").css("width",$(this).width()))}),$(e).prepend(n)}}function updateHeaderSortCount(e,t){for(var n=e.config,i=t.length,r=0;r<i;r++){var o=t[r],s=n.headerList[o[0]];s.count=o[1],s.count++}}function multisort(table,sortList,cache){if(table.config.debug)var sortTime=new Date;for(var dynamicExp="var sortWrapper = function(a,b) {",l=sortList.length,i=0;i<l;i++){var c=sortList[i][0],order=sortList[i][1],s="text"==table.config.parsers[c].type?0==order?makeSortFunction("text","asc",c):makeSortFunction("text","desc",c):0==order?makeSortFunction("numeric","asc",c):makeSortFunction("numeric","desc",c),e="e"+i;dynamicExp+="var "+e+" = "+s,dynamicExp+="if("+e+") { return "+e+"; } ",dynamicExp+="else { "}var orgOrderCol=cache.normalized[0].length-1;dynamicExp+="return a["+orgOrderCol+"]-b["+orgOrderCol+"];";for(var i=0;i<l;i++)dynamicExp+="}; ";return dynamicExp+="return 0; ",dynamicExp+="}; ",table.config.debug&&benchmark("Evaling expression:"+dynamicExp,new Date),eval(dynamicExp),cache.normalized.sort(sortWrapper),table.config.debug&&benchmark("Sorting on "+sortList.toString()+" and dir "+order+" time:",sortTime),cache}function makeSortFunction(e,t,n){var i="a["+n+"]",r="b["+n+"]";return"text"==e&&"asc"==t?"("+i+" == "+r+" ? 0 : ("+i+" === null ? Number.POSITIVE_INFINITY : ("+r+" === null ? Number.NEGATIVE_INFINITY : ("+i+" < "+r+") ? -1 : 1 )));":"text"==e&&"desc"==t?"("+i+" == "+r+" ? 0 : ("+i+" === null ? Number.POSITIVE_INFINITY : ("+r+" === null ? Number.NEGATIVE_INFINITY : ("+r+" < "+i+") ? -1 : 1 )));":"numeric"==e&&"asc"==t?"("+i+" === null && "+r+" === null) ? 0 :("+i+" === null ? Number.POSITIVE_INFINITY : ("+r+" === null ? Number.NEGATIVE_INFINITY : "+i+" - "+r+"));":"numeric"==e&&"desc"==t?"("+i+" === null && "+r+" === null) ? 0 :("+i+" === null ? Number.POSITIVE_INFINITY : ("+r+" === null ? Number.NEGATIVE_INFINITY : "+r+" - "+i+"));":void 0}function makeSortText(e){return"((a["+e+"] < b["+e+"]) ? -1 : ((a["+e+"] > b["+e+"]) ? 1 : 0));"}function makeSortTextDesc(e){return"((b["+e+"] < a["+e+"]) ? -1 : ((b["+e+"] > a["+e+"]) ? 1 : 0));"}function makeSortNumeric(e){return"a["+e+"]-b["+e+"];"}function makeSortNumericDesc(e){return"b["+e+"]-a["+e+"];"}function sortText(e,t){return table.config.sortLocaleCompare?e.localeCompare(t):e<t?-1:e>t?1:0}function sortTextDesc(e,t){return table.config.sortLocaleCompare?t.localeCompare(e):t<e?-1:t>e?1:0}function sortNumeric(e,t){return e-t}function sortNumericDesc(e,t){return t-e}function getCachedSortType(e,t){return e[t].type}var parsers=[],widgets=[];this.defaults={cssHeader:"header",cssAsc:"headerSortUp",cssDesc:"headerSortDown",cssChildRow:"expand-child",sortInitialOrder:"asc",sortMultiSortKey:"shiftKey",sortForce:null,sortAppend:null,sortLocaleCompare:!0,textExtraction:"simple",parsers:{},widgets:[],widgetZebra:{css:["even","odd"]},headers:{},widthFixed:!1,cancelSelection:!0,sortList:[],headerList:[],dateFormat:"us",decimal:"/.|,/g",onRenderHeader:null,selectorHeaders:"thead th",debug:!1},this.benchmark=benchmark,this.construct=function(e){return this.each(function(){if(this.tHead&&this.tBodies){var t,n,i,r;this.config={},r=$.extend(this.config,$.tablesorter.defaults,e),t=$(this),$.data(this,"tablesorter",r),n=buildHeaders(this),this.config.parsers=buildParserCache(this,n),i=buildCache(this);var o=[r.cssDesc,r.cssAsc];fixColumnWidth(this),n.click(function(e){var s=t[0].tBodies[0]&&t[0].tBodies[0].rows.length||0;if(!this.sortDisabled&&s>0){t.trigger("sortStart");$(this);var a=this.column;if(this.order=this.count++%2,this.lockedOrder&&(this.order=this.lockedOrder),e[r.sortMultiSortKey])if(isValueInArray(a,r.sortList))for(h=0;h<r.sortList.length;h++){var l=r.sortList[h],c=r.headerList[l[0]];l[0]==a&&(c.count=l[1],c.count++,l[1]=c.count%2)}else r.sortList.push([a,this.order]);else{if(r.sortList=[],null!=r.sortForce)for(var u=r.sortForce,h=0;h<u.length;h++)u[h][0]!=a&&r.sortList.push(u[h]);r.sortList.push([a,this.order])}return setTimeout(function(){setHeadersCss(t[0],n,r.sortList,o),appendToTable(t[0],multisort(t[0],r.sortList,i))},1),!1}}).mousedown(function(){if(r.cancelSelection)return this.onselectstart=function(){return!1},!1}),t.bind("update",function(){var e=this;setTimeout(function(){e.config.parsers=buildParserCache(e,n),i=buildCache(e)},1)}).bind("updateCell",function(e,t){var n=this.config,r=[t.parentNode.rowIndex-1,t.cellIndex];i.normalized[r[0]][r[1]]=n.parsers[r[1]].format(getElementText(n,t),t)}).bind("sorton",function(e,t){$(this).trigger("sortStart"),r.sortList=t;var s=r.sortList;updateHeaderSortCount(this,s),setHeadersCss(0,n,s,o),appendToTable(this,multisort(this,s,i))}).bind("appendCache",function(){appendToTable(this,i)}).bind("applyWidgetId",function(e,t){getWidgetById(t).format(this)}).bind("applyWidgets",function(){applyWidget(this)}),$.metadata&&$(this).metadata()&&$(this).metadata().sortlist&&(r.sortList=$(this).metadata().sortlist),r.sortList.length>0&&t.trigger("sorton",[r.sortList]),applyWidget(this)}})},this.addParser=function(e){for(var t=parsers.length,n=!0,i=0;i<t;i++)parsers[i].id.toLowerCase()==e.id.toLowerCase()&&(n=!1);n&&parsers.push(e)},this.addWidget=function(e){widgets.push(e)},this.formatFloat=function(e){var t=parseFloat(e);return isNaN(t)?0:t},this.formatInt=function(e){var t=parseInt(e);return isNaN(t)?0:t},this.isDigit=function(e,t){return/^[-+]?\d*$/.test($.trim(e.replace(/[,.']/g,"")))},this.clearTableBody=function(e){$.browser.msie?function(){for(;this.firstChild;)this.removeChild(this.firstChild)}.apply(e.tBodies[0]):e.tBodies[0].innerHTML=""}}}),$.fn.extend({tablesorter:$.tablesorter.construct});var ts=$.tablesorter;ts.addParser({id:"text",is:function(e){return!0},format:function(e){return $.trim(e.toLocaleLowerCase())},type:"text"}),ts.addParser({id:"digit",is:function(e,t){var n=t.config;return $.tablesorter.isDigit(e,n)},format:function(e){return $.tablesorter.formatFloat(e)},type:"numeric"}),ts.addParser({id:"currency",is:function(e){return/^[£$€?.]/.test(e)},format:function(e){return $.tablesorter.formatFloat(e.replace(new RegExp(/[£$€]/g),""))},type:"numeric"}),ts.addParser({id:"ipAddress",is:function(e){return/^\d{2,3}[\.]\d{2,3}[\.]\d{2,3}[\.]\d{2,3}$/.test(e)},format:function(e){for(var t=e.split("."),n="",i=t.length,r=0;r<i;r++){var o=t[r];2==o.length?n+="0"+o:n+=o}return $.tablesorter.formatFloat(n)},type:"numeric"}),ts.addParser({id:"url",is:function(e){return/^(https?|ftp|file):\/\/$/.test(e)},format:function(e){return jQuery.trim(e.replace(new RegExp(/(https?|ftp|file):\/\//),""))},type:"text"}),ts.addParser({id:"isoDate",is:function(e){return/^\d{4}[\/-]\d{1,2}[\/-]\d{1,2}$/.test(e)},format:function(e){return $.tablesorter.formatFloat(""!=e?new Date(e.replace(new RegExp(/-/g),"/")).getTime():"0")},type:"numeric"}),ts.addParser({id:"percent",is:function(e){return/\%$/.test($.trim(e))},format:function(e){return $.tablesorter.formatFloat(e.replace(new RegExp(/%/g),""))},type:"numeric"}),ts.addParser({id:"usLongDate",is:function(e){return e.match(new RegExp(/^[A-Za-z]{3,10}\.? [0-9]{1,2}, ([0-9]{4}|'?[0-9]{2}) (([0-2]?[0-9]:[0-5][0-9])|([0-1]?[0-9]:[0-5][0-9]\s(AM|PM)))$/))},format:function(e){return $.tablesorter.formatFloat(new Date(e).getTime())},type:"numeric"}),ts.addParser({id:"shortDate",is:function(e){return/\d{1,2}[\/\-]\d{1,2}[\/\-]\d{2,4}/.test(e)},format:function(e,t){var n=t.config;return e=e.replace(/\-/g,"/"),"us"==n.dateFormat?e=e.replace(/(\d{1,2})[\/\-](\d{1,2})[\/\-](\d{4})/,"$3/$1/$2"):"pt"==n.dateFormat?e=e.replace(/(\d{1,2})[\/\-](\d{1,2})[\/\-](\d{4})/,"$3/$2/$1"):"uk"==n.dateFormat?e=e.replace(/(\d{1,2})[\/\-](\d{1,2})[\/\-](\d{4})/,"$3/$2/$1"):"dd/mm/yy"!=n.dateFormat&&"dd-mm-yy"!=n.dateFormat||(e=e.replace(/(\d{1,2})[\/\-](\d{1,2})[\/\-](\d{2})/,"$1/$2/$3")),$.tablesorter.formatFloat(new Date(e).getTime())},type:"numeric"}),ts.addParser({id:"time",is:function(e){return/^(([0-2]?[0-9]:[0-5][0-9])|([0-1]?[0-9]:[0-5][0-9]\s(am|pm)))$/.test(e)},format:function(e){return $.tablesorter.formatFloat(new Date("2000/01/01 "+e).getTime())},type:"numeric"}),ts.addParser({id:"metadata",is:function(e){return!1},format:function(e,t,n){var i=t.config,r=i.parserMetadataName?i.parserMetadataName:"sortValue";return $(n).metadata()[r]},type:"numeric"}),ts.addWidget({id:"zebra",format:function(e){if(e.config.debug)var t=new Date;var n,i,r=-1;$("tr:visible",e.tBodies[0]).each(function(t){(n=$(this)).hasClass(e.config.cssChildRow)||r++,i=r%2==0,n.removeClass(e.config.widgetZebra.css[i?0:1]).addClass(e.config.widgetZebra.css[i?1:0])}),e.config.debug&&$.tablesorter.benchmark("Applying Zebra widget",t)}})}(jQuery),function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).Clipboard=e()}}(function(){return function e(t,n,i){function r(s,a){if(!n[s]){if(!t[s]){var l="function"==typeof require&&require;if(!a&&l)return l(s,!0);if(o)return o(s,!0);var c=new Error("Cannot find module '"+s+"'");throw c.code="MODULE_NOT_FOUND",c}var u=n[s]={exports:{}};t[s][0].call(u.exports,function(e){return r(t[s][1][e]||e)},u,u.exports,e,t,n,i)}return n[s].exports}for(var o="function"==typeof require&&require,s=0;s<i.length;s++)r(i[s]);return r}({1:[function(e,t,n){var i=9;if("undefined"!=typeof Element&&!Element.prototype.matches){var r=Element.prototype;r.matches=r.matchesSelector||r.mozMatchesSelector||r.msMatchesSelector||r.oMatchesSelector||r.webkitMatchesSelector}t.exports=function(e,t){for(;e&&e.nodeType!==i;){if("function"==typeof e.matches&&e.matches(t))return e;e=e.parentNode}}},{}],2:[function(e,t,n){var i=e("./closest");t.exports=function(e,t,n,r,o){var s=function(e,t,n,r){return function(n){n.delegateTarget=i(n.target,t),n.delegateTarget&&r.call(e,n)}}.apply(this,arguments);return e.addEventListener(n,s,o),{destroy:function(){e.removeEventListener(n,s,o)}}}},{"./closest":1}],3:[function(e,t,n){n.node=function(e){return void 0!==e&&e instanceof HTMLElement&&1===e.nodeType},n.nodeList=function(e){var t=Object.prototype.toString.call(e);return void 0!==e&&("[object NodeList]"===t||"[object HTMLCollection]"===t)&&"length"in e&&(0===e.length||n.node(e[0]))},n.string=function(e){return"string"==typeof e||e instanceof String},n.fn=function(e){return"[object Function]"===Object.prototype.toString.call(e)}},{}],4:[function(e,t,n){var i=e("./is"),r=e("delegate");t.exports=function(e,t,n){if(!e&&!t&&!n)throw new Error("Missing required arguments");if(!i.string(t))throw new TypeError("Second argument must be a String");if(!i.fn(n))throw new TypeError("Third argument must be a Function");if(i.node(e))return function(e,t,n){return e.addEventListener(t,n),{destroy:function(){e.removeEventListener(t,n)}}}(e,t,n);if(i.nodeList(e))return function(e,t,n){return Array.prototype.forEach.call(e,function(e){e.addEventListener(t,n)}),{destroy:function(){Array.prototype.forEach.call(e,function(e){e.removeEventListener(t,n)})}}}(e,t,n);if(i.string(e))return function(e,t,n){return r(document.body,e,t,n)}(e,t,n);throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList")}},{"./is":3,delegate:2}],5:[function(e,t,n){t.exports=function(e){var t;if("SELECT"===e.nodeName)e.focus(),t=e.value;else if("INPUT"===e.nodeName||"TEXTAREA"===e.nodeName){var n=e.hasAttribute("readonly");n||e.setAttribute("readonly",""),e.select(),e.setSelectionRange(0,e.value.length),n||e.removeAttribute("readonly"),t=e.value}else{e.hasAttribute("contenteditable")&&e.focus();var i=window.getSelection(),r=document.createRange();r.selectNodeContents(e),i.removeAllRanges(),i.addRange(r),t=i.toString()}return t}},{}],6:[function(e,t,n){function i(){}i.prototype={on:function(e,t,n){var i=this.e||(this.e={});return(i[e]||(i[e]=[])).push({fn:t,ctx:n}),this},once:function(e,t,n){function i(){r.off(e,i),t.apply(n,arguments)}var r=this;return i._=t,this.on(e,i,n)},emit:function(e){for(var t=[].slice.call(arguments,1),n=((this.e||(this.e={}))[e]||[]).slice(),i=0,r=n.length;i<r;i++)n[i].fn.apply(n[i].ctx,t);return this},off:function(e,t){var n=this.e||(this.e={}),i=n[e],r=[];if(i&&t)for(var o=0,s=i.length;o<s;o++)i[o].fn!==t&&i[o].fn._!==t&&r.push(i[o]);return r.length?n[e]=r:delete n[e],this}},t.exports=i},{}],7:[function(e,t,n){!function(i,r){if(void 0!==n)r(t,e("select"));else{var o={exports:{}};r(o,i.select),i.clipboardAction=o.exports}}(this,function(e,t){"use strict";var n=function(e){return e&&e.__esModule?e:{default:e}}(t),i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),o=function(){function e(t){(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,e),this.resolveOptions(t),this.initSelection()}return r(e,[{key:"resolveOptions",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.action=e.action,this.container=e.container,this.emitter=e.emitter,this.target=e.target,this.text=e.text,this.trigger=e.trigger,this.selectedText=""}},{key:"initSelection",value:function(){this.text?this.selectFake():this.target&&this.selectTarget()}},{key:"selectFake",value:function(){var e=this,t="rtl"==document.documentElement.getAttribute("dir");this.removeFake(),this.fakeHandlerCallback=function(){return e.removeFake()},this.fakeHandler=this.container.addEventListener("click",this.fakeHandlerCallback)||!0,this.fakeElem=document.createElement("textarea"),this.fakeElem.style.fontSize="12pt",this.fakeElem.style.border="0",this.fakeElem.style.padding="0",this.fakeElem.style.margin="0",this.fakeElem.style.position="absolute",this.fakeElem.style[t?"right":"left"]="-9999px";var i=window.pageYOffset||document.documentElement.scrollTop;this.fakeElem.style.top=i+"px",this.fakeElem.setAttribute("readonly",""),this.fakeElem.value=this.text,this.container.appendChild(this.fakeElem),this.selectedText=(0,n.default)(this.fakeElem),this.copyText()}},{key:"removeFake",value:function(){this.fakeHandler&&(this.container.removeEventListener("click",this.fakeHandlerCallback),this.fakeHandler=null,this.fakeHandlerCallback=null),this.fakeElem&&(this.container.removeChild(this.fakeElem),this.fakeElem=null)}},{key:"selectTarget",value:function(){this.selectedText=(0,n.default)(this.target),this.copyText()}},{key:"copyText",value:function(){var e=void 0;try{e=document.execCommand(this.action)}catch(t){e=!1}this.handleResult(e)}},{key:"handleResult",value:function(e){this.emitter.emit(e?"success":"error",{action:this.action,text:this.selectedText,trigger:this.trigger,clearSelection:this.clearSelection.bind(this)})}},{key:"clearSelection",value:function(){this.trigger&&this.trigger.focus(),window.getSelection().removeAllRanges()}},{key:"destroy",value:function(){this.removeFake()}},{key:"action",set:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"copy";if(this._action=e,"copy"!==this._action&&"cut"!==this._action)throw new Error('Invalid "action" value, use either "copy" or "cut"')},get:function(){return this._action}},{key:"target",set:function(e){if(void 0!==e){if(!e||"object"!==(void 0===e?"undefined":i(e))||1!==e.nodeType)throw new Error('Invalid "target" value, use a valid Element');if("copy"===this.action&&e.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if("cut"===this.action&&(e.hasAttribute("readonly")||e.hasAttribute("disabled")))throw new Error('Invalid "target" attribute. You can\'t cut text from elements with "readonly" or "disabled" attributes');this._target=e}},get:function(){return this._target}}]),e}();e.exports=o})},{select:5}],8:[function(e,t,n){!function(i,r){if(void 0!==n)r(t,e("./clipboard-action"),e("tiny-emitter"),e("good-listener"));else{var o={exports:{}};r(o,i.clipboardAction,i.tinyEmitter,i.goodListener),i.clipboard=o.exports}}(this,function(e,t,n,i){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){var n="data-clipboard-"+e;if(t.hasAttribute(n))return t.getAttribute(n)}var s=r(t),a=r(n),l=r(i),c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},u=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),h=function(e){function t(e,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var i=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return i.resolveOptions(n),i.listenClick(e),i}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,a.default),u(t,[{key:"resolveOptions",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.action="function"==typeof e.action?e.action:this.defaultAction,this.target="function"==typeof e.target?e.target:this.defaultTarget,this.text="function"==typeof e.text?e.text:this.defaultText,this.container="object"===c(e.container)?e.container:document.body}},{key:"listenClick",value:function(e){var t=this;this.listener=(0,l.default)(e,"click",function(e){return t.onClick(e)})}},{key:"onClick",value:function(e){var t=e.delegateTarget||e.currentTarget;this.clipboardAction&&(this.clipboardAction=null),this.clipboardAction=new s.default({action:this.action(t),target:this.target(t),text:this.text(t),container:this.container,trigger:t,emitter:this})}},{key:"defaultAction",value:function(e){return o("action",e)}},{key:"defaultTarget",value:function(e){var t=o("target",e);if(t)return document.querySelector(t)}},{key:"defaultText",value:function(e){return o("text",e)}},{key:"destroy",value:function(){this.listener.destroy(),this.clipboardAction&&(this.clipboardAction.destroy(),this.clipboardAction=null)}}],[{key:"isSupported",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:["copy","cut"],t="string"==typeof e?[e]:e,n=!!document.queryCommandSupported;return t.forEach(function(e){n=n&&!!document.queryCommandSupported(e)}),n}}]),t}();e.exports=h})},{"./clipboard-action":7,"good-listener":4,"tiny-emitter":6}]},{},[8])(8)}),function(){var e=function(){return this}();e||"undefined"==typeof window||(e=window);var t=function(e,n,i){"string"==typeof e?(2==arguments.length&&(i=n),t.modules[e]||(t.payloads[e]=i,t.modules[e]=null)):t.original?t.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 r=o(e,t);if(void 0!=r)return n&&n(),r}else if("[object Array]"===Object.prototype.toString.call(t)){for(var s=[],a=0,l=t.length;a<l;++a){var c=o(e,t[a]);if(void 0==c&&i.original)return;s.push(c)}return n&&n.apply(null,s)||!0}},i=function(e,t){var r=n("",e,t);return void 0==r&&i.original?i.original.apply(this,arguments):r},r=function(e,t){if(-1!==t.indexOf("!")){var n=t.split("!");return r(e,n[0])+"!"+r(e,n[1])}if("."==t.charAt(0)){for(t=e.split("/").slice(0,-1).join("/")+"/"+t;-1!==t.indexOf(".")&&i!=t;){var i=t;t=t.replace(/\/\.\//,"/").replace(/[^\/]+\/\.\.\//,"")}}return t},o=function(e,i){i=r(e,i);var o=t.modules[i];if(!o){if("function"==typeof(o=t.payloads[i])){var s={},a={id:i,uri:"",exports:s,packaged:!0};s=o(function(e,t){return n(i,e,t)},s,a)||a.exports,t.modules[i]=s,delete t.payloads[i]}o=t.modules[i]=s||o}return o};!function(n){var r=e;n&&(e[n]||(e[n]={}),r=e[n]),r.define&&r.define.packaged||(t.original=r.define,r.define=t,r.define.packaged=!0),r.require&&r.require.packaged||(i.original=r.require,r.require=i,r.require.packaged=!0)}("ace")}(),ace.define("ace/lib/regexp",["require","exports","module"],function(e,t,n){"use strict";var i={exec:RegExp.prototype.exec,test:RegExp.prototype.test,match:String.prototype.match,replace:String.prototype.replace,split:String.prototype.split},r=void 0===i.exec.call(/()??/,"")[1],o=function(){var e=/^/g;return i.test.call(e,""),!e.lastIndex}();o&&r||(RegExp.prototype.exec=function(e){var t,n,s=i.exec.apply(this,arguments);if("string"==typeof e&&s){if(!r&&s.length>1&&function(e,t,n){if(Array.prototype.indexOf)return e.indexOf(t,n);for(var i=n||0;i<e.length;i++)if(e[i]===t)return i;return-1}(s,"")>-1&&(n=RegExp(this.source,i.replace.call(function(e){return(e.global?"g":"")+(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.extended?"x":"")+(e.sticky?"y":"")}(this),"g","")),i.replace.call(e.slice(s.index),n,function(){for(var e=1;e<arguments.length-2;e++)void 0===arguments[e]&&(s[e]=void 0)})),this._xregexp&&this._xregexp.captureNames)for(var a=1;a<s.length;a++)(t=this._xregexp.captureNames[a-1])&&(s[t]=s[a]);!o&&this.global&&!s[0].length&&this.lastIndex>s.index&&this.lastIndex--}return s},o||(RegExp.prototype.test=function(e){var t=i.exec.call(this,e);return t&&this.global&&!t[0].length&&this.lastIndex>t.index&&this.lastIndex--,!!t}))}),ace.define("ace/lib/es5-shim",["require","exports","module"],function(e,t,n){function i(){}function r(e){try{return Object.defineProperty(e,"sentinel",{}),"sentinel"in e}catch(e){}}function o(e){return(e=+e)!=e?e=0:0!==e&&e!==1/0&&e!==-1/0&&(e=(e>0||-1)*Math.floor(Math.abs(e))),e}Function.prototype.bind||(Function.prototype.bind=function(e){var t=this;if("function"!=typeof t)throw new TypeError("Function.prototype.bind called on incompatible "+t);var n=f.call(arguments,1),r=function(){if(this instanceof r){var i=t.apply(this,n.concat(f.call(arguments)));return Object(i)===i?i:this}return t.apply(e,n.concat(f.call(arguments)))};return t.prototype&&(i.prototype=t.prototype,r.prototype=new i,i.prototype=null),r});var s,a,l,c,u,h=Function.prototype.call,d=Array.prototype,p=Object.prototype,f=d.slice,g=h.bind(p.toString),m=h.bind(p.hasOwnProperty);if((u=m(p,"__defineGetter__"))&&(s=h.bind(p.__defineGetter__),a=h.bind(p.__defineSetter__),l=h.bind(p.__lookupGetter__),c=h.bind(p.__lookupSetter__)),2!=[1,2].splice(0).length)if(function(){function e(e){var t=new Array(e+2);return t[0]=t[1]=0,t}var t,n=[];if(n.splice.apply(n,e(20)),n.splice.apply(n,e(26)),t=n.length,n.splice(5,0,"XXX"),n.length,t+1==n.length)return!0}()){var v=Array.prototype.splice;Array.prototype.splice=function(e,t){return arguments.length?v.apply(this,[void 0===e?0:e,void 0===t?this.length-e:t].concat(f.call(arguments,2))):[]}}else Array.prototype.splice=function(e,t){var n=this.length;e>0?e>n&&(e=n):void 0==e?e=0:e<0&&(e=Math.max(n+e,0)),e+t<n||(t=n-e);var i=this.slice(e,e+t),r=f.call(arguments,2),o=r.length;if(e===n)o&&this.push.apply(this,r);else{var s=Math.min(t,n-e),a=e+s,l=a+o-s,c=n-a,u=n-s;if(l<a)for(var h=0;h<c;++h)this[l+h]=this[a+h];else if(l>a)for(h=c;h--;)this[l+h]=this[a+h];if(o&&e===u)this.length=u,this.push.apply(this,r);else for(this.length=u+o,h=0;h<o;++h)this[e+h]=r[h]}return i};Array.isArray||(Array.isArray=function(e){return"[object Array]"==g(e)});var w=Object("a"),b="a"!=w[0]||!(0 in w);if(Array.prototype.forEach||(Array.prototype.forEach=function(e){var t=L(this),n=b&&"[object String]"==g(this)?this.split(""):t,i=arguments[1],r=-1,o=n.length>>>0;if("[object Function]"!=g(e))throw new TypeError;for(;++r<o;)r in n&&e.call(i,n[r],r,t)}),Array.prototype.map||(Array.prototype.map=function(e){var t=L(this),n=b&&"[object String]"==g(this)?this.split(""):t,i=n.length>>>0,r=Array(i),o=arguments[1];if("[object Function]"!=g(e))throw new TypeError(e+" is not a function");for(var s=0;s<i;s++)s in n&&(r[s]=e.call(o,n[s],s,t));return r}),Array.prototype.filter||(Array.prototype.filter=function(e){var t,n=L(this),i=b&&"[object String]"==g(this)?this.split(""):n,r=i.length>>>0,o=[],s=arguments[1];if("[object Function]"!=g(e))throw new TypeError(e+" is not a function");for(var a=0;a<r;a++)a in i&&(t=i[a],e.call(s,t,a,n)&&o.push(t));return o}),Array.prototype.every||(Array.prototype.every=function(e){var t=L(this),n=b&&"[object String]"==g(this)?this.split(""):t,i=n.length>>>0,r=arguments[1];if("[object Function]"!=g(e))throw new TypeError(e+" is not a function");for(var o=0;o<i;o++)if(o in n&&!e.call(r,n[o],o,t))return!1;return!0}),Array.prototype.some||(Array.prototype.some=function(e){var t=L(this),n=b&&"[object String]"==g(this)?this.split(""):t,i=n.length>>>0,r=arguments[1];if("[object Function]"!=g(e))throw new TypeError(e+" is not a function");for(var o=0;o<i;o++)if(o in n&&e.call(r,n[o],o,t))return!0;return!1}),Array.prototype.reduce||(Array.prototype.reduce=function(e){var t=L(this),n=b&&"[object String]"==g(this)?this.split(""):t,i=n.length>>>0;if("[object Function]"!=g(e))throw new TypeError(e+" is not a function");if(!i&&1==arguments.length)throw new TypeError("reduce of empty array with no initial value");var r,o=0;if(arguments.length>=2)r=arguments[1];else for(;;){if(o in n){r=n[o++];break}if(++o>=i)throw new TypeError("reduce of empty array with no initial value")}for(;o<i;o++)o in n&&(r=e.call(void 0,r,n[o],o,t));return r}),Array.prototype.reduceRight||(Array.prototype.reduceRight=function(e){var t=L(this),n=b&&"[object String]"==g(this)?this.split(""):t,i=n.length>>>0;if("[object Function]"!=g(e))throw new TypeError(e+" is not a function");if(!i&&1==arguments.length)throw new TypeError("reduceRight of empty array with no initial value");var r,o=i-1;if(arguments.length>=2)r=arguments[1];else for(;;){if(o in n){r=n[o--];break}if(--o<0)throw new TypeError("reduceRight of empty array with no initial value")}do{o in this&&(r=e.call(void 0,r,n[o],o,t))}while(o--);return r}),Array.prototype.indexOf&&-1==[0,1].indexOf(1,2)||(Array.prototype.indexOf=function(e){var t=b&&"[object String]"==g(this)?this.split(""):L(this),n=t.length>>>0;if(!n)return-1;var i=0;for(arguments.length>1&&(i=o(arguments[1])),i=i>=0?i:Math.max(0,n+i);i<n;i++)if(i in t&&t[i]===e)return i;return-1}),Array.prototype.lastIndexOf&&-1==[0,1].lastIndexOf(0,-3)||(Array.prototype.lastIndexOf=function(e){var t=b&&"[object String]"==g(this)?this.split(""):L(this),n=t.length>>>0;if(!n)return-1;var i=n-1;for(arguments.length>1&&(i=Math.min(i,o(arguments[1]))),i=i>=0?i:n-Math.abs(i);i>=0;i--)if(i in t&&e===t[i])return i;return-1}),Object.getPrototypeOf||(Object.getPrototypeOf=function(e){return e.__proto__||(e.constructor?e.constructor.prototype:p)}),!Object.getOwnPropertyDescriptor){Object.getOwnPropertyDescriptor=function(e,t){if("object"!=typeof e&&"function"!=typeof e||null===e)throw new TypeError("Object.getOwnPropertyDescriptor called on a non-object: "+e);if(m(e,t)){var n;if(n={enumerable:!0,configurable:!0},u){var i=e.__proto__;e.__proto__=p;var r=l(e,t),o=c(e,t);if(e.__proto__=i,r||o)return r&&(n.get=r),o&&(n.set=o),n}return n.value=e[t],n}}}if(Object.getOwnPropertyNames||(Object.getOwnPropertyNames=function(e){return Object.keys(e)}),!Object.create){var y;y=null===Object.prototype.__proto__?function(){return{__proto__:null}}:function(){var e={};for(var t in e)e[t]=null;return e.constructor=e.hasOwnProperty=e.propertyIsEnumerable=e.isPrototypeOf=e.toLocaleString=e.toString=e.valueOf=e.__proto__=null,e},Object.create=function(e,t){var n;if(null===e)n=y();else{if("object"!=typeof e)throw new TypeError("typeof prototype["+typeof e+"] != 'object'");var i=function(){};i.prototype=e,(n=new i).__proto__=e}return void 0!==t&&Object.defineProperties(n,t),n}}if(Object.defineProperty){var A=r({}),$="undefined"==typeof document||r(document.createElement("div"));if(!A||!$)var C=Object.defineProperty}if(!Object.defineProperty||C){Object.defineProperty=function(e,t,n){if("object"!=typeof e&&"function"!=typeof e||null===e)throw new TypeError("Object.defineProperty called on non-object: "+e);if("object"!=typeof n&&"function"!=typeof n||null===n)throw new TypeError("Property description must be an object: "+n);if(C)try{return C.call(Object,e,t,n)}catch(e){}if(m(n,"value"))if(u&&(l(e,t)||c(e,t))){var i=e.__proto__;e.__proto__=p,delete e[t],e[t]=n.value,e.__proto__=i}else e[t]=n.value;else{if(!u)throw new TypeError("getters & setters can not be defined on this javascript engine");m(n,"get")&&s(e,t,n.get),m(n,"set")&&a(e,t,n.set)}return e}}Object.defineProperties||(Object.defineProperties=function(e,t){for(var n in t)m(t,n)&&Object.defineProperty(e,n,t[n]);return e}),Object.seal||(Object.seal=function(e){return e}),Object.freeze||(Object.freeze=function(e){return e});try{Object.freeze(function(){})}catch(e){Object.freeze=function(e){return function(t){return"function"==typeof t?t:e(t)}}(Object.freeze)}if(Object.preventExtensions||(Object.preventExtensions=function(e){return e}),Object.isSealed||(Object.isSealed=function(e){return!1}),Object.isFrozen||(Object.isFrozen=function(e){return!1}),Object.isExtensible||(Object.isExtensible=function(e){if(Object(e)===e)throw new TypeError;for(var t="";m(e,t);)t+="?";e[t]=!0;var n=m(e,t);return delete e[t],n}),!Object.keys){var x=!0,k=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],E=k.length;for(var F in{toString:null})x=!1;Object.keys=function(e){if("object"!=typeof e&&"function"!=typeof e||null===e)throw new TypeError("Object.keys called on a non-object");var t=[];for(var n in e)m(e,n)&&t.push(n);if(x)for(var i=0,r=E;i<r;i++){var o=k[i];m(e,o)&&t.push(o)}return t}}Date.now||(Date.now=function(){return(new Date).getTime()});var S="\t\n\v\f\r   ᠎             　\u2028\u2029\ufeff";if(!String.prototype.trim||S.trim()){S="["+S+"]";var B=new RegExp("^"+S+S+"*"),D=new RegExp(S+S+"*$");String.prototype.trim=function(){return String(this).replace(B,"").replace(D,"")}}var L=function(e){if(null==e)throw new TypeError("can't convert "+e+" to object");return Object(e)}}),ace.define("ace/lib/fixoldbrowsers",["require","exports","module","ace/lib/regexp","ace/lib/es5-shim"],function(e,t,n){"use strict";e("./regexp"),e("./es5-shim")}),ace.define("ace/lib/dom",["require","exports","module"],function(e,t,n){"use strict";t.getDocumentHead=function(e){return e||(e=document),e.head||e.getElementsByTagName("head")[0]||e.documentElement},t.createElement=function(e,t){return document.createElementNS?document.createElementNS(t||"http://www.w3.org/1999/xhtml",e):document.createElement(e)},t.hasCssClass=function(e,t){return-1!==(e.className+"").split(/\s+/g).indexOf(t)},t.addCssClass=function(e,n){t.hasCssClass(e,n)||(e.className+=" "+n)},t.removeCssClass=function(e,t){for(var n=e.className.split(/\s+/g);;){var i=n.indexOf(t);if(-1==i)break;n.splice(i,1)}e.className=n.join(" ")},t.toggleCssClass=function(e,t){for(var n=e.className.split(/\s+/g),i=!0;;){var r=n.indexOf(t);if(-1==r)break;i=!1,n.splice(r,1)}return i&&n.push(t),e.className=n.join(" "),i},t.setCssClass=function(e,n,i){i?t.addCssClass(e,n):t.removeCssClass(e,n)},t.hasCssString=function(e,t){var n,i=0;if((t=t||document).createStyleSheet&&(n=t.styleSheets)){for(;i<n.length;)if(n[i++].owningElement.id===e)return!0}else if(n=t.getElementsByTagName("style"))for(;i<n.length;)if(n[i++].id===e)return!0;return!1},t.importCssString=function(e,n,i){if(i=i||document,n&&t.hasCssString(n,i))return null;var r;n&&(e+="\n/*# sourceURL=ace/css/"+n+" */"),i.createStyleSheet?((r=i.createStyleSheet()).cssText=e,n&&(r.owningElement.id=n)):((r=t.createElement("style")).appendChild(i.createTextNode(e)),n&&(r.id=n),t.getDocumentHead(i).appendChild(r))},t.importCssStylsheet=function(e,n){if(n.createStyleSheet)n.createStyleSheet(e);else{var i=t.createElement("link");i.rel="stylesheet",i.href=e,t.getDocumentHead(n).appendChild(i)}},t.getInnerWidth=function(e){return parseInt(t.computedStyle(e,"paddingLeft"),10)+parseInt(t.computedStyle(e,"paddingRight"),10)+e.clientWidth},t.getInnerHeight=function(e){return parseInt(t.computedStyle(e,"paddingTop"),10)+parseInt(t.computedStyle(e,"paddingBottom"),10)+e.clientHeight},t.scrollbarWidth=function(e){var n=t.createElement("ace_inner");n.style.width="100%",n.style.minWidth="0px",n.style.height="200px",n.style.display="block";var i=t.createElement("ace_outer"),r=i.style;r.position="absolute",r.left="-10000px",r.overflow="hidden",r.width="200px",r.minWidth="0px",r.height="150px",r.display="block",i.appendChild(n);var o=e.documentElement;o.appendChild(i);var s=n.offsetWidth;r.overflow="scroll";var a=n.offsetWidth;return s==a&&(a=i.clientWidth),o.removeChild(i),s-a},"undefined"!=typeof document?(void 0!==window.pageYOffset?(t.getPageScrollTop=function(){return window.pageYOffset},t.getPageScrollLeft=function(){return window.pageXOffset}):(t.getPageScrollTop=function(){return document.body.scrollTop},t.getPageScrollLeft=function(){return document.body.scrollLeft}),window.getComputedStyle?t.computedStyle=function(e,t){return t?(window.getComputedStyle(e,"")||{})[t]||"":window.getComputedStyle(e,"")||{}}:t.computedStyle=function(e,t){return t?e.currentStyle[t]:e.currentStyle},t.setInnerHtml=function(e,t){var n=e.cloneNode(!1);return n.innerHTML=t,e.parentNode.replaceChild(n,e),n},"textContent"in document.documentElement?(t.setInnerText=function(e,t){e.textContent=t},t.getInnerText=function(e){return e.textContent}):(t.setInnerText=function(e,t){e.innerText=t},t.getInnerText=function(e){return e.innerText}),t.getParentWindow=function(e){return e.defaultView||e.parentWindow}):t.importCssString=function(){}}),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/fixoldbrowsers","ace/lib/oop"],function(e,t,n){"use strict";e("./fixoldbrowsers");var i=e("./oop"),r=function(){var e,t,n={MODIFIER_KEYS:{16:"Shift",17:"Ctrl",18:"Alt",224:"Meta"},KEY_MODS:{ctrl:1,alt:2,option:2,shift:4,super:8,meta:8,command:8,cmd:8},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 i.mixin(n,n.MODIFIER_KEYS),i.mixin(n,n.PRINTABLE_KEYS),i.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}();i.mixin(t,r),t.keyCodeToString=function(e){var t=r[e];return"string"!=typeof t&&(t=String.fromCharCode(e)),t.toLowerCase()}}),ace.define("ace/lib/useragent",["require","exports","module"],function(e,t,n){"use strict";if(t.OS={LINUX:"LINUX",MAC:"MAC",WINDOWS:"WINDOWS"},t.getOS=function(){return t.isMac?t.OS.MAC:t.isLinux?t.OS.LINUX:t.OS.WINDOWS},"object"==typeof navigator){var i=(navigator.platform.match(/mac|win|linux/i)||["other"])[0].toLowerCase(),r=navigator.userAgent;t.isWin="win"==i,t.isMac="mac"==i,t.isLinux="linux"==i,t.isIE="Microsoft Internet Explorer"==navigator.appName||navigator.appName.indexOf("MSAppHost")>=0?parseFloat((r.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]):parseFloat((r.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]),t.isOldIE=t.isIE&&t.isIE<9,t.isGecko=t.isMozilla=(window.Controllers||window.controllers)&&"Gecko"===window.navigator.product,t.isOldGecko=t.isGecko&&parseInt((r.match(/rv:(\d+)/)||[])[1],10)<4,t.isOpera=window.opera&&"[object Opera]"==Object.prototype.toString.call(window.opera),t.isWebKit=parseFloat(r.split("WebKit/")[1])||void 0,t.isChrome=parseFloat(r.split(" Chrome/")[1])||void 0,t.isAIR=r.indexOf("AdobeAIR")>=0,t.isIPad=r.indexOf("iPad")>=0,t.isChromeOS=r.indexOf(" CrOS ")>=0,t.isIOS=/iPad|iPhone|iPod/.test(r)&&!window.MSStream,t.isIOS&&(t.isMac=!0)}}),ace.define("ace/lib/event",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(e,t,n){"use strict";function i(e,t,n){var i=c(t);if(!s.isMac&&a){if(t.getModifierState&&(t.getModifierState("OS")||t.getModifierState("Win"))&&(i|=8),a.altGr){if(3==(3&i))return;a.altGr=0}if(18===n||17===n){var r="location"in t?t.location:t.keyLocation;if(17===n&&1===r)1==a[n]&&(l=t.timeStamp);else if(18===n&&3===i&&2===r){t.timeStamp-l<50&&(a.altGr=!0)}}}if(n in o.MODIFIER_KEYS&&(n=-1),8&i&&n>=91&&n<=93&&(n=-1),!i&&13===n){if(3===(r="location"in t?t.location:t.keyLocation)&&(e(t,i,-n),t.defaultPrevented))return}if(s.isChromeOS&&8&i){if(e(t,i,n),t.defaultPrevented)return;i&=-9}return!!(i||n in o.FUNCTION_KEYS||n in o.PRINTABLE_KEYS)&&e(t,i,n)}function r(){a=Object.create(null)}var o=e("./keys"),s=e("./useragent"),a=null,l=0;t.addListener=function(e,t,n){if(e.addEventListener)return e.addEventListener(t,n,!1);if(e.attachEvent){var i=function(){n.call(e,window.event)};n._wrapper=i,e.attachEvent("on"+t,i)}},t.removeListener=function(e,t,n){if(e.removeEventListener)return e.removeEventListener(t,n,!1);e.detachEvent&&e.detachEvent("on"+t,n._wrapper||n)},t.stopEvent=function(e){return t.stopPropagation(e),t.preventDefault(e),!1},t.stopPropagation=function(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0},t.preventDefault=function(e){e.preventDefault?e.preventDefault():e.returnValue=!1},t.getButton=function(e){return"dblclick"==e.type?0:"contextmenu"==e.type||s.isMac&&e.ctrlKey&&!e.altKey&&!e.shiftKey?2:e.preventDefault?e.button:{1:0,2:2,4:1}[e.button]},t.capture=function(e,n,i){function r(e){n&&n(e),i&&i(e),t.removeListener(document,"mousemove",n,!0),t.removeListener(document,"mouseup",r,!0),t.removeListener(document,"dragstart",r,!0)}return t.addListener(document,"mousemove",n,!0),t.addListener(document,"mouseup",r,!0),t.addListener(document,"dragstart",r,!0),r},t.addTouchMoveListener=function(e,n){var i,r;t.addListener(e,"touchstart",function(e){var t=e.touches[0];i=t.clientX,r=t.clientY}),t.addListener(e,"touchmove",function(e){var t=e.touches;if(!(t.length>1)){var o=t[0];e.wheelX=i-o.clientX,e.wheelY=r-o.clientY,i=o.clientX,r=o.clientY,n(e)}})},t.addMouseWheelListener=function(e,n){"onmousewheel"in e?t.addListener(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),n(e)}):"onwheel"in e?t.addListener(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)}n(e)}):t.addListener(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)),n(e)})},t.addMultiMouseDownListener=function(e,n,i,r){function o(e){if(0!==t.getButton(e)?h=0:e.detail>1?++h>4&&(h=1):h=1,s.isIE){var o=Math.abs(e.clientX-l)>5||Math.abs(e.clientY-c)>5;u&&!o||(h=1),u&&clearTimeout(u),u=setTimeout(function(){u=null},n[h-1]||600),1==h&&(l=e.clientX,c=e.clientY)}if(e._clicks=h,i[r]("mousedown",e),h>4)h=0;else if(h>1)return i[r](d[h],e)}function a(e){h=2,u&&clearTimeout(u),u=setTimeout(function(){u=null},n[h-1]||600),i[r]("mousedown",e),i[r](d[h],e)}var l,c,u,h=0,d={2:"dblclick",3:"tripleclick",4:"quadclick"};Array.isArray(e)||(e=[e]),e.forEach(function(e){t.addListener(e,"mousedown",o),s.isOldIE&&t.addListener(e,"dblclick",a)})};var c=!s.isMac||!s.isOpera||"KeyboardEvent"in window?function(e){return 0|(e.ctrlKey?1:0)|(e.altKey?2:0)|(e.shiftKey?4:0)|(e.metaKey?8:0)}:function(e){return 0|(e.metaKey?1:0)|(e.altKey?2:0)|(e.shiftKey?4:0)|(e.ctrlKey?8:0)};if(t.getModifierString=function(e){return o.KEY_MODS[c(e)]},t.addCommandKeyListener=function(e,n){var o=t.addListener;if(s.isOldGecko||s.isOpera&&!("KeyboardEvent"in window)){var l=null;o(e,"keydown",function(e){l=e.keyCode}),o(e,"keypress",function(e){return i(n,e,l)})}else{var c=null;o(e,"keydown",function(e){a[e.keyCode]=(a[e.keyCode]||0)+1;var t=i(n,e,e.keyCode);return c=e.defaultPrevented,t}),o(e,"keypress",function(e){c&&(e.ctrlKey||e.altKey||e.shiftKey||e.metaKey)&&(t.stopEvent(e),c=null)}),o(e,"keyup",function(e){a[e.keyCode]=null}),a||(r(),o(window,"focus",r))}},"object"==typeof window&&window.postMessage&&!s.isOldIE){t.nextTick=function(e,n){n=n||window;var i="zero-timeout-message-1";t.addListener(n,"message",function r(o){o.data==i&&(t.stopPropagation(o),t.removeListener(n,"message",r),e())}),n.postMessage(i,"*")}}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/lib/lang",["require","exports","module"],function(e,t,n){"use strict";t.last=function(e){return e[e.length-1]},t.stringReverse=function(e){return e.split("").reverse().join("")},t.stringRepeat=function(e,t){for(var n="";t>0;)1&t&&(n+=e),(t>>=1)&&(e+=e);return n};var i=/^\s\s*/,r=/\s\s*$/;t.stringTrimLeft=function(e){return e.replace(i,"")},t.stringTrimRight=function(e){return e.replace(r,"")},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,i=e.length;n<i;n++)e[n]&&"object"==typeof e[n]?t[n]=this.copyObject(e[n]):t[n]=e[n];return t},t.deepCopy=function e(t){if("object"!=typeof t||!t)return t;var n;if(Array.isArray(t)){n=[];for(var i=0;i<t.length;i++)n[i]=e(t[i]);return n}if("[object Object]"!==Object.prototype.toString.call(t))return t;n={};for(var i in t)n[i]=e(t[i]);return n},t.arrayToMap=function(e){for(var t={},n=0;n<e.length;n++)t[e[n]]=1;return t},t.createMap=function(e){var t=Object.create(null);for(var n in e)t[n]=e[n];return t},t.arrayRemove=function(e,t){for(var n=0;n<=e.length;n++)t===e[n]&&e.splice(n,1)},t.escapeRegExp=function(e){return e.replace(/([.*+?^${}()|[\]\/\\])/g,"\\$1")},t.escapeHTML=function(e){return e.replace(/&/g,"&#38;").replace(/"/g,"&#34;").replace(/'/g,"&#39;").replace(/</g,"&#60;")},t.getMatchOffsets=function(e,t){var n=[];return e.replace(t,function(e){n.push({offset:arguments[arguments.length-2],length:e.length})}),n},t.deferredCall=function(e){var t=null,n=function(){t=null,e()},i=function(e){return i.cancel(),t=setTimeout(n,e||0),i};return i.schedule=i,i.call=function(){return this.cancel(),e(),i},i.cancel=function(){return clearTimeout(t),t=null,i},i.isPending=function(){return t},i},t.delayedCall=function(e,t){var n=null,i=function(){n=null,e()},r=function(e){null==n&&(n=setTimeout(i,e||t))};return r.delay=function(e){n&&clearTimeout(n),n=setTimeout(i,e||t)},r.schedule=r,r.call=function(){this.cancel(),e()},r.cancel=function(){n&&clearTimeout(n),n=null},r.isPending=function(){return n},r}}),ace.define("ace/keyboard/textinput_ios",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/lib/dom","ace/lib/lang","ace/lib/keys"],function(e,t,n){"use strict";var i=e("../lib/event"),r=e("../lib/useragent"),o=e("../lib/dom"),s=e("../lib/lang"),a=e("../lib/keys"),l=a.KEY_MODS,c=r.isChrome<18,u=r.isIE;t.TextInput=function(e,t){function n(e){if(!w){if(w=!0,x)t=0,n=e?0:p.value.length-1;else var t=4,n=5;try{p.setSelectionRange(t,n)}catch(e){}w=!1}}function h(){w||(p.value=f,r.isWebKit&&C.schedule())}function d(){clearTimeout(R),R=setTimeout(function(){b&&(p.style.cssText=b,b=""),null==t.renderer.$keepTextAreaAtCursor&&(t.renderer.$keepTextAreaAtCursor=!0,t.renderer.$moveTextAreaToCursor())},0)}var p=o.createElement("textarea");p.className=r.isIOS?"ace_text-input ace_text-input-ios":"ace_text-input",r.isTouchPad&&p.setAttribute("x-palm-disable-auto-cap",!0),p.setAttribute("wrap","off"),p.setAttribute("autocorrect","off"),p.setAttribute("autocapitalize","off"),p.setAttribute("spellcheck",!1),p.style.opacity="0",e.insertBefore(p,e.firstChild);var f="\n aaaa a\n",g=!1,m=!1,v=!1,w=!1,b="",y=!0;try{var A=document.activeElement===p}catch(e){}i.addListener(p,"blur",function(e){t.onBlur(e),A=!1}),i.addListener(p,"focus",function(e){A=!0,t.onFocus(e),n()}),this.focus=function(){if(b)return p.focus();p.style.position="fixed",p.focus()},this.blur=function(){p.blur()},this.isFocused=function(){return A};var $=s.delayedCall(function(){A&&n(y)}),C=s.delayedCall(function(){w||(p.value=f,A&&n())});r.isWebKit||t.addEventListener("changeSelection",function(){t.selection.isEmpty()!=y&&(y=!y,$.schedule())}),h(),A&&t.onFocus();var x=null;this.setInputHandler=function(e){x=e},this.getInputHandler=function(){return x};var k=!1,E=function(e){4===p.selectionStart&&5===p.selectionEnd||(x&&(e=x(e),x=null),v?(n(),e&&t.onPaste(e),v=!1):e==f.substr(0)&&4===p.selectionStart?k?t.execCommand("del",{source:"ace"}):t.execCommand("backspace",{source:"ace"}):g||(e.substring(0,9)==f&&e.length>f.length?e=e.substr(9):e.substr(0,4)==f.substr(0,4)?e=e.substr(4,e.length-f.length+1):e.charAt(e.length-1)==f.charAt(0)&&(e=e.slice(0,-1)),e==f.charAt(0)||e.charAt(e.length-1)==f.charAt(0)&&(e=e.slice(0,-1)),e&&t.onTextInput(e)),g&&(g=!1),k&&(k=!1))},F=function(e){if(!w){var t=p.value;E(t),h()}},S=function(e,t,n){var i=e.clipboardData||window.clipboardData;if(i&&!c){var r=u||n?"Text":"text/plain";try{return t?!1!==i.setData(r,t):i.getData(r)}catch(e){if(!n)return S(e,t,!0)}}},B=function(e,o){var s=t.getCopyText();if(!s)return i.preventDefault(e);S(e,s)?(r.isIOS&&(m=o,p.value="\n aa"+s+"a a\n",p.setSelectionRange(4,4+s.length),g={value:s}),o?t.onCut():t.onCopy(),r.isIOS||i.preventDefault(e)):(g=!0,p.value=s,p.select(),setTimeout(function(){g=!1,h(),n(),o?t.onCut():t.onCopy()}))};i.addCommandKeyListener(p,t.onCommandKey.bind(t)),i.addListener(p,"select",function(e){!function(e){return 0===e.selectionStart&&e.selectionEnd===e.value.length}(p)?x&&n(t.selection.isEmpty()):(t.selectAll(),n())}),i.addListener(p,"input",F),i.addListener(p,"cut",function(e){B(e,!0)}),i.addListener(p,"copy",function(e){B(e,!1)}),i.addListener(p,"paste",function(e){var o=S(e);"string"==typeof o?(o&&t.onPaste(o,e),r.isIE&&setTimeout(n),i.preventDefault(e)):(p.value="",v=!0)});var D=function(){if(w&&t.onCompositionUpdate&&!t.$readOnly){var e=p.value.replace(/\x01/g,"");if(w.lastValue!==e&&(t.onCompositionUpdate(e),w.lastValue&&t.undo(),w.canUndo&&(w.lastValue=e),w.lastValue)){var n=t.selection.getRange();t.insert(w.lastValue),t.session.markUndoGroup(),w.range=t.selection.getRange(),t.selection.setRange(n),t.selection.clearSelection()}}},L=function(e){if(t.onCompositionEnd&&!t.$readOnly){var n=w;w=!1;var i=setTimeout(function(){i=null;var e=p.value.replace(/\x01/g,"");w||(e==n.lastValue?h():!n.lastValue&&e&&(h(),E(e)))});x=function(e){return i&&clearTimeout(i),(e=e.replace(/\x01/g,""))==n.lastValue?"":(n.lastValue&&i&&t.undo(),e)},t.onCompositionEnd(),t.removeListener("mousedown",L),"compositionend"==e.type&&n.range&&t.selection.setRange(n.range),(r.isChrome&&r.isChrome>=53||r.isWebKit&&r.isWebKit>=603)&&F()}},M=s.delayedCall(D,50);i.addListener(p,"compositionstart",function(e){w||!t.onCompositionStart||t.$readOnly||((w={}).canUndo=t.session.$undoManager,t.onCompositionStart(),setTimeout(D,0),t.on("mousedown",L),w.canUndo&&!t.selection.isEmpty()&&(t.insert(""),t.session.markUndoGroup(),t.selection.clearSelection()),t.session.markUndoGroup())}),r.isGecko?i.addListener(p,"text",function(){M.schedule()}):(i.addListener(p,"keyup",function(){M.schedule()}),i.addListener(p,"keydown",function(){M.schedule()})),i.addListener(p,"compositionend",L),this.getElement=function(){return p},this.setReadOnly=function(e){p.readOnly=e},this.onContextMenu=function(e){k=!0,n(t.selection.isEmpty()),t._emit("nativecontextmenu",{target:t,domEvent:e}),this.moveToMouse(e,!0)},this.moveToMouse=function(e,n){b||(b=p.style.cssText),p.style.cssText=(n?"z-index:100000;":"")+"height:"+p.style.height+";"+(r.isIE?"opacity:0.1;":"");var s=t.container.getBoundingClientRect(),a=o.computedStyle(t.container),l=s.top+(parseInt(a.borderTopWidth)||0),c=s.left+(parseInt(s.borderLeftWidth)||0),u=s.bottom-l-p.clientHeight-2,h=function(e){p.style.left=e.clientX-c-2+"px",p.style.top=Math.min(e.clientY-l-2,u)+"px"};h(e),"mousedown"==e.type&&(t.renderer.$keepTextAreaAtCursor&&(t.renderer.$keepTextAreaAtCursor=null),clearTimeout(R),r.isWin&&i.capture(t.container,h,d))},this.onContextMenuClose=d;var R,T=function(e){t.textInput.onContextMenu(e),d()};if(i.addListener(p,"mouseup",T),i.addListener(p,"mousedown",function(e){e.preventDefault(),d()}),i.addListener(t.renderer.scroller,"contextmenu",T),i.addListener(p,"contextmenu",T),r.isIOS){var _=null,O=!1;e.addEventListener("keydown",function(e){_&&clearTimeout(_),O=!0}),e.addEventListener("keyup",function(e){_=setTimeout(function(){O=!1},100)});var I=function(e){if(document.activeElement===p&&!O){if(m)return setTimeout(function(){m=!1},100);var n=p.selectionStart,i=p.selectionEnd;if(p.setSelectionRange(4,5),n==i)switch(n){case 0:t.onCommandKey(null,0,a.up);break;case 1:t.onCommandKey(null,0,a.home);break;case 2:t.onCommandKey(null,l.option,a.left);break;case 4:t.onCommandKey(null,0,a.left);break;case 5:t.onCommandKey(null,0,a.right);break;case 7:t.onCommandKey(null,l.option,a.right);break;case 8:t.onCommandKey(null,0,a.end);break;case 9:t.onCommandKey(null,0,a.down)}else{switch(i){case 6:t.onCommandKey(null,l.shift,a.right);break;case 7:t.onCommandKey(null,l.shift|l.option,a.right);break;case 8:t.onCommandKey(null,l.shift,a.end);break;case 9:t.onCommandKey(null,l.shift,a.down)}switch(n){case 0:t.onCommandKey(null,l.shift,a.up);break;case 1:t.onCommandKey(null,l.shift,a.home);break;case 2:t.onCommandKey(null,l.shift|l.option,a.left);break;case 3:t.onCommandKey(null,l.shift,a.left)}}}};document.addEventListener("selectionchange",I),t.on("destroy",function(){document.removeEventListener("selectionchange",I)})}}}),ace.define("ace/keyboard/textinput",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/lib/dom","ace/lib/lang","ace/keyboard/textinput_ios"],function(e,t,n){"use strict";var i=e("../lib/event"),r=e("../lib/useragent"),o=e("../lib/dom"),s=e("../lib/lang"),a=r.isChrome<18,l=r.isIE,c=e("./textinput_ios").TextInput;t.TextInput=function(e,t){function n(e){if(!m){if(m=!0,$)var t=0,n=e?0:d.value.length-1;else t=e?2:1,n=2;try{d.setSelectionRange(t,n)}catch(e){}m=!1}}function u(){m||(d.value=p,r.isWebKit&&A.schedule())}function h(){clearTimeout(T),T=setTimeout(function(){v&&(d.style.cssText=v,v=""),null==t.renderer.$keepTextAreaAtCursor&&(t.renderer.$keepTextAreaAtCursor=!0,t.renderer.$moveTextAreaToCursor())},0)}if(r.isIOS)return c.call(this,e,t);var d=o.createElement("textarea");d.className="ace_text-input",d.setAttribute("wrap","off"),d.setAttribute("autocorrect","off"),d.setAttribute("autocapitalize","off"),d.setAttribute("spellcheck",!1),d.style.opacity="0",e.insertBefore(d,e.firstChild);var p="\u2028\u2028",f=!1,g=!1,m=!1,v="",w=!0;try{var b=document.activeElement===d}catch(e){}i.addListener(d,"blur",function(e){t.onBlur(e),b=!1}),i.addListener(d,"focus",function(e){b=!0,t.onFocus(e),n()}),this.focus=function(){if(v)return d.focus();var e=d.style.top;d.style.position="fixed",d.style.top="0px",d.focus(),setTimeout(function(){d.style.position="","0px"==d.style.top&&(d.style.top=e)},0)},this.blur=function(){d.blur()},this.isFocused=function(){return b};var y=s.delayedCall(function(){b&&n(w)}),A=s.delayedCall(function(){m||(d.value=p,b&&n())});r.isWebKit||t.addEventListener("changeSelection",function(){t.selection.isEmpty()!=w&&(w=!w,y.schedule())}),u(),b&&t.onFocus();var $=null;this.setInputHandler=function(e){$=e},this.getInputHandler=function(){return $};var C=!1,x=function(e){$&&(e=$(e),$=null),g?(n(),e&&t.onPaste(e),g=!1):e==p.charAt(0)?C?t.execCommand("del",{source:"ace"}):t.execCommand("backspace",{source:"ace"}):(e.substring(0,2)==p?e=e.substr(2):e.charAt(0)==p.charAt(0)?e=e.substr(1):e.charAt(e.length-1)==p.charAt(0)&&(e=e.slice(0,-1)),e.charAt(e.length-1)==p.charAt(0)&&(e=e.slice(0,-1)),e&&t.onTextInput(e)),C&&(C=!1)},k=function(e){if(!m){var t=d.value;x(t),u()}},E=function(e,t,n){var i=e.clipboardData||window.clipboardData;if(i&&!a){var r=l||n?"Text":"text/plain";try{return t?!1!==i.setData(r,t):i.getData(r)}catch(e){if(!n)return E(e,t,!0)}}},F=function(e,r){var o=t.getCopyText();if(!o)return i.preventDefault(e);E(e,o)?(r?t.onCut():t.onCopy(),i.preventDefault(e)):(f=!0,d.value=o,d.select(),setTimeout(function(){f=!1,u(),n(),r?t.onCut():t.onCopy()}))},S=function(e){F(e,!0)},B=function(e){F(e,!1)},D=function(e){var o=E(e);"string"==typeof o?(o&&t.onPaste(o,e),r.isIE&&setTimeout(n),i.preventDefault(e)):(d.value="",g=!0)};i.addCommandKeyListener(d,t.onCommandKey.bind(t)),i.addListener(d,"select",function(e){f?f=!1:function(e){return 0===e.selectionStart&&e.selectionEnd===e.value.length}(d)?(t.selectAll(),n()):$&&n(t.selection.isEmpty())}),i.addListener(d,"input",k),i.addListener(d,"cut",S),i.addListener(d,"copy",B),i.addListener(d,"paste",D),"oncut"in d&&"oncopy"in d&&"onpaste"in d||i.addListener(e,"keydown",function(e){if((!r.isMac||e.metaKey)&&e.ctrlKey)switch(e.keyCode){case 67:B(e);break;case 86:D(e);break;case 88:S(e)}});var L=function(){if(m&&t.onCompositionUpdate&&!t.$readOnly){var e=d.value.replace(/\u2028/g,"");if(m.lastValue!==e&&(t.onCompositionUpdate(e),m.lastValue&&t.undo(),m.canUndo&&(m.lastValue=e),m.lastValue)){var n=t.selection.getRange();t.insert(m.lastValue),t.session.markUndoGroup(),m.range=t.selection.getRange(),t.selection.setRange(n),t.selection.clearSelection()}}},M=function(e){if(t.onCompositionEnd&&!t.$readOnly){var n=m;m=!1;var i=setTimeout(function(){i=null;var e=d.value.replace(/\u2028/g,"");m||(e==n.lastValue?u():!n.lastValue&&e&&(u(),x(e)))});$=function(e){return i&&clearTimeout(i),(e=e.replace(/\u2028/g,""))==n.lastValue?"":(n.lastValue&&i&&t.undo(),e)},t.onCompositionEnd(),t.removeListener("mousedown",M),"compositionend"==e.type&&n.range&&t.selection.setRange(n.range),(r.isChrome&&r.isChrome>=53||r.isWebKit&&r.isWebKit>=603)&&k()}},R=s.delayedCall(L,50);i.addListener(d,"compositionstart",function(e){m||!t.onCompositionStart||t.$readOnly||((m={}).canUndo=t.session.$undoManager,t.onCompositionStart(),setTimeout(L,0),t.on("mousedown",M),m.canUndo&&!t.selection.isEmpty()&&(t.insert(""),t.session.markUndoGroup(),t.selection.clearSelection()),t.session.markUndoGroup())}),r.isGecko?i.addListener(d,"text",function(){R.schedule()}):(i.addListener(d,"keyup",function(){R.schedule()}),i.addListener(d,"keydown",function(){R.schedule()})),i.addListener(d,"compositionend",M),this.getElement=function(){return d},this.setReadOnly=function(e){d.readOnly=e},this.onContextMenu=function(e){C=!0,n(t.selection.isEmpty()),t._emit("nativecontextmenu",{target:t,domEvent:e}),this.moveToMouse(e,!0)},this.moveToMouse=function(e,n){v||(v=d.style.cssText),d.style.cssText=(n?"z-index:100000;":"")+"height:"+d.style.height+";"+(r.isIE?"opacity:0.1;":"");var s=t.container.getBoundingClientRect(),a=o.computedStyle(t.container),l=s.top+(parseInt(a.borderTopWidth)||0),c=s.left+(parseInt(s.borderLeftWidth)||0),u=s.bottom-l-d.clientHeight-2,p=function(e){d.style.left=e.clientX-c-2+"px",d.style.top=Math.min(e.clientY-l-2,u)+"px"};p(e),"mousedown"==e.type&&(t.renderer.$keepTextAreaAtCursor&&(t.renderer.$keepTextAreaAtCursor=null),clearTimeout(T),r.isWin&&i.capture(t.container,p,h))},this.onContextMenuClose=h;var T,_=function(e){t.textInput.onContextMenu(e),h()};i.addListener(d,"mouseup",_),i.addListener(d,"mousedown",function(e){e.preventDefault(),h()}),i.addListener(t.renderer.scroller,"contextmenu",_),i.addListener(d,"contextmenu",_)}}),ace.define("ace/mouse/default_handlers",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],function(e,t,n){"use strict";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)),t.setDefaultHandler("touchmove",this.onTouchMove.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 r(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}}e("../lib/dom"),e("../lib/event");var o=e("../lib/useragent");(function(){this.onMouseDown=function(e){var t=e.inSelection(),n=e.getDocumentPosition();this.mousedownEvent=e;var i=this.editor,r=e.getButton();if(0!==r){var s=i.getSelectionRange().isEmpty();return i.$blockScrolling++,(s||1==r)&&i.selection.moveToPosition(n),i.$blockScrolling--,void(2==r&&(i.textInput.onContextMenu(e.domEvent),o.isMozilla||e.preventDefault()))}return this.mousedownEvent.time=Date.now(),!t||i.isFocused()||(i.focus(),!this.$focusTimout||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;n.$blockScrolling++,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"),n.$blockScrolling--},this.select=function(){var e,t=this.editor,n=t.renderer.screenToTextCoordinates(this.x,this.y);if(t.$blockScrolling++,this.$clickSelection){var i=this.$clickSelection.comparePoint(n);if(-1==i)e=this.$clickSelection.end;else if(1==i)e=this.$clickSelection.start;else{var o=r(this.$clickSelection,n);n=o.cursor,e=o.anchor}t.selection.setSelectionAnchor(e.row,e.column)}t.selection.selectToPosition(n),t.$blockScrolling--,t.renderer.scrollCursorIntoView()},this.extendSelectionBy=function(e){var t,n=this.editor,i=n.renderer.screenToTextCoordinates(this.x,this.y),o=n.selection[e](i.row,i.column);if(n.$blockScrolling++,this.$clickSelection){var s=this.$clickSelection.comparePoint(o.start),a=this.$clickSelection.comparePoint(o.end);if(-1==s&&a<=0)t=this.$clickSelection.end,o.end.row==i.row&&o.end.column==i.column||(i=o.start);else if(1==a&&s>=0)t=this.$clickSelection.start,o.start.row==i.row&&o.start.column==i.column||(i=o.end);else if(-1==s&&1==a)i=o.end,t=o.start;else{var l=r(this.$clickSelection,i);i=l.cursor,t=l.anchor}n.selection.setSelectionAnchor(t.row,t.column)}n.selection.selectToPosition(i),n.$blockScrolling--,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=function(e,t,n,i){return Math.sqrt(Math.pow(n-e,2)+Math.pow(i-t,2))}(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y),t=Date.now();(e>0||t-this.mousedownEvent.time>this.$focusTimout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},this.onDoubleClick=function(e){var t=e.getDocumentPosition(),n=this.editor,i=n.session.getBracketRange(t);i?(i.isEmpty()&&(i.start.column--,i.end.column++),this.setState("select")):(i=n.selection.getWordRange(t.row,t.column),this.setState("selectByWords")),this.$clickSelection=i,this.select()},this.onTripleClick=function(e){var t=e.getDocumentPosition(),n=this.editor;this.setState("selectByLines");var i=n.getSelectionRange();i.isMultiLine()&&i.contains(t.row,t.column)?(this.$clickSelection=n.selection.getLineRange(i.start.row),this.$clickSelection.end=n.selection.getLineRange(i.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,i=e.domEvent.timeStamp,r=i-n.t,o=e.wheelX/r,s=e.wheelY/r;r<250&&(o=(o+n.vx)/2,s=(s+n.vy)/2);var a=Math.abs(o/s),l=!1;if(a>=1&&t.renderer.isScrollableBy(e.wheelX*e.speed,0)&&(l=!0),a<=1&&t.renderer.isScrollableBy(0,e.wheelY*e.speed)&&(l=!0),l)n.allowed=i;else if(i-n.allowed<250){Math.abs(o)<=1.1*Math.abs(n.vx)&&Math.abs(s)<=1.1*Math.abs(n.vy)?(l=!0,n.allowed=i):n.allowed=0}return n.t=i,n.vx=o,n.vy=s,l?(t.renderer.scrollBy(e.wheelX*e.speed,e.wheelY*e.speed),e.stop()):void 0}},this.onTouchMove=function(e){this.editor._emit("mousewheel",e)}}).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";function i(e){this.isOpen=!1,this.$element=null,this.$parentNode=e}e("./lib/oop");var r=e("./lib/dom");(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){r.setInnerText(this.getElement(),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";function i(e){a.call(this,e)}var r=e("../lib/dom"),o=e("../lib/oop"),s=e("../lib/event"),a=e("../tooltip").Tooltip;o.inherits(i,a),function(){this.setPosition=function(e,t){var n=window.innerWidth||document.documentElement.clientWidth,i=window.innerHeight||document.documentElement.clientHeight,r=this.getWidth(),o=this.getHeight();t+=15,(e+=15)+r>n&&(e-=e+r-n),t+o>i&&(t-=20+o),a.prototype.setPosition.call(this,e,t)}}.call(i.prototype),t.GutterHandler=function(e){function t(){c&&(c=clearTimeout(c)),h&&(l.hide(),h=null,o._signal("hideGutterTooltip",l),o.removeEventListener("mousewheel",t))}function n(e){l.setPosition(e.x,e.y)}var o=e.editor,a=o.renderer.$gutterLayer,l=new i(o.container);e.editor.setDefaultHandler("guttermousedown",function(t){if(o.isFocused()&&0==t.getButton()&&"foldWidgets"!=a.getRegion(t)){var n=t.getDocumentPosition().row,i=o.session.selection;if(t.getShiftKey())i.selectTo(n,0);else{if(2==t.domEvent.detail)return o.selectAll(),t.preventDefault();e.$clickSelection=o.selection.getLineRange(n)}return e.setState("selectByLines"),e.captureMouse(t),t.preventDefault()}});var c,u,h;e.editor.setDefaultHandler("guttermousemove",function(i){var s=i.domEvent.target||i.domEvent.srcElement;if(r.hasCssClass(s,"ace_fold-widget"))return t();h&&e.$tooltipFollowsMouse&&n(i),u=i,c||(c=setTimeout(function(){c=null,u&&!e.isMousePressed?function(){var i=u.getDocumentPosition().row,r=a.$annotations[i];if(!r)return t();if(i==o.session.getLength()){var s=o.renderer.pixelToScreenCoordinates(0,u.y).row,c=u.$pos;if(s>o.session.documentToScreenRow(c.row,c.column))return t()}if(h!=r)if(h=r.text.join("<br/>"),l.setHtml(h),l.show(),o._signal("showGutterTooltip",l),o.on("mousewheel",t),e.$tooltipFollowsMouse)n(u);else{var d=u.domEvent.target.getBoundingClientRect(),p=l.getElement().style;p.left=d.right+"px",p.top=d.bottom+"px"}}():t()},50))}),s.addListener(o.renderer.$gutter,"mouseout",function(e){u=null,h&&!c&&(c=setTimeout(function(){c=null,t()},50))}),o.on("changeSession",t)}}),ace.define("ace/mouse/mouse_event",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(e,t,n){"use strict";var i=e("../lib/event"),r=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(){i.stopPropagation(this.domEvent),this.propagationStopped=!0},this.preventDefault=function(){i.preventDefault(this.domEvent),this.defaultPrevented=!0},this.stop=function(){this.stopPropagation(),this.preventDefault()},this.getDocumentPosition=function(){return this.$pos?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 i.getButton(this.domEvent)},this.getShiftKey=function(){return this.domEvent.shiftKey},this.getAccelKey=r.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";function i(e){function t(){var e=A;(function(e,t){var n=Date.now(),i=!t||e.row!=t.row,o=!t||e.column!=t.column;!k||i||o?(f.$blockScrolling+=1,f.moveCursorToPosition(e),f.$blockScrolling-=1,k=n,E={x:v,y:w}):r(E.x,E.y,v,w)>u?k=null:n-k>=c&&(f.renderer.scrollCursorIntoView(),k=null)})(A=f.renderer.screenToTextCoordinates(v,w),e),function(e,t){var n=Date.now(),i=f.renderer.layerConfig.lineHeight,r=f.renderer.layerConfig.characterWidth,o=f.renderer.scroller.getBoundingClientRect(),s={x:{left:v-o.left,right:o.right-v},y:{top:w-o.top,bottom:o.bottom-w}},a=Math.min(s.x.left,s.x.right),c=Math.min(s.y.top,s.y.bottom),u={row:e.row,column:e.column};a/r<=2&&(u.column+=s.x.left<s.x.right?-3:2),c/i<=1&&(u.row+=s.y.top<s.y.bottom?-1:1);var h=e.row!=u.row,d=e.column!=u.column,p=!t||e.row!=t.row;h||d&&!p?x?n-x>=l&&f.renderer.scrollCursorIntoView(u):x=n:x=null}(A,e)}function n(){y=f.selection.toOrientedRange(),m=f.session.addMarker(y,"ace_selection",f.getSelectionStyle()),f.clearSelection(),f.isFocused()&&f.renderer.$cursorLayer.setBlinking(!1),clearInterval(b),t(),b=setInterval(t,20),S=0,s.addListener(document,"mousemove",h)}function i(){clearInterval(b),f.session.removeMarker(m),m=null,f.$blockScrolling+=1,f.selection.fromOrientedRange(y),f.$blockScrolling-=1,f.isFocused()&&!C&&f.renderer.$cursorLayer.setBlinking(!f.getReadOnly()),y=null,A=null,S=0,x=null,k=null,s.removeListener(document,"mousemove",h)}function h(){null==B&&(B=setTimeout(function(){null!=B&&m&&i()},20))}function d(e){var t=e.types;return!t||Array.prototype.some.call(t,function(e){return"text/plain"==e||"Text"==e})}function p(e){var t=["copy","copymove","all","uninitialized"],n=a.isMac?e.altKey:e.ctrlKey,i="uninitialized";try{i=e.dataTransfer.effectAllowed.toLowerCase()}catch(e){}var r="none";return n&&t.indexOf(i)>=0?r="copy":["move","copymove","linkmove","all","uninitialized"].indexOf(i)>=0?r="move":t.indexOf(i)>=0&&(r="copy"),r}var f=e.editor,g=o.createElement("img");g.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",a.isOpera&&(g.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),f.addEventListener("mousedown",this.onMouseDown.bind(e));var m,v,w,b,y,A,$,C,x,k,E,F=f.container,S=0;this.onDragStart=function(e){if(this.cancelDrag||!F.draggable){var t=this;return setTimeout(function(){t.startSelect(),t.captureMouse(e)},0),e.preventDefault()}y=f.getSelectionRange();var n=e.dataTransfer;n.effectAllowed=f.getReadOnly()?"copy":"copyMove",a.isOpera&&(f.container.appendChild(g),g.scrollTop=0),n.setDragImage&&n.setDragImage(g,0,0),a.isOpera&&f.container.removeChild(g),n.clearData(),n.setData("Text",f.session.getTextRange()),C=!0,this.setState("drag")},this.onDragEnd=function(e){if(F.draggable=!1,C=!1,this.setState(null),!f.getReadOnly()){var t=e.dataTransfer.dropEffect;$||"move"!=t||f.session.remove(f.getSelectionRange()),f.renderer.$cursorLayer.setBlinking(!0)}this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle("")},this.onDragEnter=function(e){if(!f.getReadOnly()&&d(e.dataTransfer))return v=e.clientX,w=e.clientY,m||n(),S++,e.dataTransfer.dropEffect=$=p(e),s.preventDefault(e)},this.onDragOver=function(e){if(!f.getReadOnly()&&d(e.dataTransfer))return v=e.clientX,w=e.clientY,m||(n(),S++),null!==B&&(B=null),e.dataTransfer.dropEffect=$=p(e),s.preventDefault(e)},this.onDragLeave=function(e){if(--S<=0&&m)return i(),$=null,s.preventDefault(e)},this.onDrop=function(e){if(A){var t=e.dataTransfer;if(C)switch($){case"move":y=y.contains(A.row,A.column)?{start:A,end:A}:f.moveText(y,A);break;case"copy":y=f.moveText(y,A,!0)}else{var n=t.getData("Text");y={start:A,end:f.session.insert(A,n)},f.focus(),$=null}return i(),s.preventDefault(e)}},s.addListener(F,"dragstart",this.onDragStart.bind(e)),s.addListener(F,"dragend",this.onDragEnd.bind(e)),s.addListener(F,"dragenter",this.onDragEnter.bind(e)),s.addListener(F,"dragover",this.onDragOver.bind(e)),s.addListener(F,"dragleave",this.onDragLeave.bind(e)),s.addListener(F,"drop",this.onDrop.bind(e));var B=null}function r(e,t,n,i){return Math.sqrt(Math.pow(n-e,2)+Math.pow(i-t,2))}var o=e("../lib/dom"),s=e("../lib/event"),a=e("../lib/useragent"),l=200,c=200,u=5;(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.renderer.$cursorLayer.setBlinking(!this.editor.getReadOnly()),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=a.isWin?"default":"move";e.renderer.setCursorStyle(t),this.setState("dragReady")},this.onMouseDrag=function(e){var t=this.editor.container;if(a.isIE&&"dragReady"==this.state){r(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y)>3&&t.dragDrop()}if("dragWait"===this.state){r(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(),i=e.getButton();if(1===(e.domEvent.detail||1)&&0===i&&n){if(e.editor.inMultiSelectMode&&(e.getAccelKey()||e.getShiftKey()))return;this.mousedownEvent.time=Date.now();var r=e.domEvent.target||e.domEvent.srcElement;if("unselectable"in r&&(r.unselectable="on"),t.getDragDelay()){if(a.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(i.prototype),t.DragdropHandler=i}),ace.define("ace/lib/net",["require","exports","module","ace/lib/dom"],function(e,t,n){"use strict";var i=e("./dom");t.get=function(e,t){var n=new XMLHttpRequest;n.open("GET",e,!0),n.onreadystatechange=function(){4===n.readyState&&t(n.responseText)},n.send(null)},t.loadScript=function(e,t){var n=i.getDocumentHead(),r=document.createElement("script");r.src=e,n.appendChild(r),r.onload=r.onreadystatechange=function(e,n){!n&&r.readyState&&"loaded"!=r.readyState&&"complete"!=r.readyState||(r=r.onload=r.onreadystatechange=null,n||t())}},t.qualifyURL=function(e){var t=document.createElement("a");return t.href=e,t.href}}),ace.define("ace/lib/event_emitter",["require","exports","module"],function(e,t,n){"use strict";var i={},r=function(){this.propagationStopped=!0},o=function(){this.defaultPrevented=!0};i._emit=i._dispatchEvent=function(e,t){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var n=this._eventRegistry[e]||[],i=this._defaultHandlers[e];if(n.length||i){"object"==typeof t&&t||(t={}),t.type||(t.type=e),t.stopPropagation||(t.stopPropagation=r),t.preventDefault||(t.preventDefault=o),n=n.slice();for(var s=0;s<n.length&&(n[s](t,this),!t.propagationStopped);s++);return i&&!t.defaultPrevented?i(t,this):void 0}},i._signal=function(e,t){var n=(this._eventRegistry||{})[e];if(n){n=n.slice();for(var i=0;i<n.length;i++)n[i](t,this)}},i.once=function(e,t){var n=this;t&&this.addEventListener(e,function i(){n.removeEventListener(e,i),t.apply(null,arguments)})},i.setDefaultHandler=function(e,t){var n=this._defaultHandlers;if(n||(n=this._defaultHandlers={_disabled_:{}}),n[e]){var i=n[e],r=n._disabled_[e];r||(n._disabled_[e]=r=[]),r.push(i);var o=r.indexOf(t);-1!=o&&r.splice(o,1)}n[e]=t},i.removeDefaultHandler=function(e,t){var n=this._defaultHandlers;if(n){var i=n._disabled_[e];if(n[e]==t){n[e];i&&this.setDefaultHandler(e,i.pop())}else if(i){var r=i.indexOf(t);-1!=r&&i.splice(r,1)}}},i.on=i.addEventListener=function(e,t,n){this._eventRegistry=this._eventRegistry||{};var i=this._eventRegistry[e];return i||(i=this._eventRegistry[e]=[]),-1==i.indexOf(t)&&i[n?"unshift":"push"](t),t},i.off=i.removeListener=i.removeEventListener=function(e,t){this._eventRegistry=this._eventRegistry||{};var n=this._eventRegistry[e];if(n){var i=n.indexOf(t);-1!==i&&n.splice(i,1)}},i.removeAllListeners=function(e){this._eventRegistry&&(this._eventRegistry[e]=[])},t.EventEmitter=i}),ace.define("ace/lib/app_config",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(e,t,n){"no use strict";function i(e){"undefined"!=typeof console&&console.warn&&console.warn.apply(console,arguments)}function r(e,t){var n=new Error(e);n.data=t,"object"==typeof console&&console.error&&console.error(n),setTimeout(function(){throw n})}var o=e("./oop"),s=e("./event_emitter").EventEmitter,a={setOptions:function(e){Object.keys(e).forEach(function(t){this.setOption(t,e[t])},this)},getOptions:function(e){var t={};return e?Array.isArray(e)||(t=e,e=Object.keys(t)):e=Object.keys(this.$options),e.forEach(function(e){t[e]=this.getOption(e)},this),t},setOption:function(e,t){if(this["$"+e]!==t){var n=this.$options[e];if(!n)return i('misspelled option "'+e+'"');if(n.forwardTo)return this[n.forwardTo]&&this[n.forwardTo].setOption(e,t);n.handlesSet||(this["$"+e]=t),n&&n.set&&n.set.call(this,t)}},getOption:function(e){var t=this.$options[e];return t?t.forwardTo?this[t.forwardTo]&&this[t.forwardTo].getOption(e):t&&t.get?t.get.call(this):this["$"+e]:i('misspelled option "'+e+'"')}},l=function(){this.$defaultOptions={}};(function(){o.implement(this,s),this.defineOptions=function(e,t,n){return e.$options||(this.$defaultOptions[t]=e.$options={}),Object.keys(n).forEach(function(t){var i=n[t];"string"==typeof i&&(i={forwardTo:i}),i.name||(i.name=t),e.$options[i.name]=i,"initialValue"in i&&(e["$"+i.name]=i.initialValue)}),o.implement(e,a),this},this.resetOptions=function(e){Object.keys(e.$options).forEach(function(t){var n=e.$options[t];"value"in n&&e.setOption(t,n.value)})},this.setDefaultValue=function(e,t,n){var i=this.$defaultOptions[e]||(this.$defaultOptions[e]={});i[t]&&(i.forwardTo?this.setDefaultValue(i.forwardTo,t,n):i[t].value=n)},this.setDefaultValues=function(e,t){Object.keys(t).forEach(function(n){this.setDefaultValue(e,n,t[n])},this)},this.warn=i,this.reportError=r}).call(l.prototype),t.AppConfig=l}),ace.define("ace/config",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/lib/net","ace/lib/app_config"],function(e,t,n){"no use strict";function i(i){if(a&&a.document){l.packaged=i||e.packaged||n.packaged||a.define&&define.packaged;for(var r={},o="",s=document.currentScript||document._currentScript,c=(s&&s.ownerDocument||document).getElementsByTagName("script"),u=0;u<c.length;u++){var h=c[u],d=h.src||h.getAttribute("src");if(d){for(var p=h.attributes,f=0,g=p.length;f<g;f++){var m=p[f];0===m.name.indexOf("data-ace-")&&(r[function(e){return e.replace(/-(.)/g,function(e,t){return t.toUpperCase()})}(m.name.replace(/^data-ace-/,""))]=m.value)}var v=d.match(/^(.*)\/ace(\-\w+)?\.js(\?|$)/);v&&(o=v[1])}}o&&(r.base=r.base||o,r.packaged=!0),r.basePath=r.base,r.workerPath=r.workerPath||r.base,r.modePath=r.modePath||r.base,r.themePath=r.themePath||r.base,delete r.base;for(var w in r)void 0!==r[w]&&t.set(w,r[w])}}var r=e("./lib/lang"),o=(e("./lib/oop"),e("./lib/net")),s=e("./lib/app_config").AppConfig;n.exports=t=new s;var a=function(){return this||"undefined"!=typeof window&&window}(),l={packaged:!1,workerPath:null,modePath:null,themePath:null,basePath:"",suffix:".js",$moduleUrls:{}};t.get=function(e){if(!l.hasOwnProperty(e))throw new Error("Unknown config key: "+e);return l[e]},t.set=function(e,t){if(!l.hasOwnProperty(e))throw new Error("Unknown config key: "+e);l[e]=t},t.all=function(){return r.copyObject(l)},t.moduleUrl=function(e,t){if(l.$moduleUrls[e])return l.$moduleUrls[e];var n=e.split("/"),i="snippets"==(t=t||n[n.length-2]||"")?"/":"-",r=n[n.length-1];if("worker"==t&&"-"==i){var o=new RegExp("^"+t+"[\\-_]|[\\-_]"+t+"$","g");r=r.replace(o,"")}(!r||r==t)&&n.length>1&&(r=n[n.length-2]);var s=l[t+"Path"];return null==s?s=l.basePath:"/"==i&&(t=i=""),s&&"/"!=s.slice(-1)&&(s+="/"),s+t+i+r+this.get("suffix")},t.setModuleUrl=function(e,t){return l.$moduleUrls[e]=t},t.$loading={},t.loadModule=function(n,i){var r,s;Array.isArray(n)&&(s=n[0],n=n[1]);try{r=e(n)}catch(e){}if(r&&!t.$loading[n])return i&&i(r);if(t.$loading[n]||(t.$loading[n]=[]),t.$loading[n].push(i),!(t.$loading[n].length>1)){var a=function(){e([n],function(e){t._emit("load.module",{name:n,module:e});var i=t.$loading[n];t.$loading[n]=null,i.forEach(function(t){t&&t(e)})})};if(!t.get("packaged"))return a();o.loadScript(t.moduleUrl(n,s),a)}},i(!0),t.init=i}),ace.define("ace/mouse/mouse_handler",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/mouse/default_handlers","ace/mouse/default_gutter_handler","ace/mouse/mouse_event","ace/mouse/dragdrop_handler","ace/config"],function(e,t,n){"use strict";var i=e("../lib/event"),r=e("../lib/useragent"),o=e("./default_handlers").DefaultHandlers,s=e("./default_gutter_handler").GutterHandler,a=e("./mouse_event").MouseEvent,l=e("./dragdrop_handler").DragdropHandler,c=e("../config"),u=function(e){var t=this;this.editor=e,new o(this),new s(this),new l(this);var n=function(t){(!document.hasFocus||!document.hasFocus()||!e.isFocused()&&document.activeElement==(e.textInput&&e.textInput.getElement()))&&window.focus(),e.focus()},a=e.renderer.getMouseEventTarget();i.addListener(a,"click",this.onMouseEvent.bind(this,"click")),i.addListener(a,"mousemove",this.onMouseMove.bind(this,"mousemove")),i.addMultiMouseDownListener([a,e.renderer.scrollBarV&&e.renderer.scrollBarV.inner,e.renderer.scrollBarH&&e.renderer.scrollBarH.inner,e.textInput&&e.textInput.getElement()].filter(Boolean),[400,300,250],this,"onMouseEvent"),i.addMouseWheelListener(e.container,this.onMouseWheel.bind(this,"mousewheel")),i.addTouchMoveListener(e.container,this.onTouchMove.bind(this,"touchmove"));var c=e.renderer.$gutter;i.addListener(c,"mousedown",this.onMouseEvent.bind(this,"guttermousedown")),i.addListener(c,"click",this.onMouseEvent.bind(this,"gutterclick")),i.addListener(c,"dblclick",this.onMouseEvent.bind(this,"gutterdblclick")),i.addListener(c,"mousemove",this.onMouseEvent.bind(this,"guttermousemove")),i.addListener(a,"mousedown",n),i.addListener(c,"mousedown",n),r.isIE&&e.renderer.scrollBarV&&(i.addListener(e.renderer.scrollBarV.element,"mousedown",n),i.addListener(e.renderer.scrollBarH.element,"mousedown",n)),e.on("mousemove",function(n){if(!t.state&&!t.$dragDelay&&t.$dragEnabled){var i=e.renderer.screenToTextCoordinates(n.x,n.y),r=e.session.selection.getRange(),o=e.renderer;!r.isEmpty()&&r.insideStart(i.row,i.column)?o.setCursorStyle("default"):o.setCursorStyle("")}})};(function(){this.onMouseEvent=function(e,t){this.editor._emit(e,new a(t,this.editor))},this.onMouseMove=function(e,t){var n=this.editor._eventRegistry&&this.editor._eventRegistry.mousemove;n&&n.length&&this.editor._emit(e,new a(t,this.editor))},this.onMouseWheel=function(e,t){var n=new a(t,this.editor);n.speed=2*this.$scrollSpeed,n.wheelX=t.wheelX,n.wheelY=t.wheelY,this.editor._emit(e,n)},this.onTouchMove=function(e,t){var n=new a(t,this.editor);n.speed=1,n.wheelX=t.wheelX,n.wheelY=t.wheelY,this.editor._emit(e,n)},this.setState=function(e){this.state=e},this.captureMouse=function(e,t){this.x=e.x,this.y=e.y,this.isMousePressed=!0;var n=this.editor.renderer;n.$keepTextAreaAtCursor&&(n.$keepTextAreaAtCursor=null);var o=this,s=function(e){if(e){if(r.isWebKit&&!e.which&&o.releaseMouse)return o.releaseMouse();o.x=e.clientX,o.y=e.clientY,t&&t(e),o.mouseEvent=new a(e,o.editor),o.$mouseMoved=!0}},l=function(e){clearInterval(u),c(),o[o.state+"End"]&&o[o.state+"End"](e),o.state="",null==n.$keepTextAreaAtCursor&&(n.$keepTextAreaAtCursor=!0,n.$moveTextAreaToCursor()),o.isMousePressed=!1,o.$onCaptureMouseMove=o.releaseMouse=null,e&&o.onMouseEvent("mouseup",e)},c=function(){o[o.state]&&o[o.state](),o.$mouseMoved=!1};if(r.isOldIE&&"dblclick"==e.domEvent.type)return setTimeout(function(){l(e)});o.$onCaptureMouseMove=s,o.releaseMouse=i.capture(this.editor.container,s,l);var u=setInterval(c,20)},this.releaseMouse=null,this.cancelContextMenu=function(){var e=function(t){t&&t.domEvent&&"contextmenu"!=t.domEvent.type||(this.editor.off("nativecontextmenu",e),t&&t.domEvent&&i.stopEvent(t.domEvent))}.bind(this);setTimeout(e,10),this.editor.on("nativecontextmenu",e)}}).call(u.prototype),c.defineOptions(u.prototype,"mouseHandler",{scrollSpeed:{initialValue:2},dragDelay:{initialValue:r.isMac?150:0},dragEnabled:{initialValue:!0},focusTimout:{initialValue:0},tooltipFollowsMouse:{initialValue:!0}}),t.MouseHandler=u}),ace.define("ace/mouse/fold_handler",["require","exports","module"],function(e,t,n){"use strict";t.FoldHandler=function(e){e.on("click",function(t){var n=t.getDocumentPosition(),i=e.session,r=i.getFoldAt(n.row,n.column,1);r&&(t.getAccelKey()?i.removeFold(r):i.expandFold(r),t.stop())}),e.on("gutterclick",function(t){if("foldWidgets"==e.renderer.$gutterLayer.getRegion(t)){var n=t.getDocumentPosition().row,i=e.session;i.foldWidgets&&i.foldWidgets[n]&&e.session.onFoldWidgetClick(n,t),e.isFocused()||e.focus(),t.stop()}}),e.on("gutterdblclick",function(t){if("foldWidgets"==e.renderer.$gutterLayer.getRegion(t)){var n=t.getDocumentPosition().row,i=e.session,r=i.getParentFoldRangeData(n,!0),o=r.range||r.firstRange;if(o){n=o.start.row;var s=i.getFoldAt(n,i.getLine(n).length,1);s?i.removeFold(s):(i.addFold("...",o),e.renderer.scrollCursorIntoView({row:o.start.row,column:0}))}t.stop()}})}}),ace.define("ace/keyboard/keybinding",["require","exports","module","ace/lib/keys","ace/lib/event"],function(e,t,n){"use strict";var i=e("../lib/keys"),r=e("../lib/event"),o=function(e){this.$editor=e,this.$data={editor:e},this.$handlers=[],this.setDefaultHandler(e.commands)};(function(){this.setDefaultHandler=function(e){this.removeKeyboardHandler(this.$defaultHandler),this.$defaultHandler=e,this.addKeyboardHandler(e,0)},this.setKeyboardHandler=function(e){var t=this.$handlers;if(t[t.length-1]!=e){for(;t[t.length-1]&&t[t.length-1]!=this.$defaultHandler;)this.removeKeyboardHandler(t[t.length-1]);this.addKeyboardHandler(e,1)}},this.addKeyboardHandler=function(e,t){if(e){"function"!=typeof e||e.handleKeyboard||(e.handleKeyboard=e);var n=this.$handlers.indexOf(e);-1!=n&&this.$handlers.splice(n,1),void 0==t?this.$handlers.push(e):this.$handlers.splice(t,0,e),-1==n&&e.attach&&e.attach(this.$editor)}},this.removeKeyboardHandler=function(e){var t=this.$handlers.indexOf(e);return-1!=t&&(this.$handlers.splice(t,1),e.detach&&e.detach(this.$editor),!0)},this.getKeyboardHandler=function(){return this.$handlers[this.$handlers.length-1]},this.getStatusText=function(){var e=this.$data,t=e.editor;return this.$handlers.map(function(n){return n.getStatusText&&n.getStatusText(t,e)||""}).filter(Boolean).join(" ")},this.$callKeyboardHandlers=function(e,t,n,i){for(var o,s=!1,a=this.$editor.commands,l=this.$handlers.length;l--&&!((o=this.$handlers[l].handleKeyboard(this.$data,e,t,n,i))&&o.command&&((s="null"==o.command||a.exec(o.command,this.$editor,o.args,i))&&i&&-1!=e&&1!=o.passEvent&&1!=o.command.passEvent&&r.stopEvent(i),s)););return s||-1!=e||(o={command:"insertstring"},s=a.exec("insertstring",this.$editor,t)),s&&this.$editor._signal&&this.$editor._signal("keyboardActivity",o),s},this.onCommandKey=function(e,t,n){var r=i.keyCodeToString(n);this.$callKeyboardHandlers(t,r,n,e)},this.onTextInput=function(e){this.$callKeyboardHandlers(-1,e)}}).call(o.prototype),t.KeyBinding=o}),ace.define("ace/lib/bidiutil",["require","exports","module"],function(e,t,n){"use strict";function i(e,t,n,i){var r=s?p:d,f=null,T=null,_=null,O=0,I=null,V=-1,P=null,W=null,N=[];if(!i)for(P=0,i=[];P<n;P++)i[P]=o(e[P]);for(a=s,l=!1,c=!1,u=!1,h=!1,W=0;W<n;W++){if(f=O,N[W]=T=function(e,t,n,i){var r,o,a,d,p=t[i];switch(p){case g:case m:l=!1;case b:case w:return p;case v:return l?w:v;case $:return l=!0,c=!0,m;case C:return b;case x:return i<1||i+1>=t.length||(r=n[i-1])!=v&&r!=w||(o=t[i+1])!=v&&o!=w?b:(l&&(o=w),o==r?o:b);case k:return(r=i>0?n[i-1]:y)==v&&i+1<t.length&&t[i+1]==v?v:b;case E:if(i>0&&n[i-1]==v)return v;if(l)return b;for(d=i+1,a=t.length;d<a&&t[d]==E;)d++;return d<a&&t[d]==v?v:b;case F:for(a=t.length,d=i+1;d<a&&t[d]==F;)d++;if(d<a){var f=e[i],T=f>=1425&&f<=2303||64286==f;if(r=t[d],T&&(r==m||r==$))return m}return i<1||(r=t[i-1])==y?b:n[i-1];case y:return l=!1,u=!0,s;case A:return h=!0,b;case S:case B:case L:case M:case D:l=!1;case R:return b}}(e,i,N,W),O=r[f][T],I=240&O,O&=15,t[W]=_=r[O][5],I>0)if(16==I){for(P=V;P<W;P++)t[P]=1;V=-1}else V=-1;if(r[O][6])-1==V&&(V=W);else if(V>-1){for(P=V;P<W;P++)t[P]=_;V=-1}i[W]==y&&(t[W]=0),a|=_}if(h)for(P=0;P<n;P++)if(i[P]==A){t[P]=s;for(var H=P-1;H>=0&&i[H]==C;H--)t[H]=s}}function r(e,t,n){if(!(a<e))if(1!=e||s!=f||u)for(var i,r,o,l,c=n.length,h=0;h<c;){if(t[h]>=e){for(i=h+1;i<c&&t[i]>=e;)i++;for(r=h,o=i-1;r<o;r++,o--)l=n[r],n[r]=n[o],n[o]=l;h=i}h++}else n.reverse()}function o(e){var t=e.charCodeAt(0),n=t>>8;return 0==n?t>191?g:T[t]:5==n?/[\u0591-\u05f4]/.test(e)?m:g:6==n?/[\u0610-\u061a\u064b-\u065f\u06d6-\u06e4\u06e7-\u06ed]/.test(e)?F:/[\u0660-\u0669\u066b-\u066c]/.test(e)?w:1642==t?E:/[\u06f0-\u06f9]/.test(e)?v:$:32==n&&t<=8287?_[255&t]:254==n&&t>=65136?$:b}var s=0,a=0,l=!1,c=!1,u=!1,h=!1,d=[[0,3,0,1,0,0,0],[0,3,0,1,2,2,0],[0,3,0,17,2,0,1],[0,3,5,5,4,1,0],[0,3,21,21,4,0,1],[0,3,5,5,4,2,0]],p=[[2,0,1,1,0,1,0],[2,0,1,1,0,2,0],[2,0,2,1,3,2,0],[2,0,2,33,3,1,1]],f=1,g=0,m=1,v=2,w=3,b=4,y=5,A=6,$=7,C=8,x=9,k=10,E=11,F=12,S=13,B=14,D=15,L=16,M=17,R=18,T=[R,R,R,R,R,R,R,R,R,A,y,A,C,y,R,R,R,R,R,R,R,R,R,R,R,R,R,R,y,y,y,A,C,b,b,E,E,E,b,b,b,b,b,k,x,k,x,x,v,v,v,v,v,v,v,v,v,v,x,b,b,b,b,b,b,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,b,b,b,b,b,b,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,b,b,b,b,R,R,R,R,R,R,y,R,R,R,R,R,R,R,R,R,R,R,R,R,R,R,R,R,R,R,R,R,R,R,R,R,R,x,b,E,E,E,E,b,b,b,b,g,b,b,R,b,b,E,E,v,v,b,g,b,b,b,v,g,b,b,b,b,b],_=[C,C,C,C,C,C,C,C,C,C,C,R,R,R,g,m,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,C,y,S,B,D,L,M,x,E,E,E,E,E,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,x,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,C];t.L=g,t.R=m,t.EN=v,t.ON_R=3,t.AN=4,t.R_H=5,t.B=6,t.DOT="·",t.doBidiReorder=function(e,n,o){if(e.length<2)return{};var a=e.split(""),l=new Array(a.length),c=new Array(a.length),u=[];s=o?f:0,i(a,u,a.length,n);for(var h=0;h<l.length;l[h]=h,h++);r(2,u,l),r(1,u,l);for(h=0;h<l.length-1;h++)n[h]===w?u[h]=t.AN:u[h]===m&&(n[h]>$&&n[h]<S||n[h]===b||n[h]===R)?u[h]=t.ON_R:h>0&&"ل"===a[h-1]&&/\u0622|\u0623|\u0625|\u0627/.test(a[h])&&(u[h-1]=u[h]=t.R_H,h++);a[a.length-1]===t.DOT&&(u[a.length-1]=t.B);for(h=0;h<l.length;h++)c[h]=u[l[h]];return{logicalFromVisual:l,bidiLevels:c}},t.hasBidiCharacters=function(e,t){for(var n=!1,i=0;i<e.length;i++)t[i]=o(e.charAt(i)),n||t[i]!=m&&t[i]!=$||(n=!0);return n},t.getVisualFromLogicalIdx=function(e,t){for(var n=0;n<t.logicalFromVisual.length;n++)if(t.logicalFromVisual[n]==e)return n;return 0}}),ace.define("ace/bidihandler",["require","exports","module","ace/lib/bidiutil","ace/lib/lang","ace/lib/useragent"],function(e,t,n){"use strict";var i=e("./lib/bidiutil"),r=e("./lib/lang"),o=e("./lib/useragent"),s=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,a=function(e){this.session=e,this.bidiMap={},this.currentRow=null,this.bidiUtil=i,this.charWidths=[],this.EOL="¬",this.showInvisibles=!0,this.isRtlDir=!1,this.line="",this.wrapIndent=0,this.isLastRow=!1,this.EOF="¶",this.seenBidi=!1};(function(){this.isBidiRow=function(e,t,n){return!!this.seenBidi&&(e!==this.currentRow&&(this.currentRow=e,this.updateRowLine(t,n),this.updateBidiMap()),this.bidiMap.bidiLevels)},this.onChange=function(e){this.seenBidi?this.currentRow=null:"insert"==e.action&&s.test(e.lines.join("\n"))&&(this.seenBidi=!0,this.currentRow=null)},this.getDocumentRow=function(){var e=0,t=this.session.$screenRowCache;if(t.length){var n=this.session.$getRowCacheIndex(t,this.currentRow);n>=0&&(e=this.session.$docRowCache[n])}return e},this.getSplitIndex=function(){var e=0,t=this.session.$screenRowCache;if(t.length)for(var n,i=this.session.$getRowCacheIndex(t,this.currentRow);this.currentRow-e>0&&(n=this.session.$getRowCacheIndex(t,this.currentRow-e-1))===i;)i=n,e++;return e},this.updateRowLine=function(e,t){if(void 0===e&&(e=this.getDocumentRow()),this.wrapIndent=0,this.isLastRow=e===this.session.getLength()-1,this.line=this.session.getLine(e),this.session.$useWrapMode){var n=this.session.$wrapData[e];n&&(void 0===t&&(t=this.getSplitIndex()),t>0&&n.length?(this.wrapIndent=n.indent,this.line=t<n.length?this.line.substring(n[t-1],n[n.length-1]):this.line.substring(n[n.length-1])):this.line=this.line.substring(0,n[t]))}var o,s=this.session,a=0;this.line=this.line.replace(/\t|[\u1100-\u2029, \u202F-\uFFE6]/g,function(e,t){return"\t"===e||s.isFullWidth(e.charCodeAt(0))?(o="\t"===e?s.getScreenTabSize(t+a):2,a+=o-1,r.stringRepeat(i.DOT,o)):e})},this.updateBidiMap=function(){var e=[],t=this.isLastRow?this.EOF:this.EOL,n=this.line+(this.showInvisibles?t:i.DOT);i.hasBidiCharacters(n,e)?this.bidiMap=i.doBidiReorder(n,e,this.isRtlDir):this.bidiMap={}},this.markAsDirty=function(){this.currentRow=null},this.updateCharacterWidths=function(e){if(this.seenBidi&&this.characterWidth!==e.$characterSize.width){var t=this.characterWidth=e.$characterSize.width,n=e.$measureCharWidth("ה");this.charWidths[i.L]=this.charWidths[i.EN]=this.charWidths[i.ON_R]=t,this.charWidths[i.R]=this.charWidths[i.AN]=n,this.charWidths[i.R_H]=o.isChrome?n:.45*n,this.charWidths[i.B]=0,this.currentRow=null}},this.getShowInvisibles=function(){return this.showInvisibles},this.setShowInvisibles=function(e){this.showInvisibles=e,this.currentRow=null},this.setEolChar=function(e){this.EOL=e},this.setTextDir=function(e){this.isRtlDir=e},this.getPosLeft=function(e){e-=this.wrapIndent;var t=i.getVisualFromLogicalIdx(e>0?e-1:0,this.bidiMap),n=this.bidiMap.bidiLevels,r=0;0===e&&n[t]%2!=0&&t++;for(var o=0;o<t;o++)r+=this.charWidths[n[o]];return 0!==e&&n[t]%2==0&&(r+=this.charWidths[n[t]]),this.wrapIndent&&(r+=this.wrapIndent*this.charWidths[i.L]),r},this.getSelections=function(e,t){for(var n,r,o=this.bidiMap,s=o.bidiLevels,a=this.wrapIndent*this.charWidths[i.L],l=[],c=Math.min(e,t)-this.wrapIndent,u=Math.max(e,t)-this.wrapIndent,h=!1,d=!1,p=0,f=0;f<s.length;f++)r=o.logicalFromVisual[f],n=s[f],(h=r>=c&&r<u)&&!d?p=a:!h&&d&&l.push({left:p,width:a-p}),a+=this.charWidths[n],d=h;return h&&f===s.length&&l.push({left:p,width:a-p}),l},this.offsetToCol=function(e){var t=0,n=(e=Math.max(e,0),0),r=0,o=this.bidiMap.bidiLevels,s=this.charWidths[o[r]];for(this.wrapIndent&&(e-=this.wrapIndent*this.charWidths[i.L]);e>n+s/2;){if(n+=s,r===o.length-1){s=0;break}s=this.charWidths[o[++r]]}return r>0&&o[r-1]%2!=0&&o[r]%2==0?(e<n&&r--,t=this.bidiMap.logicalFromVisual[r]):r>0&&o[r-1]%2==0&&o[r]%2!=0?t=1+(e>n?this.bidiMap.logicalFromVisual[r]:this.bidiMap.logicalFromVisual[r-1]):this.isRtlDir&&r===o.length-1&&0===s&&o[r-1]%2==0||!this.isRtlDir&&0===r&&o[r]%2!=0?t=1+this.bidiMap.logicalFromVisual[r]:(r>0&&o[r-1]%2!=0&&0!==s&&r--,t=this.bidiMap.logicalFromVisual[r]),t+this.wrapIndent}}).call(a.prototype),t.BidiHandler=a}),ace.define("ace/range",["require","exports","module"],function(e,t,n){"use strict";var i=function(e,t,n,i){this.start={row:e,column:t},this.end={row:n,column:i}};(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,i=e.start;return 1==(t=this.compare(n.row,n.column))?1==(t=this.compare(i.row,i.column))?2:0==t?1:0:-1==t?-2:-1==(t=this.compare(i.row,i.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?e<this.start.row?-1:e>this.end.row?1:this.start.row===e?t>=this.start.column?0:-1:this.end.row===e?t<=this.end.column?0:1:0:t<this.start.column?-1:t>this.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.row<e)n={row:e,column:0};if(this.start.row>t)var r={row:t+1,column:0};else if(this.start.row<e)r={row:e,column:0};return i.fromPoints(r||this.start,n||this.end)},this.extend=function(e,t){var n=this.compare(e,t);if(0==n)return this;if(-1==n)var r={row:e,column:t};else var o={row:e,column:t};return i.fromPoints(r||this.start,o||this.end)},this.isEmpty=function(){return this.start.row===this.end.row&&this.start.column===this.end.column},this.isMultiLine=function(){return this.start.row!==this.end.row},this.clone=function(){return i.fromPoints(this.start,this.end)},this.collapseRows=function(){return 0==this.end.column?new i(this.start.row,0,Math.max(this.start.row,this.end.row-1),0):new i(this.start.row,0,this.end.row,0)},this.toScreenRange=function(e){var t=e.documentToScreenPosition(this.start),n=e.documentToScreenPosition(this.end);return new i(t.row,t.column,n.row,n.column)},this.moveBy=function(e,t){this.start.row+=e,this.start.column+=t,this.end.row+=e,this.end.column+=t}}).call(i.prototype),i.fromPoints=function(e,t){return new i(e.row,e.column,t.row,t.column)},i.comparePoints=function(e,t){return e.row-t.row||e.column-t.column},i.comparePoints=function(e,t){return e.row-t.row||e.column-t.column},t.Range=i}),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 i=e("./lib/oop"),r=e("./lib/lang"),o=e("./lib/event_emitter").EventEmitter,s=e("./range").Range,a=function(e){this.session=e,this.doc=e.getDocument(),this.clearSelection(),this.lead=this.selectionLead=this.doc.createAnchor(0,0),this.anchor=this.selectionAnchor=this.doc.createAnchor(0,0);var t=this;this.lead.on("change",function(e){t._emit("changeCursor"),t.$isEmpty||t._emit("changeSelection"),t.$keepDesiredColumnOnChange||e.old.column==e.value.column||(t.$desiredColumn=null)}),this.selectionAnchor.on("change",function(){t.$isEmpty||t._emit("changeSelection")})};(function(){i.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.getRange().isMultiLine()},this.getCursor=function(){return this.lead.getPosition()},this.setSelectionAnchor=function(e,t){this.anchor.setPosition(e,t),this.$isEmpty&&(this.$isEmpty=!1,this._emit("changeSelection"))},this.getSelectionAnchor=function(){return this.$isEmpty?this.getSelectionLead():this.anchor.getPosition()},this.getSelectionLead=function(){return this.lead.getPosition()},this.shiftSelection=function(e){if(this.$isEmpty)this.moveCursorTo(this.lead.row,this.lead.column+e);else{var t=this.getSelectionAnchor(),n=this.getSelectionLead(),i=this.isBackwards();i&&0===t.column||this.setSelectionAnchor(t.row,t.column+e),(i||0!==n.column)&&this.$moveSelection(function(){this.moveCursorTo(n.row,n.column+e)})}},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()?s.fromPoints(t,t):this.isBackwards()?s.fromPoints(t,e):s.fromPoints(e,t)},this.clearSelection=function(){this.$isEmpty||(this.$isEmpty=!0,this._emit("changeSelection"))},this.selectAll=function(){var e=this.doc.getLength()-1;this.setSelectionAnchor(0,0),this.moveCursorTo(e,this.doc.getLine(e).length)},this.setRange=this.setSelectionRange=function(e,t){t?(this.setSelectionAnchor(e.end.row,e.end.column),this.selectTo(e.start.row,e.start.column)):(this.setSelectionAnchor(e.start.row,e.start.column),this.selectTo(e.end.row,e.end.column)),this.getRange().isEmpty()&&(this.$isEmpty=!0),this.$desiredColumn=null},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(void 0===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,i="number"==typeof e?e:this.lead.row,r=this.session.getFoldLine(i);return r?(i=r.start.row,n=r.end.row):n=i,!0===t?new s(i,0,n,this.session.getLine(n).length):new s(i,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 i=e.column,r=e.column+t;return n<0&&(i=e.column-t,r=e.column),this.session.isTabStop(e)&&this.doc.getLine(e.row).slice(i,r).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.row<this.doc.getLength()-1&&this.moveCursorTo(this.lead.row+1,0);else{var n=this.session.getTabSize();t=this.lead;this.wouldMoveIntoSoftTab(t,n,1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,n):this.moveCursorBy(0,1)}},this.moveCursorLineStart=function(){var e=this.lead.row,t=this.lead.column,n=this.session.documentToScreenRow(e,t),i=this.session.screenToDocumentPosition(n,0),r=this.session.getDisplayLine(e,null,i.row,i.column).match(/^\s*/);r[0].length==t||this.session.$useEmacsStyleLineStart||(i.column+=r[0].length),this.moveCursorToPosition(i)},this.moveCursorLineEnd=function(){var e=this.lead,t=this.session.getDocumentLastRowColumnPosition(e.row,e.column);if(this.lead.column==t.column){var n=this.session.getLine(t.row);if(t.column==n.length){var i=n.search(/\s+$/);i>0&&(t.column=i)}}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),i=n.substring(t);this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;var r=this.session.getFoldAt(e,t,1);if(r)this.moveCursorTo(r.end.row,r.end.column);else{if(this.session.nonTokenRe.exec(i)&&(t+=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0,i=n.substring(t)),t>=n.length)return this.moveCursorTo(e,n.length),this.moveCursorRight(),void(e<this.doc.getLength()-1&&this.moveCursorWordRight());this.session.tokenRe.exec(i)&&(t+=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(e,t)}},this.moveCursorLongWordLeft=function(){var e,t=this.lead.row,n=this.lead.column;if(e=this.session.getFoldAt(t,n,-1))this.moveCursorTo(e.start.row,e.start.column);else{var i=this.session.getFoldStringAt(t,n,-1);null==i&&(i=this.doc.getLine(t).substring(0,n));var o=r.stringReverse(i);if(this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0,this.session.nonTokenRe.exec(o)&&(n-=this.session.nonTokenRe.lastIndex,o=o.slice(this.session.nonTokenRe.lastIndex),this.session.nonTokenRe.lastIndex=0),n<=0)return this.moveCursorTo(t,0),this.moveCursorLeft(),void(t>0&&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,i=/\s/,r=this.session.tokenRe;if(r.lastIndex=0,this.session.tokenRe.exec(e))n=this.session.tokenRe.lastIndex;else{for(;(t=e[n])&&i.test(t);)n++;if(n<1)for(r.lastIndex=0;(t=e[n])&&!r.test(t);)if(r.lastIndex=0,n++,i.test(t)){if(n>2){n--;break}for(;(t=e[n])&&i.test(t);)n++;if(n>2)break}}return r.lastIndex=0,n},this.moveCursorShortWordRight=function(){var e=this.lead.row,t=this.lead.column,n=this.doc.getLine(e),i=n.substring(t),r=this.session.getFoldAt(e,t,1);if(r)return this.moveCursorTo(r.end.row,r.end.column);if(t==n.length){var o=this.doc.getLength();do{e++,i=this.doc.getLine(e)}while(e<o&&/^\s*$/.test(i));/^\s+/.test(i)||(i=""),t=0}var s=this.$shortWordEndIndex(i);this.moveCursorTo(e,t+s)},this.moveCursorShortWordLeft=function(){var e,t=this.lead.row,n=this.lead.column;if(e=this.session.getFoldAt(t,n,-1))return this.moveCursorTo(e.start.row,e.start.column);var i=this.session.getLine(t).substring(0,n);if(0===n){do{t--,i=this.doc.getLine(t)}while(t>0&&/^\s*$/.test(i));n=i.length,/\s+$/.test(i)||(i="")}var o=r.stringReverse(i),s=this.$shortWordEndIndex(o);return this.moveCursorTo(t,n-s)},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,i=this.session.documentToScreenPosition(this.lead.row,this.lead.column);0===t&&(0!==e&&(this.session.$bidiHandler.isBidiRow(i.row,this.lead.row)?(n=this.session.$bidiHandler.getPosLeft(i.column),i.column=Math.round(n/this.session.$bidiHandler.charWidths[0])):n=i.column*this.session.$bidiHandler.charWidths[0]),this.$desiredColumn?i.column=this.$desiredColumn:this.$desiredColumn=i.column);var r=this.session.screenToDocumentPosition(i.row+e,i.column,n);0!==e&&0===t&&r.row===this.lead.row&&r.column===this.lead.column&&this.session.lineWidgets&&this.session.lineWidgets[r.row]&&(r.row>0||e>0)&&r.row++,this.moveCursorTo(r.row,r.column+t,0===t)},this.moveCursorToPosition=function(e){this.moveCursorTo(e.row,e.column)},this.moveCursorTo=function(e,t,n){var i=this.session.getFoldAt(e,t,1);i&&(e=i.start.row,t=i.start.column),this.$keepDesiredColumnOnChange=!0;var r=this.session.getLine(e);/[\uDC00-\uDFFF]/.test(r.charAt(t))&&r.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 i=this.session.screenToDocumentPosition(e,t);this.moveCursorTo(i.row,i.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 s.fromPoints(t,n)}catch(e){return s.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){this.toSingleRange(e[0]);for(var t=e.length;t--;){var n=s.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(a.prototype),t.Selection=a}),ace.define("ace/tokenizer",["require","exports","module","ace/config"],function(e,t,n){"use strict";var i=e("./config"),r=2e3,o=function(e){this.states=e,this.regExps={},this.matchMappings={};for(var t in this.states){for(var n=this.states[t],i=[],r=0,o=this.matchMappings[t]={defaultToken:"text"},s="g",a=[],l=0;l<n.length;l++){var c=n[l];if(c.defaultToken&&(o.defaultToken=c.defaultToken),c.caseInsensitive&&(s="gi"),null!=c.regex){c.regex instanceof RegExp&&(c.regex=c.regex.toString().slice(1,-1));var u=c.regex,h=new RegExp("(?:("+u+")|(.))").exec("a").length-2;Array.isArray(c.token)?1==c.token.length||1==h?c.token=c.token[0]:h-1!=c.token.length?(this.reportError("number of classes and regexp groups doesn't match",{rule:c,groupCount:h-1}),c.token=c.token[0]):(c.tokenArray=c.token,c.token=null,c.onMatch=this.$arrayTokens):"function"!=typeof c.token||c.onMatch||(c.onMatch=h>1?this.$applyToken:c.token),h>1&&(/\\\d/.test(c.regex)?u=c.regex.replace(/\\([0-9]+)/g,function(e,t){return"\\"+(parseInt(t,10)+r+1)}):(h=1,u=this.removeCapturingGroups(c.regex)),c.splitRegex||"string"==typeof c.token||a.push(c)),o[r]=l,r+=h,i.push(u),c.onMatch||(c.onMatch=null)}}i.length||(o[0]=0,i.push("$")),a.forEach(function(e){e.splitRegex=this.createSplitterRegexp(e.regex,s)},this),this.regExps[t]=new RegExp("("+i.join(")|(")+")|($)",s)}};(function(){this.$setMaxTokenCount=function(e){r=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 i=[],r=0,o=n.length;r<o;r++)t[r]&&(i[i.length]={type:n[r],value:t[r]});return i},this.$arrayTokens=function(e){if(!e)return[];var t=this.splitRegex.exec(e);if(!t)return"text";for(var n=[],i=this.tokenArray,r=0,o=i.length;r<o;r++)t[r+1]&&(n[n.length]={type:i[r],value:t[r+1]});return n},this.removeCapturingGroups=function(e){return e.replace(/\[(?:\\.|[^\]])*?\]|\\.|\(\?[:=!]|(\()/g,function(e,t){return t?"(?:":e})},this.createSplitterRegexp=function(e,t){if(-1!=e.indexOf("(?=")){var n=0,i=!1,r={};e.replace(/(\\.)|(\((?:\?[=!])?)|(\))|([\[\]])/g,function(e,t,o,s,a,l){return i?i="]"!=a:a?i=!0:s?(n==r.stack&&(r.end=l+1,r.stack=-1),n--):o&&(n++,1!=o.length&&(r.stack=n,r.start=l)),e}),null!=r.end&&/^\)*$/.test(e.substr(r.end))&&(e=e.substring(0,r.start)+e.substr(r.end))}return"^"!=e.charAt(0)&&(e="^"+e),"$"!=e.charAt(e.length-1)&&(e+="$"),new RegExp(e,(t||"").replace("g",""))},this.getLineTokens=function(e,t){if(t&&"string"!=typeof t){"#tmp"===(t=(n=t.slice(0))[0])&&(n.shift(),t=n.shift())}else var n=[];var i=t||"start",o=this.states[i];o||(i="start",o=this.states[i]);var s=this.matchMappings[i],a=this.regExps[i];a.lastIndex=0;for(var l,c=[],u=0,h=0,d={type:null,value:""};l=a.exec(e);){var p=s.defaultToken,f=null,g=l[0],m=a.lastIndex;if(m-g.length>u){var v=e.substring(u,m-g.length);d.type==p?d.value+=v:(d.type&&c.push(d),d={type:p,value:v})}for(var w=0;w<l.length-2;w++)if(void 0!==l[w+1]){p=(f=o[s[w]]).onMatch?f.onMatch(g,i,n,e):f.token,f.next&&(i="string"==typeof f.next?f.next:f.next(i,n),(o=this.states[i])||(this.reportError("state doesn't exist",i),i="start",o=this.states[i]),s=this.matchMappings[i],u=m,(a=this.regExps[i]).lastIndex=m),f.consumeLineEnd&&(u=m);break}if(g)if("string"==typeof p)f&&!1===f.merge||d.type!==p?(d.type&&c.push(d),d={type:p,value:g}):d.value+=g;else if(p){d.type&&c.push(d),d={type:null,value:""};for(w=0;w<p.length;w++)c.push(p[w])}if(u==e.length)break;if(u=m,h++>r){for(h>2*e.length&&this.reportError("infinite loop with in ace tokenizer",{startState:t,line:e});u<e.length;)d.type&&c.push(d),d={value:e.substring(u,u+=2e3),type:"overflow"};i="start",n=[];break}}return d.type&&c.push(d),n.length>1&&n[0]!==i&&n.unshift("#tmp",i),{tokens:c,state:n.length?n:i}},this.reportError=i.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 i=e("../lib/lang"),r=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 i=e[n],r=0;r<i.length;r++){var o=i[r];(o.next||o.onMatch)&&("string"==typeof o.next&&0!==o.next.indexOf(t)&&(o.next=t+o.next),o.nextState&&0!==o.nextState.indexOf(t)&&(o.nextState=t+o.nextState))}this.$rules[t+n]=i}else for(var n in e)this.$rules[n]=e[n]},this.getRules=function(){return this.$rules},this.embedRules=function(e,t,n,r,o){var s="function"==typeof e?(new e).getRules():e;if(r)for(var a=0;a<r.length;a++)r[a]=t+r[a];else{r=[];for(var l in s)r.push(t+l)}if(this.addRules(s,t),n){var c=Array.prototype[o?"push":"unshift"];for(a=0;a<r.length;a++)c.apply(this.$rules[r[a]],i.deepCopy(n))}this.$embeds||(this.$embeds=[]),this.$embeds.push(t)},this.getEmbeds=function(){return this.$embeds};var e=function(e,t){return("start"!=e||t.length)&&t.unshift(this.nextState,e),this.nextState},t=function(e,t){return t.shift(),t.shift()||"start"};this.normalizeRules=function(){function n(o){var s=r[o];s.processed=!0;for(var a=0;a<s.length;a++){var l=s[a],c=null;Array.isArray(l)&&(c=l,l={}),!l.regex&&l.start&&(l.regex=l.start,l.next||(l.next=[]),l.next.push({defaultToken:l.token},{token:l.token+".end",regex:l.end||l.start,next:"pop"}),l.token=l.token+".start",l.push=!0);var u=l.next||l.push;if(u&&Array.isArray(u)){var h=l.stateName;h||("string"!=typeof(h=l.token)&&(h=h[0]||""),r[h]&&(h+=i++)),r[h]=u,l.next=h,n(h)}else"pop"==u&&(l.next=t);if(l.push&&(l.nextState=l.next||l.push,l.next=e,delete l.push),l.rules)for(var d in l.rules)r[d]?r[d].push&&r[d].push.apply(r[d],l.rules[d]):r[d]=l.rules[d];var p="string"==typeof l?l:l.include;if(p&&(c=Array.isArray(p)?p.map(function(e){return r[e]}):r[p]),c){var f=[a,1].concat(c);l.noEscape&&(f=f.filter(function(e){return!e.next})),s.splice.apply(s,f),a--}l.keywordMap&&(l.token=this.createKeywordMapper(l.keywordMap,l.defaultToken||"text",l.caseInsensitive),delete l.defaultToken)}}var i=0,r=this.$rules;Object.keys(r).forEach(n,this)},this.createKeywordMapper=function(e,t,n,i){var r=Object.create(null);return Object.keys(e).forEach(function(t){var o=e[t];n&&(o=o.toLowerCase());for(var s=o.split(i||"|"),a=s.length;a--;)r[s[a]]=t}),Object.getPrototypeOf(r)&&(r.__proto__=null),this.$keywordList=Object.keys(r),e=null,n?function(e){return r[e.toLowerCase()]||t}:function(e){return r[e]||t}},this.getKeywords=function(){return this.$keywords}}).call(r.prototype),t.TextHighlightRules=r}),ace.define("ace/mode/behaviour",["require","exports","module"],function(e,t,n){"use strict";var i=function(){this.$behaviours={}};(function(){this.add=function(e,t,n){switch(void 0){case this.$behaviours:this.$behaviours={};case this.$behaviours[e]:this.$behaviours[e]={}}this.$behaviours[e][t]=n},this.addBehaviours=function(e){for(var t in e)for(var n in e[t])this.add(t,n,e[t][n])},this.remove=function(e){this.$behaviours&&this.$behaviours[e]&&delete this.$behaviours[e]},this.inherit=function(e,t){if("function"==typeof e)var n=(new e).getBehaviours(t);else n=e.getBehaviours(t);this.addBehaviours(n)},this.getBehaviours=function(e){if(e){for(var t={},n=0;n<e.length;n++)this.$behaviours[e[n]]&&(t[e[n]]=this.$behaviours[e[n]]);return t}return this.$behaviours}}).call(i.prototype),t.Behaviour=i}),ace.define("ace/token_iterator",["require","exports","module","ace/range"],function(e,t,n){"use strict";var i=e("./range").Range,r=function(e,t,n){this.$session=e,this.$row=t,this.$rowTokens=e.getTokens(t);var i=e.getTokenAt(t,n);this.$tokenIndex=i?i.index:-1};(function(){this.stepBackward=function(){for(this.$tokenIndex-=1;this.$tokenIndex<0;){if(this.$row-=1,this.$row<0)return this.$row=0,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=this.$rowTokens.length-1}return this.$rowTokens[this.$tokenIndex]},this.stepForward=function(){this.$tokenIndex+=1;for(var e;this.$tokenIndex>=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 i(this.$row,t,this.$row,t+e.value.length)}}).call(r.prototype),t.TokenIterator=r}),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 i,r=e("../../lib/oop"),o=e("../behaviour").Behaviour,s=e("../../token_iterator").TokenIterator,a=e("../../lib/lang"),l=["text","paren.rparen","punctuation.operator"],c=["text","paren.rparen","punctuation.operator","comment"],u={},h={'"':'"',"'":"'"},d=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 i=u[t];i=u[t]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""}},p=function(e,t,n,i){var r=e.end.row-e.start.row;return{text:n+t+i,selection:[0,e.start.column+1,r,e.end.column+(r?0:1)]}},f=function(e){this.add("braces","insertion",function(t,n,r,o,s){var l=r.getCursorPosition(),c=o.doc.getLine(l.row);if("{"==s){d(r);var u=r.getSelectionRange(),h=o.doc.getTextRange(u);if(""!==h&&"{"!==h&&r.getWrapBehavioursEnabled())return p(u,h,"{","}");if(f.isSaneInsertion(r,o))return/[\]\}\)]/.test(c[l.column])||r.inMultiSelectMode||e&&e.braces?(f.recordAutoInsert(r,o,"}"),{text:"{}",selection:[1,1]}):(f.recordMaybeInsert(r,o,"{"),{text:"{",selection:[1,1]})}else if("}"==s){d(r);if("}"==c.substring(l.column,l.column+1)){if(null!==o.$findOpeningBracket("}",{column:l.column+1,row:l.row})&&f.isAutoInsertedClosing(l,c,s))return f.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}else{if("\n"==s||"\r\n"==s){d(r);var g="";f.isMaybeInsertedClosing(l,c)&&(g=a.stringRepeat("}",i.maybeInsertedBrackets),f.clearMaybeInsertedClosing());if("}"===c.substring(l.column,l.column+1)){var m=o.findMatchingBracket({row:l.row,column:l.column+1},"}");if(!m)return null;var v=this.$getIndent(o.getLine(m.row))}else{if(!g)return void f.clearMaybeInsertedClosing();v=this.$getIndent(c)}var w=v+o.getTabString();return{text:"\n"+w+"\n"+v+g,selection:[1,w.length,1,w.length]}}f.clearMaybeInsertedClosing()}}),this.add("braces","deletion",function(e,t,n,r,o){var s=r.doc.getTextRange(o);if(!o.isMultiLine()&&"{"==s){d(n);if("}"==r.doc.getLine(o.start.row).substring(o.end.column,o.end.column+1))return o.end.column++,o;i.maybeInsertedBrackets--}}),this.add("parens","insertion",function(e,t,n,i,r){if("("==r){d(n);var o=n.getSelectionRange(),s=i.doc.getTextRange(o);if(""!==s&&n.getWrapBehavioursEnabled())return p(o,s,"(",")");if(f.isSaneInsertion(n,i))return f.recordAutoInsert(n,i,")"),{text:"()",selection:[1,1]}}else if(")"==r){d(n);var a=n.getCursorPosition(),l=i.doc.getLine(a.row);if(")"==l.substring(a.column,a.column+1)){if(null!==i.$findOpeningBracket(")",{column:a.column+1,row:a.row})&&f.isAutoInsertedClosing(a,l,r))return f.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(e,t,n,i,r){var o=i.doc.getTextRange(r);if(!r.isMultiLine()&&"("==o){d(n);if(")"==i.doc.getLine(r.start.row).substring(r.start.column+1,r.start.column+2))return r.end.column++,r}}),this.add("brackets","insertion",function(e,t,n,i,r){if("["==r){d(n);var o=n.getSelectionRange(),s=i.doc.getTextRange(o);if(""!==s&&n.getWrapBehavioursEnabled())return p(o,s,"[","]");if(f.isSaneInsertion(n,i))return f.recordAutoInsert(n,i,"]"),{text:"[]",selection:[1,1]}}else if("]"==r){d(n);var a=n.getCursorPosition(),l=i.doc.getLine(a.row);if("]"==l.substring(a.column,a.column+1)){if(null!==i.$findOpeningBracket("]",{column:a.column+1,row:a.row})&&f.isAutoInsertedClosing(a,l,r))return f.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("brackets","deletion",function(e,t,n,i,r){var o=i.doc.getTextRange(r);if(!r.isMultiLine()&&"["==o){d(n);if("]"==i.doc.getLine(r.start.row).substring(r.start.column+1,r.start.column+2))return r.end.column++,r}}),this.add("string_dquotes","insertion",function(e,t,n,i,r){var o=i.$mode.$quotes||h;if(1==r.length&&o[r]){if(this.lineCommentStart&&-1!=this.lineCommentStart.indexOf(r))return;d(n);var s=r,a=n.getSelectionRange(),l=i.doc.getTextRange(a);if(!(""===l||1==l.length&&o[l])&&n.getWrapBehavioursEnabled())return p(a,l,s,s);if(!l){var c=n.getCursorPosition(),u=i.doc.getLine(c.row),f=u.substring(c.column-1,c.column),g=u.substring(c.column,c.column+1),m=i.getTokenAt(c.row,c.column),v=i.getTokenAt(c.row,c.column+1);if("\\"==f&&m&&/escape/.test(m.type))return null;var w,b=m&&/string|escape/.test(m.type),y=!v||/string|escape/.test(v.type);if(g==s)(w=b!==y)&&/string\.end/.test(v.type)&&(w=!1);else{if(b&&!y)return null;if(b&&y)return null;var A=i.$mode.tokenRe;A.lastIndex=0;var $=A.test(f);A.lastIndex=0;var C=A.test(f);if($||C)return null;if(g&&!/[\s;,.})\]\\]/.test(g))return null;w=!0}return{text:w?s+s:"",selection:[1,1]}}}}),this.add("string_dquotes","deletion",function(e,t,n,i,r){var o=i.doc.getTextRange(r);if(!r.isMultiLine()&&('"'==o||"'"==o)){d(n);if(i.doc.getLine(r.start.row).substring(r.start.column+1,r.start.column+2)==o)return r.end.column++,r}})};f.isSaneInsertion=function(e,t){var n=e.getCursorPosition(),i=new s(t,n.row,n.column);if(!this.$matchTokenType(i.getCurrentToken()||"text",l)){var r=new s(t,n.row,n.column+1);if(!this.$matchTokenType(r.getCurrentToken()||"text",l))return!1}return i.stepForward(),i.getCurrentTokenRow()!==n.row||this.$matchTokenType(i.getCurrentToken()||"text",c)},f.$matchTokenType=function(e,t){return t.indexOf(e.type||e)>-1},f.recordAutoInsert=function(e,t,n){var r=e.getCursorPosition(),o=t.doc.getLine(r.row);this.isAutoInsertedClosing(r,o,i.autoInsertedLineEnd[0])||(i.autoInsertedBrackets=0),i.autoInsertedRow=r.row,i.autoInsertedLineEnd=n+o.substr(r.column),i.autoInsertedBrackets++},f.recordMaybeInsert=function(e,t,n){var r=e.getCursorPosition(),o=t.doc.getLine(r.row);this.isMaybeInsertedClosing(r,o)||(i.maybeInsertedBrackets=0),i.maybeInsertedRow=r.row,i.maybeInsertedLineStart=o.substr(0,r.column)+n,i.maybeInsertedLineEnd=o.substr(r.column),i.maybeInsertedBrackets++},f.isAutoInsertedClosing=function(e,t,n){return i.autoInsertedBrackets>0&&e.row===i.autoInsertedRow&&n===i.autoInsertedLineEnd[0]&&t.substr(e.column)===i.autoInsertedLineEnd},f.isMaybeInsertedClosing=function(e,t){return i.maybeInsertedBrackets>0&&e.row===i.maybeInsertedRow&&t.substr(e.column)===i.maybeInsertedLineEnd&&t.substr(0,e.column)==i.maybeInsertedLineStart},f.popAutoInsertedClosing=function(){i.autoInsertedLineEnd=i.autoInsertedLineEnd.substr(1),i.autoInsertedBrackets--},f.clearMaybeInsertedClosing=function(){i&&(i.maybeInsertedBrackets=0,i.maybeInsertedRow=-1)},r.inherits(f,o),t.CstyleBehaviour=f}),ace.define("ace/unicode",["require","exports","module"],function(e,t,n){"use strict";t.packages={},function(e){var n=/\w{4}/g;for(var i in e)t.packages[i]=e[i].replace(n,"\\u$&")}({L:"0041-005A0061-007A00AA00B500BA00C0-00D600D8-00F600F8-02C102C6-02D102E0-02E402EC02EE0370-037403760377037A-037D03860388-038A038C038E-03A103A3-03F503F7-0481048A-05250531-055605590561-058705D0-05EA05F0-05F20621-064A066E066F0671-06D306D506E506E606EE06EF06FA-06FC06FF07100712-072F074D-07A507B107CA-07EA07F407F507FA0800-0815081A082408280904-0939093D09500958-0961097109720979-097F0985-098C098F09900993-09A809AA-09B009B209B6-09B909BD09CE09DC09DD09DF-09E109F009F10A05-0A0A0A0F0A100A13-0A280A2A-0A300A320A330A350A360A380A390A59-0A5C0A5E0A72-0A740A85-0A8D0A8F-0A910A93-0AA80AAA-0AB00AB20AB30AB5-0AB90ABD0AD00AE00AE10B05-0B0C0B0F0B100B13-0B280B2A-0B300B320B330B35-0B390B3D0B5C0B5D0B5F-0B610B710B830B85-0B8A0B8E-0B900B92-0B950B990B9A0B9C0B9E0B9F0BA30BA40BA8-0BAA0BAE-0BB90BD00C05-0C0C0C0E-0C100C12-0C280C2A-0C330C35-0C390C3D0C580C590C600C610C85-0C8C0C8E-0C900C92-0CA80CAA-0CB30CB5-0CB90CBD0CDE0CE00CE10D05-0D0C0D0E-0D100D12-0D280D2A-0D390D3D0D600D610D7A-0D7F0D85-0D960D9A-0DB10DB3-0DBB0DBD0DC0-0DC60E01-0E300E320E330E40-0E460E810E820E840E870E880E8A0E8D0E94-0E970E99-0E9F0EA1-0EA30EA50EA70EAA0EAB0EAD-0EB00EB20EB30EBD0EC0-0EC40EC60EDC0EDD0F000F40-0F470F49-0F6C0F88-0F8B1000-102A103F1050-1055105A-105D106110651066106E-10701075-1081108E10A0-10C510D0-10FA10FC1100-1248124A-124D1250-12561258125A-125D1260-1288128A-128D1290-12B012B2-12B512B8-12BE12C012C2-12C512C8-12D612D8-13101312-13151318-135A1380-138F13A0-13F41401-166C166F-167F1681-169A16A0-16EA1700-170C170E-17111720-17311740-17511760-176C176E-17701780-17B317D717DC1820-18771880-18A818AA18B0-18F51900-191C1950-196D1970-19741980-19AB19C1-19C71A00-1A161A20-1A541AA71B05-1B331B45-1B4B1B83-1BA01BAE1BAF1C00-1C231C4D-1C4F1C5A-1C7D1CE9-1CEC1CEE-1CF11D00-1DBF1E00-1F151F18-1F1D1F20-1F451F48-1F4D1F50-1F571F591F5B1F5D1F5F-1F7D1F80-1FB41FB6-1FBC1FBE1FC2-1FC41FC6-1FCC1FD0-1FD31FD6-1FDB1FE0-1FEC1FF2-1FF41FF6-1FFC2071207F2090-209421022107210A-211321152119-211D212421262128212A-212D212F-2139213C-213F2145-2149214E218321842C00-2C2E2C30-2C5E2C60-2CE42CEB-2CEE2D00-2D252D30-2D652D6F2D80-2D962DA0-2DA62DA8-2DAE2DB0-2DB62DB8-2DBE2DC0-2DC62DC8-2DCE2DD0-2DD62DD8-2DDE2E2F300530063031-3035303B303C3041-3096309D-309F30A1-30FA30FC-30FF3105-312D3131-318E31A0-31B731F0-31FF3400-4DB54E00-9FCBA000-A48CA4D0-A4FDA500-A60CA610-A61FA62AA62BA640-A65FA662-A66EA67F-A697A6A0-A6E5A717-A71FA722-A788A78BA78CA7FB-A801A803-A805A807-A80AA80C-A822A840-A873A882-A8B3A8F2-A8F7A8FBA90A-A925A930-A946A960-A97CA984-A9B2A9CFAA00-AA28AA40-AA42AA44-AA4BAA60-AA76AA7AAA80-AAAFAAB1AAB5AAB6AAB9-AABDAAC0AAC2AADB-AADDABC0-ABE2AC00-D7A3D7B0-D7C6D7CB-D7FBF900-FA2DFA30-FA6DFA70-FAD9FB00-FB06FB13-FB17FB1DFB1F-FB28FB2A-FB36FB38-FB3CFB3EFB40FB41FB43FB44FB46-FBB1FBD3-FD3DFD50-FD8FFD92-FDC7FDF0-FDFBFE70-FE74FE76-FEFCFF21-FF3AFF41-FF5AFF66-FFBEFFC2-FFC7FFCA-FFCFFFD2-FFD7FFDA-FFDC",Ll:"0061-007A00AA00B500BA00DF-00F600F8-00FF01010103010501070109010B010D010F01110113011501170119011B011D011F01210123012501270129012B012D012F01310133013501370138013A013C013E014001420144014601480149014B014D014F01510153015501570159015B015D015F01610163016501670169016B016D016F0171017301750177017A017C017E-0180018301850188018C018D019201950199-019B019E01A101A301A501A801AA01AB01AD01B001B401B601B901BA01BD-01BF01C601C901CC01CE01D001D201D401D601D801DA01DC01DD01DF01E101E301E501E701E901EB01ED01EF01F001F301F501F901FB01FD01FF02010203020502070209020B020D020F02110213021502170219021B021D021F02210223022502270229022B022D022F02310233-0239023C023F0240024202470249024B024D024F-02930295-02AF037103730377037B-037D039003AC-03CE03D003D103D5-03D703D903DB03DD03DF03E103E303E503E703E903EB03ED03EF-03F303F503F803FB03FC0430-045F04610463046504670469046B046D046F04710473047504770479047B047D047F0481048B048D048F04910493049504970499049B049D049F04A104A304A504A704A904AB04AD04AF04B104B304B504B704B904BB04BD04BF04C204C404C604C804CA04CC04CE04CF04D104D304D504D704D904DB04DD04DF04E104E304E504E704E904EB04ED04EF04F104F304F504F704F904FB04FD04FF05010503050505070509050B050D050F05110513051505170519051B051D051F0521052305250561-05871D00-1D2B1D62-1D771D79-1D9A1E011E031E051E071E091E0B1E0D1E0F1E111E131E151E171E191E1B1E1D1E1F1E211E231E251E271E291E2B1E2D1E2F1E311E331E351E371E391E3B1E3D1E3F1E411E431E451E471E491E4B1E4D1E4F1E511E531E551E571E591E5B1E5D1E5F1E611E631E651E671E691E6B1E6D1E6F1E711E731E751E771E791E7B1E7D1E7F1E811E831E851E871E891E8B1E8D1E8F1E911E931E95-1E9D1E9F1EA11EA31EA51EA71EA91EAB1EAD1EAF1EB11EB31EB51EB71EB91EBB1EBD1EBF1EC11EC31EC51EC71EC91ECB1ECD1ECF1ED11ED31ED51ED71ED91EDB1EDD1EDF1EE11EE31EE51EE71EE91EEB1EED1EEF1EF11EF31EF51EF71EF91EFB1EFD1EFF-1F071F10-1F151F20-1F271F30-1F371F40-1F451F50-1F571F60-1F671F70-1F7D1F80-1F871F90-1F971FA0-1FA71FB0-1FB41FB61FB71FBE1FC2-1FC41FC61FC71FD0-1FD31FD61FD71FE0-1FE71FF2-1FF41FF61FF7210A210E210F2113212F21342139213C213D2146-2149214E21842C30-2C5E2C612C652C662C682C6A2C6C2C712C732C742C76-2C7C2C812C832C852C872C892C8B2C8D2C8F2C912C932C952C972C992C9B2C9D2C9F2CA12CA32CA52CA72CA92CAB2CAD2CAF2CB12CB32CB52CB72CB92CBB2CBD2CBF2CC12CC32CC52CC72CC92CCB2CCD2CCF2CD12CD32CD52CD72CD92CDB2CDD2CDF2CE12CE32CE42CEC2CEE2D00-2D25A641A643A645A647A649A64BA64DA64FA651A653A655A657A659A65BA65DA65FA663A665A667A669A66BA66DA681A683A685A687A689A68BA68DA68FA691A693A695A697A723A725A727A729A72BA72DA72F-A731A733A735A737A739A73BA73DA73FA741A743A745A747A749A74BA74DA74FA751A753A755A757A759A75BA75DA75FA761A763A765A767A769A76BA76DA76FA771-A778A77AA77CA77FA781A783A785A787A78CFB00-FB06FB13-FB17FF41-FF5A",Lu:"0041-005A00C0-00D600D8-00DE01000102010401060108010A010C010E01100112011401160118011A011C011E01200122012401260128012A012C012E01300132013401360139013B013D013F0141014301450147014A014C014E01500152015401560158015A015C015E01600162016401660168016A016C016E017001720174017601780179017B017D018101820184018601870189-018B018E-0191019301940196-0198019C019D019F01A001A201A401A601A701A901AC01AE01AF01B1-01B301B501B701B801BC01C401C701CA01CD01CF01D101D301D501D701D901DB01DE01E001E201E401E601E801EA01EC01EE01F101F401F6-01F801FA01FC01FE02000202020402060208020A020C020E02100212021402160218021A021C021E02200222022402260228022A022C022E02300232023A023B023D023E02410243-02460248024A024C024E03700372037603860388-038A038C038E038F0391-03A103A3-03AB03CF03D2-03D403D803DA03DC03DE03E003E203E403E603E803EA03EC03EE03F403F703F903FA03FD-042F04600462046404660468046A046C046E04700472047404760478047A047C047E0480048A048C048E04900492049404960498049A049C049E04A004A204A404A604A804AA04AC04AE04B004B204B404B604B804BA04BC04BE04C004C104C304C504C704C904CB04CD04D004D204D404D604D804DA04DC04DE04E004E204E404E604E804EA04EC04EE04F004F204F404F604F804FA04FC04FE05000502050405060508050A050C050E05100512051405160518051A051C051E0520052205240531-055610A0-10C51E001E021E041E061E081E0A1E0C1E0E1E101E121E141E161E181E1A1E1C1E1E1E201E221E241E261E281E2A1E2C1E2E1E301E321E341E361E381E3A1E3C1E3E1E401E421E441E461E481E4A1E4C1E4E1E501E521E541E561E581E5A1E5C1E5E1E601E621E641E661E681E6A1E6C1E6E1E701E721E741E761E781E7A1E7C1E7E1E801E821E841E861E881E8A1E8C1E8E1E901E921E941E9E1EA01EA21EA41EA61EA81EAA1EAC1EAE1EB01EB21EB41EB61EB81EBA1EBC1EBE1EC01EC21EC41EC61EC81ECA1ECC1ECE1ED01ED21ED41ED61ED81EDA1EDC1EDE1EE01EE21EE41EE61EE81EEA1EEC1EEE1EF01EF21EF41EF61EF81EFA1EFC1EFE1F08-1F0F1F18-1F1D1F28-1F2F1F38-1F3F1F48-1F4D1F591F5B1F5D1F5F1F68-1F6F1FB8-1FBB1FC8-1FCB1FD8-1FDB1FE8-1FEC1FF8-1FFB21022107210B-210D2110-211221152119-211D212421262128212A-212D2130-2133213E213F214521832C00-2C2E2C602C62-2C642C672C692C6B2C6D-2C702C722C752C7E-2C802C822C842C862C882C8A2C8C2C8E2C902C922C942C962C982C9A2C9C2C9E2CA02CA22CA42CA62CA82CAA2CAC2CAE2CB02CB22CB42CB62CB82CBA2CBC2CBE2CC02CC22CC42CC62CC82CCA2CCC2CCE2CD02CD22CD42CD62CD82CDA2CDC2CDE2CE02CE22CEB2CEDA640A642A644A646A648A64AA64CA64EA650A652A654A656A658A65AA65CA65EA662A664A666A668A66AA66CA680A682A684A686A688A68AA68CA68EA690A692A694A696A722A724A726A728A72AA72CA72EA732A734A736A738A73AA73CA73EA740A742A744A746A748A74AA74CA74EA750A752A754A756A758A75AA75CA75EA760A762A764A766A768A76AA76CA76EA779A77BA77DA77EA780A782A784A786A78BFF21-FF3A",Lt:"01C501C801CB01F21F88-1F8F1F98-1F9F1FA8-1FAF1FBC1FCC1FFC",Lm:"02B0-02C102C6-02D102E0-02E402EC02EE0374037A0559064006E506E607F407F507FA081A0824082809710E460EC610FC17D718431AA71C78-1C7D1D2C-1D611D781D9B-1DBF2071207F2090-20942C7D2D6F2E2F30053031-3035303B309D309E30FC-30FEA015A4F8-A4FDA60CA67FA717-A71FA770A788A9CFAA70AADDFF70FF9EFF9F",Lo:"01BB01C0-01C3029405D0-05EA05F0-05F20621-063F0641-064A066E066F0671-06D306D506EE06EF06FA-06FC06FF07100712-072F074D-07A507B107CA-07EA0800-08150904-0939093D09500958-096109720979-097F0985-098C098F09900993-09A809AA-09B009B209B6-09B909BD09CE09DC09DD09DF-09E109F009F10A05-0A0A0A0F0A100A13-0A280A2A-0A300A320A330A350A360A380A390A59-0A5C0A5E0A72-0A740A85-0A8D0A8F-0A910A93-0AA80AAA-0AB00AB20AB30AB5-0AB90ABD0AD00AE00AE10B05-0B0C0B0F0B100B13-0B280B2A-0B300B320B330B35-0B390B3D0B5C0B5D0B5F-0B610B710B830B85-0B8A0B8E-0B900B92-0B950B990B9A0B9C0B9E0B9F0BA30BA40BA8-0BAA0BAE-0BB90BD00C05-0C0C0C0E-0C100C12-0C280C2A-0C330C35-0C390C3D0C580C590C600C610C85-0C8C0C8E-0C900C92-0CA80CAA-0CB30CB5-0CB90CBD0CDE0CE00CE10D05-0D0C0D0E-0D100D12-0D280D2A-0D390D3D0D600D610D7A-0D7F0D85-0D960D9A-0DB10DB3-0DBB0DBD0DC0-0DC60E01-0E300E320E330E40-0E450E810E820E840E870E880E8A0E8D0E94-0E970E99-0E9F0EA1-0EA30EA50EA70EAA0EAB0EAD-0EB00EB20EB30EBD0EC0-0EC40EDC0EDD0F000F40-0F470F49-0F6C0F88-0F8B1000-102A103F1050-1055105A-105D106110651066106E-10701075-1081108E10D0-10FA1100-1248124A-124D1250-12561258125A-125D1260-1288128A-128D1290-12B012B2-12B512B8-12BE12C012C2-12C512C8-12D612D8-13101312-13151318-135A1380-138F13A0-13F41401-166C166F-167F1681-169A16A0-16EA1700-170C170E-17111720-17311740-17511760-176C176E-17701780-17B317DC1820-18421844-18771880-18A818AA18B0-18F51900-191C1950-196D1970-19741980-19AB19C1-19C71A00-1A161A20-1A541B05-1B331B45-1B4B1B83-1BA01BAE1BAF1C00-1C231C4D-1C4F1C5A-1C771CE9-1CEC1CEE-1CF12135-21382D30-2D652D80-2D962DA0-2DA62DA8-2DAE2DB0-2DB62DB8-2DBE2DC0-2DC62DC8-2DCE2DD0-2DD62DD8-2DDE3006303C3041-3096309F30A1-30FA30FF3105-312D3131-318E31A0-31B731F0-31FF3400-4DB54E00-9FCBA000-A014A016-A48CA4D0-A4F7A500-A60BA610-A61FA62AA62BA66EA6A0-A6E5A7FB-A801A803-A805A807-A80AA80C-A822A840-A873A882-A8B3A8F2-A8F7A8FBA90A-A925A930-A946A960-A97CA984-A9B2AA00-AA28AA40-AA42AA44-AA4BAA60-AA6FAA71-AA76AA7AAA80-AAAFAAB1AAB5AAB6AAB9-AABDAAC0AAC2AADBAADCABC0-ABE2AC00-D7A3D7B0-D7C6D7CB-D7FBF900-FA2DFA30-FA6DFA70-FAD9FB1DFB1F-FB28FB2A-FB36FB38-FB3CFB3EFB40FB41FB43FB44FB46-FBB1FBD3-FD3DFD50-FD8FFD92-FDC7FDF0-FDFBFE70-FE74FE76-FEFCFF66-FF6FFF71-FF9DFFA0-FFBEFFC2-FFC7FFCA-FFCFFFD2-FFD7FFDA-FFDC",M:"0300-036F0483-04890591-05BD05BF05C105C205C405C505C70610-061A064B-065E067006D6-06DC06DE-06E406E706E806EA-06ED07110730-074A07A6-07B007EB-07F30816-0819081B-08230825-08270829-082D0900-0903093C093E-094E0951-0955096209630981-098309BC09BE-09C409C709C809CB-09CD09D709E209E30A01-0A030A3C0A3E-0A420A470A480A4B-0A4D0A510A700A710A750A81-0A830ABC0ABE-0AC50AC7-0AC90ACB-0ACD0AE20AE30B01-0B030B3C0B3E-0B440B470B480B4B-0B4D0B560B570B620B630B820BBE-0BC20BC6-0BC80BCA-0BCD0BD70C01-0C030C3E-0C440C46-0C480C4A-0C4D0C550C560C620C630C820C830CBC0CBE-0CC40CC6-0CC80CCA-0CCD0CD50CD60CE20CE30D020D030D3E-0D440D46-0D480D4A-0D4D0D570D620D630D820D830DCA0DCF-0DD40DD60DD8-0DDF0DF20DF30E310E34-0E3A0E47-0E4E0EB10EB4-0EB90EBB0EBC0EC8-0ECD0F180F190F350F370F390F3E0F3F0F71-0F840F860F870F90-0F970F99-0FBC0FC6102B-103E1056-1059105E-10601062-10641067-106D1071-10741082-108D108F109A-109D135F1712-17141732-1734175217531772177317B6-17D317DD180B-180D18A91920-192B1930-193B19B0-19C019C819C91A17-1A1B1A55-1A5E1A60-1A7C1A7F1B00-1B041B34-1B441B6B-1B731B80-1B821BA1-1BAA1C24-1C371CD0-1CD21CD4-1CE81CED1CF21DC0-1DE61DFD-1DFF20D0-20F02CEF-2CF12DE0-2DFF302A-302F3099309AA66F-A672A67CA67DA6F0A6F1A802A806A80BA823-A827A880A881A8B4-A8C4A8E0-A8F1A926-A92DA947-A953A980-A983A9B3-A9C0AA29-AA36AA43AA4CAA4DAA7BAAB0AAB2-AAB4AAB7AAB8AABEAABFAAC1ABE3-ABEAABECABEDFB1EFE00-FE0FFE20-FE26",Mn:"0300-036F0483-04870591-05BD05BF05C105C205C405C505C70610-061A064B-065E067006D6-06DC06DF-06E406E706E806EA-06ED07110730-074A07A6-07B007EB-07F30816-0819081B-08230825-08270829-082D0900-0902093C0941-0948094D0951-095509620963098109BC09C1-09C409CD09E209E30A010A020A3C0A410A420A470A480A4B-0A4D0A510A700A710A750A810A820ABC0AC1-0AC50AC70AC80ACD0AE20AE30B010B3C0B3F0B41-0B440B4D0B560B620B630B820BC00BCD0C3E-0C400C46-0C480C4A-0C4D0C550C560C620C630CBC0CBF0CC60CCC0CCD0CE20CE30D41-0D440D4D0D620D630DCA0DD2-0DD40DD60E310E34-0E3A0E47-0E4E0EB10EB4-0EB90EBB0EBC0EC8-0ECD0F180F190F350F370F390F71-0F7E0F80-0F840F860F870F90-0F970F99-0FBC0FC6102D-10301032-10371039103A103D103E10581059105E-10601071-1074108210851086108D109D135F1712-17141732-1734175217531772177317B7-17BD17C617C9-17D317DD180B-180D18A91920-19221927192819321939-193B1A171A181A561A58-1A5E1A601A621A65-1A6C1A73-1A7C1A7F1B00-1B031B341B36-1B3A1B3C1B421B6B-1B731B801B811BA2-1BA51BA81BA91C2C-1C331C361C371CD0-1CD21CD4-1CE01CE2-1CE81CED1DC0-1DE61DFD-1DFF20D0-20DC20E120E5-20F02CEF-2CF12DE0-2DFF302A-302F3099309AA66FA67CA67DA6F0A6F1A802A806A80BA825A826A8C4A8E0-A8F1A926-A92DA947-A951A980-A982A9B3A9B6-A9B9A9BCAA29-AA2EAA31AA32AA35AA36AA43AA4CAAB0AAB2-AAB4AAB7AAB8AABEAABFAAC1ABE5ABE8ABEDFB1EFE00-FE0FFE20-FE26",Mc:"0903093E-09400949-094C094E0982098309BE-09C009C709C809CB09CC09D70A030A3E-0A400A830ABE-0AC00AC90ACB0ACC0B020B030B3E0B400B470B480B4B0B4C0B570BBE0BBF0BC10BC20BC6-0BC80BCA-0BCC0BD70C01-0C030C41-0C440C820C830CBE0CC0-0CC40CC70CC80CCA0CCB0CD50CD60D020D030D3E-0D400D46-0D480D4A-0D4C0D570D820D830DCF-0DD10DD8-0DDF0DF20DF30F3E0F3F0F7F102B102C10311038103B103C105610571062-10641067-106D108310841087-108C108F109A-109C17B617BE-17C517C717C81923-19261929-192B193019311933-193819B0-19C019C819C91A19-1A1B1A551A571A611A631A641A6D-1A721B041B351B3B1B3D-1B411B431B441B821BA11BA61BA71BAA1C24-1C2B1C341C351CE11CF2A823A824A827A880A881A8B4-A8C3A952A953A983A9B4A9B5A9BAA9BBA9BD-A9C0AA2FAA30AA33AA34AA4DAA7BABE3ABE4ABE6ABE7ABE9ABEAABEC",Me:"0488048906DE20DD-20E020E2-20E4A670-A672",N:"0030-003900B200B300B900BC-00BE0660-066906F0-06F907C0-07C90966-096F09E6-09EF09F4-09F90A66-0A6F0AE6-0AEF0B66-0B6F0BE6-0BF20C66-0C6F0C78-0C7E0CE6-0CEF0D66-0D750E50-0E590ED0-0ED90F20-0F331040-10491090-10991369-137C16EE-16F017E0-17E917F0-17F91810-18191946-194F19D0-19DA1A80-1A891A90-1A991B50-1B591BB0-1BB91C40-1C491C50-1C5920702074-20792080-20892150-21822185-21892460-249B24EA-24FF2776-27932CFD30073021-30293038-303A3192-31953220-32293251-325F3280-328932B1-32BFA620-A629A6E6-A6EFA830-A835A8D0-A8D9A900-A909A9D0-A9D9AA50-AA59ABF0-ABF9FF10-FF19",Nd:"0030-00390660-066906F0-06F907C0-07C90966-096F09E6-09EF0A66-0A6F0AE6-0AEF0B66-0B6F0BE6-0BEF0C66-0C6F0CE6-0CEF0D66-0D6F0E50-0E590ED0-0ED90F20-0F291040-10491090-109917E0-17E91810-18191946-194F19D0-19DA1A80-1A891A90-1A991B50-1B591BB0-1BB91C40-1C491C50-1C59A620-A629A8D0-A8D9A900-A909A9D0-A9D9AA50-AA59ABF0-ABF9FF10-FF19",Nl:"16EE-16F02160-21822185-218830073021-30293038-303AA6E6-A6EF",No:"00B200B300B900BC-00BE09F4-09F90BF0-0BF20C78-0C7E0D70-0D750F2A-0F331369-137C17F0-17F920702074-20792080-20892150-215F21892460-249B24EA-24FF2776-27932CFD3192-31953220-32293251-325F3280-328932B1-32BFA830-A835",P:"0021-00230025-002A002C-002F003A003B003F0040005B-005D005F007B007D00A100AB00B700BB00BF037E0387055A-055F0589058A05BE05C005C305C605F305F40609060A060C060D061B061E061F066A-066D06D40700-070D07F7-07F90830-083E0964096509700DF40E4F0E5A0E5B0F04-0F120F3A-0F3D0F850FD0-0FD4104A-104F10FB1361-13681400166D166E169B169C16EB-16ED1735173617D4-17D617D8-17DA1800-180A1944194519DE19DF1A1E1A1F1AA0-1AA61AA8-1AAD1B5A-1B601C3B-1C3F1C7E1C7F1CD32010-20272030-20432045-20512053-205E207D207E208D208E2329232A2768-277527C527C627E6-27EF2983-299829D8-29DB29FC29FD2CF9-2CFC2CFE2CFF2E00-2E2E2E302E313001-30033008-30113014-301F3030303D30A030FBA4FEA4FFA60D-A60FA673A67EA6F2-A6F7A874-A877A8CEA8CFA8F8-A8FAA92EA92FA95FA9C1-A9CDA9DEA9DFAA5C-AA5FAADEAADFABEBFD3EFD3FFE10-FE19FE30-FE52FE54-FE61FE63FE68FE6AFE6BFF01-FF03FF05-FF0AFF0C-FF0FFF1AFF1BFF1FFF20FF3B-FF3DFF3FFF5BFF5DFF5F-FF65",Pd:"002D058A05BE140018062010-20152E172E1A301C303030A0FE31FE32FE58FE63FF0D",Ps:"0028005B007B0F3A0F3C169B201A201E2045207D208D23292768276A276C276E27702772277427C527E627E827EA27EC27EE2983298529872989298B298D298F299129932995299729D829DA29FC2E222E242E262E283008300A300C300E3010301430163018301A301DFD3EFE17FE35FE37FE39FE3BFE3DFE3FFE41FE43FE47FE59FE5BFE5DFF08FF3BFF5BFF5FFF62",Pe:"0029005D007D0F3B0F3D169C2046207E208E232A2769276B276D276F27712773277527C627E727E927EB27ED27EF298429862988298A298C298E2990299229942996299829D929DB29FD2E232E252E272E293009300B300D300F3011301530173019301B301E301FFD3FFE18FE36FE38FE3AFE3CFE3EFE40FE42FE44FE48FE5AFE5CFE5EFF09FF3DFF5DFF60FF63",Pi:"00AB2018201B201C201F20392E022E042E092E0C2E1C2E20",Pf:"00BB2019201D203A2E032E052E0A2E0D2E1D2E21",Pc:"005F203F20402054FE33FE34FE4D-FE4FFF3F",Po:"0021-00230025-0027002A002C002E002F003A003B003F0040005C00A100B700BF037E0387055A-055F058905C005C305C605F305F40609060A060C060D061B061E061F066A-066D06D40700-070D07F7-07F90830-083E0964096509700DF40E4F0E5A0E5B0F04-0F120F850FD0-0FD4104A-104F10FB1361-1368166D166E16EB-16ED1735173617D4-17D617D8-17DA1800-18051807-180A1944194519DE19DF1A1E1A1F1AA0-1AA61AA8-1AAD1B5A-1B601C3B-1C3F1C7E1C7F1CD3201620172020-20272030-2038203B-203E2041-20432047-205120532055-205E2CF9-2CFC2CFE2CFF2E002E012E06-2E082E0B2E0E-2E162E182E192E1B2E1E2E1F2E2A-2E2E2E302E313001-3003303D30FBA4FEA4FFA60D-A60FA673A67EA6F2-A6F7A874-A877A8CEA8CFA8F8-A8FAA92EA92FA95FA9C1-A9CDA9DEA9DFAA5C-AA5FAADEAADFABEBFE10-FE16FE19FE30FE45FE46FE49-FE4CFE50-FE52FE54-FE57FE5F-FE61FE68FE6AFE6BFF01-FF03FF05-FF07FF0AFF0CFF0EFF0FFF1AFF1BFF1FFF20FF3CFF61FF64FF65",S:"0024002B003C-003E005E0060007C007E00A2-00A900AC00AE-00B100B400B600B800D700F702C2-02C502D2-02DF02E5-02EB02ED02EF-02FF03750384038503F604820606-0608060B060E060F06E906FD06FE07F609F209F309FA09FB0AF10B700BF3-0BFA0C7F0CF10CF20D790E3F0F01-0F030F13-0F170F1A-0F1F0F340F360F380FBE-0FC50FC7-0FCC0FCE0FCF0FD5-0FD8109E109F13601390-139917DB194019E0-19FF1B61-1B6A1B74-1B7C1FBD1FBF-1FC11FCD-1FCF1FDD-1FDF1FED-1FEF1FFD1FFE20442052207A-207C208A-208C20A0-20B8210021012103-21062108210921142116-2118211E-2123212521272129212E213A213B2140-2144214A-214D214F2190-2328232B-23E82400-24262440-244A249C-24E92500-26CD26CF-26E126E326E8-26FF2701-27042706-2709270C-27272729-274B274D274F-27522756-275E2761-276727942798-27AF27B1-27BE27C0-27C427C7-27CA27CC27D0-27E527F0-29822999-29D729DC-29FB29FE-2B4C2B50-2B592CE5-2CEA2E80-2E992E9B-2EF32F00-2FD52FF0-2FFB300430123013302030363037303E303F309B309C319031913196-319F31C0-31E33200-321E322A-32503260-327F328A-32B032C0-32FE3300-33FF4DC0-4DFFA490-A4C6A700-A716A720A721A789A78AA828-A82BA836-A839AA77-AA79FB29FDFCFDFDFE62FE64-FE66FE69FF04FF0BFF1C-FF1EFF3EFF40FF5CFF5EFFE0-FFE6FFE8-FFEEFFFCFFFD",Sm:"002B003C-003E007C007E00AC00B100D700F703F60606-060820442052207A-207C208A-208C2140-2144214B2190-2194219A219B21A021A321A621AE21CE21CF21D221D421F4-22FF2308-230B23202321237C239B-23B323DC-23E125B725C125F8-25FF266F27C0-27C427C7-27CA27CC27D0-27E527F0-27FF2900-29822999-29D729DC-29FB29FE-2AFF2B30-2B442B47-2B4CFB29FE62FE64-FE66FF0BFF1C-FF1EFF5CFF5EFFE2FFE9-FFEC",Sc:"002400A2-00A5060B09F209F309FB0AF10BF90E3F17DB20A0-20B8A838FDFCFE69FF04FFE0FFE1FFE5FFE6",Sk:"005E006000A800AF00B400B802C2-02C502D2-02DF02E5-02EB02ED02EF-02FF0375038403851FBD1FBF-1FC11FCD-1FCF1FDD-1FDF1FED-1FEF1FFD1FFE309B309CA700-A716A720A721A789A78AFF3EFF40FFE3",So:"00A600A700A900AE00B000B60482060E060F06E906FD06FE07F609FA0B700BF3-0BF80BFA0C7F0CF10CF20D790F01-0F030F13-0F170F1A-0F1F0F340F360F380FBE-0FC50FC7-0FCC0FCE0FCF0FD5-0FD8109E109F13601390-1399194019E0-19FF1B61-1B6A1B74-1B7C210021012103-21062108210921142116-2118211E-2123212521272129212E213A213B214A214C214D214F2195-2199219C-219F21A121A221A421A521A7-21AD21AF-21CD21D021D121D321D5-21F32300-2307230C-231F2322-2328232B-237B237D-239A23B4-23DB23E2-23E82400-24262440-244A249C-24E92500-25B625B8-25C025C2-25F72600-266E2670-26CD26CF-26E126E326E8-26FF2701-27042706-2709270C-27272729-274B274D274F-27522756-275E2761-276727942798-27AF27B1-27BE2800-28FF2B00-2B2F2B452B462B50-2B592CE5-2CEA2E80-2E992E9B-2EF32F00-2FD52FF0-2FFB300430123013302030363037303E303F319031913196-319F31C0-31E33200-321E322A-32503260-327F328A-32B032C0-32FE3300-33FF4DC0-4DFFA490-A4C6A828-A82BA836A837A839AA77-AA79FDFDFFE4FFE8FFEDFFEEFFFCFFFD",Z:"002000A01680180E2000-200A20282029202F205F3000",Zs:"002000A01680180E2000-200A202F205F3000",Zl:"2028",Zp:"2029",C:"0000-001F007F-009F00AD03780379037F-0383038B038D03A20526-05300557055805600588058B-059005C8-05CF05EB-05EF05F5-0605061C061D0620065F06DD070E070F074B074C07B2-07BF07FB-07FF082E082F083F-08FF093A093B094F095609570973-097809800984098D098E0991099209A909B109B3-09B509BA09BB09C509C609C909CA09CF-09D609D8-09DB09DE09E409E509FC-0A000A040A0B-0A0E0A110A120A290A310A340A370A3A0A3B0A3D0A43-0A460A490A4A0A4E-0A500A52-0A580A5D0A5F-0A650A76-0A800A840A8E0A920AA90AB10AB40ABA0ABB0AC60ACA0ACE0ACF0AD1-0ADF0AE40AE50AF00AF2-0B000B040B0D0B0E0B110B120B290B310B340B3A0B3B0B450B460B490B4A0B4E-0B550B58-0B5B0B5E0B640B650B72-0B810B840B8B-0B8D0B910B96-0B980B9B0B9D0BA0-0BA20BA5-0BA70BAB-0BAD0BBA-0BBD0BC3-0BC50BC90BCE0BCF0BD1-0BD60BD8-0BE50BFB-0C000C040C0D0C110C290C340C3A-0C3C0C450C490C4E-0C540C570C5A-0C5F0C640C650C70-0C770C800C810C840C8D0C910CA90CB40CBA0CBB0CC50CC90CCE-0CD40CD7-0CDD0CDF0CE40CE50CF00CF3-0D010D040D0D0D110D290D3A-0D3C0D450D490D4E-0D560D58-0D5F0D640D650D76-0D780D800D810D840D97-0D990DB20DBC0DBE0DBF0DC7-0DC90DCB-0DCE0DD50DD70DE0-0DF10DF5-0E000E3B-0E3E0E5C-0E800E830E850E860E890E8B0E8C0E8E-0E930E980EA00EA40EA60EA80EA90EAC0EBA0EBE0EBF0EC50EC70ECE0ECF0EDA0EDB0EDE-0EFF0F480F6D-0F700F8C-0F8F0F980FBD0FCD0FD9-0FFF10C6-10CF10FD-10FF1249124E124F12571259125E125F1289128E128F12B112B612B712BF12C112C612C712D7131113161317135B-135E137D-137F139A-139F13F5-13FF169D-169F16F1-16FF170D1715-171F1737-173F1754-175F176D17711774-177F17B417B517DE17DF17EA-17EF17FA-17FF180F181A-181F1878-187F18AB-18AF18F6-18FF191D-191F192C-192F193C-193F1941-1943196E196F1975-197F19AC-19AF19CA-19CF19DB-19DD1A1C1A1D1A5F1A7D1A7E1A8A-1A8F1A9A-1A9F1AAE-1AFF1B4C-1B4F1B7D-1B7F1BAB-1BAD1BBA-1BFF1C38-1C3A1C4A-1C4C1C80-1CCF1CF3-1CFF1DE7-1DFC1F161F171F1E1F1F1F461F471F4E1F4F1F581F5A1F5C1F5E1F7E1F7F1FB51FC51FD41FD51FDC1FF01FF11FF51FFF200B-200F202A-202E2060-206F20722073208F2095-209F20B9-20CF20F1-20FF218A-218F23E9-23FF2427-243F244B-245F26CE26E226E4-26E727002705270A270B2728274C274E2753-2755275F27602795-279727B027BF27CB27CD-27CF2B4D-2B4F2B5A-2BFF2C2F2C5F2CF2-2CF82D26-2D2F2D66-2D6E2D70-2D7F2D97-2D9F2DA72DAF2DB72DBF2DC72DCF2DD72DDF2E32-2E7F2E9A2EF4-2EFF2FD6-2FEF2FFC-2FFF3040309730983100-3104312E-3130318F31B8-31BF31E4-31EF321F32FF4DB6-4DBF9FCC-9FFFA48D-A48FA4C7-A4CFA62C-A63FA660A661A674-A67BA698-A69FA6F8-A6FFA78D-A7FAA82C-A82FA83A-A83FA878-A87FA8C5-A8CDA8DA-A8DFA8FC-A8FFA954-A95EA97D-A97FA9CEA9DA-A9DDA9E0-A9FFAA37-AA3FAA4EAA4FAA5AAA5BAA7C-AA7FAAC3-AADAAAE0-ABBFABEEABEFABFA-ABFFD7A4-D7AFD7C7-D7CAD7FC-F8FFFA2EFA2FFA6EFA6FFADA-FAFFFB07-FB12FB18-FB1CFB37FB3DFB3FFB42FB45FBB2-FBD2FD40-FD4FFD90FD91FDC8-FDEFFDFEFDFFFE1A-FE1FFE27-FE2FFE53FE67FE6C-FE6FFE75FEFD-FF00FFBF-FFC1FFC8FFC9FFD0FFD1FFD8FFD9FFDD-FFDFFFE7FFEF-FFFBFFFEFFFF",Cc:"0000-001F007F-009F",Cf:"00AD0600-060306DD070F17B417B5200B-200F202A-202E2060-2064206A-206FFEFFFFF9-FFFB",Co:"E000-F8FF",Cs:"D800-DFFF",Cn:"03780379037F-0383038B038D03A20526-05300557055805600588058B-059005C8-05CF05EB-05EF05F5-05FF06040605061C061D0620065F070E074B074C07B2-07BF07FB-07FF082E082F083F-08FF093A093B094F095609570973-097809800984098D098E0991099209A909B109B3-09B509BA09BB09C509C609C909CA09CF-09D609D8-09DB09DE09E409E509FC-0A000A040A0B-0A0E0A110A120A290A310A340A370A3A0A3B0A3D0A43-0A460A490A4A0A4E-0A500A52-0A580A5D0A5F-0A650A76-0A800A840A8E0A920AA90AB10AB40ABA0ABB0AC60ACA0ACE0ACF0AD1-0ADF0AE40AE50AF00AF2-0B000B040B0D0B0E0B110B120B290B310B340B3A0B3B0B450B460B490B4A0B4E-0B550B58-0B5B0B5E0B640B650B72-0B810B840B8B-0B8D0B910B96-0B980B9B0B9D0BA0-0BA20BA5-0BA70BAB-0BAD0BBA-0BBD0BC3-0BC50BC90BCE0BCF0BD1-0BD60BD8-0BE50BFB-0C000C040C0D0C110C290C340C3A-0C3C0C450C490C4E-0C540C570C5A-0C5F0C640C650C70-0C770C800C810C840C8D0C910CA90CB40CBA0CBB0CC50CC90CCE-0CD40CD7-0CDD0CDF0CE40CE50CF00CF3-0D010D040D0D0D110D290D3A-0D3C0D450D490D4E-0D560D58-0D5F0D640D650D76-0D780D800D810D840D97-0D990DB20DBC0DBE0DBF0DC7-0DC90DCB-0DCE0DD50DD70DE0-0DF10DF5-0E000E3B-0E3E0E5C-0E800E830E850E860E890E8B0E8C0E8E-0E930E980EA00EA40EA60EA80EA90EAC0EBA0EBE0EBF0EC50EC70ECE0ECF0EDA0EDB0EDE-0EFF0F480F6D-0F700F8C-0F8F0F980FBD0FCD0FD9-0FFF10C6-10CF10FD-10FF1249124E124F12571259125E125F1289128E128F12B112B612B712BF12C112C612C712D7131113161317135B-135E137D-137F139A-139F13F5-13FF169D-169F16F1-16FF170D1715-171F1737-173F1754-175F176D17711774-177F17DE17DF17EA-17EF17FA-17FF180F181A-181F1878-187F18AB-18AF18F6-18FF191D-191F192C-192F193C-193F1941-1943196E196F1975-197F19AC-19AF19CA-19CF19DB-19DD1A1C1A1D1A5F1A7D1A7E1A8A-1A8F1A9A-1A9F1AAE-1AFF1B4C-1B4F1B7D-1B7F1BAB-1BAD1BBA-1BFF1C38-1C3A1C4A-1C4C1C80-1CCF1CF3-1CFF1DE7-1DFC1F161F171F1E1F1F1F461F471F4E1F4F1F581F5A1F5C1F5E1F7E1F7F1FB51FC51FD41FD51FDC1FF01FF11FF51FFF2065-206920722073208F2095-209F20B9-20CF20F1-20FF218A-218F23E9-23FF2427-243F244B-245F26CE26E226E4-26E727002705270A270B2728274C274E2753-2755275F27602795-279727B027BF27CB27CD-27CF2B4D-2B4F2B5A-2BFF2C2F2C5F2CF2-2CF82D26-2D2F2D66-2D6E2D70-2D7F2D97-2D9F2DA72DAF2DB72DBF2DC72DCF2DD72DDF2E32-2E7F2E9A2EF4-2EFF2FD6-2FEF2FFC-2FFF3040309730983100-3104312E-3130318F31B8-31BF31E4-31EF321F32FF4DB6-4DBF9FCC-9FFFA48D-A48FA4C7-A4CFA62C-A63FA660A661A674-A67BA698-A69FA6F8-A6FFA78D-A7FAA82C-A82FA83A-A83FA878-A87FA8C5-A8CDA8DA-A8DFA8FC-A8FFA954-A95EA97D-A97FA9CEA9DA-A9DDA9E0-A9FFAA37-AA3FAA4EAA4FAA5AAA5BAA7C-AA7FAAC3-AADAAAE0-ABBFABEEABEFABFA-ABFFD7A4-D7AFD7C7-D7CAD7FC-D7FFFA2EFA2FFA6EFA6FFADA-FAFFFB07-FB12FB18-FB1CFB37FB3DFB3FFB42FB45FBB2-FBD2FD40-FD4FFD90FD91FDC8-FDEFFDFEFDFFFE1A-FE1FFE27-FE2FFE53FE67FE6C-FE6FFE75FEFDFEFEFF00FFBF-FFC1FFC8FFC9FFD0FFD1FFD8FFD9FFDD-FFDFFFE7FFEF-FFF8FFFEFFFF"})}),ace.define("ace/mode/text",["require","exports","module","ace/tokenizer","ace/mode/text_highlight_rules","ace/mode/behaviour/cstyle","ace/unicode","ace/lib/lang","ace/token_iterator","ace/range"],function(e,t,n){"use strict";var i=e("../tokenizer").Tokenizer,r=e("./text_highlight_rules").TextHighlightRules,o=e("./behaviour/cstyle").CstyleBehaviour,s=e("../unicode"),a=e("../lib/lang"),l=e("../token_iterator").TokenIterator,c=e("../range").Range,u=function(){this.HighlightRules=r};(function(){this.$defaultBehaviour=new o,this.tokenRe=new RegExp("^["+s.packages.L+s.packages.Mn+s.packages.Mc+s.packages.Nd+s.packages.Pc+"\\$_]+","g"),this.nonTokenRe=new RegExp("^(?:[^"+s.packages.L+s.packages.Mn+s.packages.Mc+s.packages.Nd+s.packages.Pc+"\\$_]|\\s])+","g"),this.getTokenizer=function(){return this.$tokenizer||(this.$highlightRules=this.$highlightRules||new this.HighlightRules(this.$highlightRuleConfig),this.$tokenizer=new i(this.$highlightRules.getRules())),this.$tokenizer},this.lineCommentStart="",this.blockComment="",this.toggleCommentLines=function(e,t,n,i){function r(e){for(var t=n;t<=i;t++)e(o.getLine(t),t)}var o=t.doc,s=!0,l=!0,c=1/0,u=t.getTabSize(),h=!1;if(this.lineCommentStart){if(Array.isArray(this.lineCommentStart))m=this.lineCommentStart.map(a.escapeRegExp).join("|"),f=this.lineCommentStart[0];else m=a.escapeRegExp(this.lineCommentStart),f=this.lineCommentStart;m=new RegExp("^(\\s*)(?:"+m+") ?"),h=t.getUseSoftTabs();b=function(e,t){var n=e.match(m);if(n){var i=n[1].length,r=n[0].length;p(e,i,r)||" "!=n[0][r-1]||r--,o.removeInLine(t,i,r)}};var d=f+" ",p=(w=function(e,t){s&&!/\S/.test(e)||(p(e,c,c)?o.insertInLine({row:t,column:c},d):o.insertInLine({row:t,column:c},f))},y=function(e,t){return m.test(e)},function(e,t,n){for(var i=0;t--&&" "==e.charAt(t);)i++;if(i%u!=0)return!1;for(i=0;" "==e.charAt(n++);)i++;return u>2?i%u!=u-1:i%u==0})}else{if(!this.blockComment)return!1;var f=this.blockComment.start,g=this.blockComment.end,m=new RegExp("^(\\s*)(?:"+a.escapeRegExp(f)+")"),v=new RegExp("(?:"+a.escapeRegExp(g)+")\\s*$"),w=function(e,t){y(e,t)||s&&!/\S/.test(e)||(o.insertInLine({row:t,column:e.length},g),o.insertInLine({row:t,column:c},f))},b=function(e,t){var n;(n=e.match(v))&&o.removeInLine(t,e.length-n[0].length,e.length),(n=e.match(m))&&o.removeInLine(t,n[1].length,n[0].length)},y=function(e,n){if(m.test(e))return!0;for(var i=t.getTokens(n),r=0;r<i.length;r++)if("comment"===i[r].type)return!0}}var A=1/0;r(function(e,t){var n=e.search(/\S/);-1!==n?(n<c&&(c=n),l&&!y(e,t)&&(l=!1)):A>e.length&&(A=e.length)}),c==1/0&&(c=A,s=!1,l=!1),h&&c%u!=0&&(c=Math.floor(c/u)*u),r(l?b:w)},this.toggleBlockComment=function(e,t,n,i){var r=this.blockComment;if(r){!r.start&&r[0]&&(r=r[0]);var o,s,a=(g=new l(t,i.row,i.column)).getCurrentToken(),u=(t.selection,t.selection.toOrientedRange());if(a&&/comment/.test(a.type)){for(var h,d;a&&/comment/.test(a.type);){if(-1!=(m=a.value.indexOf(r.start))){var p=g.getCurrentTokenRow(),f=g.getCurrentTokenColumn()+m;h=new c(p,f,p,f+r.start.length);break}a=g.stepBackward()}var g;for(a=(g=new l(t,i.row,i.column)).getCurrentToken();a&&/comment/.test(a.type);){var m;if(-1!=(m=a.value.indexOf(r.end))){p=g.getCurrentTokenRow(),f=g.getCurrentTokenColumn()+m;d=new c(p,f,p,f+r.end.length);break}a=g.stepForward()}d&&t.remove(d),h&&(t.remove(h),o=h.start.row,s=-r.start.length)}else s=r.start.length,o=n.start.row,t.insert(n.end,r.end),t.insert(n.start,r.start);u.start.row==o&&(u.start.column+=s),u.end.row==o&&(u.end.column+=s),t.selection.fromOrientedRange(u)}},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){this.$embeds=[],this.$modes={};for(var t in e)e[t]&&(this.$embeds.push(t),this.$modes[t]=new e[t]);var n=["toggleBlockComment","toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"];for(t=0;t<n.length;t++)!function(e){var i=n[t],r=e[i];e[n[t]]=function(){return this.$delegator(i,arguments,r)}}(this)},this.$delegator=function(e,t,n){var i=t[0];"string"!=typeof i&&(i=i[0]);for(var r=0;r<this.$embeds.length;r++)if(this.$modes[this.$embeds[r]]){var o=i.split(this.$embeds[r]);if(!o[0]&&o[1]){t[0]=o[1];var s=this.$modes[this.$embeds[r]];return s[e].apply(s,t)}}var a=n.apply(this,t);return n?a:void 0},this.transformAction=function(e,t,n,i,r){if(this.$behaviour){var o=this.$behaviour.getBehaviours();for(var s in o)if(o[s][t]){var a=o[s][t].apply(this,arguments);if(a)return a}}},this.getKeywords=function(e){if(!this.completionKeywords){var t=this.$tokenizer.rules,n=[];for(var i in t)for(var r=t[i],o=0,s=r.length;o<s;o++)if("string"==typeof r[o].token)/keyword|support|storage/.test(r[o].token)&&n.push(r[o].regex);else if("object"==typeof r[o].token)for(var a=0,l=r[o].token.length;a<l;a++)if(/keyword|support|storage/.test(r[o].token[a])){i=r[o].regex.match(/\(.+?\)/g)[a];n.push(i.substr(1,i.length-2))}this.completionKeywords=n}return e?n.concat(this.$keywordList||[]):this.$keywordList},this.$createKeywordList=function(){return this.$highlightRules||this.getTokenizer(),this.$keywordList=this.$highlightRules.$keywordList||[]},this.getCompletions=function(e,t,n,i){return(this.$keywordList||this.$createKeywordList()).map(function(e){return{name:e,value:e,score:0,meta:"keyword"}})},this.$id="ace/mode/text"}).call(u.prototype),t.Mode=u}),ace.define("ace/apply_delta",["require","exports","module"],function(e,t,n){"use strict";t.applyDelta=function(e,t,n){var i=t.start.row,r=t.start.column,o=e[i]||"";switch(t.action){case"insert":if(1===t.lines.length)e[i]=o.substring(0,r)+t.lines[0]+o.substring(r);else{var s=[i,1].concat(t.lines);e.splice.apply(e,s),e[i]=o.substring(0,r)+e[i],e[i+t.lines.length-1]+=o.substring(r)}break;case"remove":var a=t.end.column,l=t.end.row;i===l?e[i]=o.substring(0,r)+o.substring(a):e.splice(i,l-i+1,o.substring(0,r)+e[l].substring(a))}}}),ace.define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(e,t,n){"use strict";var i=e("./lib/oop"),r=e("./lib/event_emitter").EventEmitter,o=t.Anchor=function(e,t,n){this.$onChange=this.onChange.bind(this),this.attach(e),void 0===n?this.setPosition(t.row,t.column):this.setPosition(t,n)};(function(){function e(e,t,n){var i=n?e.column<=t.column:e.column<t.column;return e.row<t.row||e.row==t.row&&i}i.implement(this,r),this.getPosition=function(){return this.$clipPositionToDocument(this.row,this.column)},this.getDocument=function(){return this.document},this.$insertRight=!1,this.onChange=function(t){if(!(t.start.row==t.end.row&&t.start.row!=this.row||t.start.row>this.row)){var n=function(t,n,i){var r="insert"==t.action,o=(r?1:-1)*(t.end.row-t.start.row),s=(r?1:-1)*(t.end.column-t.start.column),a=t.start,l=r?a:t.end;return e(n,a,i)?{row:n.row,column:n.column}:e(l,n,!i)?{row:n.row+o,column:n.column+(n.row==l.row?s:0)}:{row:a.row,column:a.column}}(t,{row:this.row,column:this.column},this.$insertRight);this.setPosition(n.row,n.column,!0)}},this.setPosition=function(e,t,n){var i;if(i=n?{row:e,column:t}:this.$clipPositionToDocument(e,t),this.row!=i.row||this.column!=i.column){var r={row:this.row,column:this.column};this.row=i.row,this.column=i.column,this._signal("change",{old:r,value:i})}},this.detach=function(){this.document.removeEventListener("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 i=e("./lib/oop"),r=e("./apply_delta").applyDelta,o=e("./lib/event_emitter").EventEmitter,s=e("./range").Range,a=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(){i.implement(this,o),this.setValue=function(e){var t=this.getLength()-1;this.remove(new s(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 a(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),i=this.pos(e.row,e.column+t.length);return this.applyDelta({start:n,end:i,action:"insert",lines:[t]},!0),this.clonePos(i)},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 i=this.getLine(e);return void 0==t&&(t=i.length),t=Math.min(Math.max(t,0),i.length),{row:e,column:t}},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()))<this.getLength()?(t=t.concat([""]),n=0):(t=[""].concat(t),e--,n=this.$lines[e].length),this.insertMergedLines({row:e,column:n},t)},this.insertMergedLines=function(e,t){var n=this.clippedPos(e.row,e.column),i={row:n.row+t.length-1,column:(1==t.length?n.column:0)+t[t.length-1].length};return this.applyDelta({start:n,end:i,action:"insert",lines:t}),this.clonePos(i)},this.remove=function(e){var t=this.clippedPos(e.start.row,e.start.column),n=this.clippedPos(e.end.row,e.end.column);return this.applyDelta({start:t,end:n,action:"remove",lines:this.getLinesForRange({start:t,end:n})}),this.clonePos(t)},this.removeInLine=function(e,t,n){var i=this.clippedPos(e,t),r=this.clippedPos(e,n);return this.applyDelta({start:i,end:r,action:"remove",lines:this.getLinesForRange({start:i,end:r})},!0),this.clonePos(i)},this.removeFullLines=function(e,t){e=Math.min(Math.max(0,e),this.getLength()-1);var n=(t=Math.min(Math.max(0,t),this.getLength()-1))==this.getLength()-1&&e>0,i=t<this.getLength()-1,r=n?e-1:e,o=n?this.getLine(r).length:0,a=i?t+1:t,l=i?0:this.getLine(a).length,c=new s(r,o,a,l),u=this.$lines.slice(e,t+1);return this.applyDelta({start:c.start,end:c.end,action:"remove",lines:this.getLinesForRange(c)}),u},this.removeNewLine=function(e){e<this.getLength()-1&&e>=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){if(e instanceof s||(e=s.fromPoints(e.start,e.end)),0===t.length&&e.isEmpty())return e.start;if(t==this.getTextRange(e))return e.end;this.remove(e);return t?this.insert(e.start,t):e.start},this.applyDeltas=function(e){for(var t=0;t<e.length;t++)this.applyDelta(e[t])},this.revertDeltas=function(e){for(var t=e.length-1;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]:!s.comparePoints(e.start,e.end))||(n&&e.lines.length>2e4&&this.$splitAndapplyLargeDelta(e,2e4),r(this.$lines,e,t),this._signal("change",e))},this.$splitAndapplyLargeDelta=function(e,t){for(var n=e.lines,i=n.length,r=e.start.row,o=e.start.column,s=0,a=0;;){s=a,a+=t-1;var l=n.slice(s,a);if(a>i){e.lines=l,e.start.row=r+s,e.start.column=o;break}l.push(""),this.applyDelta({start:this.pos(r+s,o),end:this.pos(r+a,o=0),action:e.action,lines:l},!0)}},this.revertDelta=function(e){this.applyDelta({start:this.clonePos(e.start),end:this.clonePos(e.end),action:"insert"==e.action?"remove":"insert",lines:e.lines.slice()})},this.indexToPosition=function(e,t){for(var n=this.$lines||this.getAllLines(),i=this.getNewLineCharacter().length,r=t||0,o=n.length;r<o;r++)if((e-=n[r].length+i)<0)return{row:r,column:e+n[r].length+i};return{row:o-1,column:n[o-1].length}},this.positionToIndex=function(e,t){for(var n=this.$lines||this.getAllLines(),i=this.getNewLineCharacter().length,r=0,o=Math.min(e.row,n.length),s=t||0;s<o;++s)r+=n[s].length+i;return r+e.column}}).call(l.prototype),t.Document=l}),ace.define("ace/background_tokenizer",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(e,t,n){"use strict";var i=e("./lib/oop"),r=e("./lib/event_emitter").EventEmitter,o=function(e,t){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.tokenizer=e;var n=this;this.$worker=function(){if(n.running){for(var e=new Date,t=n.currentLine,i=-1,r=n.doc,o=t;n.lines[t];)t++;var s=r.getLength(),a=0;for(n.running=!1;t<s;){n.$tokenizeRow(t),i=t;do{t++}while(n.lines[t]);if(++a%5==0&&new Date-e>20){n.running=setTimeout(n.$worker,20);break}}n.currentLine=t,-1==i&&(i=t),o<=i&&n.fireUpdateEvent(o,i)}}};(function(){i.implement(this,r),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 i=Array(n+1);i.unshift(t,1),this.lines.splice.apply(this.lines,i),this.states.splice.apply(this.states,i)}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],i=this.tokenizer.getLineTokens(t,n,e);return this.states[e]+""!=i.state+""?(this.states[e]=i.state,this.lines[e+1]=null,this.currentLine>e+1&&(this.currentLine=e+1)):this.currentLine==e&&(this.currentLine=e+1),this.lines[e]=i.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 i=e("./lib/lang"),r=(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 s=o.firstRow,a=o.lastRow,l=s;l<=a;l++){var c=this.cache[l];null==c&&((c=i.getMatchOffsets(n.getLine(l),this.regExp)).length>this.MAX_RANGES&&(c=c.slice(0,this.MAX_RANGES)),c=c.map(function(e){return new r(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";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)}var r=e("../range").Range;(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.row<this.startRow||e.endRow>this.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 i,r,o,s=0,a=this.folds,l=!0;null==t&&(t=this.end.row,n=this.end.column);for(var c=0;c<a.length;c++){if(i=a[c],-1==(r=i.range.compareStart(t,n)))return void e(null,t,n,s,l);if(o=e(null,i.start.row,i.start.column,s,l),(o=!o&&e(i.placeholder,i.start.row,i.start.column,s))||0===r)return;l=!i.sameRow,s=i.end.column}e(null,t,n,s,l)},this.getNextFoldTo=function(e,t){for(var n,i,r=0;r<this.folds.length;r++){if(n=this.folds[r],-1==(i=n.range.compareEnd(e,t)))return{fold:n,kind:"after"};if(0===i)return{fold:n,kind:"inside"}}return null},this.addRemoveChars=function(e,t,n){var i,r,o=this.getNextFoldTo(e,t);if(o)if(i=o.fold,"inside"==o.kind&&i.start.column!=t&&i.start.row!=e)window.console&&window.console.log(e,t,i);else if(i.start.row==e){var s=(r=this.folds).indexOf(i);for(0===s&&(this.start.column+=n);s<r.length;s++){if(i=r[s],i.start.column+=n,!i.sameRow)return;i.end.column+=n}this.end.column+=n}},this.split=function(e,t){var n=this.getNextFoldTo(e,t);if(!n||"inside"==n.kind)return null;var r=n.fold,o=this.folds,s=this.foldData,a=o.indexOf(r),l=o[a-1];this.end.row=l.end.row,this.end.column=l.end.column;var c=new i(s,o=o.splice(a,o.length-a));return s.splice(s.indexOf(this)+1,0,c),c},this.merge=function(e){for(var t=e.folds,n=0;n<t.length;n++)this.addFold(t[n]);var i=this.foldData;i.splice(i.indexOf(e),1)},this.toString=function(){var e=[this.range.toString()+": ["];return this.folds.forEach(function(t){e.push("  "+t.toString())}),e.push("]"),e.join("\n")},this.idxToPosition=function(e){for(var t=0,n=0;n<this.folds.length;n++){var i=this.folds[n];if((e-=i.start.column-t)<0)return{row:i.start.row,column:i.start.column+e};if((e-=i.placeholder.length)<0)return i.start;t=i.end.column}return{row:this.end.row,column:this.end.column+e}}}).call(i.prototype),t.FoldLine=i}),ace.define("ace/range_list",["require","exports","module","ace/range"],function(e,t,n){"use strict";var i=e("./range").Range.comparePoints,r=function(){this.ranges=[]};(function(){this.comparePoints=i,this.pointIndex=function(e,t,n){for(var r=this.ranges,o=n||0;o<r.length;o++){var s=r[o],a=i(e,s.end);if(!(a>0)){var l=i(e,s.start);return 0===a?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 i=this.pointIndex(e.end,t,n);return i<0?i=-i-1:i++,this.ranges.splice(n,i-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,r=(n=n.sort(function(e,t){return i(e.start,t.start)}))[0],o=1;o<n.length;o++){e=r,r=n[o];var s=i(e.end,r.start);s<0||(0!=s||e.isEmpty()||r.isEmpty())&&(i(e.end,r.end)<0&&(e.end.row=r.end.row,e.end.column=r.end.column),n.splice(o,1),t.push(r),r=e,o--)}return this.ranges=n,t},this.contains=function(e,t){return this.pointIndex({row:e,column:t})>=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<e)return[];var i=this.pointIndex({row:e,column:0});i<0&&(i=-i-1);var r=this.pointIndex({row:t,column:0},i);r<0&&(r=-r-1);for(var o=[],s=i;s<r;s++)o.push(n[s]);return o},this.removeAll=function(){return this.ranges.splice(0,this.ranges.length)},this.attach=function(e){this.session&&this.detach(),this.session=e,this.onChange=this.$onChange.bind(this),this.session.on("change",this.onChange)},this.detach=function(){this.session&&(this.session.removeListener("change",this.onChange),this.session=null)},this.$onChange=function(e){if("insert"==e.action)var t=e.start,n=e.end;else n=e.start,t=e.end;for(var i=t.row,r=n.row-i,o=-t.column+n.column,s=this.ranges,a=0,l=s.length;a<l;a++){if(!((c=s[a]).end.row<i)){if(c.start.row>i)break;if(c.start.row==i&&c.start.column>=t.column&&(c.start.column==t.column&&this.$insertRight||(c.start.column+=o,c.start.row+=r)),c.end.row==i&&c.end.column>=t.column){if(c.end.column==t.column&&this.$insertRight)continue;c.end.column==t.column&&o>0&&a<l-1&&c.end.column>c.start.column&&c.end.column==s[a+1].start.column&&(c.end.column-=o),c.end.column+=o,c.end.row+=r}}}if(0!=r&&a<l)for(;a<l;a++){var c;(c=s[a]).start.row+=r,c.end.row+=r}}}).call(r.prototype),t.RangeList=r}),ace.define("ace/edit_session/fold",["require","exports","module","ace/range","ace/range_list","ace/lib/oop"],function(e,t,n){"use strict";function i(e,t){e.row-=t.row,0==e.row&&(e.column-=t.column)}function r(e,t){0==e.row&&(e.column+=t.column),e.row+=t.row}e("../range").Range;var o=e("../range_list").RangeList,s=e("../lib/oop"),a=t.Fold=function(e,t){this.foldLine=null,this.placeholder=t,this.range=e,this.start=e.start,this.end=e.end,this.sameRow=e.start.row==e.end.row,this.subFolds=this.ranges=[]};s.inherits(a,o),function(){this.toString=function(){return'"'+this.placeholder+'" '+this.range.toString()},this.setFoldLine=function(e){this.foldLine=e,this.subFolds.forEach(function(t){t.setFoldLine(e)})},this.clone=function(){var e=this.range.clone(),t=new a(e,this.placeholder);return this.subFolds.forEach(function(e){t.subFolds.push(e.clone())}),t.collapseChildren=this.collapseChildren,t},this.addSubFold=function(e){if(!this.range.isEqual(e)){if(!this.range.containsRange(e))throw new Error("A fold can't intersect already existing fold"+e.range+this.range);!function(e,t){i(e.start,t),i(e.end,t)}(e,this.start);for(var t=e.start.row,n=e.start.column,r=0,o=-1;r<this.subFolds.length&&1==(o=this.subFolds[r].range.compare(t,n));r++);var s=this.subFolds[r];if(0==o)return s.addSubFold(e);t=e.range.end.row,n=e.range.end.column;var a=r;for(o=-1;a<this.subFolds.length&&1==(o=this.subFolds[a].range.compare(t,n));a++);this.subFolds[a];if(0==o)throw new Error("A fold can't intersect already existing fold"+e.range+this.range);this.subFolds.splice(r,a-r,e);return e.setFoldLine(this.foldLine),e}},this.restoreRange=function(e){return function(e,t){r(e.start,t),r(e.end,t)}(e,this.start)}}.call(a.prototype)}),ace.define("ace/edit_session/folding",["require","exports","module","ace/range","ace/edit_session/fold_line","ace/edit_session/fold","ace/token_iterator"],function(e,t,n){"use strict";var i=e("../range").Range,r=e("./fold_line").FoldLine,o=e("./fold").Fold,s=e("../token_iterator").TokenIterator;t.Folding=function(){this.getFoldAt=function(e,t,n){var i=this.getFoldLine(e);if(!i)return null;for(var r=i.folds,o=0;o<r.length;o++){var s=r[o];if(s.range.contains(e,t)){if(1==n&&s.range.isEnd(e,t))continue;if(-1==n&&s.range.isStart(e,t))continue;return s}}},this.getFoldsInRange=function(e){var t=e.start,n=e.end,i=this.$foldData,r=[];t.column+=1,n.column-=1;for(var o=0;o<i.length;o++){var s=i[o].range.compareRange(e);if(2!=s){if(-2==s)break;for(var a=i[o].folds,l=0;l<a.length;l++){var c=a[l];if(-2==(s=c.range.compareRange(e)))break;if(2!=s){if(42==s)break;r.push(c)}}}}return t.column-=1,n.column+=1,r},this.getFoldsInRangeList=function(e){if(Array.isArray(e)){var t=[];e.forEach(function(e){t=t.concat(this.getFoldsInRange(e))},this)}else t=this.getFoldsInRange(e);return t},this.getAllFolds=function(){for(var e=[],t=this.$foldData,n=0;n<t.length;n++)for(var i=0;i<t[n].folds.length;i++)e.push(t[n].folds[i]);return e},this.getFoldStringAt=function(e,t,n,i){if(!(i=i||this.getFoldLine(e)))return null;for(var r,o,s={end:{column:0}},a=0;a<i.folds.length;a++){var l=(o=i.folds[a]).range.compareEnd(e,t);if(-1==l){r=this.getLine(o.start.row).substring(s.end.column,o.start.column);break}if(0===l)return null;s=o}return r||(r=this.getLine(o.start.row).substring(s.end.column)),-1==n?r.substring(0,t-s.end.column):1==n?r.substring(t-s.end.column):r},this.getFoldLine=function(e,t){var n=this.$foldData,i=0;for(t&&(i=n.indexOf(t)),-1==i&&(i=0);i<n.length;i++){var r=n[i];if(r.start.row<=e&&r.end.row>=e)return r;if(r.end.row>e)return null}return null},this.getNextFoldLine=function(e,t){var n=this.$foldData,i=0;for(t&&(i=n.indexOf(t)),-1==i&&(i=0);i<n.length;i++){var r=n[i];if(r.end.row>=e)return r}return null},this.getFoldedRowCount=function(e,t){for(var n=this.$foldData,i=t-e+1,r=0;r<n.length;r++){var o=n[r],s=o.end.row,a=o.start.row;if(s>=t){a<t&&(a>=e?i-=t-a:i=0);break}s>=e&&(i-=a>=e?s-a:s-e+1)}return i},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,i=this.$foldData,s=!1;e instanceof o?n=e:(n=new o(t,e)).collapseChildren=t.collapseChildren,this.$clipRangeToDocument(n.range);var a=n.start.row,l=n.start.column,c=n.end.row,u=n.end.column;if(!(a<c||a==c&&l<=u-2))throw new Error("The range has to be at least 2 characters width");var h=this.getFoldAt(a,l,1),d=this.getFoldAt(c,u,-1);if(h&&d==h)return h.addSubFold(n);h&&!h.range.isStart(a,l)&&this.removeFold(h),d&&!d.range.isEnd(c,u)&&this.removeFold(d);var p=this.getFoldsInRange(n.range);p.length>0&&(this.removeFolds(p),p.forEach(function(e){n.addSubFold(e)}));for(var f=0;f<i.length;f++){var g=i[f];if(c==g.start.row){g.addFold(n),s=!0;break}if(a==g.end.row){if(g.addFold(n),s=!0,!n.sameRow){var m=i[f+1];if(m&&m.start.row==c){g.merge(m);break}}break}if(c<=g.start.row)break}return s||(g=this.$addFoldLine(new r(this.$foldData,n))),this.$useWrapMode?this.$updateWrapData(g.start.row,g.start.row):this.$updateRowLengthCache(g.start.row,g.start.row),this.$modified=!0,this._signal("changeFold",{data:n,action:"add"}),n},this.addFolds=function(e){e.forEach(function(e){this.addFold(e)},this)},this.removeFold=function(e){var t=e.foldLine,n=t.start.row,i=t.end.row,r=this.$foldData,o=t.folds;if(1==o.length)r.splice(r.indexOf(t),1);else if(t.range.isEnd(e.end.row,e.end.column))o.pop(),t.end.row=o[o.length-1].end.row,t.end.column=o[o.length-1].end.column;else if(t.range.isStart(e.start.row,e.start.column))o.shift(),t.start.row=o[0].start.row,t.start.column=o[0].start.column;else if(e.sameRow)o.splice(o.indexOf(e),1);else{var s=t.split(e.start.row,e.start.column);(o=s.folds).shift(),s.start.row=o[0].start.row,s.start.column=o[0].start.column}this.$updating||(this.$useWrapMode?this.$updateWrapData(n,i):this.$updateRowLengthCache(n,i)),this.$modified=!0,this._signal("changeFold",{data:e,action:"remove"})},this.removeFolds=function(e){for(var t=[],n=0;n<e.length;n++)t.push(e[n]);t.forEach(function(e){this.removeFold(e)},this),this.$modified=!0},this.expandFold=function(e){this.removeFold(e),e.subFolds.forEach(function(t){e.restoreRange(t),this.addFold(t)},this),e.collapseChildren>0&&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,r;if(null==e?(n=new i(0,0,this.getLength(),0),t=!0):n="number"==typeof e?new i(e,0,e,this.getLine(e).length):"row"in e?i.fromPoints(e,e):e,r=this.getFoldsInRangeList(n),t)this.removeFolds(r);else for(var o=r;o.length;)this.expandFolds(o),o=this.getFoldsInRangeList(n);if(r.length)return r},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,i,r){null==i&&(i=e.start.row),null==r&&(r=0),null==t&&(t=e.end.row),null==n&&(n=this.getLine(t).length);var o=this.doc,s="";return e.walk(function(e,t,n,a){if(!(t<i)){if(t==i){if(n<r)return;a=Math.max(r,a)}s+=null!=e?e:o.getLine(t).substring(a,n)}},t,n),s},this.getDisplayLine=function(e,t,n,i){var r=this.getFoldLine(e);if(r)return this.getFoldDisplayLine(r,e,t,n,i);var o;return(o=this.doc.getLine(e)).substring(i||0,t||o.length)},this.$cloneFoldData=function(){var e=[];return e=this.$foldData.map(function(t){var n=t.folds.map(function(e){return e.clone()});return new r(e,n)})},this.toggleFold=function(e){var t,n,i=this.selection.getRange();if(i.isEmpty()){var r=i.start;if(t=this.getFoldAt(r.row,r.column))return void this.expandFold(t);(n=this.findMatchingBracket(r))?1==i.comparePoint(n)?i.end=n:(i.start=n,i.start.column++,i.end.column--):(n=this.findMatchingBracket({row:r.row,column:r.column+1}))?(1==i.comparePoint(n)?i.end=n:i.start=n,i.start.column++):i=this.getCommentFoldRange(r.row,r.column)||i}else{var o=this.getFoldsInRange(i);if(e&&o.length)return void this.expandFolds(o);1==o.length&&(t=o[0])}if(t||(t=this.getFoldAt(i.start.row,i.start.column)),t&&t.range.toString()==i.toString())this.expandFold(t);else{var s="...";if(!i.isMultiLine()){if((s=this.getTextRange(i)).length<4)return;s=s.trim().substring(0,2)+".."}this.addFold(s,i)}},this.getCommentFoldRange=function(e,t,n){var r=new s(this,e,t),o=r.getCurrentToken(),a=o.type;if(o&&/^comment|string/.test(a)){"comment"==(a=a.match(/comment|string/)[0])&&(a+="|doc-start");var l=new RegExp(a),c=new i;if(1!=n){do{o=r.stepBackward()}while(o&&l.test(o.type));r.stepForward()}if(c.start.row=r.getCurrentTokenRow(),c.start.column=r.getCurrentTokenColumn()+2,r=new s(this,e,t),-1!=n){var u=-1;do{if(o=r.stepForward(),-1==u){var h=this.getState(r.$row);l.test(h)||(u=r.$row)}else if(r.$row>u)break}while(o&&l.test(o.type));o=r.stepBackward()}else o=r.getCurrentToken();return c.end.row=r.getCurrentTokenRow(),c.end.column=r.getCurrentTokenColumn()+o.value.length-2,c}},this.foldAll=function(e,t,n){void 0==n&&(n=1e5);var i=this.foldWidgets;if(i){t=t||this.getLength();for(var r=e=e||0;r<t;r++)if(null==i[r]&&(i[r]=this.getFoldWidget(r)),"start"==i[r]){var o=this.getFoldWidgetRange(r);if(o&&o.isMultiLine()&&o.end.row<=t&&o.start.row>=e){r=o.end.row;try{var s=this.addFold("...",o);s&&(s.collapseChildren=n)}catch(e){}}}}},this.$foldStyles={manual:1,markbegin:1,markbeginend:1},this.$foldStyle="markbegin",this.setFoldStyle=function(e){if(!this.$foldStyles[e])throw new Error("invalid fold style: "+e+"["+Object.keys(this.$foldStyles).join(", ")+"]");if(this.$foldStyle!=e){this.$foldStyle=e,"manual"==e&&this.unfold();var t=this.$foldMode;this.$setFolding(null),this.$setFolding(t)}},this.$setFolding=function(e){this.$foldMode!=e&&(this.$foldMode=e,this.off("change",this.$updateFoldWidgets),this.off("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets),this._signal("changeAnnotation"),e&&"manual"!=this.$foldStyle?(this.foldWidgets=[],this.getFoldWidget=e.getFoldWidget.bind(e,this,this.$foldStyle),this.getFoldWidgetRange=e.getFoldWidgetRange.bind(e,this,this.$foldStyle),this.$updateFoldWidgets=this.updateFoldWidgets.bind(this),this.$tokenizerUpdateFoldWidgets=this.tokenizerUpdateFoldWidgets.bind(this),this.on("change",this.$updateFoldWidgets),this.on("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets)):this.foldWidgets=null)},this.getParentFoldRangeData=function(e,t){var n=this.foldWidgets;if(!n||t&&n[e])return{};for(var i,r=e-1;r>=0;){var o=n[r];if(null==o&&(o=n[r]=this.getFoldWidget(r)),"start"==o){var s=this.getFoldWidgetRange(r);if(i||(i=s),s&&s.end.row>=e)break}r--}return{range:-1!==r&&s,firstRange:i}},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 i=t.target||t.srcElement;i&&/ace_fold-widget/.test(i.className)&&(i.className+=" ace_invalid")}},this.$toggleFoldWidget=function(e,t){if(this.getFoldWidget){var n=this.getFoldWidget(e),i=this.getLine(e),r="end"===n?-1:1,o=this.getFoldAt(e,-1===r?0:i.length,r);if(o)return t.children||t.all?this.removeFold(o):this.expandFold(o),o;var s=this.getFoldWidgetRange(e,!0);if(s&&!s.isMultiLine()&&(o=this.getFoldAt(s.start.row,s.start.column,1))&&s.isEqual(o.range))return this.removeFold(o),o;if(t.siblings){var a=this.getParentFoldRangeData(e);if(a.range)var l=a.range.start.row+1,c=a.range.end.row;this.foldAll(l,c,t.all?1e4:0)}else t.children?(c=s?s.end.row:this.getLength(),this.foldAll(e+1,c,t.all?1e4:0)):s&&(t.all&&(s.collapseChildren=1e4),this.addFold("...",s));return s}},this.toggleFoldWidget=function(e){var t=this.selection.getCursor().row;t=this.getRowFoldStart(t);var n=this.$toggleFoldWidget(t,{});if(!n){var i=this.getParentFoldRangeData(t,!0);if(n=i.range||i.firstRange){t=n.start.row;var r=this.getFoldAt(t,this.getLine(t).length,1);r?this.removeFold(r):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 i=Array(n+1);i.unshift(t,1),this.foldWidgets.splice.apply(this.foldWidgets,i)}},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 i=e("../token_iterator").TokenIterator,r=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 i=n.match(/([\(\[\{])|([\)\]\}])/);return i?i[1]?this.$findClosingBracket(i[1],e):this.$findOpeningBracket(i[2],e):null},this.getBracketRange=function(e){var t,n=this.getLine(e.row),i=!0,o=n.charAt(e.column-1),s=o&&o.match(/([\(\[\{])|([\)\]\}])/);if(s||(o=n.charAt(e.column),e={row:e.row,column:e.column+1},s=o&&o.match(/([\(\[\{])|([\)\]\}])/),i=!1),!s)return null;if(s[1]){if(!(a=this.$findClosingBracket(s[1],e)))return null;t=r.fromPoints(e,a),i||(t.end.column++,t.start.column--),t.cursor=t.end}else{var a;if(!(a=this.$findOpeningBracket(s[2],e)))return null;t=r.fromPoints(a,e),i||(t.start.column++,t.end.column--),t.cursor=t.start}return t},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{"},this.$findOpeningBracket=function(e,t,n){var r=this.$brackets[e],o=1,s=new i(this,t.row,t.column),a=s.getCurrentToken();if(a||(a=s.stepForward()),a){n||(n=new RegExp("(\\.?"+a.type.replace(".","\\.").replace("rparen",".paren").replace(/\b(?:end)\b/,"(?:start|begin|end)")+")+"));for(var l=t.column-s.getCurrentTokenColumn()-2,c=a.value;;){for(;l>=0;){var u=c.charAt(l);if(u==r){if(0==(o-=1))return{row:s.getCurrentTokenRow(),column:l+s.getCurrentTokenColumn()}}else u==e&&(o+=1);l-=1}do{a=s.stepBackward()}while(a&&!n.test(a.type));if(null==a)break;l=(c=a.value).length-1}return null}},this.$findClosingBracket=function(e,t,n){var r=this.$brackets[e],o=1,s=new i(this,t.row,t.column),a=s.getCurrentToken();if(a||(a=s.stepForward()),a){n||(n=new RegExp("(\\.?"+a.type.replace(".","\\.").replace("lparen",".paren").replace(/\b(?:start|begin)\b/,"(?:start|begin|end)")+")+"));for(var l=t.column-s.getCurrentTokenColumn();;){for(var c=a.value,u=c.length;l<u;){var h=c.charAt(l);if(h==r){if(0==(o-=1))return{row:s.getCurrentTokenRow(),column:l+s.getCurrentTokenColumn()}}else h==e&&(o+=1);l+=1}do{a=s.stepForward()}while(a&&!n.test(a.type));if(null==a)break;l=0}return null}}}}),ace.define("ace/edit_session",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/bidihandler","ace/config","ace/lib/event_emitter","ace/selection","ace/mode/text","ace/range","ace/document","ace/background_tokenizer","ace/search_highlight","ace/edit_session/folding","ace/edit_session/bracket_match"],function(e,t,n){"use strict";var i=e("./lib/oop"),r=e("./lib/lang"),o=e("./bidihandler").BidiHandler,s=e("./config"),a=e("./lib/event_emitter").EventEmitter,l=e("./selection").Selection,c=e("./mode/text").Mode,u=e("./range").Range,h=e("./document").Document,d=e("./background_tokenizer").BackgroundTokenizer,p=e("./search_highlight").SearchHighlight,f=function(e,t){this.$breakpoints=[],this.$decorations=[],this.$frontMarkers={},this.$backMarkers={},this.$markerId=1,this.$undoSelect=!0,this.$foldData=[],this.id="session"+ ++f.$uid,this.$foldData.toString=function(){return this.join("\n")},this.on("changeFold",this.onChangeFold.bind(this)),this.$onChange=this.onChange.bind(this),"object"==typeof e&&e.getLine||(e=new h(e)),this.$bidiHandler=new o(this),this.setDocument(e),this.selection=new l(this),s.resetOptions(this),this.setMode(t),s._signal("session",this)};f.$uid=0,function(){function e(e){return!(e<4352)&&(e>=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)}i.implement(this,a),this.setDocument=function(e){this.doc&&this.doc.removeListener("change",this.$onChange),this.doc=e,e.on("change",this.$onChange),this.bgTokenizer&&this.bgTokenizer.setDocument(this.getDocument()),this.resetCaches()},this.getDocument=function(){return this.doc},this.$resetRowCache=function(e){if(!e)return this.$docRowCache=[],void(this.$screenRowCache=[]);var t=this.$docRowCache.length,n=this.$getRowCacheIndex(this.$docRowCache,e)+1;t>n&&(this.$docRowCache.splice(n,t),this.$screenRowCache.splice(n,t))},this.$getRowCacheIndex=function(e,t){for(var n=0,i=e.length-1;n<=i;){var r=n+i>>1,o=e[r];if(t>o)n=r+1;else{if(!(t<o))return r;i=r-1}}return n-1},this.resetCaches=function(){this.$modified=!0,this.$wrapData=[],this.$rowLengthCache=[],this.$resetRowCache(0),this.bgTokenizer&&this.bgTokenizer.start(0)},this.onChangeFold=function(e){var t=e.data;this.$resetRowCache(t.start.row)},this.onChange=function(e){this.$modified=!0,this.$bidiHandler.onChange(e),this.$resetRowCache(e.start.row);var t=this.$updateInternalDataOnChange(e);this.$fromUndo||!this.$undoManager||e.ignore||(this.$deltasDoc.push(e),t&&0!=t.length&&this.$deltasFold.push({action:"removeFolds",folds:t}),this.$informUndoManager.schedule()),this.bgTokenizer&&this.bgTokenizer.$updateOnChange(e),this._signal("change",e)},this.setValue=function(e){this.doc.setValue(e),this.selection.moveTo(0,0),this.$resetRowCache(0),this.$deltas=[],this.$deltasDoc=[],this.$deltasFold=[],this.setUndoManager(this.$undoManager),this.getUndoManager().reset()},this.getValue=this.toString=function(){return this.doc.getValue()},this.getSelection=function(){return this.selection},this.getState=function(e){return this.bgTokenizer.getState(e)},this.getTokens=function(e){return this.bgTokenizer.getTokens(e)},this.getTokenAt=function(e,t){var n,i=this.bgTokenizer.getTokens(e),r=0;if(null==t){var o=i.length-1;r=this.getLine(e).length}else for(o=0;o<i.length&&!((r+=i[o].value.length)>=t);o++);return(n=i[o])?(n.index=o,n.start=r-n.value.length,n):null},this.setUndoManager=function(e){if(this.$undoManager=e,this.$deltas=[],this.$deltasDoc=[],this.$deltasFold=[],this.$informUndoManager&&this.$informUndoManager.cancel(),e){var t=this;this.$syncInformUndoManager=function(){t.$informUndoManager.cancel(),t.$deltasFold.length&&(t.$deltas.push({group:"fold",deltas:t.$deltasFold}),t.$deltasFold=[]),t.$deltasDoc.length&&(t.$deltas.push({group:"doc",deltas:t.$deltasDoc}),t.$deltasDoc=[]),t.$deltas.length>0&&e.execute({action:"aceupdate",args:[t.$deltas,t],merge:t.mergeUndoDeltas}),t.mergeUndoDeltas=!1,t.$deltas=[]},this.$informUndoManager=r.delayedCall(this.$syncInformUndoManager)}},this.markUndoGroup=function(){this.$syncInformUndoManager&&this.$syncInformUndoManager()},this.$defaultUndoManager={undo:function(){},redo:function(){},reset:function(){}},this.getUndoManager=function(){return this.$undoManager||this.$defaultUndoManager},this.getTabString=function(){return this.getUseSoftTabs()?r.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;t<e.length;t++)this.$breakpoints[e[t]]="ace_breakpoint";this._signal("changeBreakpoint",{})},this.clearBreakpoints=function(){this.$breakpoints=[],this._signal("changeBreakpoint",{})},this.setBreakpoint=function(e,t){void 0===t&&(t="ace_breakpoint"),t?this.$breakpoints[e]=t:delete this.$breakpoints[e],this._signal("changeBreakpoint",{})},this.clearBreakpoint=function(e){delete this.$breakpoints[e],this._signal("changeBreakpoint",{})},this.addMarker=function(e,t,n,i){var r=this.$markerId++,o={range:e,type:n||"line",renderer:"function"==typeof n?n:null,clazz:t,inFront:!!i,id:r};return i?(this.$frontMarkers[r]=o,this._signal("changeFrontMarker")):(this.$backMarkers[r]=o,this._signal("changeBackMarker")),r},this.addDynamicMarker=function(e,t){if(e.update){var n=this.$markerId++;return e.id=n,e.inFront=!!t,t?(this.$frontMarkers[n]=e,this._signal("changeFrontMarker")):(this.$backMarkers[n]=e,this._signal("changeBackMarker")),e}},this.removeMarker=function(e){var t=this.$frontMarkers[e]||this.$backMarkers[e];if(t){var n=t.inFront?this.$frontMarkers:this.$backMarkers;t&&(delete n[e],this._signal(t.inFront?"changeFrontMarker":"changeBackMarker"))}},this.getMarkers=function(e){return e?this.$frontMarkers:this.$backMarkers},this.highlight=function(e){if(!this.$searchHighlight){var t=new p(null,"ace_selected-word","text");this.$searchHighlight=this.addDynamicMarker(t)}this.$searchHighlight.setRegexp(e)},this.highlightLines=function(e,t,n,i){"number"!=typeof t&&(n=t,t=e),n||(n="ace_step");var r=new u(e,0,t,1/0);return r.id=this.addMarker(r,n,"fullLine",i),r},this.setAnnotations=function(e){this.$annotations=e,this._signal("changeAnnotation",{})},this.getAnnotations=function(){return this.$annotations||[]},this.clearAnnotations=function(){this.setAnnotations([])},this.$detectNewLine=function(e){var t=e.match(/^.*?(\r?\n)/m);this.$autoNewLine=t?t[1]:"\n"},this.getWordRange=function(e,t){var n=this.getLine(e),i=!1;if(t>0&&(i=!!n.charAt(t-1).match(this.tokenRe)),i||(i=!!n.charAt(t).match(this.tokenRe)),i)var r=this.tokenRe;else if(/^\s+$/.test(n.slice(t-1,t+1)))r=/\s/;else r=this.nonTokenRe;var o=t;if(o>0){do{o--}while(o>=0&&n.charAt(o).match(r));o++}for(var s=t;s<n.length&&n.charAt(s).match(r);)s++;return new u(e,o,e,s)},this.getAWordRange=function(e,t){for(var n=this.getWordRange(e,t),i=this.getLine(n.end.row);i.charAt(n.end.column).match(/[ \t]/);)n.end.column+=1;return n},this.setNewLineMode=function(e){this.doc.setNewLineMode(e)},this.getNewLineMode=function(){return this.doc.getNewLineMode()},this.setUseWorker=function(e){this.setOption("useWorker",e)},this.getUseWorker=function(){return this.$useWorker},this.onReloadTokenizer=function(e){var t=e.data;this.bgTokenizer.start(t.first),this._signal("tokenizerUpdate",e)},this.$modes={},this.$mode=null,this.$modeId=null,this.setMode=function(e,t){if(e&&"object"==typeof e){if(e.getTokenizer)return this.$onChangeMode(e);var n=e,i=n.path}else i=e||"ace/mode/text";if(this.$modes["ace/mode/text"]||(this.$modes["ace/mode/text"]=new c),this.$modes[i]&&!n)return this.$onChangeMode(this.$modes[i]),void(t&&t());this.$modeId=i,s.loadModule(["mode",i],function(e){if(this.$modeId!==i)return t&&t();this.$modes[i]&&!n?this.$onChangeMode(this.$modes[i]):e&&e.Mode&&(e=new e.Mode(n),n||(this.$modes[i]=e,e.$id=i),this.$onChangeMode(e)),t&&t()}.bind(this)),this.$mode||this.$onChangeMode(this.$modes["ace/mode/text"],!0)},this.$onChangeMode=function(e,t){if(t||(this.$modeId=e.$id),this.$mode!==e){this.$mode=e,this.$stopWorker(),this.$useWorker&&this.$startWorker();var n=e.getTokenizer();if(void 0!==n.addEventListener){var i=this.onReloadTokenizer.bind(this);n.addEventListener("update",i)}if(this.bgTokenizer)this.bgTokenizer.setTokenizer(n);else{this.bgTokenizer=new d(n);var r=this;this.bgTokenizer.addEventListener("update",function(e){r._signal("tokenizerUpdate",e)})}this.bgTokenizer.setDocument(this.getDocument()),this.tokenRe=e.tokenRe,this.nonTokenRe=e.nonTokenRe,t||(e.attachToSession&&e.attachToSession(this),this.$options.wrapMethod.set.call(this,this.$wrapMethod),this.$setFolding(e.foldingRules),this.bgTokenizer.start(0),this._emit("changeMode"))}},this.$stopWorker=function(){this.$worker&&(this.$worker.terminate(),this.$worker=null)},this.$startWorker=function(){try{this.$worker=this.$mode.createWorker(this)}catch(e){s.warn("Could not load worker",e),this.$worker=null}},this.getMode=function(){return this.$mode},this.$scrollTop=0,this.setScrollTop=function(e){this.$scrollTop===e||isNaN(e)||(this.$scrollTop=e,this._signal("changeScrollTop",e))},this.getScrollTop=function(){return this.$scrollTop},this.$scrollLeft=0,this.setScrollLeft=function(e){this.$scrollLeft===e||isNaN(e)||(this.$scrollLeft=e,this._signal("changeScrollLeft",e))},this.getScrollLeft=function(){return this.$scrollLeft},this.getScreenWidth=function(){return this.$computeWidth(),this.lineWidgets?Math.max(this.getLineWidgetMaxWidth(),this.screenWidth):this.screenWidth},this.getLineWidgetMaxWidth=function(){if(null!=this.lineWidgetsWidth)return this.lineWidgetsWidth;var e=0;return this.lineWidgets.forEach(function(t){t&&t.screenWidth>e&&(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,i=0,r=0,o=this.$foldData[r],s=o?o.start.row:1/0,a=t.length,l=0;l<a;l++){if(l>s){if((l=o.end.row+1)>=a)break;s=(o=this.$foldData[r++])?o.start.row:1/0}null==n[l]&&(n[l]=this.$getStringScreenWidth(t[l])[0]),n[l]>i&&(i=n[l])}this.screenWidth=i}},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=null,i=e.length-1;-1!=i;i--){var r=e[i];"doc"==r.group?(this.doc.revertDeltas(r.deltas),n=this.$getUndoSelection(r.deltas,!0,n)):r.deltas.forEach(function(e){this.addFolds(e.folds)},this)}return this.$fromUndo=!1,n&&this.$undoSelect&&!t&&this.selection.setSelectionRange(n),n}},this.redoChanges=function(e,t){if(e.length){this.$fromUndo=!0;for(var n=null,i=0;i<e.length;i++){var r=e[i];"doc"==r.group&&(this.doc.applyDeltas(r.deltas),n=this.$getUndoSelection(r.deltas,!1,n))}return this.$fromUndo=!1,n&&this.$undoSelect&&!t&&this.selection.setSelectionRange(n),n}},this.setUndoSelect=function(e){this.$undoSelect=e},this.$getUndoSelection=function(e,t,n){function i(e){return t?"insert"!==e.action:"insert"===e.action}var r,o,s=e[0];i(s)?r=u.fromPoints(s.start,s.end):r=u.fromPoints(s.start,s.start);for(var a=1;a<e.length;a++)i(s=e[a])?(o=s.start,-1==r.compare(o.row,o.column)&&r.setStart(o),o=s.end,1==r.compare(o.row,o.column)&&r.setEnd(o),!0):(o=s.start,-1==r.compare(o.row,o.column)&&(r=u.fromPoints(s.start,s.start)),!1);if(null!=n){0===u.comparePoints(n.start,r.start)&&(n.start.column+=r.end.column-r.start.column,n.end.column+=r.end.column-r.start.column);var l=n.compareRange(r);1==l?r.setStart(n.start):-1==l&&r.setEnd(n.end)}return r},this.replace=function(e,t){return this.doc.replace(e,t)},this.moveText=function(e,t,n){var i=this.getTextRange(e),r=this.getFoldsInRange(e),o=u.fromPoints(t,t);if(!n){this.remove(e);var s=e.start.row-e.end.row;(c=s?-e.end.column:e.start.column-e.end.column)&&(o.start.row==e.end.row&&o.start.column>e.end.column&&(o.start.column+=c),o.end.row==e.end.row&&o.end.column>e.end.column&&(o.end.column+=c)),s&&o.start.row>=e.end.row&&(o.start.row+=s,o.end.row+=s)}if(o.end=this.insert(o.start,i),r.length){var a=e.start,l=o.start,c=(s=l.row-a.row,l.column-a.column);this.addFolds(r.map(function(e){return(e=e.clone()).start.row==a.row&&(e.start.column+=c),e.end.row==a.row&&(e.end.column+=c),e.start.row+=s,e.end.row+=s,e}))}return o},this.indentRows=function(e,t,n){n=n.replace(/\t/g,this.getTabString());for(var i=e;i<=t;i++)this.doc.insertInLine({row:i,column:0},n)},this.outdentRows=function(e){for(var t=e.collapseRows(),n=new u(0,0,0,0),i=this.getTabSize(),r=t.start.row;r<=t.end.row;++r){var o=this.getLine(r);n.start.row=r,n.end.row=r;for(var s=0;s<i&&" "==o.charAt(s);++s);s<i&&"\t"==o.charAt(s)?(n.start.column=s,n.end.column=s+1):(n.start.column=0,n.end.column=s),this.remove(n)}},this.$moveLines=function(e,t,n){if(e=this.getRowFoldStart(e),t=this.getRowFoldEnd(t),n<0){if((r=this.getRowFoldStart(e+n))<0)return 0;var i=r-e}else if(n>0){var r;if((r=this.getRowFoldEnd(t+n))>this.doc.getLength()-1)return 0;i=r-t}else{e=this.$clipRowToDocument(e);i=(t=this.$clipRowToDocument(t))-e+1}var o=new u(e,0,t,Number.MAX_VALUE),s=this.getFoldsInRange(o).map(function(e){return e=e.clone(),e.start.row+=i,e.end.row+=i,e}),a=0==n?this.doc.getLines(e,t):this.doc.removeFullLines(e,t);return this.doc.insertFullLines(e+i,a),s.length&&this.addFolds(s),i},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 i=this.$constrainWrapLimit(e,n.min,n.max);return i!=this.$wrapLimit&&i>1&&(this.$wrapLimit=i,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,i=e.start,r=e.end,o=i.row,s=r.row,a=s-o,l=null;if(this.$updating=!0,0!=a)if("remove"===n){this[t?"$wrapData":"$rowLengthCache"].splice(o,a);var c=this.$foldData;l=this.getFoldsInRange(e),this.removeFolds(l);var u=0;if(g=this.getFoldLine(r.row)){g.addRemoveChars(r.row,r.column,i.column-r.column),g.shiftRow(-a);var h=this.getFoldLine(o);h&&h!==g&&(h.merge(g),g=h),u=c.indexOf(g)+1}for(;u<c.length;u++){(g=c[u]).start.row>=r.row&&g.shiftRow(-a)}s=o}else{var d=Array(a);d.unshift(o,0);var p=t?this.$wrapData:this.$rowLengthCache;p.splice.apply(p,d);c=this.$foldData,u=0;if(g=this.getFoldLine(o)){var f=g.range.compareInside(i.row,i.column);0==f?(g=g.split(i.row,i.column))&&(g.shiftRow(a),g.addRemoveChars(s,0,r.column-i.column)):-1==f&&(g.addRemoveChars(o,0,r.column-i.column),g.shiftRow(a)),u=c.indexOf(g)+1}for(;u<c.length;u++){(g=c[u]).start.row>=o&&g.shiftRow(a)}}else{a=Math.abs(e.start.column-e.end.column),"remove"===n&&(l=this.getFoldsInRange(e),this.removeFolds(l),a=-a);var g;(g=this.getFoldLine(o))&&g.addRemoveChars(o,i.column,a)}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,s):this.$updateRowLengthCache(o,s),l},this.$updateRowLengthCache=function(e,t,n){this.$rowLengthCache[e]=null,this.$rowLengthCache[t]=null},this.$updateWrapData=function(e,i){var r,o,s=this.doc.getAllLines(),a=this.getTabSize(),l=this.$wrapData,c=this.$wrapLimit,u=e;for(i=Math.min(i,s.length-1);u<=i;)(o=this.getFoldLine(u,o))?(r=[],o.walk(function(e,i,o,a){var l;if(null!=e){(l=this.$getDisplayTokens(e,r.length))[0]=t;for(var c=1;c<l.length;c++)l[c]=n}else l=this.$getDisplayTokens(s[i].substring(a,o),r.length);r=r.concat(l)}.bind(this),o.end.row,s[o.end.row].length+1),l[o.start.row]=this.$computeWrapSplits(r,c,a),u=o.end.row+1):(r=this.$getDisplayTokens(s[u]),l[u]=this.$computeWrapSplits(r,c,a),u++)};var t=3,n=4,o=10,l=11,h=12;this.$computeWrapSplits=function(e,i,r){function s(t){var n=e.slice(u,t),i=n.length;n.join("").replace(/12/g,function(){i-=1}).replace(/2/g,function(){i-=1}),a.length||(m=function(){var t=0;if(0===g)return t;if(f)for(var n=0;n<e.length;n++){var i=e[n];if(i==o)t+=1;else{if(i!=l){if(i==h)continue;break}t+=r}}return p&&!1!==f&&(t+=r),Math.min(t,g)}(),a.indent=m),d+=i,a.push(d),u=t}if(0==e.length)return[];for(var a=[],c=e.length,u=0,d=0,p=this.$wrapAsCode,f=this.$indentedSoftWrap,g=i<=Math.max(2*r,8)||!1===f?0:Math.floor(i/2),m=0;c-u>i-m;){var v=u+i-m;if(e[v-1]>=o&&e[v]>=o)s(v);else if(e[v]!=t&&e[v]!=n){for(var w=Math.max(v-(i-(i>>2)),u-1);v>w&&e[v]<t;)v--;if(p){for(;v>w&&e[v]<t;)v--;for(;v>w&&9==e[v];)v--}else for(;v>w&&e[v]<o;)v--;v>w?s(++v):(2==e[v=u+i]&&v--,s(v-m))}else{for(;v!=u-1&&e[v]!=t;v--);if(v>u){s(v);continue}for(v=u+i;v<e.length&&e[v]==n;v++);if(v==e.length)break;s(v)}}return a},this.$getDisplayTokens=function(t,n){var i,r=[];n=n||0;for(var s=0;s<t.length;s++){var a=t.charCodeAt(s);if(9==a){i=this.getScreenTabSize(r.length+n),r.push(l);for(var c=1;c<i;c++)r.push(h)}else 32==a?r.push(o):a>39&&a<48||a>57&&a<64?r.push(9):a>=4352&&e(a)?r.push(1,2):r.push(1)}return r},this.$getStringScreenWidth=function(t,n,i){if(0==n)return[0,0];null==n&&(n=1/0),i=i||0;var r,o;for(o=0;o<t.length&&(9==(r=t.charCodeAt(o))?i+=this.getScreenTabSize(i):r>=4352&&e(r)?i+=2:i+=1,!(i>n));o++);return[i,o]},this.lineWidgets=null,this.getRowLength=function(e){if(this.lineWidgets)var t=this.lineWidgets[e]&&this.lineWidgets[e].rowCount||0;else t=0;return this.$useWrapMode&&this.$wrapData[e]?this.$wrapData[e].length+1+t:1+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]<t.column?n.indent:0}return 0},this.getScreenLastRowColumn=function(e){var t=this.screenToDocumentPosition(e,Number.MAX_VALUE);return this.documentToScreenColumn(t.row,t.column)},this.getDocumentLastRowColumn=function(e,t){var n=this.documentToScreenRow(e,t);return this.getScreenLastRowColumn(n)},this.getDocumentLastRowColumnPosition=function(e,t){var n=this.documentToScreenRow(e,t);return this.screenToDocumentPosition(n,Number.MAX_VALUE/10)},this.getRowSplitData=function(e){return this.$useWrapMode?this.$wrapData[e]:void 0},this.getScreenTabSize=function(e){return this.$tabSize-e%this.$tabSize},this.screenToDocumentRow=function(e,t){return this.screenToDocumentPosition(e,t).row},this.screenToDocumentColumn=function(e,t){return this.screenToDocumentPosition(e,t).column},this.screenToDocumentPosition=function(e,t,n){if(e<0)return{row:0,column:0};var i,r,o=0,s=0,a=0,l=0,c=this.$screenRowCache,u=this.$getRowCacheIndex(c,e),h=c.length;if(h&&u>=0){a=c[u],o=this.$docRowCache[u];var d=e>c[h-1]}else d=!h;for(var p=this.getLength()-1,f=this.getNextFoldLine(o),g=f?f.start.row:1/0;a<=e&&(l=this.getRowLength(o),!(a+l>e||o>=p));)a+=l,++o>g&&(o=f.end.row+1,g=(f=this.getNextFoldLine(o,f))?f.start.row:1/0),d&&(this.$docRowCache.push(o),this.$screenRowCache.push(a));if(f&&f.start.row<=o)i=this.getFoldDisplayLine(f),o=f.start.row;else{if(a+l<=e||o>p)return{row:p,column:this.getLine(p).length};i=this.getLine(o),f=null}var m=0,v=Math.floor(e-a);if(this.$useWrapMode){var w=this.$wrapData[o];w&&(r=w[v],v>0&&w.length&&(m=w.indent,s=w[v-1]||w[w.length-1],i=i.substring(s)))}return void 0!==n&&this.$bidiHandler.isBidiRow(a+v,o,v)&&(t=this.$bidiHandler.offsetToCol(n)),s+=this.$getStringScreenWidth(i,t-m)[1],this.$useWrapMode&&s>=r&&(s=r-1),f?f.idxToPosition(s):{row:o,column:s}},this.documentToScreenPosition=function(e,t){if(void 0===t)var n=this.$clipPositionToDocument(e.row,e.column);else n=this.$clipPositionToDocument(e,t);e=n.row,t=n.column;var i=0,r=null,o=null;(o=this.getFoldAt(e,t,1))&&(e=o.start.row,t=o.start.column);var s,a=0,l=this.$docRowCache,c=this.$getRowCacheIndex(l,e),u=l.length;if(u&&c>=0){a=l[c],i=this.$screenRowCache[c];var h=e>l[u-1]}else h=!u;for(var d=this.getNextFoldLine(a),p=d?d.start.row:1/0;a<e;){if(a>=p){if((s=d.end.row+1)>e)break;p=(d=this.getNextFoldLine(s,d))?d.start.row:1/0}else s=a+1;i+=this.getRowLength(a),a=s,h&&(this.$docRowCache.push(a),this.$screenRowCache.push(i))}var f="";d&&a>=p?(f=this.getFoldDisplayLine(d,e,t),r=d.start.row):(f=this.getLine(e).substring(0,t),r=e);var g=0;if(this.$useWrapMode){var m=this.$wrapData[r];if(m){for(var v=0;f.length>=m[v];)i++,v++;f=f.substring(m[v-1]||0,f.length),g=v>0?m.indent:0}}return{row:i,column:g+this.$getStringScreenWidth(f)[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,i=0,r=(a=0,(t=this.$foldData[a++])?t.start.row:1/0);i<n;){var o=this.$wrapData[i];e+=o?o.length+1:1,++i>r&&(i=t.end.row+1,r=(t=this.$foldData[a++])?t.start.row:1/0)}else{e=this.getLength();for(var s=this.$foldData,a=0;a<s.length;a++)e-=(t=s[a]).end.row-t.start.row}return this.lineWidgets&&(e+=this.$getWidgetScreenLength()),e},this.$setFontMetrics=function(e){this.$enableVarChar&&(this.$getStringScreenWidth=function(t,n,i){if(0===n)return[0,0];n||(n=1/0),i=i||0;var r,o;for(o=0;o<t.length&&(r=t.charAt(o),!((i+="\t"===r?this.getScreenTabSize(i):e.getCharacterWidth(r))>n));o++);return[i,o]})},this.destroy=function(){this.bgTokenizer&&(this.bgTokenizer.setDocument(null),this.bgTokenizer=null),this.$stopWorker()},this.isFullWidth=e}.call(f.prototype),e("./edit_session/folding").Folding.call(f.prototype),e("./edit_session/bracket_match").BracketMatch.call(f.prototype),s.defineOptions(f.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.$modified=!0,this.$resetRowCache(0),this.$updateWrapData(0,this.getLength()-1)))},initialValue:"auto"},indentedSoftWrap:{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){isNaN(e)||this.$tabSize===e||(this.$modified=!0,this.$rowLengthCache=[],this.$tabSize=e,this._signal("changeTabSize"))},initialValue:4,handlesSet:!0},navigateWithinSoftTabs:{initialValue:!1},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}}}),t.EditSession=f}),ace.define("ace/search",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],function(e,t,n){"use strict";var i=e("./lib/lang"),r=e("./lib/oop"),o=e("./range").Range,s=function(){this.$options={}};(function(){this.set=function(e){return r.mixin(this.$options,e),this},this.getOptions=function(){return i.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 i=null;return n.forEach(function(e,n,r,s){return i=new o(e,n,r,s),!(n==s&&t.start&&t.start.start&&0!=t.skipCurrent&&i.isEqual(t.start))||(i=null,!1)}),i},this.findAll=function(e){var t=this.$options;if(!t.needle)return[];this.$assembleRegExp(t);var n=t.range,r=n?e.getLines(n.start.row,n.end.row):e.doc.getAllLines(),s=[],a=t.re;if(t.$isMultiLine){var l,c=a.length,u=r.length-c;e:for(var h=a.offset||0;h<=u;h++){for(var d=0;d<c;d++)if(-1==r[h+d].search(a[d]))continue e;var p=r[h],f=r[h+c-1],g=p.length-p.match(a[0])[0].length,m=f.match(a[c-1])[0].length;l&&l.end.row===h&&l.end.column>g||(s.push(l=new o(h,g,h+c-1,m)),c>2&&(h=h+c-2))}}else for(var v=0;v<r.length;v++){var w=i.getMatchOffsets(r[v],a);for(d=0;d<w.length;d++){var b=w[d];s.push(new o(v,b.offset,v,b.offset+b.length))}}if(n){var y=n.start.column,A=n.start.column;for(v=0,d=s.length-1;v<d&&s[v].start.column<y&&s[v].start.row==n.start.row;)v++;for(;v<d&&s[d].end.column>A&&s[d].end.row==n.end.row;)d--;for(s=s.slice(v,d+1),v=0,d=s.length;v<d;v++)s[v].start.row+=n.start.row,s[v].end.row+=n.start.row}return s},this.replace=function(e,t){var n=this.$options,i=this.$assembleRegExp(n);if(n.$isMultiLine)return t;if(i){var r=i.exec(e);if(!r||r[0].length!=e.length)return null;if(t=e.replace(i,t),n.preserveCase){t=t.split("");for(var o=Math.min(e.length,e.length);o--;){var s=e[o];s&&s.toLowerCase()!=s?t[o]=t[o].toUpperCase():t[o]=t[o].toLowerCase()}t=t.join("")}return t}},this.$assembleRegExp=function(e,t){if(e.needle instanceof RegExp)return e.re=e.needle;var n=e.needle;if(!e.needle)return e.re=!1;e.regExp||(n=i.escapeRegExp(n)),e.wholeWord&&(n=function(e,t){function n(e){return/\w/.test(e)||t.regExp?"\\b":""}return n(e[0])+e+n(e[e.length-1])}(n,e));var r=e.caseSensitive?"gm":"gmi";if(e.$isMultiLine=!t&&/[\n\r]/.test(n),e.$isMultiLine)return e.re=this.$assembleMultilineRegExp(n,r);try{var o=new RegExp(n,r)}catch(e){o=!1}return e.re=o},this.$assembleMultilineRegExp=function(e,t){for(var n=e.replace(/\r\n|\r|\n/g,"$\n^").split("\n"),i=[],r=0;r<n.length;r++)try{i.push(new RegExp(n[r],t))}catch(e){return!1}return i},this.$matchIterator=function(e,t){var n=this.$assembleRegExp(t);if(!n)return!1;var i=1==t.backwards,r=0!=t.skipCurrent,o=t.range,s=t.start;s||(s=o?o[i?"end":"start"]:e.selection.getRange()),s.start&&(s=s[r!=i?"end":"start"]);var a=o?o.start.row:0,l=o?o.end.row:e.getLength()-1;if(i)var c=function(e){var n=s.row;if(!h(n,s.column,e)){for(n--;n>=a;n--)if(h(n,Number.MAX_VALUE,e))return;if(0!=t.wrap)for(n=l,a=s.row;n>=a;n--)if(h(n,Number.MAX_VALUE,e))return}};else c=function(e){var n=s.row;if(!h(n,s.column,e)){for(n+=1;n<=l;n++)if(h(n,0,e))return;if(0!=t.wrap)for(n=a,l=s.row;n<=l;n++)if(h(n,0,e))return}};if(t.$isMultiLine)var u=n.length,h=function(t,r,o){var s=i?t-u+1:t;if(!(s<0)){var a=e.getLine(s),l=a.search(n[0]);if(!(!i&&l<r||-1===l)){for(var c=1;c<u;c++)if(-1==(a=e.getLine(s+c)).search(n[c]))return;var h=a.match(n[u-1])[0].length;if(!(i&&h>r))return!!o(s,l,s+u-1,h)||void 0}}};else if(i)h=function(t,i,r){var o,s=e.getLine(t),a=[],l=0;for(n.lastIndex=0;o=n.exec(s);){var c=o[0].length;if(l=o.index,!c){if(l>=s.length)break;n.lastIndex=l+=1}if(o.index+c>i)break;a.push(o.index,c)}for(var u=a.length-1;u>=0;u-=2){var h=a[u-1];if(r(t,h,t,h+(c=a[u])))return!0}};else h=function(t,i,r){var o,s=e.getLine(t),a=i;for(n.lastIndex=i;o=n.exec(s);){var l=o[0].length;if(a=o.index,r(t,a,t,a+l))return!0;if(!l&&(n.lastIndex=a+=1,a>=s.length))return!1}};return{forEach:c}}}).call(s.prototype),t.Search=s}),ace.define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(e,t,n){"use strict";function i(e,t){this.platform=t||(s.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={},this.addCommands(e),this.$singleCommand=!0}function r(e,t){i.call(this,e,t),this.$singleCommand=!1}var o=e("../lib/keys"),s=e("../lib/useragent"),a=o.KEY_MODS;r.prototype=i.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 i=this.commandKeyBinding;for(var r in i){var o=i[r];if(o==e)delete i[r];else if(Array.isArray(o)){var s=o.indexOf(e);-1!=s&&(o.splice(s,1),1==o.length&&(i[r]=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 i="";if(-1!=e.indexOf(" ")){var r=e.split(/\s+/);e=r.pop(),r.forEach(function(e){var t=this.parseKeys(e),n=a[t.hashId]+t.key;i+=(i?" ":"")+n,this._addCommandToBinding(i,"chainKeys")},this),i+=" "}var o=this.parseKeys(e),s=a[o.hashId]+o.key;this._addCommandToBinding(i+s,t,n)},this)},this._addCommandToBinding=function(t,n,i){var r,o=this.commandKeyBinding;if(n)if(!o[t]||this.$singleCommand)o[t]=n;else{Array.isArray(o[t])?-1!=(r=o[t].indexOf(n))&&o[t].splice(r,1):o[t]=[o[t]],"number"!=typeof i&&(i=e(n));var s=o[t];for(r=0;r<s.length;r++){if(e(s[r])>i)break}s.splice(r,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=o[n];if(o.FUNCTION_KEYS[i])n=o.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 r=0,s=t.length;s--;){var a=o.KEY_MODS[t[s]];if(null==a)return"undefined"!=typeof console&&console.error("invalid modifier "+t[s]+" in "+e),!1;r|=a}return{key:n,hashId:r}},this.findKeyCommand=function(e,t){var n=a[e]+t;return this.commandKeyBinding[n]},this.handleKeyboard=function(e,t,n,i){if(!(i<0)){var r=a[t]+n,o=this.commandKeyBinding[r];return e.$keyChain&&(e.$keyChain+=" "+r,o=this.commandKeyBinding[e.$keyChain]||o),!o||"chainKeys"!=o&&"chainKeys"!=o[o.length-1]?(e.$keyChain&&(t&&4!=t||1!=n.length?(-1==t||i>0)&&(e.$keyChain=""):e.$keyChain=e.$keyChain.slice(0,-r.length-1)),{command:o}):(e.$keyChain=e.$keyChain||r,{command:"null"})}},this.getStatusText=function(e,t){return t.$keyChain||""}}.call(i.prototype),t.HashHandler=i,t.MultiHashHandler=r}),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 i=e("../lib/oop"),r=e("../keyboard/hash_handler").MultiHashHandler,o=e("../lib/event_emitter").EventEmitter,s=function(e,t){r.call(this,t,e),this.byName=this.commands,this.setDefaultHandler("exec",function(e){return e.command.exec(e.editor,e.args||{})})};i.inherits(s,r),function(){i.implement(this,o),this.exec=function(e,t,n){if(Array.isArray(e)){for(var i=e.length;i--;)if(this.exec(e[i],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(e.isAvailable&&!e.isAvailable(t))return!1;var r={editor:t,command:e,args:n};return r.returnValue=this._emit("exec",r),this._signal("afterExec",r),!1!==r.returnValue},this.toggleRecording=function(e){if(!this.$inReplay)return e&&e._emit("changeStatus"),this.recording?(this.macro.pop(),this.removeEventListener("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(s.prototype),t.CommandManager=s}),ace.define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"],function(e,t,n){"use strict";function i(e,t){return{win:e,mac:t}}var r=e("../lib/lang"),o=e("../config"),s=e("../range").Range;t.commands=[{name:"showSettingsMenu",bindKey:i("Ctrl-,","Command-,"),exec:function(e){o.loadModule("ace/ext/settings_menu",function(t){t.init(e),e.showSettingsMenu()})},readOnly:!0},{name:"goToNextError",bindKey:i("Alt-E","F4"),exec:function(e){o.loadModule("ace/ext/error_marker",function(t){t.showErrorMarker(e,1)})},scrollIntoView:"animate",readOnly:!0},{name:"goToPreviousError",bindKey:i("Alt-Shift-E","Shift-F4"),exec:function(e){o.loadModule("ace/ext/error_marker",function(t){t.showErrorMarker(e,-1)})},scrollIntoView:"animate",readOnly:!0},{name:"selectall",bindKey:i("Ctrl-A","Command-A"),exec:function(e){e.selectAll()},readOnly:!0},{name:"centerselection",bindKey:i(null,"Ctrl-L"),exec:function(e){e.centerSelection()},readOnly:!0},{name:"gotoline",bindKey:i("Ctrl-L","Command-L"),exec:function(e){var t=parseInt(prompt("Enter line number:"),10);isNaN(t)||e.gotoLine(t)},readOnly:!0},{name:"fold",bindKey:i("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:i("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:i("F2","F2"),exec:function(e){e.session.toggleFoldWidget()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleParentFoldWidget",bindKey:i("Alt-F2","Alt-F2"),exec:function(e){e.session.toggleFoldWidget(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"foldall",bindKey:i(null,"Ctrl-Command-Option-0"),exec:function(e){e.session.foldAll()},scrollIntoView:"center",readOnly:!0},{name:"foldOther",bindKey:i("Alt-0","Command-Option-0"),exec:function(e){e.session.foldAll(),e.session.unfold(e.selection.getAllRanges())},scrollIntoView:"center",readOnly:!0},{name:"unfoldall",bindKey:i("Alt-Shift-0","Command-Option-Shift-0"),exec:function(e){e.session.unfold()},scrollIntoView:"center",readOnly:!0},{name:"findnext",bindKey:i("Ctrl-K","Command-G"),exec:function(e){e.findNext()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"findprevious",bindKey:i("Ctrl-Shift-K","Command-Shift-G"),exec:function(e){e.findPrevious()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"selectOrFindNext",bindKey:i("Alt-K","Ctrl-G"),exec:function(e){e.selection.isEmpty()?e.selection.selectWord():e.findNext()},readOnly:!0},{name:"selectOrFindPrevious",bindKey:i("Alt-Shift-K","Ctrl-Shift-G"),exec:function(e){e.selection.isEmpty()?e.selection.selectWord():e.findPrevious()},readOnly:!0},{name:"find",bindKey:i("Ctrl-F","Command-F"),exec:function(e){o.loadModule("ace/ext/searchbox",function(t){t.Search(e)})},readOnly:!0},{name:"overwrite",bindKey:"Insert",exec:function(e){e.toggleOverwrite()},readOnly:!0},{name:"selecttostart",bindKey:i("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",bindKey:i("Ctrl-Home","Command-Home|Command-Up"),exec:function(e){e.navigateFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectup",bindKey:i("Shift-Up","Shift-Up|Ctrl-Shift-P"),exec:function(e){e.getSelection().selectUp()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golineup",bindKey:i("Up","Up|Ctrl-P"),exec:function(e,t){e.navigateUp(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttoend",bindKey:i("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",bindKey:i("Ctrl-End","Command-End|Command-Down"),exec:function(e){e.navigateFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectdown",bindKey:i("Shift-Down","Shift-Down|Ctrl-Shift-N"),exec:function(e){e.getSelection().selectDown()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golinedown",bindKey:i("Down","Down|Ctrl-N"),exec:function(e,t){e.navigateDown(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordleft",bindKey:i("Ctrl-Shift-Left","Option-Shift-Left"),exec:function(e){e.getSelection().selectWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordleft",bindKey:i("Ctrl-Left","Option-Left"),exec:function(e){e.navigateWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolinestart",bindKey:i("Alt-Shift-Left","Command-Shift-Left|Ctrl-Shift-A"),exec:function(e){e.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolinestart",bindKey:i("Alt-Left|Home","Command-Left|Home|Ctrl-A"),exec:function(e){e.navigateLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectleft",bindKey:i("Shift-Left","Shift-Left|Ctrl-Shift-B"),exec:function(e){e.getSelection().selectLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoleft",bindKey:i("Left","Left|Ctrl-B"),exec:function(e,t){e.navigateLeft(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordright",bindKey:i("Ctrl-Shift-Right","Option-Shift-Right"),exec:function(e){e.getSelection().selectWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordright",bindKey:i("Ctrl-Right","Option-Right"),exec:function(e){e.navigateWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolineend",bindKey:i("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",bindKey:i("Alt-Right|End","Command-Right|End|Ctrl-E"),exec:function(e){e.navigateLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectright",bindKey:i("Shift-Right","Shift-Right"),exec:function(e){e.getSelection().selectRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoright",bindKey:i("Right","Right|Ctrl-F"),exec:function(e,t){e.navigateRight(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectpagedown",bindKey:"Shift-PageDown",exec:function(e){e.selectPageDown()},readOnly:!0},{name:"pagedown",bindKey:i(null,"Option-PageDown"),exec:function(e){e.scrollPageDown()},readOnly:!0},{name:"gotopagedown",bindKey:i("PageDown","PageDown|Ctrl-V"),exec:function(e){e.gotoPageDown()},readOnly:!0},{name:"selectpageup",bindKey:"Shift-PageUp",exec:function(e){e.selectPageUp()},readOnly:!0},{name:"pageup",bindKey:i(null,"Option-PageUp"),exec:function(e){e.scrollPageUp()},readOnly:!0},{name:"gotopageup",bindKey:"PageUp",exec:function(e){e.gotoPageUp()},readOnly:!0},{name:"scrollup",bindKey:i("Ctrl-Up",null),exec:function(e){e.renderer.scrollBy(0,-2*e.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"scrolldown",bindKey:i("Ctrl-Down",null),exec:function(e){e.renderer.scrollBy(0,2*e.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"selectlinestart",bindKey:"Shift-Home",exec:function(e){e.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectlineend",bindKey:"Shift-End",exec:function(e){e.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"togglerecording",bindKey:i("Ctrl-Alt-E","Command-Option-E"),exec:function(e){e.commands.toggleRecording(e)},readOnly:!0},{name:"replaymacro",bindKey:i("Ctrl-Shift-E","Command-Shift-E"),exec:function(e){e.commands.replay(e)},readOnly:!0},{name:"jumptomatching",bindKey:i("Ctrl-P","Ctrl-P"),exec:function(e){e.jumpToMatching()},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"selecttomatching",bindKey:i("Ctrl-Shift-P","Ctrl-Shift-P"),exec:function(e){e.jumpToMatching(!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"expandToMatching",bindKey:i("Ctrl-Shift-M","Ctrl-Shift-M"),exec:function(e){e.jumpToMatching(!0,!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"passKeysToBrowser",bindKey:i(null,null),exec:function(){},passEvent:!0,readOnly:!0},{name:"copy",exec:function(e){},readOnly:!0},{name:"cut",exec:function(e){var t=e.getSelectionRange();e._emit("cut",t),e.selection.isEmpty()||(e.session.remove(t),e.clearSelection())},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"paste",exec:function(e,t){e.$handlePaste(t)},scrollIntoView:"cursor"},{name:"removeline",bindKey:i("Ctrl-D","Command-D"),exec:function(e){e.removeLines()},scrollIntoView:"cursor",multiSelectAction:"forEachLine"},{name:"duplicateSelection",bindKey:i("Ctrl-Shift-D","Command-Shift-D"),exec:function(e){e.duplicateSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"sortlines",bindKey:i("Ctrl-Alt-S","Command-Alt-S"),exec:function(e){e.sortLines()},scrollIntoView:"selection",multiSelectAction:"forEachLine"},{name:"togglecomment",bindKey:i("Ctrl-/","Command-/"),exec:function(e){e.toggleCommentLines()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"toggleBlockComment",bindKey:i("Ctrl-Shift-/","Command-Shift-/"),exec:function(e){e.toggleBlockComment()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"modifyNumberUp",bindKey:i("Ctrl-Shift-Up","Alt-Shift-Up"),exec:function(e){e.modifyNumber(1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"modifyNumberDown",bindKey:i("Ctrl-Shift-Down","Alt-Shift-Down"),exec:function(e){e.modifyNumber(-1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"replace",bindKey:i("Ctrl-H","Command-Option-F"),exec:function(e){o.loadModule("ace/ext/searchbox",function(t){t.Search(e,!0)})}},{name:"undo",bindKey:i("Ctrl-Z","Command-Z"),exec:function(e){e.undo()}},{name:"redo",bindKey:i("Ctrl-Shift-Z|Ctrl-Y","Command-Shift-Z|Command-Y"),exec:function(e){e.redo()}},{name:"copylinesup",bindKey:i("Alt-Shift-Up","Command-Option-Up"),exec:function(e){e.copyLinesUp()},scrollIntoView:"cursor"},{name:"movelinesup",bindKey:i("Alt-Up","Option-Up"),exec:function(e){e.moveLinesUp()},scrollIntoView:"cursor"},{name:"copylinesdown",bindKey:i("Alt-Shift-Down","Command-Option-Down"),exec:function(e){e.copyLinesDown()},scrollIntoView:"cursor"},{name:"movelinesdown",bindKey:i("Alt-Down","Option-Down"),exec:function(e){e.moveLinesDown()},scrollIntoView:"cursor"},{name:"del",bindKey:i("Delete","Delete|Ctrl-D|Shift-Delete"),exec:function(e){e.remove("right")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"backspace",bindKey:i("Shift-Backspace|Backspace","Ctrl-Backspace|Shift-Backspace|Backspace|Ctrl-H"),exec:function(e){e.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"cut_or_delete",bindKey:i("Shift-Delete",null),exec:function(e){if(!e.selection.isEmpty())return!1;e.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestart",bindKey:i("Alt-Backspace","Command-Backspace"),exec:function(e){e.removeToLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineend",bindKey:i("Alt-Delete","Ctrl-K|Command-Delete"),exec:function(e){e.removeToLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestarthard",bindKey:i("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",bindKey:i("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",bindKey:i("Ctrl-Backspace","Alt-Backspace|Ctrl-Alt-Backspace"),exec:function(e){e.removeWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordright",bindKey:i("Ctrl-Delete","Alt-Delete"),exec:function(e){e.removeWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"outdent",bindKey:i("Shift-Tab","Shift-Tab"),exec:function(e){e.blockOutdent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"indent",bindKey:i("Tab","Tab"),exec:function(e){e.indent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"blockoutdent",bindKey:i("Ctrl-[","Ctrl-["),exec:function(e){e.blockOutdent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"blockindent",bindKey:i("Ctrl-]","Ctrl-]"),exec:function(e){e.blockIndent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"insertstring",exec:function(e,t){e.insert(t)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"inserttext",exec:function(e,t){e.insert(r.stringRepeat(t.text||"",t.times||1))},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"splitline",bindKey:i(null,"Ctrl-O"),exec:function(e){e.splitLine()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"transposeletters",bindKey:i("Alt-Shift-X","Ctrl-T"),exec:function(e){e.transposeLetters()},multiSelectAction:function(e){e.transposeSelections(1)},scrollIntoView:"cursor"},{name:"touppercase",bindKey:i("Ctrl-U","Ctrl-U"),exec:function(e){e.toUpperCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"tolowercase",bindKey:i("Ctrl-Shift-U","Ctrl-Shift-U"),exec:function(e){e.toLowerCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"expandtoline",bindKey:i("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",bindKey:i(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(),o=e.session.doc.getLine(n.row).length,a=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+1<e.session.doc.getLength()-1&&(l+=e.session.doc.getNewLineCharacter()),e.clearSelection(),e.session.doc.replace(new s(n.row,0,i.row+2,0),l),a>0?(e.selection.moveCursorTo(n.row,n.column),e.selection.selectTo(n.row,n.column+a)):(o=e.session.doc.getLine(n.row).length>o?o+1:o,e.selection.moveCursorTo(n.row,o))},multiSelectAction:"forEach",readOnly:!0},{name:"invertSelection",bindKey:i(null,null),exec:function(e){var t=e.session.doc.getLength()-1,n=e.session.doc.getLine(t).length,i=e.selection.rangeList.ranges,r=[];i.length<1&&(i=[e.selection.getRange()]);for(var o=0;o<i.length;o++)o==i.length-1&&(i[o].end.row===t&&i[o].end.column===n||r.push(new s(i[o].end.row,i[o].end.column,t,n))),0===o?0===i[o].start.row&&0===i[o].start.column||r.push(new s(0,0,i[o].start.row,i[o].start.column)):r.push(new s(i[o-1].end.row,i[o-1].end.column,i[o].start.row,i[o].start.column));e.exitMultiSelectMode(),e.clearSelection();for(o=0;o<r.length;o++)e.selection.addRange(r[o],!1)},readOnly:!0,scrollIntoView:"none"}]}),ace.define("ace/editor",["require","exports","module","ace/lib/fixoldbrowsers","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/useragent","ace/keyboard/textinput","ace/mouse/mouse_handler","ace/mouse/fold_handler","ace/keyboard/keybinding","ace/edit_session","ace/search","ace/range","ace/lib/event_emitter","ace/commands/command_manager","ace/commands/default_commands","ace/config","ace/token_iterator"],function(e,t,n){"use strict";e("./lib/fixoldbrowsers");var i=e("./lib/oop"),r=e("./lib/dom"),o=e("./lib/lang"),s=e("./lib/useragent"),a=e("./keyboard/textinput").TextInput,l=e("./mouse/mouse_handler").MouseHandler,c=e("./mouse/fold_handler").FoldHandler,u=e("./keyboard/keybinding").KeyBinding,h=e("./edit_session").EditSession,d=e("./search").Search,p=e("./range").Range,f=e("./lib/event_emitter").EventEmitter,g=e("./commands/command_manager").CommandManager,m=e("./commands/default_commands").commands,v=e("./config"),w=e("./token_iterator").TokenIterator,b=function(e,t){var n=e.getContainerElement();this.container=n,this.renderer=e,this.id="editor"+ ++b.$uid,this.commands=new g(s.isMac?"mac":"win",m),"object"==typeof document&&(this.textInput=new a(e.getTextAreaContainer(),this),this.renderer.textarea=this.textInput.getElement(),this.$mouseHandler=new l(this),new c(this)),this.keyBinding=new u(this),this.$blockScrolling=0,this.$search=(new d).set({wrap:!0}),this.$historyTracker=this.$historyTracker.bind(this),this.commands.on("exec",this.$historyTracker),this.$initOperationListeners(),this._$emitInputEvent=o.delayedCall(function(){this._signal("input",{}),this.session&&this.session.bgTokenizer&&this.session.bgTokenizer.scheduleStart()}.bind(this)),this.on("change",function(e,t){t._$emitInputEvent.schedule(31)}),this.setSession(t||new h("")),v.resetOptions(this),v._signal("editor",this)};b.$uid=0,function(){i.implement(this,f),this.$initOperationListeners=function(){this.selections=[],this.commands.on("exec",this.startOperation.bind(this),!0),this.commands.on("afterExec",this.endOperation.bind(this),!0),this.$opResetTimer=o.delayedCall(this.endOperation.bind(this)),this.on("change",function(){this.curOp||this.startOperation(),this.curOp.docChanged=!0}.bind(this),!0),this.on("changeSelection",function(){this.curOp||this.startOperation(),this.curOp.selectionChanged=!0}.bind(this),!0)},this.curOp=null,this.prevOp={},this.startOperation=function(e){if(this.curOp){if(!e||this.curOp.command)return;this.prevOp=this.curOp}e||(this.previousCommand=null,e={}),this.$opResetTimer.schedule(),this.curOp={command:e.command||{},args:e.args,scrollTop:this.renderer.scrollTop},this.curOp.command.name&&void 0!==this.curOp.command.scrollIntoView&&this.$blockScrolling++},this.endOperation=function(e){if(this.curOp){if(e&&!1===e.returnValue)return this.curOp=null;this._signal("beforeEndOperation");var t=this.curOp.command;t.name&&this.$blockScrolling>0&&this.$blockScrolling--;var n=t&&t.scrollIntoView;if(n){switch(n){case"center-animate":n="animate";case"center":this.renderer.scrollCursorIntoView(null,.5);break;case"animate":case"cursor":this.renderer.scrollCursorIntoView();break;case"selectionPart":var i=this.selection.getRange(),r=this.renderer.layerConfig;(i.start.row>=r.lastRow||i.end.row<=r.firstRow)&&this.renderer.scrollSelectionIntoView(this.selection.anchor,this.selection.lead)}"animate"==n&&this.renderer.animateScrolling(this.curOp.scrollTop)}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,i=t.command&&e.command.name==t.command.name;if("insertstring"==e.command.name){var r=e.args;void 0===this.mergeNextCommand&&(this.mergeNextCommand=!0),i=i&&this.mergeNextCommand&&(!/\s/.test(r)||/\s/.test(t.args)),this.mergeNextCommand=!0}else i=i&&-1!==n.indexOf(e.command.name);"always"!=this.$mergeUndoDeltas&&Date.now()-this.sequenceStartTime>2e3&&(i=!1),i?this.session.mergeUndoDeltas=!0:-1!==n.indexOf(e.command.name)&&(this.sequenceStartTime=Date.now())}},this.setKeyboardHandler=function(e,t){if(e&&"string"==typeof e){this.$keybindingId=e;var n=this;v.loadModule(["keybinding",e],function(i){n.$keybindingId==e&&n.keyBinding.setKeyboardHandler(i&&i.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.$blockScrolling+=1,this.onCursorChange(),this.$blockScrolling-=1,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")||r.computedStyle(this.container,"fontSize")},this.setFontSize=function(e){this.setOption("fontSize",e)},this.$highlightBrackets=function(){if(this.session.$bracketHighlight&&(this.session.removeMarker(this.session.$bracketHighlight),this.session.$bracketHighlight=null),!this.$highlightPending){var e=this;this.$highlightPending=!0,setTimeout(function(){e.$highlightPending=!1;var t=e.session;if(t&&t.bgTokenizer){var n=t.findMatchingBracket(e.getCursorPosition());if(n)var i=new p(n.row,n.column,n.row,n.column+1);else if(t.$mode.getMatching)i=t.$mode.getMatching(e.session);i&&(t.$bracketHighlight=t.addMarker(i,"ace_bracket","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(),i=new w(e.session,n.row,n.column),r=i.getCurrentToken();if(!r||!/\b(?:tag-open|tag-name)/.test(r.type))return t.removeMarker(t.$tagHighlight),void(t.$tagHighlight=null);if(-1==r.type.indexOf("tag-open")||(r=i.stepForward())){var o=r.value,s=0,a=i.stepBackward();if("<"==a.value)do{a=r,(r=i.stepForward())&&r.value===o&&-1!==r.type.indexOf("tag-name")&&("<"===a.value?s++:"</"===a.value&&s--)}while(r&&s>=0);else{do{r=a,a=i.stepBackward(),r&&r.value===o&&-1!==r.type.indexOf("tag-name")&&("<"===a.value?s++:"</"===a.value&&s--)}while(a&&s<=0);i.stepForward()}if(!r)return t.removeMarker(t.$tagHighlight),void(t.$tagHighlight=null);var l=i.getCurrentTokenRow(),c=i.getCurrentTokenColumn(),u=new p(l,c,l,c+r.value.length),h=t.$backMarkers[t.$tagHighlight];t.$tagHighlight&&void 0!=h&&0!==u.compareRange(h.range)&&(t.removeMarker(t.$tagHighlight),t.$tagHighlight=null),u&&!t.$tagHighlight&&(t.$tagHighlight=t.addMarker(u,"ace_bracket","text"))}}},50)}},this.focus=function(){var e=this;setTimeout(function(){e.textInput.focus()}),this.textInput.focus()},this.isFocused=function(){return this.textInput.isFocused()},this.blur=function(){this.textInput.blur()},this.onFocus=function(e){this.$isFocused||(this.$isFocused=!0,this.renderer.showCursor(),this.renderer.visualizeFocus(),this._emit("focus",e))},this.onBlur=function(e){this.$isFocused&&(this.$isFocused=!1,this.renderer.hideCursor(),this.renderer.visualizeBlur(),this._emit("blur",e))},this.$cursorChange=function(){this.renderer.updateCursor()},this.onDocumentChange=function(e){var t=this.session.$useWrapMode,n=e.start.row==e.end.row?e.end.row:1/0;this.renderer.updateLines(e.start.row,n,t),this._signal("change",e),this.$cursorChange(),this.$updateHighlightActiveLine()},this.onTokenizerUpdate=function(e){var t=e.data;this.renderer.updateLines(t.first,t.last)},this.onScrollTopChange=function(){this.renderer.scrollToY(this.session.getScrollTop())},this.onScrollLeftChange=function(){this.renderer.scrollToX(this.session.getScrollLeft())},this.onCursorChange=function(){this.$cursorChange(),this.$blockScrolling||(v.warn("Automatically scrolling cursor into view after selection change","this will be disabled in the next version","set editor.$blockScrolling = Infinity to disable this message"),this.renderer.scrollCursorIntoView()),this.$highlightBrackets(),this.$highlightTags(),this.$updateHighlightActiveLine(),this._signal("changeSelection")},this.$updateHighlightActiveLine=function(){var e,t=this.getSession();if(this.$highlightActiveLine&&("line"==this.$selectionStyle&&this.selection.isMultiLine()||(e=this.getCursorPosition()),!this.renderer.$maxLines||1!==this.session.getLength()||this.renderer.$minLines>1||(e=!1)),t.$highlightLineMarker&&!e)t.removeMarker(t.$highlightLineMarker.id),t.$highlightLineMarker=null;else if(!t.$highlightLineMarker&&e){var n=new p(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(),i=this.getSelectionStyle();t.$selectionMarker=t.addMarker(n,"ace_selection",i)}var r=this.$highlightSelectedWord&&this.$getSelectionHighLightRegexp();this.session.highlight(r),this._signal("changeSelection")},this.$getSelectionHighLightRegexp=function(){var e=this.session,t=this.getSelectionRange();if(!t.isEmpty()&&!t.isMultiLine()){var n=t.start.column-1,i=t.end.column+1,r=e.getLine(t.start.row),o=r.length,s=r.substring(Math.max(n,0),Math.min(i,o));if(!(n>=0&&/^[\w\d]/.test(s)||i<=o&&/[\w\d]$/.test(s))&&(s=r.substring(t.start.column,t.end.column),/^[\w\d]+$/.test(s))){return this.$search.$assembleRegExp({wholeWord:!0,caseSensitive:!0,needle:s})}}},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();return this._signal("copy",e),e},this.onCopy=function(){this.commands.exec("copy",this)},this.onCut=function(){this.commands.exec("cut",this)},this.onPaste=function(e,t){var n={text:e,event:t};this.commands.exec("paste",this,n)},this.$handlePaste=function(e){"string"==typeof e&&(e={text:e}),this._signal("paste",e);var t=e.text;if(!this.inMultiSelectMode||this.inVirtualSelectionMode)this.insert(t);else{var n=t.split(/\r\n|\r|\n/),i=this.selection.rangeList.ranges;if(n.length>i.length||n.length<2||!n[1])return this.commands.exec("insertstring",this,t);for(var r=i.length;r--;){var o=i[r];o.isEmpty()||this.session.remove(o),this.session.insert(o.start,n[r])}}},this.execCommand=function(e,t){return this.commands.exec(e,this,t)},this.insert=function(e,t){var n=this.session,i=n.getMode(),r=this.getCursorPosition();if(this.getBehavioursEnabled()&&!t){var o=i.transformAction(n.getState(r.row),"insertion",this,n,e);o&&(e!==o.text&&(this.session.mergeUndoDeltas=!1,this.$mergeNextCommand=!1),e=o.text)}if("\t"==e&&(e=this.session.getTabString()),this.selection.isEmpty()){if(this.session.getOverwrite()&&-1==e.indexOf("\n")){(s=new p.fromPoints(r,r)).end.column+=e.length,this.session.remove(s)}}else{var s=this.getSelectionRange();r=this.session.remove(s),this.clearSelection()}if("\n"==e||"\r\n"==e){var a=n.getLine(r.row);if(r.column>a.search(/\S|$/)){var l=a.substr(r.column).search(/\S|$/);n.doc.removeInLine(r.row,r.column,r.column+l)}}this.clearSelection();var c=r.column,u=n.getState(r.row),h=(a=n.getLine(r.row),i.checkOutdent(u,a,e));n.insert(r,e);if(o&&o.selection&&(2==o.selection.length?this.selection.setSelectionRange(new p(r.row,c+o.selection[0],r.row,c+o.selection[1])):this.selection.setSelectionRange(new p(r.row+o.selection[0],o.selection[1],r.row+o.selection[2],o.selection[3]))),n.getDocument().isNewLine(e)){var d=i.getNextLineIndent(u,a.slice(0,r.column),n.getTabString());n.insert({row:r.row+1,column:0},d)}h&&i.autoOutdent(u,n,r.row)},this.onTextInput=function(e){this.keyBinding.onTextInput(e)},this.onCommandKey=function(e,t,n){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,i=n.getState(t.start.row),r=n.getMode().transformAction(i,"deletion",this,n,t);if(0===t.end.column){var o=n.getTextRange(t);if("\n"==o[o.length-1]){var s=n.getLine(t.end.row);/^\s+$/.test(s)&&(t.end.column=s.length)}}r&&(t=r)}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.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,i,r=this.session.getLine(e.row);t<r.length?(n=r.charAt(t)+r.charAt(t-1),i=new p(e.row,t-1,e.row,t+1)):(n=r.charAt(t-1)+r.charAt(t-2),i=new p(e.row,t-2,e.row,t)),this.session.replace(i,n),this.session.selection.moveToPosition(i.end)}}},this.toLowerCase=function(){var e=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var t=this.getSelectionRange(),n=this.session.getTextRange(t);this.session.replace(t,n.toLowerCase()),this.selection.setSelectionRange(e)},this.toUpperCase=function(){var e=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var t=this.getSelectionRange(),n=this.session.getTextRange(t);this.session.replace(t,n.toUpperCase()),this.selection.setSelectionRange(e)},this.indent=function(){var e=this.session,t=this.getSelectionRange();if(!(t.start.row<t.end.row)){if(t.start.column<t.end.column){var n=e.getTextRange(t);if(!/^\s+$/.test(n)){u=this.$getSelectedRows();return void e.indentRows(u.first,u.last,"\t")}}var i=e.getLine(t.start.row),r=t.start,s=e.getTabSize(),a=e.documentToScreenColumn(r.row,r.column);if(this.session.getUseSoftTabs())var l=s-a%s,c=o.stringRepeat(" ",l);else{for(l=a%s;" "==i[t.start.column-1]&&l;)t.start.column--,l--;this.selection.setSelectionRange(t),c="\t"}return this.insert(c)}var u=this.$getSelectedRows();e.indentRows(u.first,u.last,"\t")},this.blockIndent=function(){var e=this.$getSelectedRows();this.session.indentRows(e.first,e.last,"\t")},this.blockOutdent=function(){var e=this.session.getSelection();this.session.outdentRows(e.getRange())},this.sortLines=function(){for(var e=this.$getSelectedRows(),t=this.session,n=[],i=e.first;i<=e.last;i++)n.push(t.getLine(i));n.sort(function(e,t){return e.toLowerCase()<t.toLowerCase()?-1:e.toLowerCase()>t.toLowerCase()?1:0});var r=new p(0,0,0,0);for(i=e.first;i<=e.last;i++){var o=t.getLine(i);r.start.row=i,r.end.row=i,r.end.column=o.length,t.replace(r,n[i-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 i=this.session.getLine(e);n.lastIndex<t;){var r=n.exec(i);if(r.index<=t&&r.index+r[0].length>=t){return{value:r[0],start:r.index,end:r.index+r[0].length}}}return null},this.modifyNumber=function(e){var t=this.selection.getCursor().row,n=this.selection.getCursor().column,i=new p(t,n-1,t,n),r=this.session.getTextRange(i);if(!isNaN(parseFloat(r))&&isFinite(r)){var o=this.getNumberAt(t,n);if(o){var s=o.value.indexOf(".")>=0?o.start+o.value.indexOf(".")+1:o.end,a=o.start+o.value.length-s,l=parseFloat(o.value);l*=Math.pow(10,a),s!==o.end&&n<s?e*=Math.pow(10,o.end-n-1):e*=Math.pow(10,o.end-n),l+=e;var c=(l/=Math.pow(10,a)).toFixed(a),u=new p(t,o.start,t,o.end);this.session.replace(u,c),this.moveCursorTo(t,Math.max(o.start+1,n+c.length-o.value.length))}}},this.removeLines=function(){var e=this.$getSelectedRows();this.session.removeFullLines(e.first,e.last),this.clearSelection()},this.duplicateSelection=function(){var e=this.selection,t=this.session,n=e.getRange(),i=e.isBackwards();if(n.isEmpty()){var r=n.start.row;t.duplicateLines(r,r)}else{var o=i?n.start:n.end,s=t.insert(o,t.getTextRange(n),!1);n.start=o,n.end=s,e.setSelectionRange(n,i)}},this.moveLinesDown=function(){this.$moveLines(1,!1)},this.moveLinesUp=function(){this.$moveLines(-1,!1)},this.moveText=function(e,t,n){return this.session.moveText(e,t,n)},this.copyLinesUp=function(){this.$moveLines(-1,!0)},this.copyLinesDown=function(){this.$moveLines(1,!0)},this.$moveLines=function(e,t){var n,i,r=this.selection;if(!r.inMultiSelectMode||this.inVirtualSelectionMode){var o=r.toOrientedRange();n=this.$getSelectedRows(o),i=this.session.$moveLines(n.first,n.last,t?0:e),t&&-1==e&&(i=0),o.moveBy(i,0),r.fromOrientedRange(o)}else{var s=r.rangeList.ranges;r.rangeList.detach(this.session),this.inVirtualSelectionMode=!0;for(var a=0,l=0,c=s.length,u=0;u<c;u++){var h=u;s[u].moveBy(a,0);for(var d=(n=this.$getSelectedRows(s[u])).first,p=n.last;++u<c;){l&&s[u].moveBy(l,0);var f=this.$getSelectedRows(s[u]);if(t&&f.first!=p)break;if(!t&&f.first>p+1)break;p=f.last}for(u--,a=this.session.$moveLines(d,p,t?0:e),t&&-1==e&&(h=u+1);h<=u;)s[h].moveBy(a,0),h++;t||(a=0),l+=a}r.fromOrientedRange(r.ranges[0]),r.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(this.getCursorPosition())},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,i=this.renderer.layerConfig,r=e*Math.floor(i.height/i.lineHeight);this.$blockScrolling++,!0===t?this.selection.$moveSelection(function(){this.moveCursorBy(r,0)}):!1===t&&(this.selection.moveCursorBy(r,0),this.selection.clearSelection()),this.$blockScrolling--;var o=n.scrollTop;n.scrollBy(0,r*i.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,i){this.renderer.scrollToLine(e,t,n,i)},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.$blockScrolling+=1,this.selection.selectAll(),this.$blockScrolling-=1},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(),i=new w(this.session,n.row,n.column),r=i.getCurrentToken(),o=r||i.stepForward();if(o){var s,a,l=!1,c={},u=n.column-o.start,h={")":"(","(":"(","]":"[","[":"[","{":"{","}":"{"};do{if(o.value.match(/[{}()\[\]]/g)){for(;u<o.value.length&&!l;u++)if(h[o.value[u]])switch(a=h[o.value[u]]+"."+o.type.replace("rparen","lparen"),isNaN(c[a])&&(c[a]=0),o.value[u]){case"(":case"[":case"{":c[a]++;break;case")":case"]":case"}":c[a]--,-1===c[a]&&(s="bracket",l=!0)}}else o&&-1!==o.type.indexOf("tag-name")&&(isNaN(c[o.value])&&(c[o.value]=0),"<"===r.value?c[o.value]++:"</"===r.value&&c[o.value]--,-1===c[o.value]&&(s="tag",l=!0));l||(r=o,o=i.stepForward(),u=0)}while(o&&!l);if(s){var d,f;if("bracket"===s)(d=this.session.getBracketRange(n))||(f=(d=new p(i.getCurrentTokenRow(),i.getCurrentTokenColumn()+u-1,i.getCurrentTokenRow(),i.getCurrentTokenColumn()+u-1)).start,(t||f.row===n.row&&Math.abs(f.column-n.column)<2)&&(d=this.session.getBracketRange(f)));else if("tag"===s){if(!o||-1===o.type.indexOf("tag-name"))return;var g=o.value;if(0===(d=new p(i.getCurrentTokenRow(),i.getCurrentTokenColumn()-2,i.getCurrentTokenRow(),i.getCurrentTokenColumn()-2)).compare(n.row,n.column)){l=!1;do{o=r,(r=i.stepBackward())&&(-1!==r.type.indexOf("tag-close")&&d.setEnd(i.getCurrentTokenRow(),i.getCurrentTokenColumn()+1),o.value===g&&-1!==o.type.indexOf("tag-name")&&("<"===r.value?c[g]++:"</"===r.value&&c[g]--,0===c[g]&&(l=!0)))}while(r&&!l)}o&&o.type.indexOf("tag-name")&&(f=d.start).row==n.row&&Math.abs(f.column-n.column)<2&&(f=d.end)}(f=d&&d.cursor||f)&&(e?d&&t?this.selection.setRange(d):d&&d.isEqual(this.getSelectionRange())?this.clearSelection():this.selection.selectTo(f.row,f.column):this.selection.moveTo(f.row,f.column))}}},this.gotoLine=function(e,t,n){this.selection.clearSelection(),this.session.unfold({row:e-1,column:t||0}),this.$blockScrolling+=1,this.exitMultiSelectMode&&this.exitMultiSelectMode(),this.moveCursorTo(e-1,t||0),this.$blockScrolling-=1,this.isRowFullyVisible(e-1)||this.scrollToLine(e-1,!0,n)},this.navigateTo=function(e,t){this.selection.moveTo(e,t)},this.navigateUp=function(e){if(this.selection.isMultiLine()&&!this.selection.isBackwards()){var t=this.selection.anchor.getPosition();return this.moveCursorToPosition(t)}this.selection.clearSelection(),this.selection.moveCursorBy(-e||-1,0)},this.navigateDown=function(e){if(this.selection.isMultiLine()&&this.selection.isBackwards()){var t=this.selection.anchor.getPosition();return this.moveCursorToPosition(t)}this.selection.clearSelection(),this.selection.moveCursorBy(e||1,0)},this.navigateLeft=function(e){if(this.selection.isEmpty())for(e=e||1;e--;)this.selection.moveCursorLeft();else{var t=this.getSelectionRange().start;this.moveCursorToPosition(t)}this.clearSelection()},this.navigateRight=function(e){if(this.selection.isEmpty())for(e=e||1;e--;)this.selection.moveCursorRight();else{var t=this.getSelectionRange().end;this.moveCursorToPosition(t)}this.clearSelection()},this.navigateLineStart=function(){this.selection.moveCursorLineStart(),this.clearSelection()},this.navigateLineEnd=function(){this.selection.moveCursorLineEnd(),this.clearSelection()},this.navigateFileEnd=function(){this.selection.moveCursorFileEnd(),this.clearSelection()},this.navigateFileStart=function(){this.selection.moveCursorFileStart(),this.clearSelection()},this.navigateWordRight=function(){this.selection.moveCursorWordRight(),this.clearSelection()},this.navigateWordLeft=function(){this.selection.moveCursorWordLeft(),this.clearSelection()},this.replace=function(e,t){t&&this.$search.set(t);var n=this.$search.find(this.session),i=0;return n?(this.$tryReplace(n,e)&&(i=1),null!==n&&(this.selection.setSelectionRange(n),this.renderer.scrollSelectionIntoView(n.start,n.end)),i):i},this.replaceAll=function(e,t){t&&this.$search.set(t);var n=this.$search.findAll(this.session),i=0;if(!n.length)return i;this.$blockScrolling+=1;var r=this.getSelectionRange();this.selection.moveTo(0,0);for(var o=n.length-1;o>=0;--o)this.$tryReplace(n[o],e)&&i++;return this.selection.setSelectionRange(r),this.$blockScrolling-=1,i},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&&i.mixin(t,e);var r=this.selection.getRange();null==t.needle&&((e=this.session.getTextRange(r)||this.$search.$options.needle)||(r=this.session.getWordRange(r.start.row,r.start.column),e=this.session.getTextRange(r)),this.$search.set({needle:e})),this.$search.set(t),t.start||this.$search.set({start:r});var o=this.$search.find(this.session);return t.preventScroll?o:o?(this.revealRange(o,n),o):(t.backwards?r.start=r.end:r.end=r.start,void this.selection.setRange(r))},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.$blockScrolling+=1,this.session.unfold(e),this.selection.setSelectionRange(e),this.$blockScrolling-=1;var n=this.renderer.scrollTop;this.renderer.scrollSelectionIntoView(e.start,e.end,.5),!1!==t&&this.renderer.animateScrolling(n)},this.undo=function(){this.$blockScrolling++,this.session.getUndoManager().undo(),this.$blockScrolling--,this.renderer.scrollCursorIntoView(null,.5)},this.redo=function(){this.$blockScrolling++,this.session.getUndoManager().redo(),this.$blockScrolling--,this.renderer.scrollCursorIntoView(null,.5)},this.destroy=function(){this.renderer.destroy(),this._signal("destroy",this),this.session&&this.session.destroy()},this.setAutoScrollEditorIntoView=function(e){if(e){var t,n=this,i=!1;this.$scrollAnchor||(this.$scrollAnchor=document.createElement("div"));var r=this.$scrollAnchor;r.style.cssText="position:absolute",this.container.insertBefore(r,this.container.firstChild);var o=this.on("changeSelection",function(){i=!0}),s=this.renderer.on("beforeRender",function(){i&&(t=n.renderer.container.getBoundingClientRect())}),a=this.renderer.on("afterRender",function(){if(i&&t&&(n.isFocused()||n.searchBox&&n.searchBox.isFocused())){var e=n.renderer,o=e.$cursorLayer.$pixelPos,s=e.layerConfig,a=o.top-s.offset;null!=(i=o.top>=0&&a+t.top<0||!(o.top<s.height&&o.top+t.top+s.lineHeight>window.innerHeight)&&null)&&(r.style.top=a+"px",r.style.left=o.left+"px",r.style.height=s.lineHeight+"px",r.scrollIntoView(i)),i=t=null}});this.setAutoScrollEditorIntoView=function(e){e||(delete this.setAutoScrollEditorIntoView,this.off("changeSelection",o),this.renderer.off("afterRender",a),this.renderer.off("beforeRender",s))}}},this.$resetCursorStyle=function(){var e=this.$cursorStyle||"ace",t=this.renderer.$cursorLayer;t&&(t.setSmoothBlinking(/smooth/.test(e)),t.isBlinking=!this.$readOnly&&"wide"!=e,r.setCssClass(t.element,"ace_slim-cursors",/slim/.test(e)))}}.call(b.prototype),v.defineOptions(b.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.$resetCursorStyle()},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},autoScrollEditorIntoView:{set:function(e){this.setAutoScrollEditorIntoView(e)}},keyboardHandler:{set:function(e){this.setKeyboardHandler(e)},get:function(){return this.keybindingId},handlesSet:!0},hScrollBarAlwaysVisible:"renderer",vScrollBarAlwaysVisible:"renderer",highlightGutterLine:"renderer",animatedScroll:"renderer",showInvisibles:"renderer",showPrintMargin:"renderer",printMarginColumn:"renderer",printMargin:"renderer",fadeFoldWidgets:"renderer",showFoldWidgets:"renderer",showLineNumbers:"renderer",showGutter:"renderer",displayIndentGuides:"renderer",fontSize:"renderer",fontFamily:"renderer",maxLines:"renderer",minLines:"renderer",scrollPastEnd:"renderer",fixedWidthGutter:"renderer",theme:"renderer",scrollSpeed:"$mouseHandler",dragDelay:"$mouseHandler",dragEnabled:"$mouseHandler",focusTimout:"$mouseHandler",tooltipFollowsMouse:"$mouseHandler",firstLineNumber:"session",overwrite:"session",newLineMode:"session",useWorker:"session",useSoftTabs:"session",tabSize:"session",wrap:"session",indentedSoftWrap:"session",foldStyle:"session",mode:"session"}),t.Editor=b}),ace.define("ace/undomanager",["require","exports","module"],function(e,t,n){"use strict";var i=function(){this.reset()};(function(){function e(e){return{action:e.action,start:e.start,end:e.end,lines:1==e.lines.length?null:e.lines,text:1==e.lines.length?e.lines[0]:null}}function t(e){return{action:e.action,start:e.start,end:e.end,lines:e.lines||[e.text]}}function n(e,t){for(var n=new Array(e.length),i=0;i<e.length;i++){for(var r=e[i],o={group:r.group,deltas:new Array(r.length)},s=0;s<r.deltas.length;s++){var a=r.deltas[s];o.deltas[s]=t(a)}n[i]=o}return n}this.execute=function(e){var t=e.args[0];this.$doc=e.args[1],e.merge&&this.hasUndo()&&(this.dirtyCounter--,t=this.$undoStack.pop().concat(t)),this.$undoStack.push(t),this.$redoStack=[],this.dirtyCounter<0&&(this.dirtyCounter=NaN),this.dirtyCounter++},this.undo=function(e){var t=this.$undoStack.pop(),n=null;return t&&(n=this.$doc.undoChanges(t,e),this.$redoStack.push(t),this.dirtyCounter--),n},this.redo=function(e){var t=this.$redoStack.pop(),n=null;return t&&(n=this.$doc.redoChanges(this.$deserializeDeltas(t),e),this.$undoStack.push(t),this.dirtyCounter++),n},this.reset=function(){this.$undoStack=[],this.$redoStack=[],this.dirtyCounter=0},this.hasUndo=function(){return this.$undoStack.length>0},this.hasRedo=function(){return this.$redoStack.length>0},this.markClean=function(){this.dirtyCounter=0},this.isClean=function(){return 0===this.dirtyCounter},this.$serializeDeltas=function(t){return n(t,e)},this.$deserializeDeltas=function(e){return n(e,t)}}).call(i.prototype),t.UndoManager=i}),ace.define("ace/layer/gutter",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter"],function(e,t,n){"use strict";var i=e("../lib/dom"),r=e("../lib/oop"),o=e("../lib/lang"),s=e("../lib/event_emitter").EventEmitter,a=function(e){this.element=i.createElement("div"),this.element.className="ace_layer ace_gutter-layer",e.appendChild(this.element),this.setShowFoldWidgets(this.$showFoldWidgets),this.gutterWidth=0,this.$annotations=[],this.$updateAnnotations=this.$updateAnnotations.bind(this),this.$cells=[]};(function(){r.implement(this,s),this.setSession=function(e){this.session&&this.session.removeEventListener("change",this.$updateAnnotations),this.session=e,e&&e.on("change",this.$updateAnnotations)},this.addGutterDecoration=function(e,t){window.console&&console.warn&&console.warn("deprecated use session.addGutterDecoration"),this.session.addGutterDecoration(e,t)},this.removeGutterDecoration=function(e,t){window.console&&console.warn&&console.warn("deprecated use session.removeGutterDecoration"),this.session.removeGutterDecoration(e,t)},this.setAnnotations=function(e){this.$annotations=[];for(var t=0;t<e.length;t++){var n=e[t],i=n.row,r=this.$annotations[i];r||(r=this.$annotations[i]={text:[]});var s=n.text;s=s?o.escapeHTML(s):n.html||"",-1===r.text.indexOf(s)&&r.text.push(s);var a=n.type;"error"==a?r.className=" ace_error":"warning"==a&&" ace_error"!=r.className?r.className=" ace_warning":"info"!=a||r.className||(r.className=" ace_info")}},this.$updateAnnotations=function(e){if(this.$annotations.length){var t=e.start.row,n=e.end.row-t;if(0===n);else if("remove"==e.action)this.$annotations.splice(t,n+1,null);else{var i=new Array(n+1);i.unshift(t,1),this.$annotations.splice.apply(this.$annotations,i)}}},this.update=function(e){for(var t=this.session,n=e.firstRow,r=Math.min(e.lastRow+e.gutterOffset,t.getLength()-1),o=t.getNextFoldLine(n),s=o?o.start.row:1/0,a=this.$showFoldWidgets&&t.foldWidgets,l=t.$breakpoints,c=t.$decorations,u=t.$firstLineNumber,h=0,d=t.gutterRenderer||this.$renderer,p=null,f=-1,g=n;;){if(g>s&&(g=o.end.row+1,s=(o=t.getNextFoldLine(g,o))?o.start.row:1/0),g>r){for(;this.$cells.length>f+1;)p=this.$cells.pop(),this.element.removeChild(p.element);break}(p=this.$cells[++f])||((p={element:null,textNode:null,foldWidget:null}).element=i.createElement("div"),p.textNode=document.createTextNode(""),p.element.appendChild(p.textNode),this.element.appendChild(p.element),this.$cells[f]=p);var m="ace_gutter-cell ";l[g]&&(m+=l[g]),c[g]&&(m+=c[g]),this.$annotations[g]&&(m+=this.$annotations[g].className),p.element.className!=m&&(p.element.className=m);if((w=t.getRowLength(g)*e.lineHeight+"px")!=p.element.style.height&&(p.element.style.height=w),a){var v=a[g];null==v&&(v=a[g]=t.getFoldWidget(g))}if(v){p.foldWidget||(p.foldWidget=i.createElement("span"),p.element.appendChild(p.foldWidget));m="ace_fold-widget ace_"+v;"start"==v&&g==s&&g<o.end.row?m+=" ace_closed":m+=" ace_open",p.foldWidget.className!=m&&(p.foldWidget.className=m);var w=e.lineHeight+"px";p.foldWidget.style.height!=w&&(p.foldWidget.style.height=w)}else p.foldWidget&&(p.element.removeChild(p.foldWidget),p.foldWidget=null);var b=h=d?d.getText(t,g):g+u;b!==p.textNode.data&&(p.textNode.data=b),g++}this.element.style.height=e.minHeight+"px",(this.$fixedWidth||t.$useWrapMode)&&(h=t.getLength()+u);var y=d?d.getWidth(t,h,e):h.toString().length*e.characterWidth,A=this.$padding||this.$computePadding();(y+=A.left+A.right)===this.gutterWidth||isNaN(y)||(this.gutterWidth=y,this.element.style.width=Math.ceil(this.gutterWidth)+"px",this._emit("changeGutterWidth",y))},this.$fixedWidth=!1,this.$showLineNumbers=!0,this.$renderer="",this.setShowLineNumbers=function(e){this.$renderer=!e&&{getWidth:function(){return""},getText:function(){return""}}},this.getShowLineNumbers=function(){return this.$showLineNumbers},this.$showFoldWidgets=!0,this.setShowFoldWidgets=function(e){e?i.addCssClass(this.element,"ace_folding-enabled"):i.removeCssClass(this.element,"ace_folding-enabled"),this.$showFoldWidgets=e,this.$padding=null},this.getShowFoldWidgets=function(){return this.$showFoldWidgets},this.$computePadding=function(){if(!this.element.firstChild)return{left:0,right:0};var e=i.computedStyle(this.element.firstChild);return this.$padding={},this.$padding.left=parseInt(e.paddingLeft)+1||0,this.$padding.right=parseInt(e.paddingRight)||0,this.$padding},this.getRegion=function(e){var t=this.$padding||this.$computePadding(),n=this.element.getBoundingClientRect();return e.x<t.left+n.left?"markers":this.$showFoldWidgets&&e.x>n.right-t.right?"foldWidgets":void 0}}).call(a.prototype),t.Gutter=a}),ace.define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"],function(e,t,n){"use strict";var i=e("../range").Range,r=e("../lib/dom"),o=function(e){this.element=r.createElement("div"),this.element.className="ace_layer ace_marker-layer",e.appendChild(this.element)};(function(){function e(e,t,n,i){return(e?1:0)|(t?2:0)|(n?4:0)|(i?8:0)}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.update=function(e){if(e){this.config=e;var t=[];for(var n in this.markers){var i=this.markers[n];if(i.range){var r=i.range.clipRows(e.firstRow,e.lastRow);if(!r.isEmpty())if(r=r.toScreenRange(this.session),i.renderer){var o=this.$getTop(r.start.row,e),s=this.$padding+(this.session.$bidiHandler.isBidiRow(r.start.row)?this.session.$bidiHandler.getPosLeft(r.start.column):r.start.column*e.characterWidth);i.renderer(t,r,s,o,e)}else"fullLine"==i.type?this.drawFullLineMarker(t,r,i.clazz,e):"screenLine"==i.type?this.drawScreenLineMarker(t,r,i.clazz,e):r.isMultiLine()?"text"==i.type?this.drawTextMarker(t,r,i.clazz,e):this.drawMultiLineMarker(t,r,i.clazz,e):this.session.$bidiHandler.isBidiRow(r.start.row)?this.drawBidiSingleLineMarker(t,r,i.clazz+" ace_start ace_br15",e):this.drawSingleLineMarker(t,r,i.clazz+" ace_start ace_br15",e)}else i.update(t,this,this.session,e)}this.element.innerHTML=t.join("")}},this.$getTop=function(e,t){return(e-t.firstRowScreen)*t.lineHeight},this.drawTextMarker=function(t,n,r,o,s){for(var a=this.session,l=n.start.row,c=n.end.row,u=l,h=0,d=0,p=a.getScreenLastRowColumn(u),f=null,g=new i(u,n.start.column,u,d);u<=c;u++)g.start.row=g.end.row=u,g.start.column=u==l?n.start.column:a.getRowWrapIndent(u),g.end.column=p,h=d,d=p,p=u+1<c?a.getScreenLastRowColumn(u+1):u==c?0:n.end.column,f=r+(u==l?" ace_start":"")+" ace_br"+e(u==l||u==l+1&&n.start.column,h<d,d>p,u==c),this.session.$bidiHandler.isBidiRow(u)?this.drawBidiSingleLineMarker(t,g,f,o,u==c?0:1,s):this.drawSingleLineMarker(t,g,f,o,u==c?0:1,s)},this.drawMultiLineMarker=function(e,t,n,i,r){var o,s,a,l=this.$padding;if(r=r||"",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",i,null,r)}else o=i.lineHeight,s=this.$getTop(t.start.row,i),a=l+t.start.column*i.characterWidth,e.push("<div class='",n," ace_br1 ace_start' style='","height:",o,"px;","right:0;","top:",s,"px;","left:",a,"px;",r,"'></div>");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",i,null,r)}else{var u=t.end.column*i.characterWidth;o=i.lineHeight,s=this.$getTop(t.end.row,i),e.push("<div class='",n," ace_br12' style='","height:",o,"px;","width:",u,"px;","top:",s,"px;","left:",l,"px;",r,"'></div>")}if(!((o=(t.end.row-t.start.row-1)*i.lineHeight)<=0)){s=this.$getTop(t.start.row+1,i);var h=(t.start.column?1:0)|(t.end.column?0:8);e.push("<div class='",n,h?" ace_br"+h:"","' style='","height:",o,"px;","right:0;","top:",s,"px;","left:",l,"px;",r,"'></div>")}},this.drawSingleLineMarker=function(e,t,n,i,r,o){var s=i.lineHeight,a=(t.end.column+(r||0)-t.start.column)*i.characterWidth,l=this.$getTop(t.start.row,i),c=this.$padding+t.start.column*i.characterWidth;e.push("<div class='",n,"' style='","height:",s,"px;","width:",a,"px;","top:",l,"px;","left:",c,"px;",o||"","'></div>")},this.drawBidiSingleLineMarker=function(e,t,n,i,r,o){var s=i.lineHeight,a=this.$getTop(t.start.row,i),l=this.$padding;this.session.$bidiHandler.getSelections(t.start.column,t.end.column).forEach(function(t){e.push("<div class='",n,"' style='","height:",s,"px;","width:",t.width+(r||0),"px;","top:",a,"px;","left:",l+t.left,"px;",o||"","'></div>")})},this.drawFullLineMarker=function(e,t,n,i,r){var o=this.$getTop(t.start.row,i),s=i.lineHeight;t.start.row!=t.end.row&&(s+=this.$getTop(t.end.row,i)-o),e.push("<div class='",n,"' style='","height:",s,"px;","top:",o,"px;","left:0;right:0;",r||"","'></div>")},this.drawScreenLineMarker=function(e,t,n,i,r){var o=this.$getTop(t.start.row,i),s=i.lineHeight;e.push("<div class='",n,"' style='","height:",s,"px;","top:",o,"px;","left:0;right:0;",r||"","'></div>")}}).call(o.prototype),t.Marker=o}),ace.define("ace/layer/text",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/useragent","ace/lib/event_emitter"],function(e,t,n){"use strict";var i=e("../lib/oop"),r=e("../lib/dom"),o=e("../lib/lang"),s=(e("../lib/useragent"),e("../lib/event_emitter").EventEmitter),a=function(e){this.element=r.createElement("div"),this.element.className="ace_layer ace_text-layer",e.appendChild(this.element),this.$updateEolChar=this.$updateEolChar.bind(this)};(function(){i.implement(this,s),this.EOF_CHAR="¶",this.EOL_CHAR_LF="¬",this.EOL_CHAR_CRLF="¤",this.EOL_CHAR=this.EOL_CHAR_LF,this.TAB_CHAR="—",this.SPACE_CHAR="·",this.$padding=0,this.$updateEolChar=function(){var e="\n"==this.session.doc.getNewLineCharacter()?this.EOL_CHAR_LF:this.EOL_CHAR_CRLF;if(this.EOL_CHAR!=e)return this.EOL_CHAR=e,!0},this.setPadding=function(e){this.$padding=e,this.element.style.padding="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.setShowInvisibles=function(e){return this.showInvisibles!=e&&(this.showInvisibles=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;n<e+1;n++)this.showInvisibles?t.push("<span class='ace_invisible ace_invisible_tab'>"+o.stringRepeat(this.TAB_CHAR,n)+"</span>"):t.push(o.stringRepeat(" ",n));if(this.displayIndentGuides){this.$indentGuideRe=/\s\S| \t|\t |\s$/;var i="ace_indent-guide",r="",s="";if(this.showInvisibles){i+=" ace_invisible",r=" ace_invisible_space",s=" ace_invisible_tab";var a=o.stringRepeat(this.SPACE_CHAR,this.tabSize),l=o.stringRepeat(this.TAB_CHAR,this.tabSize)}else l=a=o.stringRepeat(" ",this.tabSize);this.$tabStrings[" "]="<span class='"+i+r+"'>"+a+"</span>",this.$tabStrings["\t"]="<span class='"+i+s+"'>"+l+"</span>"}},this.updateLines=function(e,t,n){this.config.lastRow==e.lastRow&&this.config.firstRow==e.firstRow||this.scrollLines(e),this.config=e;for(var i=Math.max(t,e.firstRow),r=Math.min(n,e.lastRow),o=this.element.childNodes,s=0,a=e.firstRow;a<i;a++){if(l=this.session.getFoldLine(a)){if(l.containsRow(i)){i=l.start.row;break}a=l.end.row}s++}a=i;for(var l,c=(l=this.session.getNextFoldLine(a))?l.start.row:1/0;a>c&&(a=l.end.row+1,c=(l=this.session.getNextFoldLine(a,l))?l.start.row:1/0),!(a>r);){var u=o[s++];if(u){var h=[];this.$renderLine(h,a,!this.$useLineGroups(),a==c&&l),u.style.height=e.lineHeight*this.session.getRowLength(a)+"px",u.innerHTML=h.join("")}a++}},this.scrollLines=function(e){var t=this.config;if(this.config=e,!t||t.lastRow<e.firstRow)return this.update(e);if(e.lastRow<t.firstRow)return this.update(e);var n=this.element;if(t.firstRow<e.firstRow)for(var i=this.session.getFoldedRowCount(t.firstRow,e.firstRow-1);i>0;i--)n.removeChild(n.firstChild);if(t.lastRow>e.lastRow)for(i=this.session.getFoldedRowCount(e.lastRow+1,t.lastRow);i>0;i--)n.removeChild(n.lastChild);if(e.firstRow<t.firstRow){var r=this.$renderLinesFragment(e,e.firstRow,t.firstRow-1);n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r)}if(e.lastRow>t.lastRow){r=this.$renderLinesFragment(e,t.lastRow+1,e.lastRow);n.appendChild(r)}},this.$renderLinesFragment=function(e,t,n){for(var i=this.element.ownerDocument.createDocumentFragment(),o=t,s=this.session.getNextFoldLine(o),a=s?s.start.row:1/0;o>a&&(o=s.end.row+1,a=(s=this.session.getNextFoldLine(o,s))?s.start.row:1/0),!(o>n);){var l=r.createElement("div"),c=[];if(this.$renderLine(c,o,!1,o==a&&s),l.innerHTML=c.join(""),this.$useLineGroups())l.className="ace_line_group",i.appendChild(l),l.style.height=e.lineHeight*this.session.getRowLength(o)+"px";else for(;l.firstChild;)i.appendChild(l.firstChild);o++}return i},this.update=function(e){this.config=e;for(var t=[],n=e.firstRow,i=e.lastRow,r=n,o=this.session.getNextFoldLine(r),s=o?o.start.row:1/0;r>s&&(r=o.end.row+1,s=(o=this.session.getNextFoldLine(r,o))?o.start.row:1/0),!(r>i);)this.$useLineGroups()&&t.push("<div class='ace_line_group' style='height:",e.lineHeight*this.session.getRowLength(r),"px'>"),this.$renderLine(t,r,!1,r==s&&o),this.$useLineGroups()&&t.push("</div>"),r++;this.element.innerHTML=t.join("")},this.$textToken={text:!0,rparen:!0,lparen:!0},this.$renderToken=function(e,t,n,i){var r=this,s=i.replace(/\t|&|<|>|( +)|([\x00-\x1f\x80-\xa0\xad\u1680\u180E\u2000-\u200f\u2028\u2029\u202F\u205F\u3000\uFEFF\uFFF9-\uFFFC])|[\u1100-\u115F\u11A3-\u11A7\u11FA-\u11FF\u2329-\u232A\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3000-\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,function(e,n,i,s,a){if(n)return r.showInvisibles?"<span class='ace_invisible ace_invisible_space'>"+o.stringRepeat(r.SPACE_CHAR,e.length)+"</span>":e;if("&"==e)return"&#38;";if("<"==e)return"&#60;";if(">"==e)return"&#62;";if("\t"==e){var l=r.session.getScreenTabSize(t+s);return t+=l-1,r.$tabStrings[l]}if("　"==e){var c=r.showInvisibles?"ace_cjk ace_invisible ace_invisible_space":"ace_cjk",u=r.showInvisibles?r.SPACE_CHAR:"";return t+=1,"<span class='"+c+"' style='width:"+2*r.config.characterWidth+"px'>"+u+"</span>"}return i?"<span class='ace_invisible ace_invisible_space ace_invalid'>"+r.SPACE_CHAR+"</span>":(t+=1,"<span class='ace_cjk' style='width:"+2*r.config.characterWidth+"px'>"+e+"</span>")});if(this.$textToken[n.type])e.push(s);else{var a="ace_"+n.type.replace(/\./g," ace_"),l="";"fold"==n.type&&(l=" style='width:"+n.value.length*this.config.characterWidth+"px;' "),e.push("<span class='",a,"'",l,">",s,"</span>")}return t+i.length},this.renderIndentGuide=function(e,t,n){var i=t.search(this.$indentGuideRe);return i<=0||i>=n?t:" "==t[0]?(i-=i%this.tabSize,e.push(o.stringRepeat(this.$tabStrings[" "],i/this.tabSize)),t.substr(i)):"\t"==t[0]?(e.push(o.stringRepeat(this.$tabStrings["\t"],i)),t.substr(i)):t},this.$renderWrappedLine=function(e,t,n,i){for(var r=0,s=0,a=n[0],l=0,c=0;c<t.length;c++){var u=t[c],h=u.value;if(0==c&&this.displayIndentGuides){if(r=h.length,!(h=this.renderIndentGuide(e,h,a)))continue;r-=h.length}if(r+h.length<a)l=this.$renderToken(e,l,u,h),r+=h.length;else{for(;r+h.length>=a;)l=this.$renderToken(e,l,u,h.substring(0,a-r)),h=h.substring(a-r),r=a,i||e.push("</div>","<div class='ace_line' style='height:",this.config.lineHeight,"px'>"),e.push(o.stringRepeat(" ",n.indent)),l=0,a=n[++s]||Number.MAX_VALUE;0!=h.length&&(r+=h.length,l=this.$renderToken(e,l,u,h))}}},this.$renderSimpleLine=function(e,t){var n=0,i=t[0],r=i.value;this.displayIndentGuides&&(r=this.renderIndentGuide(e,r)),r&&(n=this.$renderToken(e,n,i,r));for(var o=1;o<t.length;o++)r=(i=t[o]).value,n=this.$renderToken(e,n,i,r)},this.$renderLine=function(e,t,n,i){if(i||0==i||(i=this.session.getFoldLine(t)),i)var r=this.$getFoldLineTokens(t,i);else r=this.session.getTokens(t);if(n||e.push("<div class='ace_line' style='height:",this.config.lineHeight*(this.$useLineGroups()?1:this.session.getRowLength(t)),"px'>"),r.length){var o=this.session.getRowSplitData(t);o&&o.length?this.$renderWrappedLine(e,r,o,n):this.$renderSimpleLine(e,r)}this.showInvisibles&&(i&&(t=i.end.row),e.push("<span class='ace_invisible ace_invisible_eol'>",t==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,"</span>")),n||e.push("</div>")},this.$getFoldLineTokens=function(e,t){var n=this.session,i=[],r=n.getTokens(e);return t.walk(function(e,t,o,s,a){null!=e?i.push({type:"fold",value:e}):(a&&(r=n.getTokens(t)),r.length&&function(e,t,n){for(var r=0,o=0;o+e[r].value.length<t;)if(o+=e[r].value.length,++r==e.length)return;o!=t&&((s=e[r].value.substring(t-o)).length>n-t&&(s=s.substring(0,n-t)),i.push({type:e[r].type,value:s}),o=t+s.length,r+=1);for(;o<n&&r<e.length;){var s;(s=e[r].value).length+o>n?i.push({type:e[r].type,value:s.substring(0,n-o)}):i.push(e[r]),o+=s.length,r+=1}}(r,s,o))},t.end.row,this.session.getLine(t.end.row).length),i},this.$useLineGroups=function(){return this.session.getUseWrapMode()},this.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.$measureNode&&this.$measureNode.parentNode.removeChild(this.$measureNode),delete this.$measureNode}}).call(a.prototype),t.Text=a}),ace.define("ace/layer/cursor",["require","exports","module","ace/lib/dom"],function(e,t,n){"use strict";var i,r=e("../lib/dom"),o=function(e){this.element=r.createElement("div"),this.element.className="ace_layer ace_cursor-layer",e.appendChild(this.element),void 0===i&&(i=!("opacity"in this.element.style)),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=(i?this.$updateVisibility:this.$updateOpacity).bind(this)};(function(){this.$updateVisibility=function(e){for(var t=this.cursors,n=t.length;n--;)t[n].style.visibility=e?"":"hidden"},this.$updateOpacity=function(e){for(var t=this.cursors,n=t.length;n--;)t[n].style.opacity=e?"":"0"},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||i||(this.smoothBlinking=e,r.setCssClass(this.element,"ace_smooth-blinking",e),this.$updateCursors(!0),this.$updateCursors=this.$updateOpacity.bind(this),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.smoothBlinking&&r.removeCssClass(this.element,"ace_smooth-blinking"),e(!0),this.isBlinking&&this.blinkInterval&&this.isVisible){this.smoothBlinking&&setTimeout(function(){r.addCssClass(this.element,"ace_smooth-blinking")}.bind(this));var t=function(){this.timeoutId=setTimeout(function(){e(!1)},.6*this.blinkInterval)}.bind(this);this.intervalId=setInterval(function(){e(!0),t()},this.blinkInterval),t()}},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.update=function(e){this.config=e;var t=this.session.$selectionMarkers,n=0,i=0;void 0!==t&&0!==t.length||(t=[{cursor:null}]);n=0;for(var r=t.length;n<r;n++){var o=this.getPixelPosition(t[n].cursor,!0);if(!((o.top>e.height+e.offset||o.top<0)&&n>1)){var s=(this.cursors[i++]||this.addCursor()).style;this.drawCursor?this.drawCursor(s,o,e,t[n],this.session):(s.left=o.left+"px",s.top=o.top+"px",s.width=e.characterWidth+"px",s.height=e.lineHeight+"px")}}for(;this.cursors.length>i;)this.removeCursor();var a=this.session.getOverwrite();this.$setOverwrite(a),this.$pixelPos=o,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(o.prototype),t.Cursor=o}),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 i=e("./lib/oop"),r=e("./lib/dom"),o=e("./lib/event"),s=e("./lib/event_emitter").EventEmitter,a=function(e){this.element=r.createElement("div"),this.element.className="ace_scrollbar ace_scrollbar"+this.classSuffix,this.inner=r.createElement("div"),this.inner.className="ace_scrollbar-inner",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(){i.implement(this,s),this.setVisible=function(e){this.element.style.display=e?"":"none",this.isVisible=e,this.coeff=1}}).call(a.prototype);var l=function(e,t){a.call(this,e),this.scrollTop=0,this.scrollHeight=0,t.$scrollbarWidth=this.width=r.scrollbarWidth(e.ownerDocument),this.inner.style.width=this.element.style.width=(this.width||15)+5+"px",this.$minWidth=0};i.inherits(l,a),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>32768?(this.coeff=32768/e,e=32768):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(l.prototype);var c=function(e,t){a.call(this,e),this.scrollLeft=0,this.height=t.$scrollbarWidth,this.inner.style.height=this.element.style.height=(this.height||15)+5+"px"};i.inherits(c,a),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(c.prototype),t.ScrollBar=l,t.ScrollBarV=l,t.ScrollBarH=c,t.VScrollBar=l,t.HScrollBar=c}),ace.define("ace/renderloop",["require","exports","module","ace/lib/event"],function(e,t,n){"use strict";var i=e("./lib/event"),r=function(e,t){this.onRender=e,this.pending=!1,this.changes=0,this.window=t||window};(function(){this.schedule=function(e){if(this.changes=this.changes|e,!this.pending&&this.changes){this.pending=!0;var t=this;i.nextFrame(function(){t.pending=!1;for(var e;e=t.changes;)t.changes=0,t.onRender(e)},this.window)}}}).call(r.prototype),t.RenderLoop=r}),ace.define("ace/layer/font_metrics",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/useragent","ace/lib/event_emitter"],function(e,t,n){var i=e("../lib/oop"),r=e("../lib/dom"),o=e("../lib/lang"),s=e("../lib/useragent"),a=e("../lib/event_emitter").EventEmitter,l=0,c=t.FontMetrics=function(e){this.el=r.createElement("div"),this.$setMeasureNodeStyles(this.el.style,!0),this.$main=r.createElement("div"),this.$setMeasureNodeStyles(this.$main.style),this.$measureNode=r.createElement("div"),this.$setMeasureNodeStyles(this.$measureNode.style),this.el.appendChild(this.$main),this.el.appendChild(this.$measureNode),e.appendChild(this.el),l||this.$testFractionalRect(),this.$measureNode.innerHTML=o.stringRepeat("X",l),this.$characterSize={width:0,height:0},this.checkForSizeChanges()};(function(){i.implement(this,a),this.$characterSize={width:0,height:0},this.$testFractionalRect=function(){var e=r.createElement("div");this.$setMeasureNodeStyles(e.style),e.style.width="0.2px",document.documentElement.appendChild(e);var t=e.getBoundingClientRect().width;l=t>0&&t<1?50:100,e.parentNode.removeChild(e)},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(){var e=this.$measureSizes();if(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.$pollSizeChanges=function(){if(this.$pollSizeChangesTimer)return this.$pollSizeChangesTimer;var e=this;return this.$pollSizeChangesTimer=setInterval(function(){e.checkForSizeChanges()},500)},this.setPolling=function(e){e?this.$pollSizeChanges():this.$pollSizeChangesTimer&&(clearInterval(this.$pollSizeChangesTimer),this.$pollSizeChangesTimer=0)},this.$measureSizes=function(){if(50===l){var e=null;try{e=this.$measureNode.getBoundingClientRect()}catch(t){e={width:0,height:0}}var t={height:e.height,width:e.width/l}}else t={height:this.$measureNode.clientHeight,width:this.$measureNode.clientWidth/l};return 0===t.width||0===t.height?null:t},this.$measureCharWidth=function(e){this.$main.innerHTML=o.stringRepeat(e,l);return this.$main.getBoundingClientRect().width/l},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.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el)}}).call(c.prototype)}),ace.define("ace/virtual_renderer",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/config","ace/lib/useragent","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"],function(e,t,n){"use strict";var i=e("./lib/oop"),r=e("./lib/dom"),o=e("./config"),s=e("./lib/useragent"),a=e("./layer/gutter").Gutter,l=e("./layer/marker").Marker,c=e("./layer/text").Text,u=e("./layer/cursor").Cursor,h=e("./scrollbar").HScrollBar,d=e("./scrollbar").VScrollBar,p=e("./renderloop").RenderLoop,f=e("./layer/font_metrics").FontMetrics,g=e("./lib/event_emitter").EventEmitter;r.importCssString('.ace_editor {position: relative;overflow: hidden;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;-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;min-width: 100%;}.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;}.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 {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 {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;text-indent: -1em;-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: inherit;color: inherit;z-index: 1000;opacity: 1;text-indent: 0;}.ace_layer {z-index: 1;position: absolute;overflow: hidden;word-wrap: normal;white-space: pre;height: 100%;width: 100%;-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;pointer-events: none;}.ace_gutter-layer {position: relative;width: auto;text-align: right;pointer-events: auto;}.ace_text-layer {font: inherit !important;}.ace_cjk {display: inline-block;text-align: center;}.ace_cursor-layer {z-index: 4;}.ace_cursor {z-index: 4;position: absolute;-moz-box-sizing: border-box;-webkit-box-sizing: border-box;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_smooth-blinking .ace_cursor {-webkit-transition: opacity 0.18s;transition: opacity 0.18s;}.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_active-line {position: absolute;z-index: 2;}.ace_marker-layer .ace_selected-word {position: absolute;z-index: 4;-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;}.ace_line .ace_fold {-moz-box-sizing: border-box;-webkit-box-sizing: border-box;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: -webkit-linear-gradient(top, transparent, rgba(0, 0, 0, 0.1));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;-moz-box-sizing: border-box;-webkit-box-sizing: border-box;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 {-moz-box-sizing: border-box;-webkit-box-sizing: border-box;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_fold-widget.ace_invalid {background-color: #FFB4B4;border-color: #DE5555;}.ace_fade-fold-widgets .ace_fold-widget {-webkit-transition: opacity 0.4s ease 0.05s;transition: opacity 0.4s ease 0.05s;opacity: 0;}.ace_fade-fold-widgets:hover .ace_fold-widget {-webkit-transition: opacity 0.05s ease 0.05s;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_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_text-input-ios {position: absolute !important;top: -100000px !important;left: -100000px !important;}',"ace_editor.css");var m=function(e,t){var n=this;this.container=e||r.createElement("div"),this.$keepTextAreaAtCursor=!s.isOldIE,r.addCssClass(this.container,"ace_editor"),this.setTheme(t),this.$gutter=r.createElement("div"),this.$gutter.className="ace_gutter",this.container.appendChild(this.$gutter),this.$gutter.setAttribute("aria-hidden",!0),this.scroller=r.createElement("div"),this.scroller.className="ace_scroller",this.container.appendChild(this.scroller),this.content=r.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 l(this.content);var i=this.$textLayer=new c(this.content);this.canvas=i.element,this.$markerFront=new l(this.content),this.$cursorLayer=new u(this.content),this.$horizScroll=!1,this.$vScroll=!1,this.scrollBar=this.scrollBarV=new d(this.container,this),this.scrollBarH=new h(this.container,this),this.scrollBarV.addEventListener("scroll",function(e){n.$scrollAnimation||n.session.setScrollTop(e.data-n.scrollMargin.top)}),this.scrollBarH.addEventListener("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 f(this.container),this.$textLayer.$setFontMetrics(this.$fontMetrics),this.$textLayer.addEventListener("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.$loop=new p(this.$renderChanges.bind(this),this.container.ownerDocument.defaultView),this.$loop.schedule(this.CHANGE_FULL),this.updateCharacterSize(),this.setPadding(4),o.resetOptions(this),o._emit("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,i.implement(this,g),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()},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.lastRow<t&&(this.$changedLines.lastRow=t)):this.$changedLines={firstRow:e,lastRow:t},this.$changedLines.lastRow<this.layerConfig.firstRow){if(!n)return;this.$changedLines.lastRow=this.layerConfig.lastRow}this.$changedLines.firstRow>this.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,i){if(!(this.resizing>2)){this.resizing>0?this.resizing++:this.resizing=e?1:0;var r=this.container;i||(i=r.clientHeight||r.scrollHeight),n||(n=r.clientWidth||r.scrollWidth);var o=this.$updateCachedSize(e,t,n,i);if(!this.$size.scrollerHeight||!n&&!i)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,i){i-=this.$extraHeight||0;var r=0,o=this.$size,s={width:o.width,height:o.height,scrollerHeight:o.scrollerHeight,scrollerWidth:o.scrollerWidth};return i&&(e||o.height!=i)&&(o.height=i,r|=this.CHANGE_SIZE,o.scrollerHeight=o.height,this.$horizScroll&&(o.scrollerHeight-=this.scrollBarH.getHeight()),this.scrollBarV.element.style.bottom=this.scrollBarH.getHeight()+"px",r|=this.CHANGE_SCROLL),n&&(e||o.width!=n)&&(r|=this.CHANGE_SIZE,o.width=n,null==t&&(t=this.$showGutter?this.$gutter.offsetWidth:0),this.gutterWidth=t,this.scrollBarH.element.style.left=this.scroller.style.left=t+"px",o.scrollerWidth=Math.max(0,n-t-this.scrollBarV.getWidth()),this.scrollBarH.element.style.right=this.scroller.style.right=this.scrollBarV.getWidth()+"px",this.scroller.style.bottom=this.scrollBarH.getHeight()+"px",(this.session&&this.session.getUseWrapMode()&&this.adjustWrapLimit()||e)&&(r|=this.CHANGE_FULL)),o.$dirty=!n||!i,r&&this._signal("resize",s),r},this.onGutterResize=function(){var e=this.$showGutter?this.$gutter.offsetWidth:0;e!=this.gutterWidth&&(this.$changes|=this.$updateCachedSize(!0,e,this.$size.width,this.$size.height)),this.session.getUseWrapMode()&&this.adjustWrapLimit()?this.$loop.schedule(this.CHANGE_FULL):this.$size.$dirty?this.$loop.schedule(this.CHANGE_FULL):(this.$computeLayerConfig(),this.$loop.schedule(this.CHANGE_MARKER))},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.$updateGutterLineHighlight=function(){var e=this.$cursorLayer.$pixelPos,t=this.layerConfig.lineHeight;if(this.session.getUseWrapMode()){var n=this.session.selection.getCursor();n.column=0,e=this.$cursorLayer.getPixelPosition(n,!0),t*=this.session.getRowLength(n.row)}this.$gutterLineHighlight.style.top=e.top-this.layerConfig.offset+"px",this.$gutterLineHighlight.style.height=t+"px"},this.$updatePrintMargin=function(){if(this.$showPrintMargin||this.$printMarginEl){if(!this.$printMarginEl){var e=r.createElement("div");e.className="ace_layer ace_print-margin-layer",this.$printMarginEl=r.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=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.$keepTextAreaAtCursor){var e=this.layerConfig,t=this.$cursorLayer.$pixelPos.top,n=this.$cursorLayer.$pixelPos.left;t-=e.offset;var i=this.textarea.style,r=this.lineHeight;if(t<0||t>e.height-r)i.top=i.left="0";else{var o=this.characterWidth;if(this.$composition){var s=this.textarea.value.replace(/^\x01+/,"");o*=this.session.$getStringScreenWidth(s)[0]+2,r+=2}(n-=this.scrollLeft)>this.$size.scrollerWidth-o&&(n=this.$size.scrollerWidth-o),n+=this.gutterWidth,i.height=r+"px",i.width=o+"px",i.left=Math.min(n,this.$size.scrollerWidth-o)+"px",i.top=Math.min(t,this.$size.height-r)+"px"}}},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,i){var r=this.scrollMargin;r.top=0|e,r.bottom=0|t,r.right=0|i,r.left=0|n,r.v=r.top+r.bottom,r.h=r.left+r.right,r.top&&this.scrollTop<=0&&this.session&&this.session.setScrollTop(-r.top),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"),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(),n.firstRow!=this.layerConfig.firstRow&&n.firstRowScreen==this.layerConfig.firstRowScreen){var i=this.scrollTop+(n.firstRow-this.layerConfig.firstRow)*this.lineHeight;i>0&&(this.scrollTop=i,e|=this.CHANGE_SCROLL,e|=this.$computeLayerConfig())}n=this.layerConfig,this.$updateScrollBarV(),e&this.CHANGE_H_SCROLL&&this.$updateScrollBarH(),this.$gutterLayer.element.style.marginTop=-n.offset+"px",this.content.style.marginTop=-n.offset+"px",this.content.style.width=n.width+2*this.$padding+"px",this.content.style.height=n.minHeight+"px"}if(e&this.CHANGE_H_SCROLL&&(this.content.style.marginLeft=-this.scrollLeft+"px",this.scroller.className=this.scrollLeft<=0?"ace_scroller":"ace_scroller ace_scroll-left"),e&this.CHANGE_FULL)return this.$textLayer.update(n),this.$showGutter&&this.$gutterLayer.update(n),this.$markerBack.update(n),this.$markerFront.update(n),this.$cursorLayer.update(n),this.$moveTextAreaToCursor(),this.$highlightGutterLine&&this.$updateGutterLineHighlight(),void this._signal("afterRender");if(e&this.CHANGE_SCROLL)return e&this.CHANGE_TEXT||e&this.CHANGE_LINES?this.$textLayer.update(n):this.$textLayer.scrollLines(n),this.$showGutter&&this.$gutterLayer.update(n),this.$markerBack.update(n),this.$markerFront.update(n),this.$cursorLayer.update(n),this.$highlightGutterLine&&this.$updateGutterLineHighlight(),this.$moveTextAreaToCursor(),void this._signal("afterRender");e&this.CHANGE_TEXT?(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.$cursorLayer.update(n),this.$moveTextAreaToCursor(),this.$highlightGutterLine&&this.$updateGutterLineHighlight()),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")}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 i=e>t;if(n!=this.desiredHeight||this.$size.height!=this.desiredHeight||i!=this.$vScroll){i!=this.$vScroll&&(this.$vScroll=i,this.scrollBarV.setVisible(i));var r=this.container.clientWidth;this.container.style.height=n+"px",this.$updateCachedSize(!0,this.$gutterWidth,r,n),this.desiredHeight=n,this._signal("autosize")}},this.$computeLayerConfig=function(){var e=this.session,t=this.$size,n=t.height<=2*this.lineHeight,i=this.session.getScreenLength()*this.lineHeight,r=this.$getLongestLine(),o=!n&&(this.$hScrollBarAlwaysVisible||t.scrollerWidth-r-2*this.$padding<0),s=this.$horizScroll!==o;s&&(this.$horizScroll=o,this.scrollBarH.setVisible(o));var a=this.$vScroll;this.$maxLines&&this.lineHeight>1&&this.$autosize();var l=this.scrollTop%this.lineHeight,c=t.scrollerHeight+this.lineHeight,u=!this.$maxLines&&this.$scrollPastEnd?(t.scrollerHeight-this.lineHeight)*this.$scrollPastEnd:0;i+=u;var h=this.scrollMargin;this.session.setScrollTop(Math.max(-h.top,Math.min(this.scrollTop,i-t.scrollerHeight+h.bottom))),this.session.setScrollLeft(Math.max(-h.left,Math.min(this.scrollLeft,r+2*this.$padding-t.scrollerWidth+h.right)));var d=!n&&(this.$vScrollBarAlwaysVisible||t.scrollerHeight-i+u<0||this.scrollTop>h.top),p=a!==d;p&&(this.$vScroll=d,this.scrollBarV.setVisible(d));var f,g,m=Math.ceil(c/this.lineHeight)-1,v=Math.max(0,Math.round((this.scrollTop-l)/this.lineHeight)),w=v+m,b=this.lineHeight;v=e.screenToDocumentRow(v,0);var y=e.getFoldLine(v);y&&(v=y.start.row),f=e.documentToScreenRow(v,0),g=e.getRowLength(v)*b,w=Math.min(e.screenToDocumentRow(w,0),e.getLength()-1),c=t.scrollerHeight+e.getRowLength(w)*b+g,l=this.scrollTop-f*b;var A=0;return this.layerConfig.width!=r&&(A=this.CHANGE_H_SCROLL),(s||p)&&(A=this.$updateCachedSize(!0,this.gutterWidth,t.width,t.height),this._signal("scrollbarVisibilityChanged"),p&&(r=this.$getLongestLine())),this.layerConfig={width:r,padding:this.$padding,firstRow:v,firstRowScreen:f,lastRow:w,lineHeight:b,characterWidth:this.characterWidth,minHeight:c,maxHeight:i,offset:l,gutterOffset:b?Math.max(0,Math.ceil((l+t.height-t.scrollerHeight)/b)):0,height:this.$size.scrollerHeight},A},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||t<n.firstRow))return t===1/0?(this.$showGutter&&this.$gutterLayer.update(n),void this.$textLayer.update(n)):(this.$textLayer.updateLines(n,e,t),!0)}},this.$getLongestLine=function(){var e=this.session.getScreenWidth();return this.showInvisibles&&!this.session.$useWrapMode&&(e+=1),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 i=this.$cursorLayer.getPixelPosition(e),r=i.left,o=i.top,s=n&&n.top||0,a=n&&n.bottom||0,l=this.$scrollAnimation?this.session.getScrollTop():this.scrollTop;l+s>o?(t&&l+s>o+this.lineHeight&&(o-=t*this.$size.scrollerHeight),0===o&&(o=-this.scrollMargin.top),this.session.setScrollTop(o)):l+this.$size.scrollerHeight-a<o+this.lineHeight&&(t&&l+this.$size.scrollerHeight-a<o-this.lineHeight&&(o+=t*this.$size.scrollerHeight),this.session.setScrollTop(o+this.lineHeight-this.$size.scrollerHeight));var c=this.scrollLeft;c>r?(r<this.$padding+2*this.layerConfig.characterWidth&&(r=-this.scrollMargin.left),this.session.setScrollLeft(r)):c+this.$size.scrollerWidth<r+this.characterWidth?this.session.setScrollLeft(Math.round(r+this.characterWidth-this.$size.scrollerWidth)):c<=this.$padding&&r-c<this.characterWidth&&this.session.setScrollLeft(0)}},this.getScrollTop=function(){return this.session.getScrollTop()},this.getScrollLeft=function(){return this.session.getScrollLeft()},this.getScrollTopRow=function(){return this.scrollTop/this.lineHeight},this.getScrollBottomRow=function(){return Math.max(0,Math.floor((this.scrollTop+this.$size.scrollerHeight)/this.lineHeight)-1)},this.scrollToRow=function(e){this.session.setScrollTop(e*this.lineHeight)},this.alignCursor=function(e,t){"number"==typeof e&&(e={row:e,column:0});var n=this.$cursorLayer.getPixelPosition(e),i=this.$size.scrollerHeight-this.lineHeight,r=n.top-i*(t||0);return this.session.setScrollTop(r),r},this.STEPS=8,this.$calcSteps=function(e,t){var n=0,i=this.STEPS,r=[],o=function(e,t,n){return n*(Math.pow(e-1,3)+1)+t};for(n=0;n<i;++n)r.push(o(n/this.STEPS,e,t-e));return r},this.scrollToLine=function(e,t,n,i){var r=this.$cursorLayer.getPixelPosition({row:e,column:0}).top;t&&(r-=this.$size.scrollerHeight/2);var o=this.scrollTop;this.session.setScrollTop(r),!1!==n&&this.animateScrolling(o,i)},this.animateScrolling=function(e,t){var n=this.scrollTop;if(this.$animatedScroll){var i=this;if(e!=n){if(this.$scrollAnimation){var r=this.$scrollAnimation.steps;if(r.length&&(e=r[0])==n)return}var o=i.$calcSteps(e,n);this.$scrollAnimation={from:e,to:n,steps:o},clearInterval(this.$timer),i.session.setScrollTop(o.shift()),i.session.$scrollTop=n,this.$timer=setInterval(function(){o.length?(i.session.setScrollTop(o.shift()),i.session.$scrollTop=n):null!=n?(i.session.$scrollTop=-1,i.session.setScrollTop(n),n=null):(i.$timer=clearInterval(i.$timer),i.$scrollAnimation=null,t&&t())},10)}}},this.scrollToY=function(e){this.scrollTop!==e&&(this.$loop.schedule(this.CHANGE_SCROLL),this.scrollTop=e)},this.scrollToX=function(e){this.scrollLeft!==e&&(this.scrollLeft=e),this.$loop.schedule(this.CHANGE_H_SCROLL)},this.scrollTo=function(e,t){this.session.setScrollTop(t),this.session.setScrollLeft(t)},this.scrollBy=function(e,t){t&&this.session.setScrollTop(this.session.getScrollTop()+t),e&&this.session.setScrollLeft(this.session.getScrollLeft()+e)},this.isScrollableBy=function(e,t){return t<0&&this.session.getScrollTop()>=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=this.scroller.getBoundingClientRect(),i=e+this.scrollLeft-n.left-this.$padding,r=i/this.characterWidth,o=Math.floor((t+this.scrollTop-n.top)/this.lineHeight),s=Math.round(r);return{row:o,column:s,side:r-s>0?1:-1,offsetX:i}},this.screenToTextCoordinates=function(e,t){var n=this.scroller.getBoundingClientRect(),i=e+this.scrollLeft-n.left-this.$padding,r=Math.round(i/this.characterWidth),o=(t+this.scrollTop-n.top)/this.lineHeight;return this.session.screenToDocumentPosition(o,Math.max(r,0),i)},this.textToScreenCoordinates=function(e,t){var n=this.scroller.getBoundingClientRect(),i=this.session.documentToScreenPosition(e,t),r=this.$padding+(this.session.$bidiHandler.isBidiRow(i.row,e)?this.session.$bidiHandler.getPosLeft(i.column):Math.round(i.column*this.characterWidth)),o=i.row*this.lineHeight;return{pageX:n.left+r-this.scrollLeft,pageY:n.top+o-this.scrollTop}},this.visualizeFocus=function(){r.addCssClass(this.container,"ace_focus")},this.visualizeBlur=function(){r.removeCssClass(this.container,"ace_focus")},this.showComposition=function(e){this.$composition||(this.$composition={keepTextAreaAtCursor:this.$keepTextAreaAtCursor,cssText:this.textarea.style.cssText}),this.$keepTextAreaAtCursor=!0,r.addCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText="",this.$moveTextAreaToCursor()},this.setCompositionText=function(e){this.$moveTextAreaToCursor()},this.hideComposition=function(){this.$composition&&(r.removeCssClass(this.textarea,"ace_composition"),this.$keepTextAreaAtCursor=this.$composition.keepTextAreaAtCursor,this.textarea.style.cssText=this.$composition.cssText,this.$composition=null)},this.setTheme=function(e,t){function n(n){if(i.$themeId!=e)return t&&t();if(!n||!n.cssClass)throw new Error("couldn't load module "+e+" or it didn't call define");r.importCssString(n.cssText,n.cssClass,i.container.ownerDocument),i.theme&&r.removeCssClass(i.container,i.theme.cssClass);var o="padding"in n?n.padding:"padding"in(i.theme||{})?4:i.$padding;i.$padding&&o!=i.$padding&&i.setPadding(o),i.$theme=n.cssClass,i.theme=n,r.addCssClass(i.container,n.cssClass),r.setCssClass(i.container,"ace_dark",n.isDark),i.$size&&(i.$size.width=0,i.$updateSizeAsync()),i._dispatchEvent("themeLoaded",{theme:n}),t&&t()}var i=this;if(this.$themeId=e,i._dispatchEvent("themeChange",{theme:e}),e&&"string"!=typeof e)n(e);else{var s=e||this.$options.theme.initialValue;o.loadModule(["theme",s],n)}},this.getTheme=function(){return this.$themeId},this.setStyle=function(e,t){r.setCssClass(this.container,e,!1!==t)},this.unsetStyle=function(e){r.removeCssClass(this.container,e)},this.setCursorStyle=function(e){this.scroller.style.cursor!=e&&(this.scroller.style.cursor=e)},this.setMouseCursor=function(e){this.scroller.style.cursor=e},this.destroy=function(){this.$textLayer.destroy(),this.$cursorLayer.destroy()}}).call(m.prototype),o.defineOptions(m.prototype,"renderer",{animatedScroll:{initialValue:!1},showInvisibles:{set:function(e){this.$textLayer.setShowInvisibles(e)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!1},showPrintMargin:{set:function(){this.$updatePrintMargin()},initialValue:!0},printMarginColumn:{set:function(){this.$updatePrintMargin()},initialValue:80},printMargin:{set:function(e){"number"==typeof e&&(this.$printMarginColumn=e),this.$showPrintMargin=!!e,this.$updatePrintMargin()},get:function(){return this.$showPrintMargin&&this.$printMarginColumn}},showGutter:{set:function(e){this.$gutter.style.display=e?"block":"none",this.$loop.schedule(this.CHANGE_FULL),this.onGutterResize()},initialValue:!0},fadeFoldWidgets:{set:function(e){r.setCssClass(this.$gutter,"ace_fade-fold-widgets",e)},initialValue:!1},showFoldWidgets:{set:function(e){this.$gutterLayer.setShowFoldWidgets(e)},initialValue:!0},showLineNumbers:{set:function(e){this.$gutterLayer.setShowLineNumbers(e),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},displayIndentGuides:{set:function(e){this.$textLayer.setDisplayIndentGuides(e)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!0},highlightGutterLine:{set:function(e){if(!this.$gutterLineHighlight)return this.$gutterLineHighlight=r.createElement("div"),this.$gutterLineHighlight.className="ace_gutter-active-line",void this.$gutter.appendChild(this.$gutterLineHighlight);this.$gutterLineHighlight.style.display=e?"":"none",this.$cursorLayer.$pixelPos&&this.$updateGutterLineHighlight()},initialValue:!1,value:!0},hScrollBarAlwaysVisible:{set:function(e){this.$hScrollBarAlwaysVisible&&this.$horizScroll||this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},vScrollBarAlwaysVisible:{set:function(e){this.$vScrollBarAlwaysVisible&&this.$vScroll||this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},fontSize:{set:function(e){"number"==typeof e&&(e+="px"),this.container.style.fontSize=e,this.updateFontSize()},initialValue:12},fontFamily:{set:function(e){this.container.style.fontFamily=e,this.updateFontSize()}},maxLines:{set:function(e){this.updateFull()}},minLines:{set:function(e){this.updateFull()}},maxPixelHeight:{set:function(e){this.updateFull()},initialValue:0},scrollPastEnd:{set:function(e){e=+e||0,this.$scrollPastEnd!=e&&(this.$scrollPastEnd=e,this.$loop.schedule(this.CHANGE_SCROLL))},initialValue:0,handlesSet:!0},fixedWidthGutter:{set:function(e){this.$gutterLayer.$fixedWidth=!!e,this.$loop.schedule(this.CHANGE_GUTTER)}},theme:{set:function(e){this.setTheme(e)},get:function(){return this.$themeId||this.theme},initialValue:"./theme/textmate",handlesSet:!0}}),t.VirtualRenderer=m}),ace.define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/net","ace/lib/event_emitter","ace/config"],function(e,t,n){"use strict";function i(e){var t=function(e){var t="importScripts('"+o.qualifyURL(e)+"');";try{return new Blob([t],{type:"application/javascript"})}catch(e){var n=new(window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder);return n.append(t),n.getBlob("application/javascript")}}(e),n=(window.URL||window.webkitURL).createObjectURL(t);return new Worker(n)}var r=e("../lib/oop"),o=e("../lib/net"),s=e("../lib/event_emitter").EventEmitter,a=e("../config"),l=function(t,n,r,o,s){if(this.$sendDeltaQueue=this.$sendDeltaQueue.bind(this),this.changeListener=this.changeListener.bind(this),this.onMessage=this.onMessage.bind(this),e.nameToUrl&&!e.toUrl&&(e.toUrl=e.nameToUrl),a.get("packaged")||!e.toUrl)o=o||a.moduleUrl(n,"worker");else{var l=this.$normalizePath;o=o||l(e.toUrl("ace/worker/worker.js",null,"_"));var c={};t.forEach(function(t){c[t]=l(e.toUrl(t,null,"_").replace(/(\.js)?(\?.*)?$/,""))})}this.$worker=i(o),s&&this.send("importScripts",s),this.$worker.postMessage({init:!0,tlns:c,module:n,classname:r}),this.callbackId=1,this.callbacks={},this.$worker.onmessage=this.onMessage};(function(){r.implement(this,s),this.onMessage=function(e){var t=e.data;switch(t.type){case"event":this._signal(t.name,{data:t.data});break;case"call":var n=this.callbacks[t.id];n&&(n(t.data),delete this.callbacks[t.id]);break;case"error":this.reportError(t.data);break;case"log":window.console&&console.log&&console.log.apply(console,t.data)}},this.reportError=function(e){window.console&&console.error&&console.error(e)},this.$normalizePath=function(e){return o.qualifyURL(e)},this.terminate=function(){this._signal("terminate",{}),this.deltaQueue=null,this.$worker.terminate(),this.$worker=null,this.$doc&&this.$doc.off("change",this.changeListener),this.$doc=null},this.send=function(e,t){this.$worker.postMessage({command:e,args:t})},this.call=function(e,t,n){if(n){var i=this.callbackId++;this.callbacks[i]=n,t.push(i)}this.send(e,t)},this.emit=function(e,t){try{this.$worker.postMessage({event:e,data:{data:t.data}})}catch(e){console.error(e.stack)}},this.attachToDocument=function(e){this.$doc&&this.terminate(),this.$doc=e,this.call("setValue",[e.getValue()]),e.on("change",this.changeListener)},this.changeListener=function(e){this.deltaQueue||(this.deltaQueue=[],setTimeout(this.$sendDeltaQueue,0)),"insert"==e.action?this.deltaQueue.push(e.start,e.lines):this.deltaQueue.push(e.start,e.end)},this.$sendDeltaQueue=function(){var e=this.deltaQueue;e&&(this.deltaQueue=null,e.length>50&&e.length>this.$doc.getLength()>>1?this.call("setValue",[this.$doc.getValue()]):this.emit("change",{data:e}))}}).call(l.prototype);var c=function(e,t,n){this.$sendDeltaQueue=this.$sendDeltaQueue.bind(this),this.changeListener=this.changeListener.bind(this),this.callbackId=1,this.callbacks={},this.messageBuffer=[];var i=null,r=!1,o=Object.create(s),l=this;this.$worker={},this.$worker.terminate=function(){},this.$worker.postMessage=function(e){l.messageBuffer.push(e),i&&(r?setTimeout(c):c())},this.setEmitSync=function(e){r=e};var c=function(){var e=l.messageBuffer.shift();e.command?i[e.command].apply(i,e.args):e.event&&o._signal(e.event,e.data)};o.postMessage=function(e){l.onMessage({data:e})},o.callback=function(e,t){this.postMessage({type:"call",id:t,data:e})},o.emit=function(e,t){this.postMessage({type:"event",name:e,data:t})},a.loadModule(["worker",t],function(e){for(i=new e[n](o);l.messageBuffer.length;)c()})};c.prototype=l.prototype,t.UIWorkerClient=c,t.WorkerClient=l,t.createWorker=i}),ace.define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"],function(e,t,n){"use strict";var i=e("./range").Range,r=e("./lib/event_emitter").EventEmitter,o=e("./lib/oop"),s=function(e,t,n,i,r,o){var s=this;this.length=t,this.session=e,this.doc=e.getDocument(),this.mainClass=r,this.othersClass=o,this.$onUpdate=this.onUpdate.bind(this),this.doc.on("change",this.$onUpdate),this.$others=i,this.$onCursorChange=function(){setTimeout(function(){s.onCursorChange()})},this.$pos=n;var a=e.getUndoManager().$undoStack||e.getUndoManager().$undostack||{length:-1};this.$undoStackDepth=a.length,this.setup(),e.selection.on("changeCursor",this.$onCursorChange)};(function(){o.implement(this,r),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 r=this.pos;r.$insertRight=!0,r.detach(),r.markerId=n.addMarker(new i(r.row,r.column,r.row,r.column+this.length),this.mainClass,null,!1),this.others=[],this.$others.forEach(function(n){var i=t.createAnchor(n.row,n.column);i.$insertRight=!0,i.detach(),e.others.push(i)}),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 i(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.others.length;e++)this.session.removeMarker(this.others[e].markerId)}},this.onUpdate=function(e){if(this.$updating)return this.updateAnchors(e);var t=e;if(t.start.row===t.end.row&&t.start.row===this.pos.row){this.$updating=!0;var n="insert"===e.action?t.end.column-t.start.column:t.start.column-t.end.column,r=t.start.column>=this.pos.column&&t.start.column<=this.pos.column+this.length+1,o=t.start.column-this.pos.column;if(this.updateAnchors(e),r&&(this.length+=n),r&&!this.session.$fromUndo)if("insert"===e.action)for(var s=this.others.length-1;s>=0;s--){var a={row:(l=this.others[s]).row,column:l.column+o};this.doc.insertMergedLines(a,e.lines)}else if("remove"===e.action)for(s=this.others.length-1;s>=0;s--){var l;a={row:(l=this.others[s]).row,column:l.column+o};this.doc.remove(new i(a.row,a.column,a.row,a.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,r){t.removeMarker(n.markerId),n.markerId=t.addMarker(new i(n.row,n.column,n.row,n.column+e.length),r,null,!1)};n(this.pos,this.mainClass);for(var r=this.others.length;r--;)n(this.others[r],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.removeEventListener("change",this.$onUpdate),this.session.selection.removeEventListener("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;n<t;n++)e.undo(!0);this.selectionBefore&&this.session.selection.fromJSON(this.selectionBefore)}}}).call(s.prototype),t.PlaceHolder=s}),ace.define("ace/mouse/multi_select_handler",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(e,t,n){function i(e,t){return e.row==t.row&&e.column==t.column}var r=e("../lib/event"),o=e("../lib/useragent");t.onMouseDown=function(e){var t=e.domEvent,n=t.altKey,s=t.shiftKey,a=t.ctrlKey,l=e.getAccelKey(),c=e.getButton();if(a&&o.isMac&&(c=t.button),e.editor.inMultiSelectMode&&2==c)e.editor.textInput.onContextMenu(e.domEvent);else if(a||n||l){if(0===c){var u,h=e.editor,d=h.selection,p=h.inMultiSelectMode,f=e.getDocumentPosition(),g=d.getCursor(),m=e.inSelection()||d.isEmpty()&&i(f,g),v=e.x,w=e.y,b=h.session,y=h.renderer.pixelToScreenCoordinates(v,w),A=y;if(h.$mouseHandler.$enableJumpToDef)a&&n||l&&n?u=s?"block":"add":n&&h.$blockSelectEnabled&&(u="block");else if(l&&!n){if(u="add",!p&&s)return}else n&&h.$blockSelectEnabled&&(u="block");if(u&&o.isMac&&t.ctrlKey&&h.$mouseHandler.cancelContextMenu(),"add"==u){if(!p&&m)return;if(!p){var $=d.toOrientedRange();h.addSelectionMarker($)}var C=d.rangeList.rangeAtPoint(f);h.$blockScrolling++,h.inVirtualSelectionMode=!0,s&&(C=null,$=d.ranges[0]||$,h.removeSelectionMarker($)),h.once("mouseup",function(){var e=d.toOrientedRange();C&&e.isEmpty()&&i(C.cursor,e.cursor)?d.substractPoint(e.cursor):(s?d.substractPoint($.cursor):$&&(h.removeSelectionMarker($),d.addRange($)),d.addRange(e)),h.$blockScrolling--,h.inVirtualSelectionMode=!1})}else if("block"==u){e.stop(),h.inVirtualSelectionMode=!0;var x,k=[];h.$blockScrolling++,p&&!l?d.toSingleRange():!p&&l&&(x=d.toOrientedRange(),h.addSelectionMarker(x)),s?y=b.documentToScreenPosition(d.lead):d.moveToPosition(f),h.$blockScrolling--,A={row:-1,column:-1};var E=function(){var e=h.renderer.pixelToScreenCoordinates(v,w),t=b.screenToDocumentPosition(e.row,e.column,e.offsetX);i(A,e)&&i(t,d.lead)||(A=e,h.$blockScrolling++,h.selection.moveToPosition(t),h.renderer.scrollCursorIntoView(),h.removeSelectionMarkers(k),k=d.rectangularRangeBlock(A,y),h.$mouseHandler.$clickSelection&&1==k.length&&k[0].isEmpty()&&(k[0]=h.$mouseHandler.$clickSelection.clone()),k.forEach(h.addSelectionMarker,h),h.updateSelectionMarkers(),h.$blockScrolling--)};r.capture(h.container,function(e){v=e.clientX,w=e.clientY},function(e){clearInterval(F),h.removeSelectionMarkers(k),k.length||(k=[d.toOrientedRange()]),h.$blockScrolling++,x&&(h.removeSelectionMarker(x),d.toSingleRange(x));for(var t=0;t<k.length;t++)d.addRange(k[t]);h.inVirtualSelectionMode=!1,h.$mouseHandler.$clickSelection=null,h.$blockScrolling--});var F=setInterval(function(){E()},20);return e.preventDefault()}}}else 0===c&&e.editor.inMultiSelectMode&&e.editor.exitMultiSelectMode()}}),ace.define("ace/commands/multi_select_commands",["require","exports","module","ace/keyboard/hash_handler"],function(e,t,n){t.defaultCommands=[{name:"addCursorAbove",exec:function(e){e.selectMoreLines(-1)},bindKey:{win:"Ctrl-Alt-Up",mac:"Ctrl-Alt-Up"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorBelow",exec:function(e){e.selectMoreLines(1)},bindKey:{win:"Ctrl-Alt-Down",mac:"Ctrl-Alt-Down"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorAboveSkipCurrent",exec:function(e){e.selectMoreLines(-1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Up",mac:"Ctrl-Alt-Shift-Up"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorBelowSkipCurrent",exec:function(e){e.selectMoreLines(1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Down",mac:"Ctrl-Alt-Shift-Down"},scrollIntoView:"cursor",readOnly:!0},{name:"selectMoreBefore",exec:function(e){e.selectMore(-1)},bindKey:{win:"Ctrl-Alt-Left",mac:"Ctrl-Alt-Left"},scrollIntoView:"cursor",readOnly:!0},{name:"selectMoreAfter",exec:function(e){e.selectMore(1)},bindKey:{win:"Ctrl-Alt-Right",mac:"Ctrl-Alt-Right"},scrollIntoView:"cursor",readOnly:!0},{name:"selectNextBefore",exec:function(e){e.selectMore(-1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Left",mac:"Ctrl-Alt-Shift-Left"},scrollIntoView:"cursor",readOnly:!0},{name:"selectNextAfter",exec:function(e){e.selectMore(1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Right",mac:"Ctrl-Alt-Shift-Right"},scrollIntoView:"cursor",readOnly:!0},{name:"splitIntoLines",exec:function(e){e.multiSelect.splitIntoLines()},bindKey:{win:"Ctrl-Alt-L",mac:"Ctrl-Alt-L"},readOnly:!0},{name:"alignCursors",exec:function(e){e.alignCursors()},bindKey:{win:"Ctrl-Alt-A",mac:"Ctrl-Alt-A"},scrollIntoView:"cursor"},{name:"findAll",exec:function(e){e.findAll()},bindKey:{win:"Ctrl-Alt-K",mac:"Ctrl-Alt-G"},scrollIntoView:"cursor",readOnly:!0}],t.multiSelectCommands=[{name:"singleSelection",bindKey:"esc",exec:function(e){e.exitMultiSelectMode()},scrollIntoView:"cursor",readOnly:!0,isAvailable:function(e){return e&&e.inMultiSelectMode}}];var i=e("../keyboard/hash_handler").HashHandler;t.keyboardHandler=new i(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){function i(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(u.defaultCommands),function(e){function t(t){i&&(e.renderer.setMouseCursor(""),i=!1)}var n=e.textInput.getElement(),i=!1;l.addListener(n,"keydown",function(n){var r=18==n.keyCode&&!(n.ctrlKey||n.shiftKey||n.metaKey);e.$blockSelectEnabled&&r?i||(e.renderer.setMouseCursor("crosshair"),i=!0):i&&t()}),l.addListener(n,"keyup",t),l.addListener(n,"blur",t)}(e))}var r=e("./range_list").RangeList,o=e("./range").Range,s=e("./selection").Selection,a=e("./mouse/multi_select_handler").onMouseDown,l=e("./lib/event"),c=e("./lib/lang"),u=e("./commands/multi_select_commands");t.commands=u.defaultCommands.concat(u.multiSelectCommands);var h=new(0,e("./search").Search),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 i=this.rangeList.add(e);return this.$onAddRange(e),i.length&&this.$onRemoveRange(i),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.ranges[0]&&this.fromOrientedRange(this.ranges[0])},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 i=this.ranges.indexOf(e[n]);this.ranges.splice(i,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(){if(this.rangeCount>1){var e=this.rangeList.ranges,t=e[e.length-1],n=o.fromPoints(e[0].start,t.end);this.toSingleRange(),this.setSelectionRange(n,t.cursor==t.start)}else{n=this.getRange();var i=this.isBackwards(),r=n.start.row,s=n.end.row;if(r==s){if(i)var a=n.end,l=n.start;else a=n.start,l=n.end;return this.addRange(o.fromPoints(l,l)),void this.addRange(o.fromPoints(a,a))}var c=[],u=this.getLineRange(r,!0);u.start.column=n.start.column,c.push(u);for(var h=r+1;h<s;h++)c.push(this.getLineRange(h,!0));(u=this.getLineRange(s,!0)).end.column=n.end.column,c.push(u),c.forEach(this.addRange,this)}},this.toggleBlockSelection=function(){if(this.rangeCount>1){var e=this.rangeList.ranges,t=e[e.length-1],n=o.fromPoints(e[0].start,t.end);this.toSingleRange(),this.setSelectionRange(n,t.cursor==t.start)}else{var i=this.session.documentToScreenPosition(this.selectionLead),r=this.session.documentToScreenPosition(this.selectionAnchor);this.rectangularRangeBlock(i,r).forEach(this.addRange,this)}},this.rectangularRangeBlock=function(e,t,n){var i=[],r=e.column<t.column;if(r)var s=e.column,a=t.column,l=e.offsetX,c=t.offsetX;else s=t.column,a=e.column,l=t.offsetX,c=e.offsetX;var u=e.row<t.row;if(u)var h=e.row,d=t.row;else h=t.row,d=e.row;s<0&&(s=0),h<0&&(h=0),h==d&&(n=!0);for(var p=h;p<=d;p++){var f=o.fromPoints(this.session.screenToDocumentPosition(p,s,l),this.session.screenToDocumentPosition(p,a,c));if(f.isEmpty()){if(g&&function(e,t){return e.row==t.row&&e.column==t.column}(f.end,g))break;var g=f.end}f.cursor=r?f.start:f.end,i.push(f)}if(u&&i.reverse(),!n){for(var m=i.length-1;i[m].isEmpty()&&m>0;)m--;if(m>0)for(var v=0;i[v].isEmpty();)v++;for(var w=m;w>=v;w--)i[w].isEmpty()&&i.splice(w,1)}return i}}.call(s.prototype);var p=e("./editor").Editor;(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 i=e[n];if(i.marker){this.session.removeMarker(i.marker);var r=t.indexOf(i);-1!=r&&t.splice(r,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(u.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(u.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?i=n.forEachSelection(t,e.args):"forEachLine"==t.multiSelectAction?i=n.forEachSelection(t,e.args,!0):"single"==t.multiSelectAction?(n.exitMultiSelectMode(),i=t.exec(n,e.args||{})):i=t.multiSelectAction(n,e.args||{});else{var i=t.exec(n,e.args||{});n.multiSelect.addRange(n.multiSelect.toOrientedRange()),n.multiSelect.mergeOverlappingRanges()}return i}},this.forEachSelection=function(e,t,n){if(!this.inVirtualSelectionMode){var i,r=n&&n.keepOrder,o=1==n||n&&n.$byLines,a=this.session,l=this.selection,c=l.rangeList,u=(r?l:c).ranges;if(!u.length)return e.exec?e.exec(this,t||{}):e(this,t||{});var h=l._eventRegistry;l._eventRegistry={};var d=new s(a);this.inVirtualSelectionMode=!0;for(var p=u.length;p--;){if(o)for(;p>0&&u[p].start.row==u[p-1].end.row;)p--;d.fromOrientedRange(u[p]),d.index=p,this.selection=a.selection=d;var f=e.exec?e.exec(this,t||{}):e(this,t||{});i||void 0===f||(i=f),d.toOrientedRange(u[p])}d.detach(),this.selection=a.selection=l,this.inVirtualSelectionMode=!1,l._eventRegistry=h,l.mergeOverlappingRanges();var g=this.renderer.$scrollAnimation;return this.onCursorChange(),this.onSelectionChange(),g&&g.from==g.to&&this.renderer.animateScrolling(g.from),i}},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=[],i=0;i<t.length;i++)n.push(this.session.getTextRange(t[i]));var r=this.session.getDocument().getNewLineCharacter();(e=n.join(r)).length==(n.length-1)*r.length&&(e="")}else this.selection.isEmpty()||(e=this.session.getTextRange(this.getSelectionRange()));return e},this.$checkMultiselectChange=function(e,t){if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){var n=this.multiSelect.ranges[0];if(this.multiSelect.isEmpty()&&t==this.multiSelect.anchor)return;var i=t==this.multiSelect.anchor?n.cursor==n.start?n.end:n.start:n.cursor;i.row==t.row&&this.session.$clipPositionToDocument(i.row,i.column).column==t.column||this.multiSelect.toSingleRange(this.multiSelect.toOrientedRange())}},this.findAll=function(e,t,n){if(t=t||{},t.needle=e||t.needle,void 0==t.needle){var i=this.selection.isEmpty()?this.selection.getWordRange():this.selection.getRange();t.needle=this.session.getTextRange(i)}this.$search.set(t);var r=this.$search.findAll(this.session);if(!r.length)return 0;this.$blockScrolling+=1;var o=this.multiSelect;n||o.toSingleRange(r[0]);for(var s=r.length;s--;)o.addRange(r[s],!0);return i&&o.rangeList.rangeAtPoint(i.start)&&o.addRange(i,!0),this.$blockScrolling-=1,r.length},this.selectMoreLines=function(e,t){var n=this.selection.toOrientedRange(),i=n.cursor==n.end,r=this.session.documentToScreenPosition(n.cursor);this.selection.$desiredColumn&&(r.column=this.selection.$desiredColumn);var s=this.session.screenToDocumentPosition(r.row+e,r.column);if(n.isEmpty())l=s;else var a=this.session.documentToScreenPosition(i?n.end:n.start),l=this.session.screenToDocumentPosition(a.row+e,a.column);if(i){(c=o.fromPoints(s,l)).cursor=c.start}else{var c;(c=o.fromPoints(l,s)).cursor=c.end}if(c.desiredColumn=r.column,this.selection.inMultiSelectMode){if(t)var u=n.cursor}else this.selection.addRange(n);this.selection.addRange(c),u&&this.selection.substractPoint(u)},this.transposeSelections=function(e){for(var t=this.session,n=t.multiSelect,i=n.ranges,r=i.length;r--;){if((a=i[r]).isEmpty()){var o=t.getWordRange(a.start.row,a.start.column);a.start.row=o.start.row,a.start.column=o.start.column,a.end.row=o.end.row,a.end.column=o.end.column}}n.mergeOverlappingRanges();var s=[];for(r=i.length;r--;){var a=i[r];s.unshift(t.getTextRange(a))}e<0?s.unshift(s.pop()):s.push(s.shift());for(r=i.length;r--;){o=(a=i[r]).clone();t.replace(a,s[r]),a.start.row=o.start.row,a.start.column=o.start.column}},this.selectMore=function(e,t,n){var i=this.session,r=i.multiSelect.toOrientedRange();if(!r.isEmpty()||(r=i.getWordRange(r.start.row,r.start.column),r.cursor=-1==e?r.start:r.end,this.multiSelect.addRange(r),!n)){var o=function(e,t,n){return h.$options.wrap=!0,h.$options.needle=t,h.$options.backwards=-1==n,h.find(e)}(i,i.getTextRange(r),e);o&&(o.cursor=-1==e?o.start:o.end,this.$blockScrolling+=1,this.session.unfold(o),this.multiSelect.addRange(o),this.$blockScrolling-=1,this.renderer.scrollCursorIntoView(null,.5)),t&&this.multiSelect.substractPoint(r.cursor)}},this.alignCursors=function(){var e=this.session,t=e.multiSelect,n=t.ranges,i=-1,r=n.filter(function(e){if(e.cursor.row==i)return!0;i=e.cursor.row});if(n.length&&r.length!=n.length-1){r.forEach(function(e){t.substractPoint(e.cursor)});var s=0,a=1/0,l=n.map(function(t){var n=t.cursor,i=e.getLine(n.row).substr(n.column).search(/\S/g);return-1==i&&(i=0),n.column>s&&(s=n.column),i<a&&(a=i),i});n.forEach(function(t,n){var i=t.cursor,r=s-i.column,u=l[n]-a;r>u?e.insert(i,c.stringRepeat(" ",r-u)):e.remove(new o(i.row,i.column,i.row,i.column-r+u)),t.start.column=t.end.column=s,t.start.row=t.end.row=i.row,t.cursor=t.end}),t.fromOrientedRange(n[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers()}else{var u=this.selection.getRange(),h=u.start.row,d=u.end.row,p=h==d;if(p){var f,g=this.session.getLength();do{f=this.session.getLine(d)}while(/[=:]/.test(f)&&++d<g);do{f=this.session.getLine(h)}while(/[=:]/.test(f)&&--h>0);h<0&&(h=0),d>=g&&(d=g-1)}var m=this.session.removeFullLines(h,d);m=this.$reAlignText(m,p),this.session.insert({row:h,column:0},m.join("\n")+"\n"),p||(u.start.column=0,u.end.column=m[m.length-1].length),this.selection.setRange(u)}},this.$reAlignText=function(e,t){function n(e){return c.stringRepeat(" ",e)}function i(e){return e[2]?n(r)+e[2]+n(o-e[2].length+s)+e[4].replace(/^([=:])\s+/,"$1 "):e[0]}var r,o,s,a=!0,l=!0;return e.map(function(e){var t=e.match(/(\s*)(.*?)(\s*)([=:].*)/);return t?null==r?(r=t[1].length,o=t[2].length,s=t[3].length,t):(r+o+s!=t[1].length+t[2].length+t[3].length&&(l=!1),r!=t[1].length&&(a=!1),r>t[1].length&&(r=t[1].length),o<t[2].length&&(o=t[2].length),s>t[3].length&&(s=t[3].length),t):[e]}).map(t?i:a?l?function(e){return e[2]?n(r+o-e[2].length)+e[2]+n(s)+e[4].replace(/^([=:])\s+/,"$1 "):e[0]}:i:function(e){return e[2]?n(r)+e[2]+n(s)+e[4].replace(/^([=:])\s+/,"$1 "):e[0]})}}).call(p.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=i,e("./config").defineOptions(p.prototype,"editor",{enableMultiselect:{set:function(e){i(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 i=e("../../range").Range,r=t.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(e,t,n){var i=e.getLine(n);return this.foldingStartMarker.test(i)?"start":"markbeginend"==t&&this.foldingStopMarker&&this.foldingStopMarker.test(i)?"end":""},this.getFoldWidgetRange=function(e,t,n){return null},this.indentationBlock=function(e,t,n){var r=/\S/,o=e.getLine(t),s=o.search(r);if(-1!=s){for(var a=n||o.length,l=e.getLength(),c=t,u=t;++t<l;){var h=e.getLine(t).search(r);if(-1!=h){if(h<=s)break;u=t}}if(u>c){var d=e.getLine(u).length;return new i(c,a,u,d)}}},this.openingBracketBlock=function(e,t,n,r,o){var s={row:n,column:r+1},a=e.$findClosingBracket(t,s,o);if(a){var l=e.foldWidgets[a.row];return null==l&&(l=e.getFoldWidget(a.row)),"start"==l&&a.row>s.row&&(a.row--,a.column=e.getLine(a.row).length),i.fromPoints(s,a)}},this.closingBracketBlock=function(e,t,n,r,o){var s={row:n,column:r},a=e.$findOpeningBracket(t,s);if(a)return a.column++,s.column--,i.fromPoints(a,s)}}).call(r.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;}';e("../lib/dom").importCssString(t.cssText,t.cssClass)}),ace.define("ace/line_widgets",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/range"],function(e,t,n){"use strict";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)}e("./lib/oop");var r=e("./lib/dom");e("./range").Range;(function(){this.getRowLength=function(e){var t;return t=this.lineWidgets?this.lineWidgets[e]&&this.lineWidgets[e].rowCount||0: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 i=e.data,r=i.start.row,o=i.end.row,s="add"==e.action,a=r+1;a<o;a++)n[a]&&(n[a].hidden=s);n[o]&&(s?n[r]?n[o].hidden=s:n[r]=n[o]:(n[r]==n[o]&&(n[r]=void 0),n[o].hidden=s))}},this.updateOnChange=function(e){var t=this.session.lineWidgets;if(t){var n=e.start.row,i=e.end.row-n;if(0===i);else if("remove"==e.action){t.splice(n+1,i).forEach(function(e){e&&this.removeLineWidget(e)},this),this.$updateRows()}else{var r=new Array(i);r.unshift(n,0),t.splice.apply(t,r),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.addLineWidget=function(e){this.session.lineWidgets||(this.session.lineWidgets=new Array(this.session.getLength()));var t=this.session.lineWidgets[e.row];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.session=this.session;var n=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,n.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/n.layerConfig.lineHeight);var i=this.session.getFoldAt(e.row,0);if(e.$fold=i,i){var o=this.session.lineWidgets;e.row!=i.end.row||o[i.start.row]?e.hidden=!0:o[i.start.row]=e}return this.session._emit("changeFold",{data:{start:{row:e.row}}}),this.$updateRows(),this.renderWidgets(null,n),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(e){}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],i=[];n;)i.push(n),n=n.$oldWidget;return i},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,i=t.layerConfig;if(n&&n.length){for(var r=1/0,o=0;o<n.length;o++){var s=n[o];if(s&&s.el&&s.session==this.session){if(!s._inDocument){if(this.session.lineWidgets[s.row]!=s)continue;s._inDocument=!0,t.container.appendChild(s.el)}s.h=s.el.offsetHeight,s.fixedWidth||(s.w=s.el.offsetWidth,s.screenWidth=Math.ceil(s.w/i.characterWidth));var a=s.h/i.lineHeight;s.coverLine&&(a-=this.session.getRowLineCount(s.row))<0&&(a=0),s.rowCount!=a&&(s.rowCount=a,s.row<r&&(r=s.row))}}r!=1/0&&(this.session._emit("changeFold",{data:{start:{row:r}}}),this.session.lineWidgetWidth=null),this.session._changedWidgets=[]}},this.renderWidgets=function(e,t){var n=t.layerConfig,i=this.session.lineWidgets;if(i){for(var r=Math.min(this.firstRow,n.firstRow),o=Math.max(this.lastRow,n.lastRow,i.length);r>0&&!i[r];)r--;this.firstRow=n.firstRow,this.lastRow=n.lastRow,t.$cursorLayer.config=n;for(var s=r;s<=o;s++){var a=i[s];if(a&&a.el)if(a.hidden)a.el.style.top=-100-(a.pixelHeight||0)+"px";else{a._inDocument||(a._inDocument=!0,t.container.appendChild(a.el));var l=t.$cursorLayer.getPixelPosition({row:s,column:0},!0).top;a.coverLine||(l+=n.lineHeight*this.session.getRowLineCount(a.row)),a.el.style.top=l-n.offset+"px";var c=a.coverGutter?0:t.gutterWidth;a.fixedWidth||(c-=t.scrollLeft),a.el.style.left=c+"px",a.fullWidth&&a.screenWidth&&(a.el.style.minWidth=n.width+2*n.padding+"px"),a.fixedWidth?a.el.style.right=t.scrollBar.getWidth()+"px":a.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 i=e("../line_widgets").LineWidgets,r=e("../lib/dom"),o=e("../range").Range;t.showErrorMarker=function(e,t){var n=e.session;n.widgetManager||(n.widgetManager=new i(n),n.widgetManager.attach(e));var s=e.getCursorPosition(),a=s.row,l=n.widgetManager.getWidgetsAtRow(a).filter(function(e){return"errorMarker"==e.type})[0];l?l.destroy():a-=t;var c,u=function(e,t,n){var i=e.getAnnotations().sort(o.comparePoints);if(i.length){var r=function(e,t,n){for(var i=0,r=e.length-1;i<=r;){var o=i+r>>1,s=n(t,e[o]);if(s>0)i=o+1;else{if(!(s<0))return o;r=o-1}}return-(i+1)}(i,{row:t,column:-1},o.comparePoints);r<0&&(r=-r-1),r>=i.length?r=n>0?0:i.length-1:0===r&&n<0&&(r=i.length-1);var s=i[r];if(s&&n){if(s.row===t){do{s=i[r+=n]}while(s&&s.row===t);if(!s)return i.slice()}var a=[];t=s.row;do{a[n<0?"unshift":"push"](s),s=i[r+=n]}while(s&&s.row==t);return a.length&&a}}}(n,a,t);if(u){var h=u[0];s.column=(h.pos&&"number"!=typeof h.column?h.pos.sc:h.column)||0,s.row=h.row,c=e.renderer.$gutterLayer.$annotations[s.row]}else{if(l)return;c={text:["Looks good!"],className:"ace_ok"}}e.session.unfold(s.row),e.selection.moveToPosition(s);var d={row:s.row,fixedWidth:!0,coverGutter:!0,el:r.createElement("div"),type:"errorMarker"},p=d.el.appendChild(r.createElement("div")),f=d.el.appendChild(r.createElement("div"));f.className="error_widget_arrow "+c.className;var g=e.renderer.$cursorLayer.getPixelPosition(s).left;f.style.left=g+e.renderer.gutterWidth-5+"px",d.el.className="error_widget_wrapper",p.className="error_widget "+c.className,p.innerHTML=c.text.join("<br>"),p.appendChild(r.createElement("div"));var m=function(e,t,n){if(0===t&&("esc"===n||"return"===n))return d.destroy(),{command:"null"}};d.destroy=function(){e.$mouseHandler.isMousePressed||(e.keyBinding.removeKeyboardHandler(m),n.widgetManager.removeLineWidget(d),e.off("changeSelection",d.destroy),e.off("changeSession",d.destroy),e.off("mouseup",d.destroy),e.off("change",d.destroy))},e.keyBinding.addKeyboardHandler(m),e.on("changeSelection",d.destroy),e.on("changeSession",d.destroy),e.on("mouseup",d.destroy),e.on("change",d.destroy),e.session.widgetManager.addLineWidget(d),d.el.onmousedown=e.focus.bind(e),e.renderer.scrollCursorIntoView(null,.5,{bottom:d.el.offsetHeight})},r.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/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,n){"use strict";e("./lib/fixoldbrowsers");var i=e("./lib/dom"),r=e("./lib/event"),o=e("./editor").Editor,s=e("./edit_session").EditSession,a=e("./undomanager").UndoManager,l=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,"function"==typeof define&&(t.define=define),t.edit=function(e){if("string"==typeof e){var n=e;if(!(e=document.getElementById(n)))throw new Error("ace.edit can't find div #"+n)}if(e&&e.env&&e.env.editor instanceof o)return e.env.editor;var s="";if(e&&/input|textarea/i.test(e.tagName)){var a=e;s=a.value,e=i.createElement("pre"),a.parentNode.replaceChild(e,a)}else e&&(s=i.getInnerText(e),e.innerHTML="");var c=t.createEditSession(s),u=new o(new l(e));u.setSession(c);var h={document:c,editor:u,onResize:u.resize.bind(u,null)};return a&&(h.textarea=a),r.addListener(window,"resize",h.onResize),u.on("destroy",function(){r.removeListener(window,"resize",h.onResize),h.editor.container.env=null}),u.container.env=u.env=h,u},t.createEditSession=function(e,t){var n=new s(e,t);return n.setUndoManager(new a),n},t.EditSession=s,t.UndoManager=a,t.version="1.2.9"}),ace.require(["ace/ace"],function(e){e&&(e.config.init(!0),e.define=ace.define),window.ace||(window.ace=e);for(var t in e)e.hasOwnProperty(t)&&(window.ace[t]=e[t])}),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.define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var i=e("../lib/oop"),r=(e("../lib/lang"),e("./text_highlight_rules").TextHighlightRules),o=t.supportType="align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|border|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|bottom|box-shadow|box-sizing|caption-side|clear|clip|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|min-height|min-width|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|vertical-align|visibility|white-space|width|word-break|word-spacing|word-wrap|z-index",s=t.supportFunction="rgb|rgba|url|attr|counter|counters",a=t.supportConstant="absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero",l=t.supportConstantColor="aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen",c=t.supportConstantFonts="arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace",u=t.numRe="\\-?(?:(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+))",h=t.pseudoElements="(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b",d=t.pseudoClasses="(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b",p=function(){var e=this.createKeywordMapper({"support.function":s,"support.constant":a,"support.type":o,"support.constant.color":l,"support.constant.fonts":c},"text",!0);this.$rules={start:[{include:["strings","url","comments"]},{token:"paren.lparen",regex:"\\{",next:"ruleset"},{token:"paren.rparen",regex:"\\}"},{token:"string",regex:"@",next:"media"},{token:"keyword",regex:"#[a-z0-9-_]+"},{token:"keyword",regex:"%"},{token:"variable",regex:"\\.[a-z0-9-_]+"},{token:"string",regex:":[a-z0-9-_]+"},{token:"constant.numeric",regex:u},{token:"constant",regex:"[a-z0-9-_]+"},{caseInsensitive:!0}],media:[{include:["strings","url","comments"]},{token:"paren.lparen",regex:"\\{",next:"start"},{token:"paren.rparen",regex:"\\}",next:"start"},{token:"string",regex:";",next:"start"},{token:"keyword",regex:"(?:media|supports|document|charset|import|namespace|media|supports|document|page|font|keyframes|viewport|counter-style|font-feature-values|swash|ornaments|annotation|stylistic|styleset|character-variant)"}],comments:[{token:"comment",regex:"\\/\\*",push:[{token:"comment",regex:"\\*\\/",next:"pop"},{defaultToken:"comment"}]}],ruleset:[{regex:"-(webkit|ms|moz|o)-",token:"text"},{token:"paren.rparen",regex:"\\}",next:"start"},{include:["strings","url","comments"]},{token:["constant.numeric","keyword"],regex:"("+u+")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)"},{token:"constant.numeric",regex:u},{token:"constant.numeric",regex:"#[a-f0-9]{6}"},{token:"constant.numeric",regex:"#[a-f0-9]{3}"},{token:["punctuation","entity.other.attribute-name.pseudo-element.css"],regex:h},{token:["punctuation","entity.other.attribute-name.pseudo-class.css"],regex:d},{include:"url"},{token:e,regex:"\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"},{caseInsensitive:!0}],url:[{token:"support.function",regex:"(?:url(:?-prefix)?|domain|regexp)\\(",push:[{token:"support.function",regex:"\\)",next:"pop"},{defaultToken:"string"}]}],strings:[{token:"string.start",regex:"'",push:[{token:"string.end",regex:"'|$",next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]},{token:"string.start",regex:'"',push:[{token:"string.end",regex:'"|$',next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]}],escapes:[{token:"constant.language.escape",regex:/\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/}]},this.normalizeRules()};i.inherits(p,r),t.CssHighlightRules=p}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var i=e("../range").Range,r=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 r=n[1].length,o=e.findMatchingBracket({row:t,column:r});if(!o||o.row==t)return 0;var s=this.$getIndent(e.getLine(o.row));e.replace(new i(t,0,t,r-1),s)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(r.prototype),t.MatchingBraceOutdent=r}),ace.define("ace/mode/css_completions",["require","exports","module"],function(e,t,n){"use strict";var i={background:{"#$0":1},"background-color":{"#$0":1,transparent:1,fixed:1},"background-image":{"url('/$0')":1},"background-repeat":{repeat:1,"repeat-x":1,"repeat-y":1,"no-repeat":1,inherit:1},"background-position":{bottom:2,center:2,left:2,right:2,top:2,inherit:2},"background-attachment":{scroll:1,fixed:1},"background-size":{cover:1,contain:1},"background-clip":{"border-box":1,"padding-box":1,"content-box":1},"background-origin":{"border-box":1,"padding-box":1,"content-box":1},border:{"solid $0":1,"dashed $0":1,"dotted $0":1,"#$0":1},"border-color":{"#$0":1},"border-style":{solid:2,dashed:2,dotted:2,double:2,groove:2,hidden:2,inherit:2,inset:2,none:2,outset:2,ridged:2},"border-collapse":{collapse:1,separate:1},bottom:{px:1,em:1,"%":1},clear:{left:1,right:1,both:1,none:1},color:{"#$0":1,"rgb(#$00,0,0)":1},cursor:{default:1,pointer:1,move:1,text:1,wait:1,help:1,progress:1,"n-resize":1,"ne-resize":1,"e-resize":1,"se-resize":1,"s-resize":1,"sw-resize":1,"w-resize":1,"nw-resize":1},display:{none:1,block:1,inline:1,"inline-block":1,"table-cell":1},"empty-cells":{show:1,hide:1},float:{left:1,right:1,none:1},"font-family":{Arial:2,"Comic Sans MS":2,Consolas:2,"Courier New":2,Courier:2,Georgia:2,Monospace:2,"Sans-Serif":2,"Segoe UI":2,Tahoma:2,"Times New Roman":2,"Trebuchet MS":2,Verdana:1},"font-size":{px:1,em:1,"%":1},"font-weight":{bold:1,normal:1},"font-style":{italic:1,normal:1},"font-variant":{normal:1,"small-caps":1},height:{px:1,em:1,"%":1},left:{px:1,em:1,"%":1},"letter-spacing":{normal:1},"line-height":{normal:1},"list-style-type":{none:1,disc:1,circle:1,square:1,decimal:1,"decimal-leading-zero":1,"lower-roman":1,"upper-roman":1,"lower-greek":1,"lower-latin":1,"upper-latin":1,georgian:1,"lower-alpha":1,"upper-alpha":1},margin:{px:1,em:1,"%":1},"margin-right":{px:1,em:1,"%":1},"margin-left":{px:1,em:1,"%":1},"margin-top":{px:1,em:1,"%":1},"margin-bottom":{px:1,em:1,"%":1},"max-height":{px:1,em:1,"%":1},"max-width":{px:1,em:1,"%":1},"min-height":{px:1,em:1,"%":1},"min-width":{px:1,em:1,"%":1},overflow:{hidden:1,visible:1,auto:1,scroll:1},"overflow-x":{hidden:1,visible:1,auto:1,scroll:1},"overflow-y":{hidden:1,visible:1,auto:1,scroll:1},padding:{px:1,em:1,"%":1},"padding-top":{px:1,em:1,"%":1},"padding-right":{px:1,em:1,"%":1},"padding-bottom":{px:1,em:1,"%":1},"padding-left":{px:1,em:1,"%":1},"page-break-after":{auto:1,always:1,avoid:1,left:1,right:1},"page-break-before":{auto:1,always:1,avoid:1,left:1,right:1},position:{absolute:1,relative:1,fixed:1,static:1},right:{px:1,em:1,"%":1},"table-layout":{fixed:1,auto:1},"text-decoration":{none:1,underline:1,"line-through":1,blink:1},"text-align":{left:1,right:1,center:1,justify:1},"text-transform":{capitalize:1,uppercase:1,lowercase:1,none:1},top:{px:1,em:1,"%":1},"vertical-align":{top:1,bottom:1},visibility:{hidden:1,visible:1},"white-space":{nowrap:1,normal:1,pre:1,"pre-line":1,"pre-wrap":1},width:{px:1,em:1,"%":1},"word-spacing":{normal:1},filter:{"alpha(opacity=$0100)":1},"text-shadow":{"$02px 2px 2px #777":1},"text-overflow":{"ellipsis-word":1,clip:1,ellipsis:1},"-moz-border-radius":1,"-moz-border-radius-topright":1,"-moz-border-radius-bottomright":1,"-moz-border-radius-topleft":1,"-moz-border-radius-bottomleft":1,"-webkit-border-radius":1,"-webkit-border-top-right-radius":1,"-webkit-border-top-left-radius":1,"-webkit-border-bottom-right-radius":1,"-webkit-border-bottom-left-radius":1,"-moz-box-shadow":1,"-webkit-box-shadow":1,transform:{"rotate($00deg)":1,"skew($00deg)":1},"-moz-transform":{"rotate($00deg)":1,"skew($00deg)":1},"-webkit-transform":{"rotate($00deg)":1,"skew($00deg)":1}},r=function(){};(function(){this.completionsDefined=!1,this.defineCompletions=function(){if(document){var e=document.createElement("c").style;for(var t in e)if("string"==typeof e[t]){var n=t.replace(/[A-Z]/g,function(e){return"-"+e.toLowerCase()});i.hasOwnProperty(n)||(i[n]=1)}}this.completionsDefined=!0},this.getCompletions=function(e,t,n,i){this.completionsDefined||this.defineCompletions();if(!t.getTokenAt(n.row,n.column))return[];if("ruleset"===e){var r=t.getLine(n.row).substr(0,n.column);return/:[^;]+$/.test(r)?(/([\w\-]+):[^:]*$/.test(r),this.getPropertyValueCompletions(e,t,n,i)):this.getPropertyCompletions(e,t,n,i)}return[]},this.getPropertyCompletions=function(e,t,n,r){return Object.keys(i).map(function(e){return{caption:e,snippet:e+": $0;",meta:"property",score:Number.MAX_VALUE}})},this.getPropertyValueCompletions=function(e,t,n,r){var o=t.getLine(n.row).substr(0,n.column),s=(/([\w\-]+):[^:]*$/.exec(o)||{})[1];if(!s)return[];var a=[];return s in i&&"object"==typeof i[s]&&(a=Object.keys(i[s])),a.map(function(e){return{caption:e,snippet:e,meta:"property value",score:Number.MAX_VALUE}})}}).call(r.prototype),t.CssCompletions=r}),ace.define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"],function(e,t,n){"use strict";var i=e("../../lib/oop"),r=(e("../behaviour").Behaviour,e("./cstyle").CstyleBehaviour),o=e("../../token_iterator").TokenIterator,s=function(){this.inherit(r),this.add("colon","insertion",function(e,t,n,i,r){if(":"===r){var s=n.getCursorPosition(),a=new o(i,s.row,s.column),l=a.getCurrentToken();if(l&&l.value.match(/\s+/)&&(l=a.stepBackward()),l&&"support.type"===l.type){var c=i.doc.getLine(s.row);if(":"===c.substring(s.column,s.column+1))return{text:"",selection:[1,1]};if(!c.substring(s.column).match(/^\s*;/))return{text:":;",selection:[1,1]}}}}),this.add("colon","deletion",function(e,t,n,i,r){var s=i.doc.getTextRange(r);if(!r.isMultiLine()&&":"===s){var a=n.getCursorPosition(),l=new o(i,a.row,a.column),c=l.getCurrentToken();if(c&&c.value.match(/\s+/)&&(c=l.stepBackward()),c&&"support.type"===c.type){if(";"===i.doc.getLine(r.start.row).substring(r.end.column,r.end.column+1))return r.end.column++,r}}}),this.add("semicolon","insertion",function(e,t,n,i,r){if(";"===r){var o=n.getCursorPosition();if(";"===i.doc.getLine(o.row).substring(o.column,o.column+1))return{text:"",selection:[1,1]}}})};i.inherits(s,r),t.CssBehaviour=s}),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 i=e("../../lib/oop"),r=e("../../range").Range,o=e("./fold_mode").FoldMode,s=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)))};i.inherits(s,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 i=e.getLine(n);if(this.singleLineBlockCommentRe.test(i)&&!this.startRegionRe.test(i)&&!this.tripleStarBlockCommentRe.test(i))return"";var r=this._getFoldWidgetBase(e,t,n);return!r&&this.startRegionRe.test(i)?"start":r},this.getFoldWidgetRange=function(e,t,n,i){var r=e.getLine(n);if(this.startRegionRe.test(r))return this.getCommentRegionBlock(e,r,n);if(a=r.match(this.foldingStartMarker)){var o=a.index;if(a[1])return this.openingBracketBlock(e,a[1],n,o);var s=e.getCommentFoldRange(n,o+a[0].length,1);return s&&!s.isMultiLine()&&(i?s=this.getSectionRange(e,n):"all"!=t&&(s=null)),s}if("markbegin"!==t){var a;if(a=r.match(this.foldingStopMarker)){o=a.index+a[0].length;return a[1]?this.closingBracketBlock(e,a[1],n,o):e.getCommentFoldRange(n,o,-1)}}},this.getSectionRange=function(e,t){for(var n=e.getLine(t),i=n.search(/\S/),o=t,s=n.length,a=t+=1,l=e.getLength();++t<l;){var c=(n=e.getLine(t)).search(/\S/);if(-1!==c){if(i>c)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(i==c)break}a=t}}return new r(o,s,a,e.getLine(a).length)},this.getCommentRegionBlock=function(e,t,n){for(var i=t.search(/\s*$/),o=e.getLength(),s=n,a=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,l=1;++n<o;){t=e.getLine(n);var c=a.exec(t);if(c&&(c[1]?l--:l++,!l))break}if(n>s)return new r(s,i,n,t.length)}}.call(s.prototype)}),ace.define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/css_completions","ace/mode/behaviour/css","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var i=e("../lib/oop"),r=e("./text").Mode,o=e("./css_highlight_rules").CssHighlightRules,s=e("./matching_brace_outdent").MatchingBraceOutdent,a=e("../worker/worker_client").WorkerClient,l=e("./css_completions").CssCompletions,c=e("./behaviour/css").CssBehaviour,u=e("./folding/cstyle").FoldMode,h=function(){this.HighlightRules=o,this.$outdent=new s,this.$behaviour=new c,this.$completer=new l,this.foldingRules=new u};i.inherits(h,r),function(){this.foldingRules="cStyle",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var i=this.$getIndent(t),r=this.getTokenizer().getLineTokens(t,e).tokens;if(r.length&&"comment"==r[r.length-1].type)return i;return t.match(/^.*\{\s*$/)&&(i+=n),i},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.getCompletions=function(e,t,n,i){return this.$completer.getCompletions(e,t,n,i)},this.createWorker=function(e){var t=new a(["ace"],"ace/mode/css_worker","Worker");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/css"}.call(h.prototype),t.Mode=h}),ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var i=e("../lib/oop"),r=e("./text_highlight_rules").TextHighlightRules,o=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@[\\w\\d_]+"},o.getTagRule(),{defaultToken:"comment.doc",caseInsensitive:!0}]}};i.inherits(o,r),o.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},o.getStartRule=function(e){return{token:"comment.doc",regex:"\\/\\*(?=\\*)",next:e}},o.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.DocCommentHighlightRules=o}),ace.define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";function i(e){return[{token:"comment",regex:/\/\*/,next:[o.getTagRule(),{token:"comment",regex:"\\*\\/",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]},{token:"comment",regex:"\\/\\/",next:[o.getTagRule(),{token:"comment",regex:"$|^",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]}]}var r=e("../lib/oop"),o=e("./doc_comment_highlight_rules").DocCommentHighlightRules,s=e("./text_highlight_rules").TextHighlightRules,a="[a-zA-Z\\$_¡-][a-zA-Z\\d\\$_¡-]*",l=function(e){var t=this.createKeywordMapper({"variable.language":"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document",keyword:"const|yield|import|get|set|async|await|break|case|catch|continue|default|delete|do|else|finally|for|function|if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|__parent__|__count__|escape|unescape|with|__proto__|class|enum|extends|super|export|implements|private|public|interface|package|protected|static","storage.type":"const|let|var|function","constant.language":"null|Infinity|NaN|undefined","support.function":"alert","constant.language.boolean":"true|false"},"identifier"),n="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|u{[0-9a-fA-F]{1,6}}|[0-2][0-7]{0,2}|3[0-7][0-7]?|[4-7][0-7]?|.)";this.$rules={no_regex:[o.getStartRule("doc-start"),i("no_regex"),{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",regex:/(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/},{token:["storage.type","punctuation.operator","support.function","punctuation.operator","entity.name.function","text","keyword.operator"],regex:"("+a+")(\\.)(prototype)(\\.)("+a+")(\\s*)(=)",next:"function_arguments"},{token:["storage.type","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","paren.lparen"],regex:"("+a+")(\\.)("+a+")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","keyword.operator","text","storage.type","text","paren.lparen"],regex:"("+a+")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{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:["storage.type","text","entity.name.function","text","paren.lparen"],regex:"(function)(\\s+)("+a+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","paren.lparen"],regex:"("+a+")(\\s*)(:)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:"keyword",regex:"from(?=\\s*('|\"))"},{token:"keyword",regex:"(?:case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void)\\b",next:"start"},{token:["support.constant"],regex:/that\b/},{token:["storage.type","punctuation.operator","support.function.firebug"],regex:/(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/},{token:t,regex:a},{token:"punctuation.operator",regex:/[.](?![.])/,next:"property"},{token:"storage.type",regex:/=>/},{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:[o.getStartRule("doc-start"),i("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||function(){var e=a.replace("\\d","\\d\\-"),t={onMatch:function(e,t,n){var i="/"==e.charAt(1)?2:1;return 1==i?(t!=this.nextState?n.unshift(this.next,this.nextState,0):n.unshift(this.next),n[2]++):2==i&&t==this.nextState&&(n[1]--,(!n[1]||n[1]<0)&&(n.shift(),n.shift())),[{type:"meta.tag.punctuation."+(1==i?"":"end-")+"tag-open.xml",value:e.slice(0,i)},{type:"meta.tag.tag-name.xml",value:e.substr(i)}]},regex:"</?"+e,next:"jsxAttributes",nextState:"jsx"};this.$rules.start.unshift(t);var n={regex:"{",token:"paren.quasi.start",push:"start"};this.$rules.jsx=[n,t,{include:"reference"},{defaultToken:"string"}],this.$rules.jsxAttributes=[{token:"meta.tag.punctuation.tag-close.xml",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,i("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_:\\.-]+;)"}]}.call(this)),this.embedRules(o,"doc-",[o.getEndRule("no_regex")]),this.normalizeRules()};r.inherits(l,s),t.JavaScriptHighlightRules=l}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var i=e("../range").Range,r=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 r=n[1].length,o=e.findMatchingBracket({row:t,column:r});if(!o||o.row==t)return 0;var s=this.$getIndent(e.getLine(o.row));e.replace(new i(t,0,t,r-1),s)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(r.prototype),t.MatchingBraceOutdent=r}),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 i=e("../../lib/oop"),r=e("../../range").Range,o=e("./fold_mode").FoldMode,s=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)))};i.inherits(s,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 i=e.getLine(n);if(this.singleLineBlockCommentRe.test(i)&&!this.startRegionRe.test(i)&&!this.tripleStarBlockCommentRe.test(i))return"";var r=this._getFoldWidgetBase(e,t,n);return!r&&this.startRegionRe.test(i)?"start":r},this.getFoldWidgetRange=function(e,t,n,i){var r=e.getLine(n);if(this.startRegionRe.test(r))return this.getCommentRegionBlock(e,r,n);if(a=r.match(this.foldingStartMarker)){var o=a.index;if(a[1])return this.openingBracketBlock(e,a[1],n,o);var s=e.getCommentFoldRange(n,o+a[0].length,1);return s&&!s.isMultiLine()&&(i?s=this.getSectionRange(e,n):"all"!=t&&(s=null)),s}if("markbegin"!==t){var a;if(a=r.match(this.foldingStopMarker)){o=a.index+a[0].length;return a[1]?this.closingBracketBlock(e,a[1],n,o):e.getCommentFoldRange(n,o,-1)}}},this.getSectionRange=function(e,t){for(var n=e.getLine(t),i=n.search(/\S/),o=t,s=n.length,a=t+=1,l=e.getLength();++t<l;){var c=(n=e.getLine(t)).search(/\S/);if(-1!==c){if(i>c)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(i==c)break}a=t}}return new r(o,s,a,e.getLine(a).length)},this.getCommentRegionBlock=function(e,t,n){for(var i=t.search(/\s*$/),o=e.getLength(),s=n,a=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,l=1;++n<o;){t=e.getLine(n);var c=a.exec(t);if(c&&(c[1]?l--:l++,!l))break}if(n>s)return new r(s,i,n,t.length)}}.call(s.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 i=e("../lib/oop"),r=e("./text").Mode,o=e("./javascript_highlight_rules").JavaScriptHighlightRules,s=e("./matching_brace_outdent").MatchingBraceOutdent,a=e("../worker/worker_client").WorkerClient,l=e("./behaviour/cstyle").CstyleBehaviour,c=e("./folding/cstyle").FoldMode,u=function(){this.HighlightRules=o,this.$outdent=new s,this.$behaviour=new l,this.foldingRules=new c};i.inherits(u,r),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$quotes={'"':'"',"'":"'","`":"`"},this.getNextLineIndent=function(e,t,n){var i=this.$getIndent(t),r=this.getTokenizer().getLineTokens(t,e),o=r.tokens,s=r.state;if(o.length&&"comment"==o[o.length-1].type)return i;if("start"==e||"no_regex"==e){(a=t.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/))&&(i+=n)}else if("doc-start"==e){if("start"==s||"no_regex"==s)return"";var a;(a=t.match(/^\s*(\/?)\*/))&&(a[1]&&(i+=" "),i+="* ")}return i},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 a(["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"}.call(u.prototype),t.Mode=u}),function(e){"use strict";function t(e,t){return t=t||Error,function(){var n,i=arguments[0];for(n="["+(e?e+":":"")+i+"] http://errors.angularjs.org/1.6.1/"+(e?e+"/":"")+i,i=1;i<arguments.length;i++){n=n+(1==i?"?":"&")+"p"+(i-1)+"=";var r;n+=encodeURIComponent(r="function"==typeof(r=arguments[i])?r.toString().replace(/ \{[\s\S]*$/,""):void 0===r?"undefined":"string"!=typeof r?JSON.stringify(r):r)}return new t(n)}}function n(e){if(null==e||x(e))return!1;if(Xn(e)||b(e)||Tn&&e instanceof Tn)return!0;var t="length"in Object(e)&&e.length;return y(t)&&(0<=t&&(t-1 in e||e instanceof Array)||"function"==typeof e.item)}function i(e,t,r){var o,s;if(e)if($(e))for(o in e)"prototype"!==o&&"length"!==o&&"name"!==o&&e.hasOwnProperty(o)&&t.call(r,e[o],o,e);else if(Xn(e)||n(e)){var a="object"!=typeof e;for(o=0,s=e.length;o<s;o++)(a||o in e)&&t.call(r,e[o],o,e)}else if(e.forEach&&e.forEach!==i)e.forEach(t,r,e);else if(w(e))for(o in e)t.call(r,e[o],o,e);else if("function"==typeof e.hasOwnProperty)for(o in e)e.hasOwnProperty(o)&&t.call(r,e[o],o,e);else for(o in e)Vn.call(e,o)&&t.call(r,e[o],o,e);return e}function r(e,t,n){for(var i=Object.keys(e).sort(),r=0;r<i.length;r++)t.call(n,e[i[r]],i[r]);return i}function o(e){return function(t,n){e(n,t)}}function s(e,t,n){for(var i=e.$$hashKey,r=0,o=t.length;r<o;++r){var a=t[r];if(v(a)||$(a))for(var l=Object.keys(a),c=0,u=l.length;c<u;c++){var h=l[c],d=a[h];n&&v(d)?A(d)?e[h]=new Date(d.valueOf()):C(d)?e[h]=new RegExp(d):d.nodeName?e[h]=d.cloneNode(!0):F(d)?e[h]=d.clone():(v(e[h])||(e[h]=Xn(d)?[]:{}),s(e[h],[d],!0)):e[h]=d}}return i?e.$$hashKey=i:delete e.$$hashKey,e}function a(e){return s(e,Nn.call(arguments,1),!1)}function l(e){return s(e,Nn.call(arguments,1),!0)}function c(e){return parseInt(e,10)}function u(e,t){return a(Object.create(e),t)}function h(){}function d(e){return e}function p(e){return function(){return e}}function f(e){return $(e.toString)&&e.toString!==Un}function g(e){return void 0===e}function m(e){return void 0!==e}function v(e){return null!==e&&"object"==typeof e}function w(e){return null!==e&&"object"==typeof e&&!qn(e)}function b(e){return"string"==typeof e}function y(e){return"number"==typeof e}function A(e){return"[object Date]"===Un.call(e)}function $(e){return"function"==typeof e}function C(e){return"[object RegExp]"===Un.call(e)}function x(e){return e&&e.window===e}function k(e){return e&&e.$evalAsync&&e.$watch}function E(e){return"boolean"==typeof e}function F(e){return!(!e||!(e.nodeName||e.prop&&e.attr&&e.find))}function S(e){return Pn(e.nodeName||e[0]&&e[0].nodeName)}function B(e,t){var n=e.indexOf(t);return 0<=n&&e.splice(n,1),n}function D(e,t){function n(e,t){var n,i=t.$$hashKey;if(Xn(e)){n=0;for(var o=e.length;n<o;n++)t.push(r(e[n]))}else if(w(e))for(n in e)t[n]=r(e[n]);else if(e&&"function"==typeof e.hasOwnProperty)for(n in e)e.hasOwnProperty(n)&&(t[n]=r(e[n]));else for(n in e)Vn.call(e,n)&&(t[n]=r(e[n]));return i?t.$$hashKey=i:delete t.$$hashKey,t}function r(e){if(!v(e))return e;if(-1!==(t=o.indexOf(e)))return s[t];if(x(e)||k(e))throw jn("cpws");var t=!1,i=function(e){switch(Un.call(e)){case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Float32Array]":case"[object Float64Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return new e.constructor(r(e.buffer),e.byteOffset,e.length);case"[object ArrayBuffer]":if(!e.slice){var t=new ArrayBuffer(e.byteLength);return new Uint8Array(t).set(new Uint8Array(e)),t}return e.slice(0);case"[object Boolean]":case"[object Number]":case"[object String]":case"[object Date]":return new e.constructor(e.valueOf());case"[object RegExp]":return t=new RegExp(e.source,e.toString().match(/[^/]*$/)[0]),t.lastIndex=e.lastIndex,t;case"[object Blob]":return new e.constructor([e],{type:e.type})}if($(e.cloneNode))return e.cloneNode(!0)}(e);return void 0===i&&(i=Xn(e)?[]:Object.create(qn(e)),t=!0),o.push(e),s.push(i),t?n(e,i):i}var o=[],s=[];if(t){if(function(e){return e&&y(e.length)&&Jn.test(Un.call(e))}(t)||"[object ArrayBuffer]"===Un.call(t))throw jn("cpta");if(e===t)throw jn("cpi");return Xn(t)?t.length=0:i(t,function(e,n){"$$hashKey"!==n&&delete t[n]}),o.push(e),s.push(t),n(e,t)}return r(e)}function L(e,t){if(e===t)return!0;if(null===e||null===t)return!1;if(e!=e&&t!=t)return!0;var n,i=typeof e;if(i===typeof t&&"object"===i){if(!Xn(e)){if(A(e))return!!A(t)&&L(e.getTime(),t.getTime());if(C(e))return!!C(t)&&e.toString()===t.toString();if(k(e)||k(t)||x(e)||x(t)||Xn(t)||A(t)||C(t))return!1;i=te();for(n in e)if("$"!==n.charAt(0)&&!$(e[n])){if(!L(e[n],t[n]))return!1;i[n]=!0}for(n in t)if(!(n in i)&&"$"!==n.charAt(0)&&m(t[n])&&!$(t[n]))return!1;return!0}if(!Xn(t))return!1;if((i=e.length)===t.length){for(n=0;n<i;n++)if(!L(e[n],t[n]))return!1;return!0}}return!1}function M(e,t,n){return e.concat(Nn.call(t,n))}function R(e,t){var n=2<arguments.length?Nn.call(arguments,2):[];return!$(t)||t instanceof RegExp?t:n.length?function(){return arguments.length?t.apply(e,M(n,arguments,0)):t.apply(e,n)}:function(){return arguments.length?t.apply(e,arguments):t.call(e)}}function T(t,n){var i=n;return"string"==typeof t&&"$"===t.charAt(0)&&"$"===t.charAt(1)?i=void 0:x(n)?i="$WINDOW":n&&e.document===n?i="$DOCUMENT":k(n)&&(i="$SCOPE"),i}function _(e,t){if(!g(e))return y(t)||(t=t?2:null),JSON.stringify(e,T,t)}function O(e){return b(e)?JSON.parse(e):e}function I(e,t){e=e.replace(ni,"");var n=Date.parse("Jan 01, 1970 00:00:00 "+e)/6e4;return Yn(n)?t:n}function V(e,t,n){n=n?-1:1;var i=e.getTimezoneOffset();return t=I(t,i),n*=t-i,(e=new Date(e.getTime())).setMinutes(e.getMinutes()+n),e}function P(e){e=Tn(e).clone();try{e.empty()}catch(e){}var t=Tn("<div>").append(e).html();try{return e[0].nodeType===ai?Pn(t):t.match(/^(<[^>]+>)/)[1].replace(/^<([\w-]+)/,function(e,t){return"<"+Pn(t)})}catch(e){return Pn(t)}}function W(e){try{return decodeURIComponent(e)}catch(e){}}function N(e){var t={};return i((e||"").split("&"),function(e){var n,i,r;e&&(i=e=e.replace(/\+/g,"%20"),-1!==(n=e.indexOf("="))&&(i=e.substring(0,n),r=e.substring(n+1)),i=W(i),m(i)&&(r=!m(r)||W(r),Vn.call(t,i)?Xn(t[i])?t[i].push(r):t[i]=[t[i],r]:t[i]=r))}),t}function H(e){var t=[];return i(e,function(e,n){Xn(e)?i(e,function(e){t.push(U(n,!0)+(!0===e?"":"="+U(e,!0)))}):t.push(U(n,!0)+(!0===e?"":"="+U(e,!0)))}),t.length?t.join("&"):""}function z(e){return U(e,!0).replace(/%26/gi,"&").replace(/%3D/gi,"=").replace(/%2B/gi,"+")}function U(e,t){return encodeURIComponent(e).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%3B/gi,";").replace(/%20/g,t?"%20":"+")}function q(t,n){var r,o,s={};i(ii,function(e){e+="app",!r&&t.hasAttribute&&t.hasAttribute(e)&&(r=t,o=t.getAttribute(e))}),i(ii,function(e){e+="app";var n;!r&&(n=t.querySelector("["+e.replace(":","\\:")+"]"))&&(r=n,o=n.getAttribute(e))}),r&&(ri?(s.strictDi=null!==function(e,t){var n,i,r=ii.length;for(i=0;i<r;++i)if(n=ii[i]+t,b(n=e.getAttribute(n)))return n;return null}(r,"strict-di"),n(r,o?[o]:[],s)):e.console.error("Angular: disabling automatic bootstrap. <script> protocol indicates an extension, document.location.href does not match."))}function j(t,n,r){v(r)||(r={}),r=a({strictDi:!1},r);var o=function(){if((t=Tn(t)).injector()){var i=t[0]===e.document?"document":P(t);throw jn("btstrpd",i.replace(/</,"&lt;").replace(/>/,"&gt;"))}return(n=n||[]).unshift(["$provide",function(e){e.value("$rootElement",t)}]),r.debugInfoEnabled&&n.push(["$compileProvider",function(e){e.debugInfoEnabled(!0)}]),n.unshift("ng"),(i=Le(n,r.strictDi)).invoke(["$rootScope","$rootElement","$compile","$injector",function(e,t,n,i){e.$apply(function(){t.data("$injector",i),n(t)(e)})}]),i},s=/^NG_ENABLE_DEBUG_INFO!/,l=/^NG_DEFER_BOOTSTRAP!/;if(e&&s.test(e.name)&&(r.debugInfoEnabled=!0,e.name=e.name.replace(s,"")),e&&!l.test(e.name))return o();e.name=e.name.replace(l,""),Kn.resumeBootstrap=function(e){return i(e,function(e){n.push(e)}),o()},$(Kn.resumeDeferredBootstrap)&&Kn.resumeDeferredBootstrap()}function K(){e.name="NG_ENABLE_DEBUG_INFO!"+e.name,e.location.reload()}function G(e){if(!(e=Kn.element(e).injector()))throw jn("test");return e.get("$$testability")}function Y(e,t){return t=t||"_",e.replace(oi,function(e,n){return(n?t:"")+e.toLowerCase()})}function X(e,t,n){if(!e)throw jn("areq",t||"?",n||"required");return e}function J(e,t,n){return n&&Xn(e)&&(e=e[e.length-1]),X($(e),t,"not a function, got "+(e&&"object"==typeof e?e.constructor.name||"Object":typeof e)),e}function Z(e,t){if("hasOwnProperty"===e)throw jn("badname",t)}function Q(e,t,n){if(!t)return e;for(var i,r=e,o=(t=t.split(".")).length,s=0;s<o;s++)i=t[s],e&&(e=(r=e)[i]);return!n&&$(e)?R(r,e):e}function ee(e){for(var t,n=e[0],i=e[e.length-1],r=1;n!==i&&(n=n.nextSibling);r++)(t||e[r]!==n)&&(t||(t=Tn(Nn.call(e,0,r))),t.push(n));return t||e}function te(){return Object.create(null)}function ne(e){if(null==e)return"";switch(typeof e){case"string":break;case"number":e=""+e;break;default:e=!f(e)||Xn(e)||A(e)?_(e):e.toString()}return e}function ie(e,t){if(Xn(e)){t=t||[];for(var n=0,i=e.length;n<i;n++)t[n]=e[n]}else if(v(e))for(n in t=t||{},e)"$"===n.charAt(0)&&"$"===n.charAt(1)||(t[n]=e[n]);return t||e}function re(e){var t=[];return JSON.stringify(e,function(e,n){if(n=T(e,n),v(n)){if(0<=t.indexOf(n))return"...";t.push(n)}return n})}function oe(e,t){return t.toUpperCase()}function se(e){return e.replace(hi,oe)}function ae(e){return 1===(e=e.nodeType)||!e||9===e}function le(e,t){var n,r,o=t.createDocumentFragment(),s=[];if(mi.test(e)){for(n=o.appendChild(t.createElement("div")),r=(vi.exec(e)||["",""])[1].toLowerCase(),r=bi[r]||bi._default,n.innerHTML=r[1]+e.replace(wi,"<$1></$2>")+r[2],r=r[0];r--;)n=n.lastChild;s=M(s,n.childNodes),(n=o.firstChild).textContent=""}else s.push(t.createTextNode(e));return o.textContent="",o.innerHTML="",i(s,function(e){o.appendChild(e)}),o}function ce(t){if(t instanceof ce)return t;var n;if(b(t)&&(t=Zn(t),n=!0),!(this instanceof ce)){if(n&&"<"!==t.charAt(0))throw fi("nosel");return new ce(t)}if(n){n=e.document;var i;be(this,t=(i=gi.exec(t))?[n.createElement(i[1])]:(i=le(t,n))?i.childNodes:[])}else $(t)?xe(t):be(this,t)}function ue(e){return e.cloneNode(!0)}function he(e,t){if(t||pe(e),e.querySelectorAll)for(var n=e.querySelectorAll("*"),i=0,r=n.length;i<r;i++)pe(n[i])}function de(e,t,n,r){if(m(r))throw fi("offargs");var o=(r=fe(e))&&r.events,s=r&&r.handle;if(s)if(t){var a=function(t){var i=o[t];m(n)&&B(i||[],n),m(n)&&i&&0<i.length||(e.removeEventListener(t,s),delete o[t])};i(t.split(" "),function(e){a(e),pi[e]&&a(pi[e])})}else for(t in o)"$destroy"!==t&&e.removeEventListener(t,s),delete o[t]}function pe(e,t){var n=e.ng339,i=n&&ci[n];i&&(t?delete i.data[t]:(i.handle&&(i.events.$destroy&&i.handle({},"$destroy"),de(e)),delete ci[n],e.ng339=void 0))}function fe(e,t){var n=(n=e.ng339)&&ci[n];return t&&!n&&(e.ng339=n=++ui,n=ci[n]={events:{},data:{},handle:void 0}),n}function ge(e,t,n){if(ae(e)){var i,r=m(n),o=!r&&t&&!v(t),s=!t;if(e=(e=fe(e,!o))&&e.data,r)e[se(t)]=n;else{if(s)return e;if(o)return e&&e[se(t)];for(i in t)e[se(i)]=t[i]}}}function me(e,t){return!!e.getAttribute&&-1<(" "+(e.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ").indexOf(" "+t+" ")}function ve(e,t){t&&e.setAttribute&&i(t.split(" "),function(t){e.setAttribute("class",Zn((" "+(e.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ").replace(" "+Zn(t)+" "," ")))})}function we(e,t){if(t&&e.setAttribute){var n=(" "+(e.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ");i(t.split(" "),function(e){e=Zn(e),-1===n.indexOf(" "+e+" ")&&(n+=e+" ")}),e.setAttribute("class",Zn(n))}}function be(e,t){if(t)if(t.nodeType)e[e.length++]=t;else{var n=t.length;if("number"==typeof n&&t.window!==t){if(n)for(var i=0;i<n;i++)e[e.length++]=t[i]}else e[e.length++]=t}}function ye(e,t){return Ae(e,"$"+(t||"ngController")+"Controller")}function Ae(e,t,n){for(9===e.nodeType&&(e=e.documentElement),t=Xn(t)?t:[t];e;){for(var i=0,r=t.length;i<r;i++)if(m(n=Tn.data(e,t[i])))return n;e=e.parentNode||11===e.nodeType&&e.host}}function $e(e){for(he(e,!0);e.firstChild;)e.removeChild(e.firstChild)}function Ce(e,t){t||he(e);var n=e.parentNode;n&&n.removeChild(e)}function xe(t){function n(){e.document.removeEventListener("DOMContentLoaded",n),e.removeEventListener("load",n),t()}"complete"===e.document.readyState?e.setTimeout(t):(e.document.addEventListener("DOMContentLoaded",n),e.addEventListener("load",n))}function ke(e,t){var n=$i[t.toLowerCase()];return n&&Ci[S(e)]&&n}function Ee(e,t,n){var i=t.relatedTarget;i&&(i===e||yi.call(e,i))||n.call(e,t)}function Fe(){this.$get=function(){return a(ce,{hasClass:function(e,t){return e.attr&&(e=e[0]),me(e,t)},addClass:function(e,t){return e.attr&&(e=e[0]),we(e,t)},removeClass:function(e,t){return e.attr&&(e=e[0]),ve(e,t)}})}}function Se(e,t){var n=e&&e.$$hashKey;return n?("function"==typeof n&&(n=e.$$hashKey()),n):(n=typeof e,n="function"===n||"object"===n&&null!==e?e.$$hashKey=n+":"+(t||function(){return++Gn})():n+":"+e)}function Be(e,t){if(t){var n=0;this.nextUid=function(){return++n}}i(e,this.put,this)}function De(e){return(e=(Function.prototype.toString.call(e)+" ").replace(Di,"")).match(Ei)||e.match(Fi)}function Le(e,t){function n(e){return function(t,n){if(!v(t))return e(t,n);i(t,o(e))}}function r(e,t){if(Z(e,"service"),($(t)||Xn(t))&&(t=f.instantiate(t)),!t.$get)throw Li("pget",e);return d[e+"Provider"]=t}function s(e,t,n){return r(e,{$get:!1!==n?function(e,t){return function(){var n=y.invoke(t,this);if(g(n))throw Li("undef",e);return n}}(e,t):t})}function a(e){X(g(e)||Xn(e),"modulesToLoad","not an array");var t,n=[];return i(e,function(e){function i(e){var t,n;for(t=0,n=e.length;t<n;t++){var i=e[t],r=f.get(i[0]);r[i[1]].apply(r,i[2])}}if(!h.get(e)){h.put(e,!0);try{b(e)?(t=On(e),n=n.concat(a(t.requires)).concat(t._runBlocks),i(t._invokeQueue),i(t._configBlocks)):$(e)?n.push(f.invoke(e)):Xn(e)?n.push(f.invoke(e)):J(e,"module")}catch(t){throw Xn(e)&&(e=e[e.length-1]),t.message&&t.stack&&-1===t.stack.indexOf(t.message)&&(t=t.message+"\n"+t.stack),Li("modulerr",e,t.stack||t.message||t)}}}),n}function l(e,n){function i(t,i){if(e.hasOwnProperty(t)){if(e[t]===c)throw Li("cdep",t+" <- "+u.join(" <- "));return e[t]}try{return u.unshift(t),e[t]=c,e[t]=n(t,i),e[t]}catch(n){throw e[t]===c&&delete e[t],n}finally{u.shift()}}function r(e,n,r){for(var o=[],s=0,a=(e=Le.$$annotate(e,t,r)).length;s<a;s++){var l=e[s];if("string"!=typeof l)throw Li("itkn",l);o.push(n&&n.hasOwnProperty(l)?n[l]:i(l,r))}return o}return{invoke:function(e,t,n,i){if("string"==typeof n&&(i=n,n=null),n=r(e,n,i),Xn(e)&&(e=e[e.length-1]),i=e,Rn||"function"!=typeof i)i=!1;else{var o=i.$$ngIsClass;E(o)||(o=i.$$ngIsClass=/^(?:class\b|constructor\()/.test(Function.prototype.toString.call(i)+" ")),i=o}return i?(n.unshift(null),new(Function.prototype.bind.apply(e,n))):e.apply(t,n)},instantiate:function(e,t,n){var i=Xn(e)?e[e.length-1]:e;return(e=r(e,t,n)).unshift(null),new(Function.prototype.bind.apply(i,e))},get:i,annotate:Le.$$annotate,has:function(t){return d.hasOwnProperty(t+"Provider")||e.hasOwnProperty(t)}}}t=!0===t;var c={},u=[],h=new Be([],!0),d={$provide:{provider:n(r),factory:n(s),service:n(function(e,t){return s(e,["$injector",function(e){return e.instantiate(t)}])}),value:n(function(e,t){return s(e,p(t),!1)}),constant:n(function(e,t){Z(e,"constant"),d[e]=t,m[e]=t}),decorator:function(e,t){var n=f.get(e+"Provider"),i=n.$get;n.$get=function(){var e=y.invoke(i,n);return y.invoke(t,null,{$delegate:e})}}}},f=d.$injector=l(d,function(e,t){throw Kn.isString(t)&&u.push(t),Li("unpr",u.join(" <- "))}),m={},w=l(m,function(e,t){var n=f.get(e+"Provider",t);return y.invoke(n.$get,n,void 0,e)}),y=w;d.$injectorProvider={$get:p(w)};var A=a(e);return(y=w.get("$injector")).strictDi=t,i(A,function(e){e&&y.invoke(e)}),y}function Me(){var t=!0;this.disableAutoScrolling=function(){t=!1},this.$get=["$window","$location","$rootScope",function(n,i,r){function o(e){if(e){e.scrollIntoView();var t;$(t=s.yOffset)?t=t():F(t)?(t=t[0],t="fixed"!==n.getComputedStyle(t).position?0:t.getBoundingClientRect().bottom):y(t)||(t=0),t&&(e=e.getBoundingClientRect().top,n.scrollBy(0,e-t))}else n.scrollTo(0,0)}function s(e){var t;(e=b(e)?e:y(e)?e.toString():i.hash())?(t=a.getElementById(e))?o(t):(t=function(e){var t=null;return Array.prototype.some.call(e,function(e){if("a"===S(e))return t=e,!0}),t}(a.getElementsByName(e)))?o(t):"top"===e&&o(null):o(null)}var a=n.document;return t&&r.$watch(function(){return i.hash()},function(t,n){t===n&&""===t||function(t,n){"complete"===(n=n||e).document.readyState?n.setTimeout(t):Tn(n).on("load",t)}(function(){r.$evalAsync(s)})}),s}]}function Re(e,t){return e||t?e?t?(Xn(e)&&(e=e.join(" ")),Xn(t)&&(t=t.join(" ")),e+" "+t):e:t:""}function Te(e){return v(e)?e:{}}function _e(){this.$get=["$window","$log","$sniffer","$document",function(e,t,n,r){return new function(e,t,n,r){function o(e){try{e.apply(null,Nn.call(arguments,1))}finally{if(0==--v)for(;w.length;)try{w.pop()()}catch(e){n.error(e)}}}function s(){C=null,a(),l()}function a(){L(b=g(b=x())?null:b,F)&&(b=F),F=b}function l(){A===c.url()&&y===b||(A=c.url(),y=b,i(k,function(e){e(c.url(),b)}))}var c=this,u=e.location,d=e.history,p=e.setTimeout,f=e.clearTimeout,m={};c.isMock=!1;var v=0,w=[];c.$$completeOutstandingRequest=o,c.$$incOutstandingRequestCount=function(){v++},c.notifyWhenNoOutstandingRequests=function(e){0===v?e():w.push(e)};var b,y,A=u.href,$=t.find("base"),C=null,x=r.history?function(){try{return d.state}catch(e){}}:h;a(),y=b,c.url=function(t,n,i){if(g(i)&&(i=null),u!==e.location&&(u=e.location),d!==e.history&&(d=e.history),t){var o=y===i;if(A===t&&(!r.history||o))return c;var s=A&&ut(A)===ut(t);return A=t,y=i,!r.history||s&&o?(s||(C=t),n?u.replace(t):s?(n=u,i=t.indexOf("#"),i=-1===i?"":t.substr(i),n.hash=i):u.href=t,u.href!==t&&(C=t)):(d[n?"replaceState":"pushState"](i,"",t),a(),y=b),C&&(C=t),c}return C||u.href.replace(/%27/g,"'")},c.state=function(){return b};var k=[],E=!1,F=null;c.onUrlChange=function(t){return E||(r.history&&Tn(e).on("popstate",s),Tn(e).on("hashchange",s),E=!0),k.push(t),t},c.$$applicationDestroyed=function(){Tn(e).off("hashchange popstate",s)},c.$$checkUrlChange=l,c.baseHref=function(){var e=$.attr("href");return e?e.replace(/^(https?:)?\/\/[^/]*/,""):""},c.defer=function(e,t){var n;return v++,n=p(function(){delete m[n],o(e)},t||0),m[n]=!0,n},c.defer.cancel=function(e){return!!m[e]&&(delete m[e],f(e),o(h),!0)}}(e,r,t,n)}]}function Oe(){this.$get=function(){function e(e,i){function r(e){e!==d&&(p?p===e&&(p=e.n):p=e,o(e.n,e.p),o(e,d),d=e,d.n=null)}function o(e,t){e!==t&&(e&&(e.p=t),t&&(t.n=e))}if(e in n)throw t("$cacheFactory")("iid",e);var s=0,l=a({},i,{id:e}),c=te(),u=i&&i.capacity||Number.MAX_VALUE,h=te(),d=null,p=null;return n[e]={put:function(e,t){if(!g(t)){if(u<Number.MAX_VALUE){r(h[e]||(h[e]={key:e}))}return e in c||s++,c[e]=t,s>u&&this.remove(p.key),t}},get:function(e){if(u<Number.MAX_VALUE){var t=h[e];if(!t)return;r(t)}return c[e]},remove:function(e){if(u<Number.MAX_VALUE){var t=h[e];if(!t)return;t===d&&(d=t.p),t===p&&(p=t.n),o(t.n,t.p),delete h[e]}e in c&&(delete c[e],s--)},removeAll:function(){c=te(),s=0,h=te(),d=p=null},destroy:function(){h=l=c=null,delete n[e]},info:function(){return a({},l,{size:s})}}}var n={};return e.info=function(){var e={};return i(n,function(t,n){e[n]=t.info()}),e},e.get=function(e){return n[e]},e}}function Ie(){this.$get=["$cacheFactory",function(e){return e("templates")}]}function Ve(t,n){function r(e,t,n){var r=/^\s*([@&<]|=(\*?))(\??)\s*(\w*)\s*$/,o=te();return i(e,function(e,i){if(e in A)o[i]=A[e];else{var s=e.match(r);if(!s)throw Pi("iscp",t,i,e,n?"controller bindings definition":"isolate scope definition");o[i]={mode:s[1][0],collection:"*"===s[2],optional:"?"===s[3],attrName:s[4]||i},s[4]&&(A[e]=o[i])}}),o}var s={},l=/^\s*directive:\s*([\w-]+)\s+(.*)$/,c=/(([\w-]+)(?::([^;]+))?;?)/,f=function(e){var t={};e=e.split(",");var n;for(n=0;n<e.length;n++)t[e[n]]=!0;return t}("ngSrc,ngSrcset,src,srcset"),w=/^(?:(\^\^?)?(\?)?(\^\^?)?)?/,y=/^(on[a-z]+|formaction)$/,A=te();this.directive=function e(n,r){return X(n,"name"),Z(n,"directive"),b(n)?(function(e){var t=e.charAt(0);if(!t||t!==Pn(t))throw Pi("baddir",e);if(e!==e.trim())throw Pi("baddir",e)}(n),X(r,"directiveFactory"),s.hasOwnProperty(n)||(s[n]=[],t.factory(n+"Directive",["$injector","$exceptionHandler",function(e,t){var r=[];return i(s[n],function(o,s){try{var a=e.invoke(o);$(a)?a={compile:p(a)}:!a.compile&&a.link&&(a.compile=p(a.link)),a.priority=a.priority||0,a.index=s,a.name=a.name||n,a.require=function(e){var t=e.require||e.controller&&e.name;return!Xn(t)&&v(t)&&i(t,function(e,n){var i=e.match(w);e.substring(i[0].length)||(t[n]=i[0]+n)}),t}(a);var l=a,c=a.restrict;if(c&&(!b(c)||!/[EACM]/.test(c)))throw Pi("badrestrict",c,n);l.restrict=c||"EA",a.$$moduleName=o.$$moduleName,r.push(a)}catch(e){t(e)}}),r}])),s[n].push(r)):i(n,o(e)),this},this.component=function(e,t){function n(e){function n(t){return $(t)||Xn(t)?function(n,i){return e.invoke(t,this,{$element:n,$attrs:i})}:t}var o=t.template||t.templateUrl?t.template:"",s={controller:r,controllerAs:function(e,t){if(t&&b(t))return t;if(b(e)){var n=Ui.exec(e);if(n)return n[3]}}(t.controller)||t.controllerAs||"$ctrl",template:n(o),templateUrl:n(t.templateUrl),transclude:t.transclude,scope:{},bindToController:t.bindings||{},restrict:"E",require:t.require};return i(t,function(e,t){"$"===t.charAt(0)&&(s[t]=e)}),s}var r=t.controller||function(){};return i(t,function(e,t){"$"===t.charAt(0)&&(n[t]=e,$(r)&&(r[t]=e))}),n.$inject=["$injector"],this.directive(e,n)},this.aHrefSanitizationWhitelist=function(e){return m(e)?(n.aHrefSanitizationWhitelist(e),this):n.aHrefSanitizationWhitelist()},this.imgSrcSanitizationWhitelist=function(e){return m(e)?(n.imgSrcSanitizationWhitelist(e),this):n.imgSrcSanitizationWhitelist()};var C=!0;this.debugInfoEnabled=function(e){return m(e)?(C=e,this):C};var x=!1;this.preAssignBindingsEnabled=function(e){return m(e)?(x=e,this):x};var F=10;this.onChangesTtl=function(e){return arguments.length?(F=e,this):F};var D=!0;this.commentDirectivesEnabled=function(e){return arguments.length?(D=e,this):D};var M=!0;this.cssClassDirectivesEnabled=function(e){return arguments.length?(M=e,this):M},this.$get=["$injector","$interpolate","$exceptionHandler","$templateRequest","$parse","$controller","$rootScope","$sce","$animate","$$sanitizeUri",function(t,n,o,p,A,T,_,O,I,V){function W(){try{if(!--ve)throw de=void 0,Pi("infchng",F);_.$apply(function(){for(var e=[],t=0,n=de.length;t<n;++t)try{de[t]()}catch(t){e.push(t)}if(de=void 0,e.length)throw e})}finally{ve++}}function N(e,t){if(t){var n,i,r,o=Object.keys(t);for(n=0,i=o.length;n<i;n++)r=o[n],this[r]=t[r]}else this.$attr={};this.$$element=e}function H(e,t){try{e.addClass(t)}catch(e){}}function z(e,t,n,i,r){e instanceof Tn||(e=Tn(e));var o=U(e,t,e,n,i,r);z.$$addScopeClass(e);var s=null;return function(t,n,i){if(!e)throw Pi("multilink");X(t,"scope"),r&&r.needsNewScope&&(t=t.$parent.$new());var a=(i=i||{}).parentBoundTranscludeFn,l=i.transcludeControllers;if(i=i.futureParentElement,a&&a.$$boundTransclude&&(a=a.$$boundTransclude),s||(s=(i=i&&i[0])&&"foreignobject"!==S(i)&&Un.call(i).match(/SVG/)?"svg":"html"),i="html"!==s?Tn(se(s,Tn("<div>").append(e).html())):n?Ai.clone.call(e):e,l)for(var c in l)i.data("$"+c+"Controller",l[c].instance);return z.$$addScopeInfo(i,t),n&&n(i,t),o&&o(t,i,i,a),n||(e=o=null),i}}function U(e,t,n,i,r,o){for(var s,a,l,c,u,h=[],d=Xn(e)||e instanceof Tn,p=0;p<e.length;p++)s=new N,11===Rn&&function(e,t,n){var i,r=e[t],o=r.parentNode;if(r.nodeType===ai)for(;(i=o?r.nextSibling:e[t+1])&&i.nodeType===ai;)r.nodeValue+=i.nodeValue,i.parentNode&&i.parentNode.removeChild(i),n&&i===e[t+1]&&e.splice(t+1,1)}(e,p,d),(o=(a=j(e[p],[],s,0===p?i:void 0,r)).length?Z(a,e[p],s,t,n,null,[],[],o):null)&&o.scope&&z.$$addScopeClass(s.$$element),s=o&&o.terminal||!(l=e[p].childNodes)||!l.length?null:U(l,o?(o.transcludeOnThisElement||!o.templateOnThisElement)&&o.transclude:t),(o||s)&&(h.push(p,o,s),c=!0,u=u||o),o=null;return c?function(e,n,i,r){var o,s,a,l,c,d,p;if(u)for(p=Array(n.length),l=0;l<h.length;l+=3)o=h[l],p[o]=n[o];else p=n;for(l=0,c=h.length;l<c;)s=p[h[l++]],n=h[l++],o=h[l++],n?(n.scope?(a=e.$new(),z.$$addScopeInfo(Tn(s),a)):a=e,d=n.transcludeOnThisElement?q(e,n.transclude,r):!n.templateOnThisElement&&r?r:!r&&t?q(e,t):null,n(o,a,s,i,d)):o&&o(e,s.childNodes,void 0,r)}:null}function q(e,t,n){function i(i,r,o,s,a){return i||(i=e.$new(!1,a),i.$$transcluded=!0),t(i,r,{parentBoundTranscludeFn:n,transcludeControllers:o,futureParentElement:s})}var r,o=i.$$slots=te();for(r in t.$$slots)o[r]=t.$$slots[r]?q(e,t.$$slots[r],n):null;return i}function j(e,i,r,o,a){var u,h=r.$attr;switch(e.nodeType){case 1:ne(i,We(u=S(e)),"E",o,a);for(var d,p,g,m,w=e.attributes,A=0,$=w&&w.length;A<$;A++){var C=!1,x=!1;p=(d=w[A]).name,g=d.value,d=We(p),(m=Ae.test(d))&&(p=p.replace(Ni,"").substr(8).replace(/_(.)/g,function(e,t){return t.toUpperCase()})),(d=d.match($e))&&function(e){if(s.hasOwnProperty(e))for(var n=t.get(e+"Directive"),i=0,r=n.length;i<r;i++)if((e=n[i]).multiElement)return!0;return!1}(d[1])&&(C=p,x=p.substr(0,p.length-5)+"end",p=p.substr(0,p.length-6)),h[d=We(p.toLowerCase())]=p,!m&&r.hasOwnProperty(d)||(r[d]=g,ke(e,d)&&(r[d]=!0)),function(e,t,i,r,o){var s=function(e,t){if("srcdoc"===t)return O.HTML;var n=S(e);if("src"===t||"ngSrc"===t){if(-1===["img","video","audio","source","track"].indexOf(n))return O.RESOURCE_URL}else if("xlinkHref"===t||"form"===n&&"action"===t||"link"===n&&"href"===t)return O.RESOURCE_URL}(e,r),a=f[r]||o,l=n(i,!o,s,a);if(l){if("multiple"===r&&"select"===S(e))throw Pi("selmulti",P(e));if(y.test(r))throw Pi("nodomevents");t.push({priority:100,compile:function(){return{pre:function(e,t,o){t=o.$$observers||(o.$$observers=te());var c=o[r];c!==i&&(l=c&&n(c,!0,s,a),i=c),l&&(o[r]=l(e),(t[r]||(t[r]=[])).$$inter=!0,(o.$$observers&&o.$$observers[r].$$scope||e).$watch(l,function(e,t){"class"===r&&e!==t?o.$updateClass(e,t):o.$set(r,e)}))}}}})}}(e,i,g,d,m),ne(i,d,"A",o,a,C,x)}if("input"===u&&"hidden"===e.getAttribute("type")&&e.setAttribute("autocomplete","off"),!me)break;if(h=e.className,v(h)&&(h=h.animVal),b(h)&&""!==h)for(;e=c.exec(h);)d=We(e[2]),ne(i,d,"C",o,a)&&(r[d]=Zn(e[3])),h=h.substr(e.index+e[0].length);break;case ai:!function(e,t){var i=n(t,!0);i&&e.push({priority:0,compile:function(e){var t=!!(e=e.parent()).length;return t&&z.$$addBindingClass(e),function(e,n){var r=n.parent();t||z.$$addBindingClass(r),z.$$addBindingInfo(r,i.expressions),e.$watch(i,function(e){n[0].nodeValue=e})}}})}(i,e.nodeValue);break;case 8:if(!ge)break;!function(e,t,n,i,r){try{var o=l.exec(e.nodeValue);if(o){var s=We(o[1]);ne(t,s,"M",i,r)&&(n[s]=Zn(o[2]))}}catch(e){}}(e,i,r,o,a)}return i.sort(re),i}function K(e,t,n){var i=[],r=0;if(t&&e.hasAttribute&&e.hasAttribute(t))do{if(!e)throw Pi("uterdir",t,n);1===e.nodeType&&(e.hasAttribute(t)&&r++,e.hasAttribute(n)&&r--),i.push(e),e=e.nextSibling}while(0<r);else i.push(e);return Tn(i)}function G(e,t,n){return function(i,r,o,s,a){return r=K(r[0],t,n),e(i,r,o,s,a)}}function J(e,t,n,i,r,o){var s;return e?z(t,n,i,r,o):function(){return s||(s=z(t,n,i,r,o),t=n=o=null),s.apply(this,arguments)}}function Z(e,t,n,r,s,l,c,d,f){function m(e,t,n,i){e&&(n&&(e=G(e,n,i)),e.require=b.require,e.directiveName=y,(L===b||b.$$isolateScope)&&(e=le(e,{isolateScope:!0})),c.push(e)),t&&(n&&(t=G(t,n,i)),t.require=b.require,t.directiveName=y,(L===b||b.$$isolateScope)&&(t=le(t,{isolateScope:!0})),d.push(t))}function w(e,r,s,l,u){var h,p,f,m,w,b,y,A;t===s?(l=n,A=n.$$element):(A=Tn(s),l=new N(A,n)),w=r,L?m=r.$new(!0):B&&(w=r.$parent),u&&(y=function(e,t,n,i){var r;if(k(e)||(i=n,n=t,t=e,e=void 0),V&&(r=b),n||(n=V?A.parent():A),!i)return u(e,t,r,n,F);var o=u.$$slots[i];if(o)return o(e,t,r,n,F);if(g(o))throw Pi("noslot",i,P(A))},y.$$boundTransclude=u,y.isSlotFilled=function(e){return!!u.$$slots[e]}),D&&(b=function(e,t,n,i,r,o,s){var a,l=te();for(a in i){var c=i[a],u={$scope:c===s||c.$$isolateScope?r:o,$element:e,$attrs:t,$transclude:n},h=c.controller;"@"===h&&(h=t[c.name]),u=T(h,u,!0,c.controllerAs),l[c.name]=u,e.data("$"+c.name+"Controller",u.instance)}return l}(A,l,y,D,m,r,L)),L&&(z.$$addScopeInfo(A,m,!0,!(M&&(M===L||M===L.$$originalDirective))),z.$$addScopeClass(A,!0),m.$$isolateBindings=L.$$isolateBindings,(p=he(r,l,m,m.$$isolateBindings,L)).removeWatches&&m.$on("$destroy",p.removeWatches));for(h in b){p=D[h],f=b[h];var C=p.$$bindings.bindToController;if(x){f.bindingInfo=C?he(w,l,f.instance,C,p):{};var E=f();E!==f.instance&&(f.instance=E,A.data("$"+p.name+"Controller",E),f.bindingInfo.removeWatches&&f.bindingInfo.removeWatches(),f.bindingInfo=he(w,l,f.instance,C,p))}else f.instance=f(),A.data("$"+p.name+"Controller",f.instance),f.bindingInfo=he(w,l,f.instance,C,p)}for(i(D,function(e,t){var n=e.require;e.bindToController&&!Xn(n)&&v(n)&&a(b[t].instance,Q(t,n,A,b))}),i(b,function(e){var t=e.instance;if($(t.$onChanges))try{t.$onChanges(e.bindingInfo.initialChanges)}catch(e){o(e)}if($(t.$onInit))try{t.$onInit()}catch(e){o(e)}$(t.$doCheck)&&(w.$watch(function(){t.$doCheck()}),t.$doCheck()),$(t.$onDestroy)&&w.$on("$destroy",function(){t.$onDestroy()})}),h=0,p=c.length;h<p;h++)f=c[h],ce(f,f.isolateScope?m:r,A,l,f.require&&Q(f.directiveName,f.require,A,b),y);var F=r;for(L&&(L.template||null===L.templateUrl)&&(F=m),e&&e(F,s.childNodes,void 0,u),h=d.length-1;0<=h;h--)f=d[h],ce(f,f.isolateScope?m:r,A,l,f.require&&Q(f.directiveName,f.require,A,b),y);i(b,function(e){$((e=e.instance).$postLink)&&e.$postLink()})}f=f||{};for(var b,y,A,C,E,F=-Number.MAX_VALUE,B=f.newScopeDirective,D=f.controllerDirectives,L=f.newIsolateScopeDirective,M=f.templateDirective,_=f.nonTlbTranscludeDirective,O=!1,I=!1,V=f.hasElementTranscludeDirective,W=n.$$element=Tn(t),Y=r,X=!1,ne=!1,re=0,de=e.length;re<de;re++){var pe=(b=e[re]).$$start,fe=b.$$end;if(pe&&(W=K(t,pe,fe)),A=void 0,F>b.priority)break;if((E=b.scope)&&(b.templateUrl||(v(E)?(oe("new/isolated scope",L||B,b,W),L=b):oe("new/isolated scope",L,b,W)),B=B||b),y=b.name,!X&&(b.replace&&(b.templateUrl||b.template)||b.transclude&&!b.$$tlb)){for(E=re+1;X=e[E++];)if(X.transclude&&!X.$$tlb||X.replace&&(X.templateUrl||X.template)){ne=!0;break}X=!0}if(!b.templateUrl&&b.controller&&(D=D||te(),oe("'"+y+"' controller",D[y],b,W),D[y]=b),E=b.transclude)if(O=!0,b.$$tlb||(oe("transclusion",_,b,W),_=b),"element"===E)V=!0,F=b.priority,A=W,W=n.$$element=Tn(z.$$createComment(y,n[y])),t=W[0],ae(s,Nn.call(A,0),t),A[0].$$parentNode=A[0].parentNode,Y=J(ne,A,r,F,l&&l.name,{nonTlbTranscludeDirective:_});else{var ge=te();if(v(E)){A=[];var me=te(),ve=te();i(E,function(e,t){var n="?"===e.charAt(0);e=n?e.substring(1):e,me[e]=t,ge[t]=null,ve[t]=n}),i(W.contents(),function(e){var t=me[We(S(e))];t?(ve[t]=!0,ge[t]=ge[t]||[],ge[t].push(e)):A.push(e)}),i(ve,function(e,t){if(!e)throw Pi("reqslot",t)});for(var we in ge)ge[we]&&(ge[we]=J(ne,ge[we],r))}else A=Tn(ue(t)).contents();W.empty(),(Y=J(ne,A,r,void 0,void 0,{needsNewScope:b.$$isolateScope||b.$$newScope})).$$slots=ge}if(b.template)if(I=!0,oe("template",M,b,W),M=b,E=$(b.template)?b.template(W,n):b.template,E=ye(E),b.replace){if(l=b,A=mi.test(E)?He(se(b.templateNamespace,Zn(E))):[],t=A[0],1!==A.length||1!==t.nodeType)throw Pi("tplrt",y,"");ae(s,W,t),E=j(t,[],de={$attr:{}});var be=e.splice(re+1,e.length-(re+1));(L||B)&&ee(E,L,B),e=e.concat(E).concat(be),ie(n,de),de=e.length}else W.html(E);if(b.templateUrl)I=!0,oe("template",M,b,W),M=b,b.replace&&(l=b),w=function(e,t,n,r,s,a,l,c){var d,f,g=[],m=t[0],w=e.shift(),b=u(w,{templateUrl:null,transclude:null,replace:null,$$originalDirective:w}),y=$(w.templateUrl)?w.templateUrl(t,n):w.templateUrl,A=w.templateNamespace;return t.empty(),p(y).then(function(o){var u,h;if(o=ye(o),w.replace){if(o=mi.test(o)?He(se(A,Zn(o))):[],u=o[0],1!==o.length||1!==u.nodeType)throw Pi("tplrt",w.name,y);o={$attr:{}},ae(r,t,u);var p=j(u,[],o);v(w.scope)&&ee(p,!0),e=p.concat(e),ie(n,o)}else u=m,t.html(o);for(e.unshift(b),d=Z(e,u,n,s,t,w,a,l,c),i(r,function(e,n){e===u&&(r[n]=t[0])}),f=U(t[0].childNodes,s);g.length;){o=g.shift(),h=g.shift();var $=g.shift(),C=g.shift();if(p=t[0],!o.$$destroyed){if(h!==m){var x=h.className;c.hasElementTranscludeDirective&&w.replace||(p=ue(u)),ae($,Tn(h),p),H(Tn(p),x)}h=d.transcludeOnThisElement?q(o,d.transclude,C):C,d(f,o,p,r,h)}}g=null}).catch(function(e){e instanceof Error&&o(e)}).catch(h),function(e,t,n,i,r){e=r,t.$$destroyed||(g?g.push(t,n,i,e):(d.transcludeOnThisElement&&(e=q(t,d.transclude,r)),d(f,t,n,i,e)))}}(e.splice(re,e.length-re),W,n,s,O&&Y,c,d,{controllerDirectives:D,newScopeDirective:B!==b&&B,newIsolateScopeDirective:L,templateDirective:M,nonTlbTranscludeDirective:_}),de=e.length;else if(b.compile)try{C=b.compile(W,n,Y);var Ae=b.$$originalDirective||b;$(C)?m(null,R(Ae,C),pe,fe):C&&m(R(Ae,C.pre),R(Ae,C.post),pe,fe)}catch(e){o(e,P(W))}b.terminal&&(w.terminal=!0,F=Math.max(F,b.priority))}return w.scope=B&&!0===B.scope,w.transcludeOnThisElement=O,w.templateOnThisElement=I,w.transclude=Y,f.hasElementTranscludeDirective=V,w}function Q(e,t,n,r){var o;if(b(t)){var s=t.match(w);t=t.substring(s[0].length);var a=s[1]||s[3];s="?"===s[2];if("^^"===a?n=n.parent():o=(o=r&&r[t])&&o.instance,!o){var l="$"+t+"Controller";o=a?n.inheritedData(l):n.data(l)}if(!o&&!s)throw Pi("ctreq",t,e)}else if(Xn(t))for(o=[],a=0,s=t.length;a<s;a++)o[a]=Q(e,t[a],n,r);else v(t)&&(o={},i(t,function(t,i){o[i]=Q(e,t,n,r)}));return o||null}function ee(e,t,n){for(var i=0,r=e.length;i<r;i++)e[i]=u(e[i],{$$isolateScope:t,$$newScope:n})}function ne(e,n,i,o,a,l,c){if(n===a)return null;var h=null;if(s.hasOwnProperty(n))for(var d=0,p=(a=t.get(n+"Directive")).length;d<p;d++)if(n=a[d],(g(o)||o>n.priority)&&-1!==n.restrict.indexOf(i)){if(l&&(n=u(n,{$$start:l,$$end:c})),!n.$$bindings){var f=h=n,m=n.name,w={isolateScope:null,bindToController:null};if(v(f.scope)&&(!0===f.bindToController?(w.bindToController=r(f.scope,m,!0),w.isolateScope={}):w.isolateScope=r(f.scope,m,!1)),v(f.bindToController)&&(w.bindToController=r(f.bindToController,m,!0)),w.bindToController&&!f.controller)throw Pi("noctrl",m);v((h=h.$$bindings=w).isolateScope)&&(n.$$isolateBindings=h.isolateScope)}e.push(n),h=n}return h}function ie(e,t){var n=t.$attr,r=e.$attr;i(e,function(i,r){"$"!==r.charAt(0)&&(t[r]&&t[r]!==i&&(i=i.length?i+("style"===r?";":" ")+t[r]:t[r]),e.$set(r,i,!0,n[r]))}),i(t,function(t,i){e.hasOwnProperty(i)||"$"===i.charAt(0)||(e[i]=t,"class"!==i&&"style"!==i&&(r[i]=n[i]))})}function re(e,t){var n=t.priority-e.priority;return 0!==n?n:e.name!==t.name?e.name<t.name?-1:1:e.index-t.index}function oe(e,t,n,i){function r(e){return e?" (module: "+e+")":""}if(t)throw Pi("multidir",t.name,r(t.$$moduleName),n.name,r(n.$$moduleName),e,P(i))}function se(t,n){switch(t=Pn(t||"html")){case"svg":case"math":var i=e.document.createElement("div");return i.innerHTML="<"+t+">"+n+"</"+t+">",i.childNodes[0].childNodes;default:return n}}function ae(t,n,i){var r,o,s=n[0],a=n.length,l=s.parentNode;if(t)for(r=0,o=t.length;r<o;r++)if(t[r]===s){t[r++]=i,o=r+a-1;for(var c=t.length;r<c;r++,o++)o<c?t[r]=t[o]:delete t[r];t.length-=a-1,t.context===s&&(t.context=i);break}for(l&&l.replaceChild(i,s),t=e.document.createDocumentFragment(),r=0;r<a;r++)t.appendChild(n[r]);for(Tn.hasData(s)&&(Tn.data(i,Tn.data(s)),Tn(s).off("$destroy")),Tn.cleanData(t.querySelectorAll("*")),r=1;r<a;r++)delete n[r];n[0]=i,n.length=1}function le(e,t){return a(function(){return e.apply(null,arguments)},e,t)}function ce(e,t,n,i,r,s){try{e(t,n,i,r,s)}catch(e){o(e,P(n))}}function he(e,t,r,o,s){function a(t,n,i){!$(r.$onChanges)||n===i||n!=n&&i!=i||(de||(e.$$postDigest(W),de=[]),c||(c={},de.push(l)),c[t]&&(i=c[t].previousValue),c[t]=new Pe(i,n))}function l(){r.$onChanges(c),c=void 0}var c,u=[],d={};return i(o,function(i,o){var l,c,p,f,g=i.attrName,m=i.optional;switch(i.mode){case"@":m||Vn.call(t,g)||(r[o]=t[g]=void 0),m=t.$observe(g,function(e){(b(e)||E(e))&&(a(o,e,r[o]),r[o]=e)}),t.$$observers[g].$$scope=e,b(l=t[g])?r[o]=n(l)(e):E(l)&&(r[o]=l),d[o]=new Pe(Wi,r[o]),u.push(m);break;case"=":if(!Vn.call(t,g)){if(m)break;t[g]=void 0}if(m&&!t[g])break;c=A(t[g]),f=c.literal?L:function(e,t){return e===t||e!=e&&t!=t},p=c.assign||function(){throw l=r[o]=c(e),Pi("nonassign",t[g],g,s.name)},l=r[o]=c(e),(m=function(t){return f(t,r[o])||(f(t,l)?p(e,t=r[o]):r[o]=t),l=t}).$stateful=!0,m=i.collection?e.$watchCollection(t[g],m):e.$watch(A(t[g],m),null,c.literal),u.push(m);break;case"<":if(!Vn.call(t,g)){if(m)break;t[g]=void 0}if(m&&!t[g])break;var v=(c=A(t[g])).literal,w=r[o]=c(e);d[o]=new Pe(Wi,r[o]),m=e.$watch(c,function(e,t){if(t===e){if(t===w||v&&L(t,w))return;t=w}a(o,e,t),r[o]=e},v),u.push(m);break;case"&":if((c=t.hasOwnProperty(g)?A(t[g]):h)===h&&m)break;r[o]=function(t){return c(e,t)}}}),{initialChanges:d,removeWatches:u.length&&function(){for(var e=0,t=u.length;e<t;++e)u[e]()}}}var de,pe=/^\w/,fe=e.document.createElement("div"),ge=D,me=M,ve=F;N.prototype={$normalize:We,$addClass:function(e){e&&0<e.length&&I.addClass(this.$$element,e)},$removeClass:function(e){e&&0<e.length&&I.removeClass(this.$$element,e)},$updateClass:function(e,t){var n=Ne(e,t);n&&n.length&&I.addClass(this.$$element,n),(n=Ne(t,e))&&n.length&&I.removeClass(this.$$element,n)},$set:function(e,t,n,r){var s=ke(this.$$element[0],e),a=xi[e],l=e;if(s?(this.$$element.prop(e,t),r=s):a&&(this[a]=t,l=a),this[e]=t,r?this.$attr[e]=r:(r=this.$attr[e])||(this.$attr[e]=r=Y(e,"-")),"a"===(s=S(this.$$element))&&("href"===e||"xlinkHref"===e)||"img"===s&&"src"===e)this[e]=t=V(t,"src"===e);else if("img"===s&&"srcset"===e&&m(t)){s="",a=Zn(t);for(var c=/(\s+\d+x\s*,|\s+\d+w\s*,|\s+,|,\s+)/,u=(c=/\s/.test(a)?c:/(,)/,a=a.split(c),c=Math.floor(a.length/2),0);u<c;u++){var h=2*u;s=s+V(Zn(a[h]),!0),s=s+" "+Zn(a[h+1])}a=Zn(a[2*u]).split(/\s/),s+=V(Zn(a[0]),!0),2===a.length&&(s+=" "+Zn(a[1])),this[e]=t=s}!1!==n&&(null===t||g(t)?this.$$element.removeAttr(r):pe.test(r)?this.$$element.attr(r,t):function(e,t,n){fe.innerHTML="<span "+t+">";var i=(t=fe.firstChild.attributes)[0];t.removeNamedItem(i.name),i.value=n,e.attributes.setNamedItem(i)}(this.$$element[0],r,t)),(e=this.$$observers)&&i(e[l],function(e){try{e(t)}catch(e){o(e)}})},$observe:function(e,t){var n=this,i=n.$$observers||(n.$$observers=te()),r=i[e]||(i[e]=[]);return r.push(t),_.$evalAsync(function(){r.$$inter||!n.hasOwnProperty(e)||g(n[e])||t(n[e])}),function(){B(r,t)}}};var we=n.startSymbol(),be=n.endSymbol(),ye="{{"===we&&"}}"===be?d:function(e){return e.replace(/\{\{/g,we).replace(/}}/g,be)},Ae=/^ngAttr[A-Z]/,$e=/^(.+)Start$/;return z.$$addBindingInfo=C?function(e,t){var n=e.data("$binding")||[];Xn(t)?n=n.concat(t):n.push(t),e.data("$binding",n)}:h,z.$$addBindingClass=C?function(e){H(e,"ng-binding")}:h,z.$$addScopeInfo=C?function(e,t,n,i){e.data(n?i?"$isolateScopeNoTemplate":"$isolateScope":"$scope",t)}:h,z.$$addScopeClass=C?function(e,t){H(e,t?"ng-isolate-scope":"ng-scope")}:h,z.$$createComment=function(t,n){var i="";return C&&(i=" "+(t||"")+": ",n&&(i+=n+" ")),e.document.createComment(i)},z}]}function Pe(e,t){this.previousValue=e,this.currentValue=t}function We(e){return e.replace(Ni,"").replace(Hi,oe)}function Ne(e,t){var n="",i=e.split(/\s+/),r=t.split(/\s+/),o=0;e:for(;o<i.length;o++){for(var s=i[o],a=0;a<r.length;a++)if(s===r[a])continue e;n+=(0<n.length?" ":"")+s}return n}function He(e){var t=(e=Tn(e)).length;if(1>=t)return e;for(;t--;){var n=e[t];(8===n.nodeType||n.nodeType===ai&&""===n.nodeValue.trim())&&Hn.call(e,t,1)}return e}function ze(){var e={},n=!1;this.has=function(t){return e.hasOwnProperty(t)},this.register=function(t,n){Z(t,"controller"),v(t)?a(e,t):e[t]=n},this.allowGlobals=function(){n=!0},this.$get=["$injector","$window",function(i,r){function o(e,n,i,r){if(!e||!v(e.$scope))throw t("$controller")("noscp",r,n);e.$scope[n]=i}return function(t,s,l,c){var u,h,d;if(l=!0===l,c&&b(c)&&(d=c),b(t)){if(!(c=t.match(Ui)))throw zi("ctrlfmt",t);if(h=c[1],d=d||c[3],!(t=e.hasOwnProperty(h)?e[h]:Q(s.$scope,h,!0)||(n?Q(r,h,!0):void 0)))throw zi("ctrlreg",h);J(t,h,!0)}return l?(l=(Xn(t)?t[t.length-1]:t).prototype,u=Object.create(l||null),d&&o(s,d,u,h||t.name),a(function(){var e=i.invoke(t,u,s,h);return e!==u&&(v(e)||$(e))&&(u=e,d&&o(s,d,u,h||t.name)),u},{instance:u,identifier:d})):(u=i.instantiate(t,s,h),d&&o(s,d,u,h||t.name),u)}}]}function Ue(){this.$get=["$window",function(e){return Tn(e.document)}]}function qe(){this.$get=["$document","$rootScope",function(e,t){function n(){r=i.hidden}var i=e[0],r=i&&i.hidden;return e.on("visibilitychange",n),t.$on("$destroy",function(){e.off("visibilitychange",n)}),function(){return r}}]}function je(){this.$get=["$log",function(e){return function(t,n){e.error.apply(e,arguments)}}]}function Ke(e){return v(e)?A(e)?e.toISOString():_(e):e}function Ge(){this.$get=function(){return function(e){if(!e)return"";var t=[];return r(e,function(e,n){null===e||g(e)||(Xn(e)?i(e,function(e){t.push(U(n)+"="+U(Ke(e)))}):t.push(U(n)+"="+U(Ke(e))))}),t.join("&")}}}function Ye(){this.$get=function(){return function(e){function t(e,o,s){null===e||g(e)||(Xn(e)?i(e,function(e,n){t(e,o+"["+(v(e)?n:"")+"]")}):v(e)&&!A(e)?r(e,function(e,n){t(e,o+(s?"":"[")+n+(s?"":"]"))}):n.push(U(o)+"="+U(Ke(e))))}if(!e)return"";var n=[];return t(e,"",!0),n.join("&")}}}function Xe(e,t){if(b(e)){var n=e.replace(Xi,"").trim();if(n){var i=t("Content-Type");(i=i&&0===i.indexOf(ji))||(i=(i=n.match(Gi))&&Yi[i[0]].test(n)),i&&(e=O(n))}}return e}function Je(e){var t,n=te();return b(e)?i(e.split("\n"),function(e){t=e.indexOf(":");var i=Pn(Zn(e.substr(0,t)));e=Zn(e.substr(t+1)),i&&(n[i]=n[i]?n[i]+", "+e:e)}):v(e)&&i(e,function(e,t){var i=Pn(t),r=Zn(e);i&&(n[i]=n[i]?n[i]+", "+r:r)}),n}function Ze(e){var t;return function(n){return t||(t=Je(e)),n?(void 0===(n=t[Pn(n)])&&(n=null),n):t}}function Qe(e,t,n,r){return $(r)?r(e,t,n):(i(r,function(i){e=i(e,t,n)}),e)}function et(){var e=this.defaults={transformResponse:[Xe],transformRequest:[function(e){return v(e)&&"[object File]"!==Un.call(e)&&"[object Blob]"!==Un.call(e)&&"[object FormData]"!==Un.call(e)?_(e):e}],headers:{common:{Accept:"application/json, text/plain, */*"},post:ie(Ki),put:ie(Ki),patch:ie(Ki)},xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",paramSerializer:"$httpParamSerializer",jsonpCallbackParam:"callback"},n=!1;this.useApplyAsync=function(e){return m(e)?(n=!!e,this):n};var r=this.interceptors=[];this.$get=["$browser","$httpBackend","$$cookieReader","$cacheFactory","$rootScope","$q","$injector","$sce",function(o,s,l,c,u,d,p,f){function w(r){function c(e,t){for(var n=0,i=t.length;n<i;){var r=t[n++],o=t[n++];e=e.then(r,o)}return t.length=0,e}function C(e){var t=a({},e);return t.data=Qe(e.data,e.headers,e.status,x.transformResponse),200<=(e=e.status)&&300>e?t:d.reject(t)}if(!v(r))throw t("$http")("badreq",r);if(!b(f.valueOf(r.url)))throw t("$http")("badreq",r.url);var x=a({method:"get",transformRequest:e.transformRequest,transformResponse:e.transformResponse,paramSerializer:e.paramSerializer,jsonpCallbackParam:e.jsonpCallbackParam},r);x.headers=function(t){var n,r,o,s=e.headers,l=a({},t.headers);s=a({},s.common,s[Pn(t.method)]);e:for(n in s){r=Pn(n);for(o in l)if(Pn(o)===r)continue e;l[n]=s[n]}return function(e,t){var n,r={};return i(e,function(e,i){$(e)?null!=(n=e(t))&&(r[i]=n):r[i]=e}),r}(l,ie(t))}(r),x.method=Wn(x.method),x.paramSerializer=b(x.paramSerializer)?p.get(x.paramSerializer):x.paramSerializer,o.$$incOutstandingRequestCount();var k=[],E=[];return r=d.resolve(x),i(A,function(e){(e.request||e.requestError)&&k.unshift(e.request,e.requestError),(e.response||e.responseError)&&E.push(e.response,e.responseError)}),r=c(r,k),r=r.then(function(t){var r=t.headers,o=Qe(t.data,Ze(r),void 0,t.transformRequest);return g(o)&&i(r,function(e,t){"content-type"===Pn(t)&&delete r[t]}),g(t.withCredentials)&&!g(e.withCredentials)&&(t.withCredentials=e.withCredentials),function(t,r){function o(e){if(e){var t={};return i(e,function(e,i){t[i]=function(t){function i(){e(t)}n?u.$applyAsync(i):u.$$phase?i():u.$apply(i)}}),t}}function a(e,n,i,r){(200<=(n=-1<=n?n:0)&&300>n?C.resolve:C.reject)({data:e,status:n,headers:Ze(i),config:t,statusText:r})}function c(e){a(e.data,e.status,ie(e.headers()),e.statusText)}function h(){var e=w.pendingRequests.indexOf(t);-1!==e&&w.pendingRequests.splice(e,1)}var p,A,C=d.defer(),x=C.promise,k=t.headers,E="jsonp"===Pn(t.method),F=t.url;return E?F=f.getTrustedResourceUrl(F):b(F)||(F=f.valueOf(F)),F=function(e,t){return 0<t.length&&(e+=(-1===e.indexOf("?")?"?":"&")+t),e}(F,t.paramSerializer(t.params)),E&&(F=function(e,t){if(/[&?][^=]+=JSON_CALLBACK/.test(e))throw Ji("badjsonp",e);if(new RegExp("[&?]"+t+"=").test(e))throw Ji("badjsonp",t,e);return e+=(-1===e.indexOf("?")?"?":"&")+t+"=JSON_CALLBACK"}(F,t.jsonpCallbackParam)),w.pendingRequests.push(t),x.then(h,h),!t.cache&&!e.cache||!1===t.cache||"GET"!==t.method&&"JSONP"!==t.method||(p=v(t.cache)?t.cache:v(e.cache)?e.cache:y),p&&(A=p.get(F),m(A)?A&&$(A.then)?A.then(c,c):Xn(A)?a(A[1],A[0],ie(A[2]),A[3]):a(A,200,{},"OK"):p.put(F,x)),g(A)&&((A=qt(t.url)?l()[t.xsrfCookieName||e.xsrfCookieName]:void 0)&&(k[t.xsrfHeaderName||e.xsrfHeaderName]=A),s(t.method,F,r,function(e,t,i,r){function o(){a(t,e,i,r)}p&&(200<=e&&300>e?p.put(F,[e,t,Je(i),r]):p.remove(F)),n?u.$applyAsync(o):(o(),u.$$phase||u.$apply())},k,t.timeout,t.withCredentials,t.responseType,o(t.eventHandlers),o(t.uploadEventHandlers))),x}(t,o).then(C,C)}),r=c(r,E),r=r.finally(function(){o.$$completeOutstandingRequest(h)})}var y=c("$http");e.paramSerializer=b(e.paramSerializer)?p.get(e.paramSerializer):e.paramSerializer;var A=[];return i(r,function(e){A.unshift(b(e)?p.get(e):p.invoke(e))}),w.pendingRequests=[],function(e){i(arguments,function(e){w[e]=function(t,n){return w(a({},n||{},{method:e,url:t}))}})}("get","delete","head","jsonp"),function(e){i(arguments,function(e){w[e]=function(t,n,i){return w(a({},i||{},{method:e,url:t,data:n}))}})}("post","put","patch"),w.defaults=e,w}]}function tt(){this.$get=function(){return function(){return new e.XMLHttpRequest}}}function nt(){this.$get=["$browser","$jsonpCallbacks","$document","$xhrFactory",function(e,t,n,r){return function(e,t,n,r,o){return function(s,a,l,c,u,h,d,p,f,v){function w(){y&&y(),A&&A.abort()}if(a=a||e.url(),"jsonp"===Pn(s))var b=r.createCallback(a),y=function(e,t,n){e=e.replace("JSON_CALLBACK",t);var i=o.createElement("script"),s=null;return i.type="text/javascript",i.src=e,i.async=!0,s=function(e){i.removeEventListener("load",s),i.removeEventListener("error",s),o.body.removeChild(i),i=null;var a=-1,l="unknown";e&&("load"!==e.type||r.wasCalled(t)||(e={type:"error"}),l=e.type,a="error"===e.type?404:200),n&&n(a,l)},i.addEventListener("load",s),i.addEventListener("error",s),o.body.appendChild(i),s}(a,b,function(e,t){var i=200===e&&r.getResponse(b);m(C)&&n.cancel(C),y=A=null,c(e,i,"",t),r.removeCallback(b)});else{var A=t(s,a);if(A.open(s,a,!0),i(u,function(e,t){m(e)&&A.setRequestHeader(t,e)}),A.onload=function(){var e=A.statusText||"",t="response"in A?A.response:A.responseText,i=1223===A.status?204:A.status;0===i&&(i=t?200:"file"===Ut(a).protocol?404:0);var r=A.getAllResponseHeaders();m(C)&&n.cancel(C),y=A=null,c(i,t,r,e)},s=function(){m(C)&&n.cancel(C),y=A=null,c(-1,null,null,"")},A.onerror=s,A.onabort=s,A.ontimeout=s,i(f,function(e,t){A.addEventListener(t,e)}),i(v,function(e,t){A.upload.addEventListener(t,e)}),d&&(A.withCredentials=!0),p)try{A.responseType=p}catch(e){if("json"!==p)throw e}A.send(g(l)?null:l)}if(0<h)var C=n(w,h);else h&&$(h.then)&&h.then(w)}}(e,r,e.defer,t,n[0])}]}function it(){var e="{{",t="}}";this.startSymbol=function(t){return t?(e=t,this):e},this.endSymbol=function(e){return e?(t=e,this):t},this.$get=["$parse","$exceptionHandler","$sce",function(n,i,r){function o(e){return"\\\\\\"+e}function s(n){return n.replace(d,e).replace(f,t)}function l(e,t,n,i){var r=e.$watch(function(e){return r(),i(e)},t,n);return r}function c(o,c,d,f){function v(e){try{var t=e;return e=d?r.getTrusted(d,t):r.valueOf(t),f&&!m(e)?e:ne(e)}catch(e){i(Zi.interr(o,e))}}if(!o.length||-1===o.indexOf(e)){var w;return c||(c=s(o),w=p(c),w.exp=o,w.expressions=[],w.$$watchDelegate=l),w}f=!!f;var b,y,A=0,C=[],x=[];w=o.length;for(var k=[],E=[];A<w;){if(-1===(b=o.indexOf(e,A))||-1===(y=o.indexOf(t,b+u))){A!==w&&k.push(s(o.substring(A)));break}A!==b&&k.push(s(o.substring(A,b))),A=o.substring(b+u,y),C.push(A),x.push(n(A,v)),A=y+h,E.push(k.length),k.push("")}if(d&&1<k.length&&Zi.throwNoconcat(o),!c||C.length){var F=function(e){for(var t=0,n=C.length;t<n;t++){if(f&&g(e[t]))return;k[E[t]]=e[t]}return k.join("")};return a(function(e){var t=0,n=C.length,r=Array(n);try{for(;t<n;t++)r[t]=x[t](e);return F(r)}catch(e){i(Zi.interr(o,e))}},{exp:o,expressions:C,$$watchDelegate:function(e,t){var n;return e.$watchGroup(x,function(i,r){var o=F(i);$(t)&&t.call(this,o,i!==r?n:o,e),n=o})}})}}var u=e.length,h=t.length,d=new RegExp(e.replace(/./g,o),"g"),f=new RegExp(t.replace(/./g,o),"g");return c.startSymbol=function(){return e},c.endSymbol=function(){return t},c}]}function rt(){this.$get=["$rootScope","$window","$q","$$q","$browser",function(e,t,n,i,r){function o(o,a,l,c){function u(){h?o.apply(null,d):o(g)}var h=4<arguments.length,d=h?Nn.call(arguments,4):[],p=t.setInterval,f=t.clearInterval,g=0,v=m(c)&&!c,w=(v?i:n).defer(),b=w.promise;return l=m(l)?l:0,b.$$intervalId=p(function(){v?r.defer(u):e.$evalAsync(u),w.notify(g++),0<l&&g>=l&&(w.resolve(g),f(b.$$intervalId),delete s[b.$$intervalId]),v||e.$apply()},a),s[b.$$intervalId]=w,b}var s={};return o.cancel=function(e){return!!(e&&e.$$intervalId in s)&&(s[e.$$intervalId].promise.catch(h),s[e.$$intervalId].reject("canceled"),t.clearInterval(e.$$intervalId),delete s[e.$$intervalId],!0)},o}]}function ot(e){for(var t=(e=e.split("/")).length;t--;)e[t]=z(e[t]);return e.join("/")}function st(e,t){var n=Ut(e);t.$$protocol=n.protocol,t.$$host=n.hostname,t.$$port=c(n.port)||tr[n.protocol]||null}function at(e,t){if(ir.test(e))throw nr("badpath",e);var n="/"!==e.charAt(0);n&&(e="/"+e);var i=Ut(e);t.$$path=decodeURIComponent(n&&"/"===i.pathname.charAt(0)?i.pathname.substring(1):i.pathname),t.$$search=N(i.search),t.$$hash=decodeURIComponent(i.hash),t.$$path&&"/"!==t.$$path.charAt(0)&&(t.$$path="/"+t.$$path)}function lt(e,t){return e.slice(0,t.length)===t}function ct(e,t){if(lt(t,e))return t.substr(e.length)}function ut(e){var t=e.indexOf("#");return-1===t?e:e.substr(0,t)}function ht(e){return e.replace(/(#.+)|#$/,"$1")}function dt(e,t,n){this.$$html5=!0,n=n||"",st(e,this),this.$$parse=function(e){var n=ct(t,e);if(!b(n))throw nr("ipthprfx",e,t);at(n,this),this.$$path||(this.$$path="/"),this.$$compose()},this.$$compose=function(){var e=H(this.$$search),n=this.$$hash?"#"+z(this.$$hash):"";this.$$url=ot(this.$$path)+(e?"?"+e:"")+n,this.$$absUrl=t+this.$$url.substr(1)},this.$$parseLinkUrl=function(i,r){if(r&&"#"===r[0])return this.hash(r.slice(1)),!0;var o,s;return m(o=ct(e,i))?(s=o,s=n&&m(o=ct(n,o))?t+(ct("/",o)||o):e+s):m(o=ct(t,i))?s=t+o:t===i+"/"&&(s=t),s&&this.$$parse(s),!!s}}function pt(e,t,n){st(e,this),this.$$parse=function(i){var r;g(o=ct(e,i)||ct(t,i))||"#"!==o.charAt(0)?this.$$html5?r=o:(r="",g(o)&&(e=i,this.replace())):(r=ct(n,o),g(r)&&(r=o)),at(r,this),i=this.$$path;var o,s=/^\/[A-Z]:(\/.*)/;lt(r,o=e)&&(r=r.replace(o,"")),s.exec(r)||(i=(r=s.exec(i))?r[1]:i),this.$$path=i,this.$$compose()},this.$$compose=function(){var t=H(this.$$search),i=this.$$hash?"#"+z(this.$$hash):"";this.$$url=ot(this.$$path)+(t?"?"+t:"")+i,this.$$absUrl=e+(this.$$url?n+this.$$url:"")},this.$$parseLinkUrl=function(t,n){return ut(e)===ut(t)&&(this.$$parse(t),!0)}}function ft(e,t,n){this.$$html5=!0,pt.apply(this,arguments),this.$$parseLinkUrl=function(i,r){if(r&&"#"===r[0])return this.hash(r.slice(1)),!0;var o,s;return e===ut(i)?o=i:(s=ct(t,i))?o=e+n+s:t===i+"/"&&(o=t),o&&this.$$parse(o),!!o},this.$$compose=function(){var t=H(this.$$search),i=this.$$hash?"#"+z(this.$$hash):"";this.$$url=ot(this.$$path)+(t?"?"+t:"")+i,this.$$absUrl=e+n+this.$$url}}function gt(e){return function(){return this[e]}}function mt(e,t){return function(n){return g(n)?this[e]:(this[e]=t(n),this.$$compose(),this)}}function vt(){var e="!",t={enabled:!1,requireBase:!0,rewriteLinks:!0};this.hashPrefix=function(t){return m(t)?(e=t,this):e},this.html5Mode=function(e){return E(e)?(t.enabled=e,this):v(e)?(E(e.enabled)&&(t.enabled=e.enabled),E(e.requireBase)&&(t.requireBase=e.requireBase),(E(e.rewriteLinks)||b(e.rewriteLinks))&&(t.rewriteLinks=e.rewriteLinks),this):t},this.$get=["$rootScope","$browser","$sniffer","$rootElement","$window",function(n,i,r,o,s){function a(e,t,n){var r=c.url(),o=c.$$state;try{i.url(e,t,n),c.$$state=i.state()}catch(e){throw c.url(r),c.$$state=o,e}}function l(e,t){n.$broadcast("$locationChangeSuccess",c.absUrl(),e,c.$$state,t)}var c,u;u=i.baseHref();var h,d=i.url();if(t.enabled){if(!u&&t.requireBase)throw nr("nobase");h=d.substring(0,d.indexOf("/",d.indexOf("//")+2))+(u||"/"),u=r.history?dt:ft}else h=ut(d),u=pt;var p=h.substr(0,ut(h).lastIndexOf("/")+1);(c=new u(h,p,"#"+e)).$$parseLinkUrl(d,d),c.$$state=i.state();var f=/^\s*(javascript|mailto):/i;o.on("click",function(e){if((a=t.rewriteLinks)&&!e.ctrlKey&&!e.metaKey&&!e.shiftKey&&2!==e.which&&2!==e.button){for(var r=Tn(e.target);"a"!==S(r[0]);)if(r[0]===o[0]||!(r=r.parent())[0])return;if(!b(a)||!g(r.attr(a))){var a=r.prop("href"),l=r.attr("href")||r.attr("xlink:href");v(a)&&"[object SVGAnimatedString]"===a.toString()&&(a=Ut(a.animVal).href),f.test(a)||!a||r.attr("target")||e.isDefaultPrevented()||!c.$$parseLinkUrl(a,l)||(e.preventDefault(),c.absUrl()!==i.url()&&(n.$apply(),s.angular["ff-684208-preventDefault"]=!0))}}}),ht(c.absUrl())!==ht(d)&&i.url(c.absUrl(),!0);var m=!0;return i.onUrlChange(function(e,t){lt(e,p)?(n.$evalAsync(function(){var i,r=c.absUrl(),o=c.$$state;e=ht(e),c.$$parse(e),c.$$state=t,i=n.$broadcast("$locationChangeStart",e,r,t,o).defaultPrevented,c.absUrl()===e&&(i?(c.$$parse(r),c.$$state=o,a(r,!1,o)):(m=!1,l(r,o)))}),n.$$phase||n.$digest()):s.location.href=e}),n.$watch(function(){var e=ht(i.url()),t=ht(c.absUrl()),o=i.state(),s=c.$$replace,u=e!==t||c.$$html5&&r.history&&o!==c.$$state;(m||u)&&(m=!1,n.$evalAsync(function(){var t=c.absUrl(),i=n.$broadcast("$locationChangeStart",t,e,c.$$state,o).defaultPrevented;c.absUrl()===t&&(i?(c.$$parse(e),c.$$state=o):(u&&a(t,s,o===c.$$state?null:c.$$state),l(e,o)))})),c.$$replace=!1}),c}]}function wt(){var e=!0,t=this;this.debugEnabled=function(t){return m(t)?(e=t,this):e},this.$get=["$window",function(n){function r(e){var t=n.console||{},r=t[e]||t.log||h;e=!1;try{e=!!r.apply}catch(e){}return e?function(){var e=[];return i(arguments,function(t){e.push(function(e){return e instanceof Error&&(e.stack?e=e.message&&-1===e.stack.indexOf(e.message)?"Error: "+e.message+"\n"+e.stack:e.stack:e.sourceURL&&(e=e.message+"\n"+e.sourceURL+":"+e.line)),e}(t))}),r.apply(t,e)}:function(e,t){r(e,null==t?"":t)}}return{log:r("log"),info:r("info"),warn:r("warn"),error:r("error"),debug:function(){var n=r("debug");return function(){e&&n.apply(t,arguments)}}()}}]}function bt(e){return e+""}function yt(e,t){return void 0!==e?e:t}function At(e,t){return void 0===e?t:void 0===t?e:e+t}function $t(e,t){var n,r,o;switch(e.type){case ur.Program:n=!0,i(e.body,function(e){$t(e.expression,t),n=n&&e.expression.constant}),e.constant=n;break;case ur.Literal:e.constant=!0,e.toWatch=[];break;case ur.UnaryExpression:$t(e.argument,t),e.constant=e.argument.constant,e.toWatch=e.argument.toWatch;break;case ur.BinaryExpression:$t(e.left,t),$t(e.right,t),e.constant=e.left.constant&&e.right.constant,e.toWatch=e.left.toWatch.concat(e.right.toWatch);break;case ur.LogicalExpression:$t(e.left,t),$t(e.right,t),e.constant=e.left.constant&&e.right.constant,e.toWatch=e.constant?[]:[e];break;case ur.ConditionalExpression:$t(e.test,t),$t(e.alternate,t),$t(e.consequent,t),e.constant=e.test.constant&&e.alternate.constant&&e.consequent.constant,e.toWatch=e.constant?[]:[e];break;case ur.Identifier:e.constant=!1,e.toWatch=[e];break;case ur.MemberExpression:$t(e.object,t),e.computed&&$t(e.property,t),e.constant=e.object.constant&&(!e.computed||e.property.constant),e.toWatch=[e];break;case ur.CallExpression:n=o=!!e.filter&&!t(e.callee.name).$stateful,r=[],i(e.arguments,function(e){$t(e,t),n=n&&e.constant,e.constant||r.push.apply(r,e.toWatch)}),e.constant=n,e.toWatch=o?r:[e];break;case ur.AssignmentExpression:$t(e.left,t),$t(e.right,t),e.constant=e.left.constant&&e.right.constant,e.toWatch=[e];break;case ur.ArrayExpression:n=!0,r=[],i(e.elements,function(e){$t(e,t),n=n&&e.constant,e.constant||r.push.apply(r,e.toWatch)}),e.constant=n,e.toWatch=r;break;case ur.ObjectExpression:n=!0,r=[],i(e.properties,function(e){$t(e.value,t),n=n&&e.value.constant&&!e.computed,e.value.constant||r.push.apply(r,e.value.toWatch)}),e.constant=n,e.toWatch=r;break;case ur.ThisExpression:e.constant=!1,e.toWatch=[];break;case ur.LocalsExpression:e.constant=!1,e.toWatch=[]}}function Ct(e){if(1===e.length){var t=(e=e[0].expression).toWatch;return 1!==t.length?t:t[0]!==e?t:void 0}}function xt(e){return e.type===ur.Identifier||e.type===ur.MemberExpression}function kt(e){if(1===e.body.length&&xt(e.body[0].expression))return{type:ur.AssignmentExpression,left:e.body[0].expression,right:{type:ur.NGValueParameter},operator:"="}}function Et(e){return 0===e.body.length||1===e.body.length&&(e.body[0].expression.type===ur.Literal||e.body[0].expression.type===ur.ArrayExpression||e.body[0].expression.type===ur.ObjectExpression)}function Ft(e,t){this.astBuilder=e,this.$filter=t}function St(e,t){this.astBuilder=e,this.$filter=t}function Bt(e){return $(e.valueOf)?e.valueOf():sr.call(e)}function Dt(){var e,t,n=te(),r={true:!0,false:!1,null:null,undefined:void 0};this.addLiteral=function(e,t){r[e]=t},this.setIdentifierFns=function(n,i){return e=n,t=i,this},this.$get=["$filter",function(o){function s(e,t){return null==e||null==t?e===t:("object"!=typeof e||"object"!=typeof(e=Bt(e)))&&(e===t||e!=e&&t!=t)}function a(e,t,n,i,r){var o;if(1===(l=i.inputs).length){var a=s,l=l[0];return e.$watch(function(e){var t=l(e);return s(t,a)||(o=i(e,void 0,void 0,[t]),a=t&&Bt(t)),o},t,n,r)}for(var c=[],u=[],h=0,d=l.length;h<d;h++)c[h]=s,u[h]=null;return e.$watch(function(e){for(var t=!1,n=0,r=l.length;n<r;n++){var a=l[n](e);(t||(t=!s(a,c[n])))&&(u[n]=a,c[n]=a&&Bt(a))}return t&&(o=i(e,void 0,void 0,u)),o},t,n,r)}function l(e,t,n,i,r){function o(e,n,i){l=e,$(t)&&t(e,n,i),m(e)&&i.$$postDigest(function(){m(l)&&s()})}var s,l;return s=i.inputs?a(e,o,n,i,r):e.$watch(function(e){return i(e)},o,n)}function c(e,t,n,r){function o(e){var t=!0;return i(e,function(e){m(e)||(t=!1)}),t}var s,a;return s=e.$watch(function(e){return r(e)},function(e,n,i){a=e,$(t)&&t(e,n,i),o(e)&&i.$$postDigest(function(){o(a)&&s()})},n)}function u(e,t,n,i){var r=e.$watch(function(e){return r(),i(e)},t,n);return r}function d(e,t){if(!t)return e;var n=!1,i=(i=e.$$watchDelegate)!==c&&i!==l?function(i,r,o,s){return o=n&&s?s[0]:e(i,r,o,s),t(o,i,r)}:function(n,i,r,o){return r=e(n,i,r,o),n=t(r,n,i),m(r)?n:r};n=!e.inputs;return e.$$watchDelegate&&e.$$watchDelegate!==a?(i.$$watchDelegate=e.$$watchDelegate,i.inputs=e.inputs):t.$stateful||(i.$$watchDelegate=a,i.inputs=e.inputs?e.inputs:[e]),i}var p={csp:ei().noUnsafeEval,literals:D(r),isIdentifierStart:$(e)&&e,isIdentifierContinue:$(t)&&t};return function(e,t){var i,r,s;switch(typeof e){case"string":return s=e=e.trim(),(i=n[s])||(":"===e.charAt(0)&&":"===e.charAt(1)&&(r=!0,e=e.substring(2)),i=new cr(p),(i=new hr(i,o,p).parse(e)).constant?i.$$watchDelegate=u:r?i.$$watchDelegate=i.literal?c:l:i.inputs&&(i.$$watchDelegate=a),n[s]=i),d(i,t);case"function":return d(e,t);default:return d(h,t)}}}]}function Lt(){var e=!0;this.$get=["$rootScope","$exceptionHandler",function(t,n){return Rt(function(e){t.$evalAsync(e)},n,e)}],this.errorOnUnhandledRejections=function(t){return m(t)?(e=t,this):e}}function Mt(){var e=!0;this.$get=["$browser","$exceptionHandler",function(t,n){return Rt(function(e){t.defer(e)},n,e)}],this.errorOnUnhandledRejections=function(t){return m(t)?(e=t,this):e}}function Rt(e,n,r){function o(){return new function(){var e=this.promise=new s;this.resolve=function(t){u(e,t)},this.reject=function(t){d(e,t)},this.notify=function(t){f(e,t)}}}function s(){this.$$state={status:0}}function l(){for(;!C&&x.length;){var e=x.shift();if(!e.pur){e.pur=!0;var t="Possibly unhandled rejection: "+("function"==typeof(t=e.value)?t.toString().replace(/ \{[\s\S]*$/,""):g(t)?"undefined":"string"!=typeof t?re(t):t);e.value instanceof Error?n(e.value,t):n(t)}}}function c(t){!r||t.pending||2!==t.status||t.pur||(0===C&&0===x.length&&e(l),x.push(t)),!t.processScheduled&&t.pending&&(t.processScheduled=!0,++C,e(function(){var n,i,o;o=t.pending,t.processScheduled=!1,t.pending=void 0;try{for(var s=0,a=o.length;s<a;++s){t.pur=!0,i=o[s][0],n=o[s][t.status];try{$(n)?u(i,n(t.value)):1===t.status?u(i,t.value):d(i,t.value)}catch(e){d(i,e)}}}finally{--C,r&&0===C&&e(l)}}))}function u(e,t){e.$$state.status||(t===e?p(e,A("qcycle",t)):h(e,t))}function h(e,t){function n(t){r||(r=!0,p(e,t))}var i,r=!1;try{(v(t)||$(t))&&(i=t.then),$(i)?(e.$$state.status=-1,i.call(t,function(t){r||(r=!0,h(e,t))},n,function(t){f(e,t)})):(e.$$state.value=t,e.$$state.status=1,c(e.$$state))}catch(e){n(e)}}function d(e,t){e.$$state.status||p(e,t)}function p(e,t){e.$$state.value=t,e.$$state.status=2,c(e.$$state)}function f(t,i){var r=t.$$state.pending;0>=t.$$state.status&&r&&r.length&&e(function(){for(var e,t,o=0,s=r.length;o<s;o++){t=r[o][0],e=r[o][3];try{f(t,$(e)?e(i):i)}catch(e){n(e)}}})}function m(e){var t=new s;return d(t,e),t}function w(e,t,n){var i=null;try{$(n)&&(i=n())}catch(e){return m(e)}return i&&$(i.then)?i.then(function(){return t(e)},m):t(e)}function b(e,t,n,i){var r=new s;return u(r,e),r.then(t,n,i)}function y(e){if(!$(e))throw A("norslvr",e);var t=new s;return e(function(e){u(t,e)},function(e){d(t,e)}),t}var A=t("$q",TypeError),C=0,x=[];a(s.prototype,{then:function(e,t,n){if(g(e)&&g(t)&&g(n))return this;var i=new s;return this.$$state.pending=this.$$state.pending||[],this.$$state.pending.push([i,e,t,n]),0<this.$$state.status&&c(this.$$state),i},catch:function(e){return this.then(null,e)},finally:function(e,t){return this.then(function(t){return w(t,k,e)},function(t){return w(t,m,e)},t)}});var k=b;return y.prototype=s.prototype,y.defer=o,y.reject=m,y.when=b,y.resolve=k,y.all=function(e){var t=new s,n=0,r=Xn(e)?[]:{};return i(e,function(e,i){n++,b(e).then(function(e){r[i]=e,--n||u(t,r)},function(e){d(t,e)})}),0===n&&u(t,r),t},y.race=function(e){var t=o();return i(e,function(e){b(e).then(t.resolve,t.reject)}),t.promise},y}function Tt(){this.$get=["$window","$timeout",function(e,t){var n=e.requestAnimationFrame||e.webkitRequestAnimationFrame,i=e.cancelAnimationFrame||e.webkitCancelAnimationFrame||e.webkitCancelRequestAnimationFrame,r=!!n,o=r?function(e){var t=n(e);return function(){i(t)}}:function(e){var n=t(e,16.66,!1);return function(){t.cancel(n)}};return o.supported=r,o}]}function _t(){var e=10,r=t("$rootScope"),o=null,s=null;this.digestTtl=function(t){return arguments.length&&(e=t),e},this.$get=["$exceptionHandler","$parse","$browser",function(t,a,l){function c(e){e.currentScope.$$destroyed=!0}function u(e){9===Rn&&(e.$$childHead&&u(e.$$childHead),e.$$nextSibling&&u(e.$$nextSibling)),e.$parent=e.$$nextSibling=e.$$prevSibling=e.$$childHead=e.$$childTail=e.$root=e.$$watchers=null}function d(){this.$id=++Gn,this.$$phase=this.$parent=this.$$watchers=this.$$nextSibling=this.$$prevSibling=this.$$childHead=this.$$childTail=null,this.$root=this,this.$$destroyed=!1,this.$$listeners={},this.$$listenerCount={},this.$$watchersCount=0,this.$$isolateBindings=null}function p(e){if(y.$$phase)throw r("inprog",y.$$phase);y.$$phase=e}function f(e,t){do{e.$$watchersCount+=t}while(e=e.$parent)}function m(e,t,n){do{e.$$listenerCount[n]-=t,0===e.$$listenerCount[n]&&delete e.$$listenerCount[n]}while(e=e.$parent)}function w(){}function b(){for(;x.length;)try{x.shift()()}catch(e){t(e)}s=null}d.prototype={constructor:d,$new:function(e,t){var n;return t=t||this,e?(n=new d,n.$root=this.$root):(this.$$ChildScope||(this.$$ChildScope=function(e){function t(){this.$$watchers=this.$$nextSibling=this.$$childHead=this.$$childTail=null,this.$$listeners={},this.$$listenerCount={},this.$$watchersCount=0,this.$id=++Gn,this.$$ChildScope=null}return t.prototype=e,t}(this)),n=new this.$$ChildScope),n.$parent=t,n.$$prevSibling=t.$$childTail,t.$$childHead?(t.$$childTail.$$nextSibling=n,t.$$childTail=n):t.$$childHead=t.$$childTail=n,(e||t!==this)&&n.$on("$destroy",c),n},$watch:function(e,t,n,i){var r=a(e);if(r.$$watchDelegate)return r.$$watchDelegate(this,t,n,r,e);var s=this,l=s.$$watchers,c={fn:t,last:w,get:r,exp:i||e,eq:!!n};return o=null,$(t)||(c.fn=h),l||(l=s.$$watchers=[],l.$$digestWatchIndex=-1),l.unshift(c),l.$$digestWatchIndex++,f(this,1),function(){var e=B(l,c);0<=e&&(f(s,-1),e<l.$$digestWatchIndex&&l.$$digestWatchIndex--),o=null}},$watchGroup:function(e,t){function n(){l=!1,c?(c=!1,t(o,o,a)):t(o,r,a)}var r=Array(e.length),o=Array(e.length),s=[],a=this,l=!1,c=!0;if(!e.length){var u=!0;return a.$evalAsync(function(){u&&t(o,o,a)}),function(){u=!1}}return 1===e.length?this.$watch(e[0],function(e,n,i){o[0]=e,r[0]=n,t(o,e===n?o:r,i)}):(i(e,function(e,t){var i=a.$watch(e,function(e,i){o[t]=e,r[t]=i,l||(l=!0,a.$evalAsync(n))});s.push(i)}),function(){for(;s.length;)s.shift()()})},$watchCollection:function(e,t){function i(e){var t,i,s;if(!g(r=e)){if(v(r))if(n(r))for(o!==d&&(o=d,m=o.length=0,u++),e=r.length,m!==e&&(u++,o.length=m=e),t=0;t<e;t++)s=o[t],i=r[t],s!=s&&i!=i||s===i||(u++,o[t]=i);else{o!==p&&(o=p={},m=0,u++),e=0;for(t in r)Vn.call(r,t)&&(e++,i=r[t],s=o[t],t in o?s!=s&&i!=i||s===i||(u++,o[t]=i):(m++,o[t]=i,u++));if(m>e)for(t in u++,o)Vn.call(r,t)||(m--,delete o[t])}else o!==r&&(o=r,u++);return u}}i.$stateful=!0;var r,o,s,l=this,c=1<t.length,u=0,h=a(e,i),d=[],p={},f=!0,m=0;return this.$watch(h,function(){if(f?(f=!1,t(r,r,l)):t(r,s,l),c)if(v(r))if(n(r)){s=Array(r.length);for(var e=0;e<r.length;e++)s[e]=r[e]}else for(e in s={},r)Vn.call(r,e)&&(s[e]=r[e]);else s=r})},$digest:function(){var n,i,a,c,u,h,d,f,g,m=e,v=[];p("$digest"),l.$$checkUrlChange(),this===y&&null!==s&&(l.defer.cancel(s),b()),o=null;do{for(h=!1,d=this,u=0;u<A.length;u++){try{(g=A[u]).scope.$eval(g.expression,g.locals)}catch(e){t(e)}o=null}A.length=0;e:do{if(u=d.$$watchers)for(u.$$digestWatchIndex=u.length;u.$$digestWatchIndex--;)try{if(n=u[u.$$digestWatchIndex])if(c=n.get,(i=c(d))===(a=n.last)||(n.eq?L(i,a):Yn(i)&&Yn(a))){if(n===o){h=!1;break e}}else h=!0,o=n,n.last=n.eq?D(i,null):i,(0,n.fn)(i,a===w?i:a,d),5>m&&(f=4-m,v[f]||(v[f]=[]),v[f].push({msg:$(n.exp)?"fn: "+(n.exp.name||n.exp.toString()):n.exp,newVal:i,oldVal:a}))}catch(e){t(e)}if(!(u=d.$$watchersCount&&d.$$childHead||d!==this&&d.$$nextSibling))for(;d!==this&&!(u=d.$$nextSibling);)d=d.$parent}while(d=u);if((h||A.length)&&!m--)throw y.$$phase=null,r("infdig",e,v)}while(h||A.length);for(y.$$phase=null;k<C.length;)try{C[k++]()}catch(e){t(e)}C.length=k=0},$destroy:function(){if(!this.$$destroyed){var e=this.$parent;this.$broadcast("$destroy"),this.$$destroyed=!0,this===y&&l.$$applicationDestroyed(),f(this,-this.$$watchersCount);for(var t in this.$$listenerCount)m(this,this.$$listenerCount[t],t);e&&e.$$childHead===this&&(e.$$childHead=this.$$nextSibling),e&&e.$$childTail===this&&(e.$$childTail=this.$$prevSibling),this.$$prevSibling&&(this.$$prevSibling.$$nextSibling=this.$$nextSibling),this.$$nextSibling&&(this.$$nextSibling.$$prevSibling=this.$$prevSibling),this.$destroy=this.$digest=this.$apply=this.$evalAsync=this.$applyAsync=h,this.$on=this.$watch=this.$watchGroup=function(){return h},this.$$listeners={},this.$$nextSibling=null,u(this)}},$eval:function(e,t){return a(e)(this,t)},$evalAsync:function(e,t){y.$$phase||A.length||l.defer(function(){A.length&&y.$digest()}),A.push({scope:this,expression:a(e),locals:t})},$$postDigest:function(e){C.push(e)},$apply:function(e){try{p("$apply");try{return this.$eval(e)}finally{y.$$phase=null}}catch(e){t(e)}finally{try{y.$digest()}catch(e){throw t(e),e}}},$applyAsync:function(e){var t=this;e&&x.push(function(){t.$eval(e)}),e=a(e),null===s&&(s=l.defer(function(){y.$apply(b)}))},$on:function(e,t){var n=this.$$listeners[e];n||(this.$$listeners[e]=n=[]),n.push(t);var i=this;do{i.$$listenerCount[e]||(i.$$listenerCount[e]=0),i.$$listenerCount[e]++}while(i=i.$parent);var r=this;return function(){var i=n.indexOf(t);-1!==i&&(n[i]=null,m(r,1,e))}},$emit:function(e,n){var i,r,o,s=[],a=this,l=!1,c={name:e,targetScope:a,stopPropagation:function(){l=!0},preventDefault:function(){c.defaultPrevented=!0},defaultPrevented:!1},u=M([c],arguments,1);do{for(i=a.$$listeners[e]||s,c.currentScope=a,r=0,o=i.length;r<o;r++)if(i[r])try{i[r].apply(null,u)}catch(e){t(e)}else i.splice(r,1),r--,o--;if(l)return c.currentScope=null,c;a=a.$parent}while(a);return c.currentScope=null,c},$broadcast:function(e,n){var i=this,r=this,o={name:e,targetScope:this,preventDefault:function(){o.defaultPrevented=!0},defaultPrevented:!1};if(!this.$$listenerCount[e])return o;for(var s,a,l=M([o],arguments,1);i=r;){for(o.currentScope=i,s=0,a=(r=i.$$listeners[e]||[]).length;s<a;s++)if(r[s])try{r[s].apply(null,l)}catch(e){t(e)}else r.splice(s,1),s--,a--;if(!(r=i.$$listenerCount[e]&&i.$$childHead||i!==this&&i.$$nextSibling))for(;i!==this&&!(r=i.$$nextSibling);)i=i.$parent}return o.currentScope=null,o}};var y=new d,A=y.$$asyncQueue=[],C=y.$$postDigestQueue=[],x=y.$$applyAsyncQueue=[],k=0;return y}]}function Ot(){var e=/^\s*(https?|ftp|mailto|tel|file):/,t=/^\s*((https?|ftp|file|blob):|data:image\/)/;this.aHrefSanitizationWhitelist=function(t){return m(t)?(e=t,this):e},this.imgSrcSanitizationWhitelist=function(e){return m(e)?(t=e,this):t},this.$get=function(){return function(n,i){var r,o=i?t:e;return""===(r=Ut(n).href)||r.match(o)?n:"unsafe:"+r}}}function It(e){var t=[];return m(e)&&i(e,function(e){t.push(function(e){if("self"===e)return e;if(b(e)){if(-1<e.indexOf("***"))throw dr("iwcard",e);return e=Qn(e).replace(/\\\*\\\*/g,".*").replace(/\\\*/g,"[^:/.?&;]*"),new RegExp("^"+e+"$")}if(C(e))return new RegExp("^"+e.source+"$");throw dr("imatcher")}(e))}),t}function Vt(){this.SCE_CONTEXTS=pr;var e=["self"],t=[];this.resourceUrlWhitelist=function(t){return arguments.length&&(e=It(t)),e},this.resourceUrlBlacklist=function(e){return arguments.length&&(t=It(e)),t},this.$get=["$injector",function(n){function i(e,t){return"self"===e?qt(t):!!e.exec(t.href)}function r(e){var t=function(e){this.$$unwrapTrustedValue=function(){return e}};return e&&(t.prototype=new e),t.prototype.valueOf=function(){return this.$$unwrapTrustedValue()},t.prototype.toString=function(){return this.$$unwrapTrustedValue().toString()},t}var o=function(e){throw dr("unsafe")};n.has("$sanitize")&&(o=n.get("$sanitize"));var s=r(),a={};return a[pr.HTML]=r(s),a[pr.CSS]=r(s),a[pr.URL]=r(s),a[pr.JS]=r(s),a[pr.RESOURCE_URL]=r(a[pr.URL]),{trustAs:function(e,t){var n=a.hasOwnProperty(e)?a[e]:null;if(!n)throw dr("icontext",e,t);if(null===t||g(t)||""===t)return t;if("string"!=typeof t)throw dr("itype",e);return new n(t)},getTrusted:function(n,r){if(null===r||g(r)||""===r)return r;if((c=a.hasOwnProperty(n)?a[n]:null)&&r instanceof c)return r.$$unwrapTrustedValue();if(n===pr.RESOURCE_URL){var s,l,c=Ut(r.toString()),u=!1;for(s=0,l=e.length;s<l;s++)if(i(e[s],c)){u=!0;break}if(u)for(s=0,l=t.length;s<l;s++)if(i(t[s],c)){u=!1;break}if(u)return r;throw dr("insecurl",r.toString())}if(n===pr.HTML)return o(r);throw dr("unsafe")},valueOf:function(e){return e instanceof s?e.$$unwrapTrustedValue():e}}}]}function Pt(){var e=!0;this.enabled=function(t){return arguments.length&&(e=!!t),e},this.$get=["$parse","$sceDelegate",function(t,n){if(e&&8>Rn)throw dr("iequirks");var r=ie(pr);r.isEnabled=function(){return e},r.trustAs=n.trustAs,r.getTrusted=n.getTrusted,r.valueOf=n.valueOf,e||(r.trustAs=r.getTrusted=function(e,t){return t},r.valueOf=d),r.parseAs=function(e,n){var i=t(n);return i.literal&&i.constant?i:t(n,function(t){return r.getTrusted(e,t)})};var o=r.parseAs,s=r.getTrusted,a=r.trustAs;return i(pr,function(e,t){var n=Pn(t);r[("parse_as_"+n).replace(fr,oe)]=function(t){return o(e,t)},r[("get_trusted_"+n).replace(fr,oe)]=function(t){return s(e,t)},r[("trust_as_"+n).replace(fr,oe)]=function(t){return a(e,t)}}),r}]}function Wt(){this.$get=["$window","$document",function(e,t){var n={},i=!(e.chrome&&(e.chrome.app&&e.chrome.app.runtime||!e.chrome.app&&e.chrome.runtime&&e.chrome.runtime.id))&&e.history&&e.history.pushState,r=c((/android (\d+)/.exec(Pn((e.navigator||{}).userAgent))||[])[1]),o=/Boxee/i.test((e.navigator||{}).userAgent),s=t[0]||{},a=s.body&&s.body.style,l=!1,u=!1;return a&&(l=!!("transition"in a||"webkitTransition"in a),u=!!("animation"in a||"webkitAnimation"in a)),{history:!(!i||4>r||o),hasEvent:function(e){if("input"===e&&Rn)return!1;if(g(n[e])){var t=s.createElement("div");n[e]="on"+e in t}return n[e]},csp:ei(),transitions:l,animations:u,android:r}}]}function Nt(){var e;this.httpOptions=function(t){return t?(e=t,this):e},this.$get=["$exceptionHandler","$templateCache","$http","$q","$sce",function(t,n,i,r,o){function s(l,c){s.totalPendingRequests++,b(l)&&!g(n.get(l))||(l=o.getTrustedResourceUrl(l));var u=i.defaults&&i.defaults.transformResponse;return Xn(u)?u=u.filter(function(e){return e!==Xe}):u===Xe&&(u=null),i.get(l,a({cache:n,transformResponse:u},e)).finally(function(){s.totalPendingRequests--}).then(function(e){return n.put(l,e.data),e.data},function(e){return c||(e=gr("tpload",l,e.status,e.statusText),t(e)),r.reject(e)})}return s.totalPendingRequests=0,s}]}function Ht(){this.$get=["$rootScope","$browser","$location",function(e,t,n){return{findBindings:function(e,t,n){var r=[];return i(e=e.getElementsByClassName("ng-binding"),function(e){var o=Kn.element(e).data("$binding");o&&i(o,function(i){n?new RegExp("(^|\\s)"+Qn(t)+"(\\s|\\||$)").test(i)&&r.push(e):-1!==i.indexOf(t)&&r.push(e)})}),r},findModels:function(e,t,n){for(var i=["ng-","data-ng-","ng\\:"],r=0;r<i.length;++r){var o=e.querySelectorAll("["+i[r]+"model"+(n?"=":"*=")+'"'+t+'"]');if(o.length)return o}},getLocation:function(){return n.url()},setLocation:function(t){t!==n.url()&&(n.url(t),e.$digest())},whenStable:function(e){t.notifyWhenNoOutstandingRequests(e)}}}]}function zt(){this.$get=["$rootScope","$browser","$q","$$q","$exceptionHandler",function(e,t,n,i,r){function o(o,a,l){$(o)||(l=a,a=o,o=h);var c,u=Nn.call(arguments,3),d=m(l)&&!l,p=(d?i:n).defer(),f=p.promise;return c=t.defer(function(){try{p.resolve(o.apply(null,u))}catch(e){p.reject(e),r(e)}finally{delete s[f.$$timeoutId]}d||e.$apply()},a),f.$$timeoutId=c,s[c]=p,f}var s={};return o.cancel=function(e){return!!(e&&e.$$timeoutId in s)&&(s[e.$$timeoutId].promise.catch(h),s[e.$$timeoutId].reject("canceled"),delete s[e.$$timeoutId],t.defer.cancel(e.$$timeoutId))},o}]}function Ut(e){return Rn&&(mr.setAttribute("href",e),e=mr.href),mr.setAttribute("href",e),{href:mr.href,protocol:mr.protocol?mr.protocol.replace(/:$/,""):"",host:mr.host,search:mr.search?mr.search.replace(/^\?/,""):"",hash:mr.hash?mr.hash.replace(/^#/,""):"",hostname:mr.hostname,port:mr.port,pathname:"/"===mr.pathname.charAt(0)?mr.pathname:"/"+mr.pathname}}function qt(e){return(e=b(e)?Ut(e):e).protocol===vr.protocol&&e.host===vr.host}function jt(){this.$get=p(e)}function Kt(e){function t(e){try{return decodeURIComponent(e)}catch(t){return e}}var n=e[0]||{},i={},r="";return function(){var e,o,s,a,l;try{e=n.cookie||""}catch(t){e=""}if(e!==r)for(r=e,e=r.split("; "),i={},s=0;s<e.length;s++)o=e[s],0<(a=o.indexOf("="))&&(l=t(o.substring(0,a)),g(i[l])&&(i[l]=t(o.substring(a+1))));return i}}function Gt(){this.$get=Kt}function Yt(e){function t(n,r){if(v(n)){var o={};return i(n,function(e,n){o[n]=t(n,e)}),o}return e.factory(n+"Filter",r)}this.register=t,this.$get=["$injector",function(e){return function(t){return e.get(t+"Filter")}}],t("currency",Qt),t("date",cn),t("filter",Xt),t("json",un),t("limitTo",hn),t("lowercase",xr),t("number",en),t("orderBy",pn),t("uppercase",kr)}function Xt(){return function(e,i,r,o){if(!n(e)){if(null==e)return e;throw t("filter")("notarray",e)}o=o||"$";var s;switch(Zt(i)){case"function":break;case"boolean":case"null":case"number":case"string":s=!0;case"object":i=function(e,t,n,i){var r=v(e)&&n in e;return!0===t?t=L:$(t)||(t=function(e,t){return!(g(e)||(null===e||null===t?e!==t:v(t)||v(e)&&!f(e)||(e=Pn(""+e),t=Pn(""+t),-1===e.indexOf(t))))}),function(o){return r&&!v(o)?Jt(o,e[n],t,n,!1):Jt(o,e,t,n,i)}}(i,r,o,s);break;default:return e}return Array.prototype.filter.call(e,i)}}function Jt(e,t,n,i,r,o){var s=Zt(e),a=Zt(t);if("string"===a&&"!"===t.charAt(0))return!Jt(e,t.substring(1),n,i,r);if(Xn(e))return e.some(function(e){return Jt(e,t,n,i,r)});switch(s){case"object":var l;if(r){for(l in e)if("$"!==l.charAt(0)&&Jt(e[l],t,n,i,!0))return!0;return!o&&Jt(e,t,n,i,!1)}if("object"===a){for(l in t)if(o=t[l],!$(o)&&!g(o)&&(s=l===i,!Jt(s?e:e[l],o,n,i,s,s)))return!1;return!0}return n(e,t);case"function":return!1;default:return n(e,t)}}function Zt(e){return null===e?"null":typeof e}function Qt(e){var t=e.NUMBER_FORMATS;return function(e,n,i){return g(n)&&(n=t.CURRENCY_SYM),g(i)&&(i=t.PATTERNS[1].maxFrac),null==e?e:tn(e,t.PATTERNS[1],t.GROUP_SEP,t.DECIMAL_SEP,i).replace(/\u00A4/g,n)}}function en(e){var t=e.NUMBER_FORMATS;return function(e,n){return null==e?e:tn(e,t.PATTERNS[0],t.GROUP_SEP,t.DECIMAL_SEP,n)}}function tn(e,t,n,i,r){if(!b(e)&&!y(e)||isNaN(e))return"";var o=!isFinite(e),s=!1,a=Math.abs(e)+"",l="";if(o)l="∞";else{for(function(e,t,n,i){var r=e.d,o=r.length-e.i;if(t=g(t)?Math.min(Math.max(n,o),i):+t,n=t+e.i,i=r[n],0<n){r.splice(Math.max(e.i,n));for(var s=n;s<r.length;s++)r[s]=0}else for(o=Math.max(0,o),e.i=1,r.length=Math.max(1,n=t+1),r[0]=0,s=1;s<n;s++)r[s]=0;if(5<=i)if(0>n-1){for(i=0;i>n;i--)r.unshift(0),e.i++;r.unshift(1),e.i++}else r[n-1]++;for(;o<Math.max(0,t);o++)r.push(0);(t=r.reduceRight(function(e,t,n,i){return t+=e,i[n]=t%10,Math.floor(t/10)},0))&&(r.unshift(t),e.i++)}(s=function(e){var t,n,i,r,o,s=0;for(-1<(n=e.indexOf(br))&&(e=e.replace(br,"")),0<(i=e.search(/e/i))?(0>n&&(n=i),n+=+e.slice(i+1),e=e.substring(0,i)):0>n&&(n=e.length),i=0;e.charAt(i)===yr;i++);if(i===(o=e.length))t=[0],n=1;else{for(o--;e.charAt(o)===yr;)o--;for(n-=i,t=[],r=0;i<=o;i++,r++)t[r]=+e.charAt(i)}return n>wr&&(t=t.splice(0,wr-1),s=n-1,n=1),{d:t,e:s,i:n}}(a),r,t.minFrac,t.maxFrac),l=s.d,a=s.i,r=s.e,o=[],s=l.reduce(function(e,t){return e&&!t},!0);0>a;)l.unshift(0),a++;for(0<a?o=l.splice(a,l.length):(o=l,l=[0]),a=[],l.length>=t.lgSize&&a.unshift(l.splice(-t.lgSize,l.length).join(""));l.length>t.gSize;)a.unshift(l.splice(-t.gSize,l.length).join(""));l.length&&a.unshift(l.join("")),l=a.join(n),o.length&&(l+=i+o.join("")),r&&(l+="e+"+r)}return 0>e&&!s?t.negPre+l+t.negSuf:t.posPre+l+t.posSuf}function nn(e,t,n,i){var r="";for((0>e||i&&0>=e)&&(i?e=1-e:(e=-e,r="-")),e=""+e;e.length<t;)e=yr+e;return n&&(e=e.substr(e.length-t)),r+e}function rn(e,t,n,i,r){return n=n||0,function(o){return o=o["get"+e](),(0<n||o>-n)&&(o+=n),0===o&&-12===n&&(o=12),nn(o,t,i,r)}}function on(e,t,n){return function(i,r){var o=i["get"+e]();return r[Wn((n?"STANDALONE":"")+(t?"SHORT":"")+e)][o]}}function sn(e){var t=new Date(e,0,1).getDay();return new Date(e,0,(4>=t?5:12)-t)}function an(e){return function(t){var n=sn(t.getFullYear());return t=+new Date(t.getFullYear(),t.getMonth(),t.getDate()+(4-t.getDay()))-+n,t=1+Math.round(t/6048e5),nn(t,e)}}function ln(e,t){return 0>=e.getFullYear()?t.ERAS[0]:t.ERAS[1]}function cn(e){var t=/^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/;return function(n,r,o){var s,a,l="",u=[];if(r=r||"mediumDate",r=e.DATETIME_FORMATS[r]||r,b(n)&&(n=Cr.test(n)?c(n):function(e){var n;if(n=e.match(t)){e=new Date(0);var i=0,r=0,o=n[8]?e.setUTCFullYear:e.setFullYear,s=n[8]?e.setUTCHours:e.setHours;n[9]&&(i=c(n[9]+n[10]),r=c(n[9]+n[11])),o.call(e,c(n[1]),c(n[2])-1,c(n[3])),i=c(n[4]||0)-i,r=c(n[5]||0)-r,o=c(n[6]||0),n=Math.round(1e3*parseFloat("0."+(n[7]||0))),s.call(e,i,r,o,n)}return e}(n)),y(n)&&(n=new Date(n)),!A(n)||!isFinite(n.getTime()))return n;for(;r;)(a=$r.exec(r))?(u=M(u,a,1),r=u.pop()):(u.push(r),r=null);var h=n.getTimezoneOffset();return o&&(h=I(o,h),n=V(n,o,!0)),i(u,function(t){s=Ar[t],l+=s?s(n,e.DATETIME_FORMATS,h):"''"===t?"'":t.replace(/(^'|'$)/g,"").replace(/''/g,"'")}),l}}function un(){return function(e,t){return g(t)&&(t=2),_(e,t)}}function hn(){return function(e,t,i){return t=1/0===Math.abs(Number(t))?Number(t):c(t),Yn(t)?e:(y(e)&&(e=e.toString()),n(e)?(i=!i||isNaN(i)?0:c(i),i=0>i?Math.max(0,e.length+i):i,0<=t?dn(e,i,i+t):0===i?dn(e,t,e.length):dn(e,Math.max(0,i+t),i)):e)}}function dn(e,t,n){return b(e)?e.slice(t,n):Nn.call(e,t,n)}function pn(e){function i(e){switch(typeof e){case"number":case"boolean":case"string":return!0;default:return!1}}return function(r,o,s,a){if(null==r)return r;if(!n(r))throw t("orderBy")("notarray",r);Xn(o)||(o=[o]),0===o.length&&(o=["+"]);var l=function(t){return t.map(function(t){var n=1,i=d;if($(t))i=t;else if(b(t)&&("+"!==t.charAt(0)&&"-"!==t.charAt(0)||(n="-"===t.charAt(0)?-1:1,t=t.substring(1)),""!==t&&(i=e(t)).constant)){var r=i();i=function(e){return e[r]}}return{get:i,descending:n}})}(o),c=s?-1:1,u=$(a)?a:function(e,t){var n=0,i=e.type;if(i===(r=t.type)){var r=e.value,o=t.value;"string"===i?(r=r.toLowerCase(),o=o.toLowerCase()):"object"===i&&(v(r)&&(r=e.index),v(o)&&(o=t.index)),r!==o&&(n=r<o?-1:1)}else n=i<r?-1:1;return n};return(r=Array.prototype.map.call(r,function(e,t){return{value:e,tieBreaker:{value:t,type:"number",index:t},predicateValues:l.map(function(n){var r=n.get(e);return n=typeof r,null===r?(n="string",r="null"):"object"===n&&($(r.valueOf)&&(r=r.valueOf(),i(r))||f(r)&&(r=r.toString(),i(r))),{value:r,type:n,index:t}})}})).sort(function(e,t){for(var n=0,i=l.length;n<i;n++){var r=u(e.predicateValues[n],t.predicateValues[n]);if(r)return r*l[n].descending*c}return u(e.tieBreaker,t.tieBreaker)*c}),r=r.map(function(e){return e.value})}}function fn(e){return $(e)&&(e={link:e}),e.restrict=e.restrict||"AC",p(e)}function gn(e,t,n,i,r){this.$$controls=[],this.$error={},this.$$success={},this.$pending=void 0,this.$name=r(t.name||t.ngForm||"")(n),this.$dirty=!1,this.$valid=this.$pristine=!0,this.$submitted=this.$invalid=!1,this.$$parentForm=Sr,this.$$element=e,this.$$animate=i,mn(this)}function mn(e){e.$$classCache={},e.$$classCache[co]=!(e.$$classCache[lo]=e.$$element.hasClass(lo))}function vn(e){function t(e,t,n){n&&!e.$$classCache[t]?(e.$$animate.addClass(e.$$element,t),e.$$classCache[t]=!0):!n&&e.$$classCache[t]&&(e.$$animate.removeClass(e.$$element,t),e.$$classCache[t]=!1)}function n(e,n,i){n=n?"-"+Y(n,"-"):"",t(e,lo+n,!0===i),t(e,co+n,!1===i)}var i=e.set,r=e.unset;e.clazz.prototype.$setValidity=function(e,o,s){g(o)?(this.$pending||(this.$pending={}),i(this.$pending,e,s)):(this.$pending&&r(this.$pending,e,s),wn(this.$pending)&&(this.$pending=void 0)),E(o)?o?(r(this.$error,e,s),i(this.$$success,e,s)):(i(this.$error,e,s),r(this.$$success,e,s)):(r(this.$error,e,s),r(this.$$success,e,s)),this.$pending?(t(this,"ng-pending",!0),this.$valid=this.$invalid=void 0,n(this,"",null)):(t(this,"ng-pending",!1),this.$valid=wn(this.$error),this.$invalid=!this.$valid,n(this,"",this.$valid)),n(this,e,o=this.$pending&&this.$pending[e]?void 0:!this.$error[e]&&(!!this.$$success[e]||null)),this.$$parentForm.$setValidity(e,o,this)}}function wn(e){if(e)for(var t in e)if(e.hasOwnProperty(t))return!1;return!0}function bn(e){e.$formatters.push(function(t){return e.$isEmpty(t)?t:t.toString()})}function yn(e,t,n,i,r,o){var s=Pn(t[0].type);if(!r.android){var a=!1;t.on("compositionstart",function(){a=!0}),t.on("compositionend",function(){a=!1,c()})}var l,c=function(e){if(l&&(o.defer.cancel(l),l=null),!a){var r=t.val();e=e&&e.type,"password"===s||n.ngTrim&&"false"===n.ngTrim||(r=Zn(r)),(i.$viewValue!==r||""===r&&i.$$hasNativeValidators)&&i.$setViewValue(r,e)}};if(r.hasEvent("input"))t.on("input",c);else{var u=function(e,t,n){l||(l=o.defer(function(){l=null,t&&t.value===n||c(e)}))};t.on("keydown",function(e){var t=e.keyCode;91===t||15<t&&19>t||37<=t&&40>=t||u(e,this,this.value)}),r.hasEvent("paste")&&t.on("paste cut",u)}t.on("change",c),Nr[s]&&i.$$hasNativeValidators&&s===n.type&&t.on("keydown wheel mousedown",function(e){if(!l){var t=this.validity,n=t.badInput,i=t.typeMismatch;l=o.defer(function(){l=null,t.badInput===n&&t.typeMismatch===i||c(e)})}}),i.$render=function(){var e=i.$isEmpty(i.$viewValue)?"":i.$viewValue;t.val()!==e&&t.val(e)}}function An(e,t){return function(n,r){var o,s;if(A(n))return n;if(b(n)){if('"'===n.charAt(0)&&'"'===n.charAt(n.length-1)&&(n=n.substring(1,n.length-1)),Mr.test(n))return new Date(n);if(e.lastIndex=0,o=e.exec(n))return o.shift(),s=r?{yyyy:r.getFullYear(),MM:r.getMonth()+1,dd:r.getDate(),HH:r.getHours(),mm:r.getMinutes(),ss:r.getSeconds(),sss:r.getMilliseconds()/1e3}:{yyyy:1970,MM:1,dd:1,HH:0,mm:0,ss:0,sss:0},i(o,function(e,n){n<t.length&&(s[t[n]]=+e)}),new Date(s.yyyy,s.MM-1,s.dd,s.HH,s.mm,s.ss||0,1e3*s.sss||0)}return NaN}}function $n(e,t,n,i){return function(r,o,s,a,l,c,u){function h(e){return e&&!(e.getTime&&e.getTime()!=e.getTime())}function d(e){return m(e)&&!A(e)?n(e)||void 0:e}Cn(r,o,s,a),yn(0,o,s,a,l,c);var p,f=a&&a.$options.getOption("timezone");if(a.$$parserName=e,a.$parsers.push(function(e){return a.$isEmpty(e)?null:t.test(e)?(e=n(e,p),f&&(e=V(e,f)),e):void 0}),a.$formatters.push(function(e){if(e&&!A(e))throw po("datefmt",e);return h(e)?((p=e)&&f&&(p=V(p,f,!0)),u("date")(e,i,f)):(p=null,"")}),m(s.min)||s.ngMin){var v;a.$validators.min=function(e){return!h(e)||g(v)||n(e)>=v},s.$observe("min",function(e){v=d(e),a.$validate()})}if(m(s.max)||s.ngMax){var w;a.$validators.max=function(e){return!h(e)||g(w)||n(e)<=w},s.$observe("max",function(e){w=d(e),a.$validate()})}}}function Cn(e,t,n,i){(i.$$hasNativeValidators=v(t[0].validity))&&i.$parsers.push(function(e){var n=t.prop("validity")||{};return n.badInput||n.typeMismatch?void 0:e})}function xn(e){e.$$parserName="number",e.$parsers.push(function(t){return e.$isEmpty(t)?null:_r.test(t)?parseFloat(t):void 0}),e.$formatters.push(function(t){if(!e.$isEmpty(t)){if(!y(t))throw po("numfmt",t);t=t.toString()}return t})}function kn(e){return m(e)&&!y(e)&&(e=parseFloat(e)),Yn(e)?void 0:e}function En(e){var t=e.toString(),n=t.indexOf(".");return-1===n?-1<e&&1>e&&(e=/e-(\d+)$/.exec(t))?Number(e[1]):0:t.length-n-1}function Fn(e,t,n){if((0|(e=Number(e)))!==e||(0|t)!==t||(0|n)!==n){var i=Math.max(En(e),En(t),En(n));e*=i=Math.pow(10,i),t*=i,n*=i}return 0==(e-t)%n}function Sn(e,t,n,i,r){if(m(i)){if(!(e=e(i)).constant)throw po("constexpr",n,i);return e(t)}return r}function Bn(e,t){function n(e,t){if(!e||!e.length)return[];if(!t||!t.length)return e;var n=[],i=0;e:for(;i<e.length;i++){for(var r=e[i],o=0;o<t.length;o++)if(r===t[o])continue e;n.push(r)}return n}function r(e){var t=e;return Xn(e)?t=e.map(r).join(" "):v(e)&&(t=Object.keys(e).filter(function(t){return e[t]}).join(" ")),t}function o(e){var t=e;if(Xn(e))t=e.map(o);else if(v(e)){var n=!1;t=Object.keys(e).filter(function(t){return t=e[t],!n&&g(t)&&(n=!0),t});n&&t.push(void 0)}return t}e="ngClass"+e;var s;return["$parse",function(a){return{restrict:"AC",link:function(l,c,u){function h(e,t){var n=[];return i(e,function(e){(0<t||v[e])&&(v[e]=(v[e]||0)+t,v[e]===+(0<t)&&n.push(e))}),n.join(" ")}function d(e){if(w===t){var i=p&&p.split(" "),r=e&&e.split(" "),o=n(i,r);i=n(r,i),o=h(o,-1),i=h(i,1);u.$addClass(i),u.$removeClass(o)}p=e}var p,f=":"===(g=u[e].trim()).charAt(0)&&":"===g.charAt(1),g=a(g,f?o:r),m=f?function(e){(e=r(e))!==p&&d(e)}:d,v=c.data("$classCounts"),w=!0;v||(v=te(),c.data("$classCounts",v)),"ngClass"!==e&&(s||(s=a("$index",function(e){return 1&e})),l.$watch(s,function(e){if(e===t){var n=h((n=p)&&n.split(" "),1);u.$addClass(n)}else n=p,n=h(n&&n.split(" "),-1),u.$removeClass(n);w=e})),l.$watch(g,m,f)}}}]}function Dn(e,t,n,i,r,o,s,a,l){this.$modelValue=this.$viewValue=Number.NaN,this.$$rawModelValue=void 0,this.$validators={},this.$asyncValidators={},this.$parsers=[],this.$formatters=[],this.$viewChangeListeners=[],this.$untouched=!0,this.$touched=!1,this.$pristine=!0,this.$dirty=!1,this.$valid=!0,this.$invalid=!1,this.$error={},this.$$success={},this.$pending=void 0,this.$name=l(n.name||"",!1)(e),this.$$parentForm=Sr,this.$options=fo,this.$$parsedNgModel=r(n.ngModel),this.$$parsedNgModelAssign=this.$$parsedNgModel.assign,this.$$ngModelGet=this.$$parsedNgModel,this.$$ngModelSet=this.$$parsedNgModelAssign,this.$$pendingDebounce=null,this.$$parserValid=void 0,this.$$currentValidationRunId=0,this.$$scope=e,this.$$attr=n,this.$$element=i,this.$$animate=o,this.$$timeout=s,this.$$parse=r,this.$$q=a,this.$$exceptionHandler=t,mn(this),function(e){e.$$scope.$watch(function(){var t=e.$$ngModelGet(e.$$scope);if(t!==e.$modelValue&&(e.$modelValue==e.$modelValue||t==t)){e.$modelValue=e.$$rawModelValue=t,e.$$parserValid=void 0;for(var n=e.$formatters,i=n.length,r=t;i--;)r=n[i](r);e.$viewValue!==r&&(e.$$updateEmptyClasses(r),e.$viewValue=e.$$lastCommittedViewValue=r,e.$render(),e.$$runValidators(e.$modelValue,e.$viewValue,h))}return t})}(this)}function Ln(e){this.$$options=e}function Mn(e,t){i(t,function(t,n){m(e[n])||(e[n]=t)})}var Rn,Tn,_n,On,In=/^\/(.+)\/([a-z]*)$/,Vn=Object.prototype.hasOwnProperty,Pn=function(e){return b(e)?e.toLowerCase():e},Wn=function(e){return b(e)?e.toUpperCase():e},Nn=[].slice,Hn=[].splice,zn=[].push,Un=Object.prototype.toString,qn=Object.getPrototypeOf,jn=t("ng"),Kn=e.angular||(e.angular={}),Gn=0;Rn=e.document.documentMode;var Yn=Number.isNaN||function(e){return e!=e};h.$inject=[],d.$inject=[];var Xn=Array.isArray,Jn=/^\[object (?:Uint8|Uint8Clamped|Uint16|Uint32|Int8|Int16|Int32|Float32|Float64)Array]$/,Zn=function(e){return b(e)?e.trim():e},Qn=function(e){return e.replace(/([-()[\]{}+?*.$^|,:#<!\\])/g,"\\$1").replace(/\x08/g,"\\x08")},ei=function(){if(!m(ei.rules)){var t=e.document.querySelector("[ng-csp]")||e.document.querySelector("[data-ng-csp]");if(t){var n=t.getAttribute("ng-csp")||t.getAttribute("data-ng-csp");ei.rules={noUnsafeEval:!n||-1!==n.indexOf("no-unsafe-eval"),noInlineStyle:!n||-1!==n.indexOf("no-inline-style")}}else{t=ei;try{new Function(""),n=!1}catch(e){n=!0}t.rules={noUnsafeEval:n,noInlineStyle:!1}}}return ei.rules},ti=function(){if(m(ti.name_))return ti.name_;var t,n,i,r,o=ii.length;for(n=0;n<o;++n)if(i=ii[n],t=e.document.querySelector("["+i.replace(":","\\:")+"jq]")){r=t.getAttribute(i+"jq");break}return ti.name_=r},ni=/:/g,ii=["ng-","data-ng-","ng:","x-ng-"],ri=function(e){if(!e.currentScript)return!0;var t=e.currentScript.getAttribute("src"),n=e.createElement("a");if(n.href=t,e.location.origin===n.origin)return!0;switch(n.protocol){case"http:":case"https:":case"ftp:":case"blob:":case"file:":case"data:":return!0;default:return!1}}(e.document),oi=/[A-Z]/g,si=!1,ai=3,li={full:"1.6.1",major:1,minor:6,dot:1,codeName:"promise-rectification"};ce.expando="ng339";var ci=ce.cache={},ui=1;ce._data=function(e){return this.cache[e[this.expando]]||{}};var hi=/-([a-z])/g,di=/^-ms-/,pi={mouseleave:"mouseout",mouseenter:"mouseover"},fi=t("jqLite"),gi=/^<([\w-]+)\s*\/?>(?:<\/\1>|)$/,mi=/<|&#?\w+;/,vi=/<([\w:-]+)/,wi=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi,bi={option:[1,'<select multiple="multiple">',"</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};bi.optgroup=bi.option,bi.tbody=bi.tfoot=bi.colgroup=bi.caption=bi.thead,bi.th=bi.td;var yi=e.Node.prototype.contains||function(e){return!!(16&this.compareDocumentPosition(e))},Ai=ce.prototype={ready:xe,toString:function(){var e=[];return i(this,function(t){e.push(""+t)}),"["+e.join(", ")+"]"},eq:function(e){return Tn(0<=e?this[e]:this[this.length+e])},length:0,push:zn,sort:[].sort,splice:[].splice},$i={};i("multiple selected checked disabled readOnly required open".split(" "),function(e){$i[Pn(e)]=e});var Ci={};i("input select option textarea button form details".split(" "),function(e){Ci[e]=!0});var xi={ngMinlength:"minlength",ngMaxlength:"maxlength",ngMin:"min",ngMax:"max",ngPattern:"pattern",ngStep:"step"};i({data:ge,removeData:pe,hasData:function(e){for(var t in ci[e.ng339])return!0;return!1},cleanData:function(e){for(var t=0,n=e.length;t<n;t++)pe(e[t])}},function(e,t){ce[t]=e}),i({data:ge,inheritedData:Ae,scope:function(e){return Tn.data(e,"$scope")||Ae(e.parentNode||e,["$isolateScope","$scope"])},isolateScope:function(e){return Tn.data(e,"$isolateScope")||Tn.data(e,"$isolateScopeNoTemplate")},controller:ye,injector:function(e){return Ae(e,"$injector")},removeAttr:function(e,t){e.removeAttribute(t)},hasClass:me,css:function(e,t,n){if(t=se(t.replace(di,"ms-")),!m(n))return e.style[t];e.style[t]=n},attr:function(e,t,n){if((i=e.nodeType)!==ai&&2!==i&&8!==i&&e.getAttribute){var i=Pn(t),r=$i[i];if(!m(n))return e=e.getAttribute(t),r&&null!==e&&(e=i),null===e?void 0:e;null===n||!1===n&&r?e.removeAttribute(t):e.setAttribute(t,r?i:n)}},prop:function(e,t,n){if(!m(n))return e[t];e[t]=n},text:function(){function e(e,t){if(g(t)){var n=e.nodeType;return 1===n||n===ai?e.textContent:""}e.textContent=t}return e.$dv="",e}(),val:function(e,t){if(g(t)){if(e.multiple&&"select"===S(e)){var n=[];return i(e.options,function(e){e.selected&&n.push(e.value||e.text)}),n}return e.value}e.value=t},html:function(e,t){if(g(t))return e.innerHTML;he(e,!0),e.innerHTML=t},empty:$e},function(e,t){ce.prototype[t]=function(t,n){var i,r,o=this.length;if(e!==$e&&g(2===e.length&&e!==me&&e!==ye?t:n)){if(v(t)){for(i=0;i<o;i++)if(e===ge)e(this[i],t);else for(r in t)e(this[i],r,t[r]);return this}for(o=g(i=e.$dv)?Math.min(o,1):o,r=0;r<o;r++){var s=e(this[r],t,n);i=i?i+s:s}return i}for(i=0;i<o;i++)e(this[i],t,n);return this}}),i({removeData:pe,on:function(e,t,n,i){if(m(i))throw fi("onargs");if(ae(e)){var r=(i=fe(e,!0)).events,o=i.handle;o||(o=i.handle=function(e,t){var n=function(n,i){n.isDefaultPrevented=function(){return n.defaultPrevented};var r=t[i||n.type],o=r?r.length:0;if(o){if(g(n.immediatePropagationStopped)){var s=n.stopImmediatePropagation;n.stopImmediatePropagation=function(){n.immediatePropagationStopped=!0,n.stopPropagation&&n.stopPropagation(),s&&s.call(n)}}n.isImmediatePropagationStopped=function(){return!0===n.immediatePropagationStopped};var a=r.specialHandlerWrapper||function(e,t,n){n.call(e,t)};1<o&&(r=ie(r));for(var l=0;l<o;l++)n.isImmediatePropagationStopped()||a(e,n,r[l])}};return n.elem=e,n}(e,r));for(var s=(i=0<=t.indexOf(" ")?t.split(" "):[t]).length,a=function(t,i,s){var a=r[t];a||(a=r[t]=[],a.specialHandlerWrapper=i,"$destroy"===t||s||e.addEventListener(t,o)),a.push(n)};s--;)t=i[s],pi[t]?(a(pi[t],Ee),a(t,void 0,!0)):a(t)}},off:de,one:function(e,t,n){(e=Tn(e)).on(t,function i(){e.off(t,n),e.off(t,i)}),e.on(t,n)},replaceWith:function(e,t){var n,r=e.parentNode;he(e),i(new ce(t),function(t){n?r.insertBefore(t,n.nextSibling):r.replaceChild(t,e),n=t})},children:function(e){var t=[];return i(e.childNodes,function(e){1===e.nodeType&&t.push(e)}),t},contents:function(e){return e.contentDocument||e.childNodes||[]},append:function(e,t){if(1===(n=e.nodeType)||11===n)for(var n=0,i=(t=new ce(t)).length;n<i;n++)e.appendChild(t[n])},prepend:function(e,t){if(1===e.nodeType){var n=e.firstChild;i(new ce(t),function(t){e.insertBefore(t,n)})}},wrap:function(e,t){var n=Tn(t).eq(0).clone()[0],i=e.parentNode;i&&i.replaceChild(n,e),n.appendChild(e)},remove:Ce,detach:function(e){Ce(e,!0)},after:function(e,t){var n=e,i=e.parentNode;if(i)for(var r=0,o=(t=new ce(t)).length;r<o;r++){var s=t[r];i.insertBefore(s,n.nextSibling),n=s}},addClass:we,removeClass:ve,toggleClass:function(e,t,n){t&&i(t.split(" "),function(t){var i=n;g(i)&&(i=!me(e,t)),(i?we:ve)(e,t)})},parent:function(e){return(e=e.parentNode)&&11!==e.nodeType?e:null},next:function(e){return e.nextElementSibling},find:function(e,t){return e.getElementsByTagName?e.getElementsByTagName(t):[]},clone:ue,triggerHandler:function(e,t,n){var r,o,s=t.type||t,l=fe(e);(l=(l=l&&l.events)&&l[s])&&(r={preventDefault:function(){this.defaultPrevented=!0},isDefaultPrevented:function(){return!0===this.defaultPrevented},stopImmediatePropagation:function(){this.immediatePropagationStopped=!0},isImmediatePropagationStopped:function(){return!0===this.immediatePropagationStopped},stopPropagation:h,type:s,target:e},t.type&&(r=a(r,t)),t=ie(l),o=n?[r].concat(n):[r],i(t,function(t){r.isImmediatePropagationStopped()||t.apply(e,o)}))}},function(e,t){ce.prototype[t]=function(t,n,i){for(var r,o=0,s=this.length;o<s;o++)g(r)?(r=e(this[o],t,n,i),m(r)&&(r=Tn(r))):be(r,e(this[o],t,n,i));return m(r)?r:this}}),ce.prototype.bind=ce.prototype.on,ce.prototype.unbind=ce.prototype.off,Be.prototype={put:function(e,t){this[Se(e,this.nextUid)]=t},get:function(e){return this[Se(e,this.nextUid)]},remove:function(e){var t=this[e=Se(e,this.nextUid)];return delete this[e],t}};var ki=[function(){this.$get=[function(){return Be}]}],Ei=/^([^(]+?)=>/,Fi=/^[^(]*\(\s*([^)]*)\)/m,Si=/,/,Bi=/^\s*(_?)(\S+?)\1\s*$/,Di=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/gm,Li=t("$injector");Le.$$annotate=function(e,t,n){var r;if("function"==typeof e){if(!(r=e.$inject)){if(r=[],e.length){if(t)throw b(n)&&n||(n=e.name||function(e){return(e=De(e))?"function("+(e[1]||"").replace(/[\s\r\n]+/," ")+")":"fn"}(e)),Li("strictdi",n);i((t=De(e))[1].split(Si),function(e){e.replace(Bi,function(e,t,n){r.push(n)})})}e.$inject=r}}else Xn(e)?(t=e.length-1,J(e[t],"fn"),r=e.slice(0,t)):J(e,"fn",!0);return r};var Mi=t("$animate"),Ri=function(){this.$get=h},Ti=function(){var e=new Be,t=[];this.$get=["$$AnimateRunner","$rootScope",function(n,r){function o(e,t,n){var r=!1;return t&&(t=b(t)?t.split(" "):Xn(t)?t:[],i(t,function(t){t&&(r=!0,e[t]=n)})),r}function s(){i(t,function(t){var n=e.get(t);if(n){var r=function(e){b(e)&&(e=e.split(" "));var t=te();return i(e,function(e){e.length&&(t[e]=!0)}),t}(t.attr("class")),o="",s="";i(n,function(e,t){e!==!!r[t]&&(e?o+=(o.length?" ":"")+t:s+=(s.length?" ":"")+t)}),i(t,function(e){o&&we(e,o),s&&ve(e,s)}),e.remove(t)}}),t.length=0}return{enabled:h,on:h,off:h,pin:h,push:function(i,a,l,c){return c&&c(),(l=l||{}).from&&i.css(l.from),l.to&&i.css(l.to),(l.addClass||l.removeClass)&&(a=l.addClass,c=l.removeClass,l=e.get(i)||{},a=o(l,a,!0),c=o(l,c,!1),(a||c)&&(e.put(i,l),t.push(i),1===t.length&&r.$$postDigest(s))),(i=new n).complete(),i}}}]},_i=["$provide",function(e){var t=this;this.$$registeredAnimations=Object.create(null),this.register=function(n,i){if(n&&"."!==n.charAt(0))throw Mi("notcsel",n);var r=n+"-animation";t.$$registeredAnimations[n.substr(1)]=r,e.factory(r,i)},this.classNameFilter=function(e){if(1===arguments.length&&(this.$$classNameFilter=e instanceof RegExp?e:null)&&/(\s+|\/)ng-animate(\s+|\/)/.test(this.$$classNameFilter.toString()))throw Mi("nongcls","ng-animate");return this.$$classNameFilter},this.$get=["$$animateQueue",function(e){function t(e,t,n){if(n){var i;e:{for(i=0;i<n.length;i++){var r=n[i];if(1===r.nodeType){i=r;break e}}i=void 0}!i||i.parentNode||i.previousElementSibling||(n=null)}n?n.after(e):t.prepend(e)}return{on:e.on,off:e.off,pin:e.pin,enabled:e.enabled,cancel:function(e){e.end&&e.end()},enter:function(n,i,r,o){return i=i&&Tn(i),r=r&&Tn(r),i=i||r.parent(),t(n,i,r),e.push(n,"enter",Te(o))},move:function(n,i,r,o){return i=i&&Tn(i),r=r&&Tn(r),i=i||r.parent(),t(n,i,r),e.push(n,"move",Te(o))},leave:function(t,n){return e.push(t,"leave",Te(n),function(){t.remove()})},addClass:function(t,n,i){return i=Te(i),i.addClass=Re(i.addclass,n),e.push(t,"addClass",i)},removeClass:function(t,n,i){return i=Te(i),i.removeClass=Re(i.removeClass,n),e.push(t,"removeClass",i)},setClass:function(t,n,i,r){return r=Te(r),r.addClass=Re(r.addClass,n),r.removeClass=Re(r.removeClass,i),e.push(t,"setClass",r)},animate:function(t,n,i,r,o){return o=Te(o),o.from=o.from?a(o.from,n):n,o.to=o.to?a(o.to,i):i,o.tempClasses=Re(o.tempClasses,r||"ng-inline-animate"),e.push(t,"animate",o)}}}]}],Oi=function(){this.$get=["$$rAF",function(e){function t(t){n.push(t),1<n.length||e(function(){for(var e=0;e<n.length;e++)n[e]();n=[]})}var n=[];return function(){var e=!1;return t(function(){e=!0}),function(n){e?n():t(n)}}}]},Ii=function(){this.$get=["$q","$sniffer","$$animateAsyncRun","$$isDocumentHidden","$timeout",function(e,t,n,r,o){function s(e){this.setHost(e);var t=n();this._doneCallbacks=[],this._tick=function(e){r()?o(e,0,!1):t(e)},this._state=0}return s.chain=function(e,t){function n(){i===e.length?t(!0):e[i](function(e){!1===e?t(!1):(i++,n())})}var i=0;n()},s.all=function(e,t){function n(n){o=o&&n,++r===e.length&&t(o)}var r=0,o=!0;i(e,function(e){e.done(n)})},s.prototype={setHost:function(e){this.host=e||{}},done:function(e){2===this._state?e():this._doneCallbacks.push(e)},progress:h,getPromise:function(){if(!this.promise){var t=this;this.promise=e(function(e,n){t.done(function(t){!1===t?n():e()})})}return this.promise},then:function(e,t){return this.getPromise().then(e,t)},catch:function(e){return this.getPromise().catch(e)},finally:function(e){return this.getPromise().finally(e)},pause:function(){this.host.pause&&this.host.pause()},resume:function(){this.host.resume&&this.host.resume()},end:function(){this.host.end&&this.host.end(),this._resolve(!0)},cancel:function(){this.host.cancel&&this.host.cancel(),this._resolve(!1)},complete:function(e){var t=this;0===t._state&&(t._state=1,t._tick(function(){t._resolve(e)}))},_resolve:function(e){2!==this._state&&(i(this._doneCallbacks,function(t){t(e)}),this._doneCallbacks.length=0,this._state=2)}},s}]},Vi=function(){this.$get=["$$rAF","$q","$$AnimateRunner",function(e,t,n){return function(t,i){function r(){return e(function(){o.addClass&&(t.addClass(o.addClass),o.addClass=null),o.removeClass&&(t.removeClass(o.removeClass),o.removeClass=null),o.to&&(t.css(o.to),o.to=null),s||a.complete(),s=!0}),a}var o=i||{};o.$$prepared||(o=D(o)),o.cleanupStyles&&(o.from=o.to=null),o.from&&(t.css(o.from),o.from=null);var s,a=new n;return{start:r,end:r}}}]},Pi=t("$compile"),Wi=new function(){};Ve.$inject=["$provide","$$sanitizeUriProvider"],Pe.prototype.isFirstChange=function(){return this.previousValue===Wi};var Ni=/^((?:x|data)[:\-_])/i,Hi=/[:\-_]+(.)/g,zi=t("$controller"),Ui=/^(\S+)(\s+as\s+([\w$]+))?$/,qi=function(){this.$get=["$document",function(e){return function(t){return t?!t.nodeType&&t instanceof Tn&&(t=t[0]):t=e[0].body,t.offsetWidth+1}}]},ji="application/json",Ki={"Content-Type":ji+";charset=utf-8"},Gi=/^\[|^\{(?!\{)/,Yi={"[":/]$/,"{":/}$/},Xi=/^\)]\}',?\n/,Ji=t("$http"),Zi=Kn.$interpolateMinErr=t("$interpolate");Zi.throwNoconcat=function(e){throw Zi("noconcat",e)},Zi.interr=function(e,t){return Zi("interr",e,t.toString())};var Qi=function(){this.$get=["$window",function(e){var t=e.angular.callbacks,n={};return{createCallback:function(e){var i="angular.callbacks."+(e="_"+(t.$$counter++).toString(36)),r=function(e){var t=function(e){t.data=e,t.called=!0};return t.id=e,t}(e);return n[i]=t[e]=r,i},wasCalled:function(e){return n[e].called},getResponse:function(e){return n[e].data},removeCallback:function(e){delete t[n[e].id],delete n[e]}}}]},er=/^([^?#]*)(\?([^#]*))?(#(.*))?$/,tr={http:80,https:443,ftp:21},nr=t("$location"),ir=/^\s*[\\/]{2,}/,rr={$$absUrl:"",$$html5:!1,$$replace:!1,absUrl:gt("$$absUrl"),url:function(e){if(g(e))return this.$$url;var t=er.exec(e);return(t[1]||""===e)&&this.path(decodeURIComponent(t[1])),(t[2]||t[1]||""===e)&&this.search(t[3]||""),this.hash(t[5]||""),this},protocol:gt("$$protocol"),host:gt("$$host"),port:gt("$$port"),path:mt("$$path",function(e){return"/"===(e=null!==e?e.toString():"").charAt(0)?e:"/"+e}),search:function(e,t){switch(arguments.length){case 0:return this.$$search;case 1:if(b(e)||y(e))e=e.toString(),this.$$search=N(e);else{if(!v(e))throw nr("isrcharg");i(e=D(e,{}),function(t,n){null==t&&delete e[n]}),this.$$search=e}break;default:g(t)||null===t?delete this.$$search[e]:this.$$search[e]=t}return this.$$compose(),this},hash:mt("$$hash",function(e){return null!==e?e.toString():""}),replace:function(){return this.$$replace=!0,this}};i([ft,pt,dt],function(e){e.prototype=Object.create(rr),e.prototype.state=function(t){if(!arguments.length)return this.$$state;if(e!==dt||!this.$$html5)throw nr("nostate");return this.$$state=g(t)?null:t,this}});var or=t("$parse"),sr={}.constructor.prototype.valueOf,ar=te();i("+ - * / % === !== == != < > <= >= && || ! = |".split(" "),function(e){ar[e]=!0});var lr={n:"\n",f:"\f",r:"\r",t:"\t",v:"\v","'":"'",'"':'"'},cr=function(e){this.options=e};cr.prototype={constructor:cr,lex:function(e){for(this.text=e,this.index=0,this.tokens=[];this.index<this.text.length;)if('"'===(e=this.text.charAt(this.index))||"'"===e)this.readString(e);else if(this.isNumber(e)||"."===e&&this.isNumber(this.peek()))this.readNumber();else if(this.isIdentifierStart(this.peekMultichar()))this.readIdent();else if(this.is(e,"(){}[].,;:?"))this.tokens.push({index:this.index,text:e}),this.index++;else if(this.isWhitespace(e))this.index++;else{var t=e+this.peek(),n=t+this.peek(2),i=ar[t],r=ar[n];ar[e]||i||r?(e=r?n:i?t:e,this.tokens.push({index:this.index,text:e,operator:!0}),this.index+=e.length):this.throwError("Unexpected next character ",this.index,this.index+1)}return this.tokens},is:function(e,t){return-1!==t.indexOf(e)},peek:function(e){return e=e||1,this.index+e<this.text.length&&this.text.charAt(this.index+e)},isNumber:function(e){return"0"<=e&&"9">=e&&"string"==typeof e},isWhitespace:function(e){return" "===e||"\r"===e||"\t"===e||"\n"===e||"\v"===e||" "===e},isIdentifierStart:function(e){return this.options.isIdentifierStart?this.options.isIdentifierStart(e,this.codePointAt(e)):this.isValidIdentifierStart(e)},isValidIdentifierStart:function(e){return"a"<=e&&"z">=e||"A"<=e&&"Z">=e||"_"===e||"$"===e},isIdentifierContinue:function(e){return this.options.isIdentifierContinue?this.options.isIdentifierContinue(e,this.codePointAt(e)):this.isValidIdentifierContinue(e)},isValidIdentifierContinue:function(e,t){return this.isValidIdentifierStart(e,t)||this.isNumber(e)},codePointAt:function(e){return 1===e.length?e.charCodeAt(0):(e.charCodeAt(0)<<10)+e.charCodeAt(1)-56613888},peekMultichar:function(){var e=this.text.charAt(this.index),t=this.peek();if(!t)return e;var n=e.charCodeAt(0),i=t.charCodeAt(0);return 55296<=n&&56319>=n&&56320<=i&&57343>=i?e+t:e},isExpOperator:function(e){return"-"===e||"+"===e||this.isNumber(e)},throwError:function(e,t,n){throw n=n||this.index,t=m(t)?"s "+t+"-"+this.index+" ["+this.text.substring(t,n)+"]":" "+n,or("lexerr",e,t,this.text)},readNumber:function(){for(var e="",t=this.index;this.index<this.text.length;){var n=Pn(this.text.charAt(this.index));if("."===n||this.isNumber(n))e+=n;else{var i=this.peek();if("e"===n&&this.isExpOperator(i))e+=n;else if(this.isExpOperator(n)&&i&&this.isNumber(i)&&"e"===e.charAt(e.length-1))e+=n;else{if(!this.isExpOperator(n)||i&&this.isNumber(i)||"e"!==e.charAt(e.length-1))break;this.throwError("Invalid exponent")}}this.index++}this.tokens.push({index:t,text:e,constant:!0,value:Number(e)})},readIdent:function(){var e=this.index;for(this.index+=this.peekMultichar().length;this.index<this.text.length;){var t=this.peekMultichar();if(!this.isIdentifierContinue(t))break;this.index+=t.length}this.tokens.push({index:e,text:this.text.slice(e,this.index),identifier:!0})},readString:function(e){var t=this.index;this.index++;for(var n="",i=e,r=!1;this.index<this.text.length;){var o=this.text.charAt(this.index);i=i+o;if(r)"u"===o?((r=this.text.substring(this.index+1,this.index+5)).match(/[\da-f]{4}/i)||this.throwError("Invalid unicode escape [\\u"+r+"]"),this.index+=4,n+=String.fromCharCode(parseInt(r,16))):n+=lr[o]||o,r=!1;else if("\\"===o)r=!0;else{if(o===e)return this.index++,void this.tokens.push({index:t,text:i,constant:!0,value:n});n+=o}this.index++}this.throwError("Unterminated quote",t)}};var ur=function(e,t){this.lexer=e,this.options=t};ur.Program="Program",ur.ExpressionStatement="ExpressionStatement",ur.AssignmentExpression="AssignmentExpression",ur.ConditionalExpression="ConditionalExpression",ur.LogicalExpression="LogicalExpression",ur.BinaryExpression="BinaryExpression",ur.UnaryExpression="UnaryExpression",ur.CallExpression="CallExpression",ur.MemberExpression="MemberExpression",ur.Identifier="Identifier",ur.Literal="Literal",ur.ArrayExpression="ArrayExpression",ur.Property="Property",ur.ObjectExpression="ObjectExpression",ur.ThisExpression="ThisExpression",ur.LocalsExpression="LocalsExpression",ur.NGValueParameter="NGValueParameter",ur.prototype={ast:function(e){return this.text=e,this.tokens=this.lexer.lex(e),e=this.program(),0!==this.tokens.length&&this.throwError("is an unexpected token",this.tokens[0]),e},program:function(){for(var e=[];;)if(0<this.tokens.length&&!this.peek("}",")",";","]")&&e.push(this.expressionStatement()),!this.expect(";"))return{type:ur.Program,body:e}},expressionStatement:function(){return{type:ur.ExpressionStatement,expression:this.filterChain()}},filterChain:function(){for(var e=this.expression();this.expect("|");)e=this.filter(e);return e},expression:function(){return this.assignment()},assignment:function(){var e=this.ternary();if(this.expect("=")){if(!xt(e))throw or("lval");e={type:ur.AssignmentExpression,left:e,right:this.assignment(),operator:"="}}return e},ternary:function(){var e,t,n=this.logicalOR();return this.expect("?")&&(e=this.expression(),this.consume(":"))?(t=this.expression(),{type:ur.ConditionalExpression,test:n,alternate:e,consequent:t}):n},logicalOR:function(){for(var e=this.logicalAND();this.expect("||");)e={type:ur.LogicalExpression,operator:"||",left:e,right:this.logicalAND()};return e},logicalAND:function(){for(var e=this.equality();this.expect("&&");)e={type:ur.LogicalExpression,operator:"&&",left:e,right:this.equality()};return e},equality:function(){for(var e,t=this.relational();e=this.expect("==","!=","===","!==");)t={type:ur.BinaryExpression,operator:e.text,left:t,right:this.relational()};return t},relational:function(){for(var e,t=this.additive();e=this.expect("<",">","<=",">=");)t={type:ur.BinaryExpression,operator:e.text,left:t,right:this.additive()};return t},additive:function(){for(var e,t=this.multiplicative();e=this.expect("+","-");)t={type:ur.BinaryExpression,operator:e.text,left:t,right:this.multiplicative()};return t},multiplicative:function(){for(var e,t=this.unary();e=this.expect("*","/","%");)t={type:ur.BinaryExpression,operator:e.text,left:t,right:this.unary()};return t},unary:function(){var e;return(e=this.expect("+","-","!"))?{type:ur.UnaryExpression,operator:e.text,prefix:!0,argument:this.unary()}:this.primary()},primary:function(){var e;this.expect("(")?(e=this.filterChain(),this.consume(")")):this.expect("[")?e=this.arrayDeclaration():this.expect("{")?e=this.object():this.selfReferential.hasOwnProperty(this.peek().text)?e=D(this.selfReferential[this.consume().text]):this.options.literals.hasOwnProperty(this.peek().text)?e={type:ur.Literal,value:this.options.literals[this.consume().text]}:this.peek().identifier?e=this.identifier():this.peek().constant?e=this.constant():this.throwError("not a primary expression",this.peek());for(var t;t=this.expect("(","[",".");)"("===t.text?(e={type:ur.CallExpression,callee:e,arguments:this.parseArguments()},this.consume(")")):"["===t.text?(e={type:ur.MemberExpression,object:e,property:this.expression(),computed:!0},this.consume("]")):"."===t.text?e={type:ur.MemberExpression,object:e,property:this.identifier(),computed:!1}:this.throwError("IMPOSSIBLE");return e},filter:function(e){e=[e];for(var t={type:ur.CallExpression,callee:this.identifier(),arguments:e,filter:!0};this.expect(":");)e.push(this.expression());return t},parseArguments:function(){var e=[];if(")"!==this.peekToken().text)do{e.push(this.filterChain())}while(this.expect(","));return e},identifier:function(){var e=this.consume();return e.identifier||this.throwError("is not a valid identifier",e),{type:ur.Identifier,name:e.text}},constant:function(){return{type:ur.Literal,value:this.consume().value}},arrayDeclaration:function(){var e=[];if("]"!==this.peekToken().text)do{if(this.peek("]"))break;e.push(this.expression())}while(this.expect(","));return this.consume("]"),{type:ur.ArrayExpression,elements:e}},object:function(){var e,t=[];if("}"!==this.peekToken().text)do{if(this.peek("}"))break;e={type:ur.Property,kind:"init"},this.peek().constant?(e.key=this.constant(),e.computed=!1,this.consume(":"),e.value=this.expression()):this.peek().identifier?(e.key=this.identifier(),e.computed=!1,this.peek(":")?(this.consume(":"),e.value=this.expression()):e.value=e.key):this.peek("[")?(this.consume("["),e.key=this.expression(),this.consume("]"),e.computed=!0,this.consume(":"),e.value=this.expression()):this.throwError("invalid key",this.peek()),t.push(e)}while(this.expect(","));return this.consume("}"),{type:ur.ObjectExpression,properties:t}},throwError:function(e,t){throw or("syntax",t.text,e,t.index+1,this.text,this.text.substring(t.index))},consume:function(e){if(0===this.tokens.length)throw or("ueoe",this.text);var t=this.expect(e);return t||this.throwError("is unexpected, expecting ["+e+"]",this.peek()),t},peekToken:function(){if(0===this.tokens.length)throw or("ueoe",this.text);return this.tokens[0]},peek:function(e,t,n,i){return this.peekAhead(0,e,t,n,i)},peekAhead:function(e,t,n,i,r){if(this.tokens.length>e){var o=(e=this.tokens[e]).text;if(o===t||o===n||o===i||o===r||!(t||n||i||r))return e}return!1},expect:function(e,t,n,i){return!!(e=this.peek(e,t,n,i))&&(this.tokens.shift(),e)},selfReferential:{this:{type:ur.ThisExpression},$locals:{type:ur.LocalsExpression}}},Ft.prototype={compile:function(e){var t=this;e=this.astBuilder.ast(e),this.state={nextId:0,filters:{},fn:{vars:[],body:[],own:{}},assign:{vars:[],body:[],own:{}},inputs:[]},$t(e,t.$filter);var n,r="";return this.stage="assign",(n=kt(e))&&(this.state.computing="assign",r=this.nextId(),this.recurse(n,r),this.return_(r),r="fn.assign="+this.generateFunction("assign","s,v,l")),n=Ct(e.body),t.stage="inputs",i(n,function(e,n){var i="fn"+n;t.state[i]={vars:[],body:[],own:{}},t.state.computing=i;var r=t.nextId();t.recurse(e,r),t.return_(r),t.state.inputs.push(i),e.watchId=n}),this.state.computing="fn",this.stage="main",this.recurse(e),r='"'+this.USE+" "+this.STRICT+'";\n'+this.filterPrefix()+"var fn="+this.generateFunction("fn","s,l,a,i")+r+this.watchFns()+"return fn;",r=new Function("$filter","getStringValue","ifDefined","plus",r)(this.$filter,bt,yt,At),this.state=this.stage=void 0,r.literal=Et(e),r.constant=e.constant,r},USE:"use",STRICT:"strict",watchFns:function(){var e=[],t=this.state.inputs,n=this;return i(t,function(t){e.push("var "+t+"="+n.generateFunction(t,"s"))}),t.length&&e.push("fn.inputs=["+t.join(",")+"];"),e.join("")},generateFunction:function(e,t){return"function("+t+"){"+this.varsPrefix(e)+this.body(e)+"};"},filterPrefix:function(){var e=[],t=this;return i(this.state.filters,function(n,i){e.push(n+"=$filter("+t.escape(i)+")")}),e.length?"var "+e.join(",")+";":""},varsPrefix:function(e){return this.state[e].vars.length?"var "+this.state[e].vars.join(",")+";":""},body:function(e){return this.state[e].body.join("")},recurse:function(e,t,n,r,o,s){var a,l,c,u,d,p=this;if(r=r||h,!s&&m(e.watchId))t=t||this.nextId(),this.if_("i",this.lazyAssign(t,this.computedMember("i",e.watchId)),this.lazyRecurse(e,t,n,r,o,!0));else switch(e.type){case ur.Program:i(e.body,function(t,n){p.recurse(t.expression,void 0,void 0,function(e){l=e}),n!==e.body.length-1?p.current().body.push(l,";"):p.return_(l)});break;case ur.Literal:u=this.escape(e.value),this.assign(t,u),r(t||u);break;case ur.UnaryExpression:this.recurse(e.argument,void 0,void 0,function(e){l=e}),u=e.operator+"("+this.ifDefined(l,0)+")",this.assign(t,u),r(u);break;case ur.BinaryExpression:this.recurse(e.left,void 0,void 0,function(e){a=e}),this.recurse(e.right,void 0,void 0,function(e){l=e}),u="+"===e.operator?this.plus(a,l):"-"===e.operator?this.ifDefined(a,0)+e.operator+this.ifDefined(l,0):"("+a+")"+e.operator+"("+l+")",this.assign(t,u),r(u);break;case ur.LogicalExpression:t=t||this.nextId(),p.recurse(e.left,t),p.if_("&&"===e.operator?t:p.not(t),p.lazyRecurse(e.right,t)),r(t);break;case ur.ConditionalExpression:t=t||this.nextId(),p.recurse(e.test,t),p.if_(t,p.lazyRecurse(e.alternate,t),p.lazyRecurse(e.consequent,t)),r(t);break;case ur.Identifier:t=t||this.nextId(),n&&(n.context="inputs"===p.stage?"s":this.assign(this.nextId(),this.getHasOwnProperty("l",e.name)+"?l:s"),n.computed=!1,n.name=e.name),p.if_("inputs"===p.stage||p.not(p.getHasOwnProperty("l",e.name)),function(){p.if_("inputs"===p.stage||"s",function(){o&&1!==o&&p.if_(p.isNull(p.nonComputedMember("s",e.name)),p.lazyAssign(p.nonComputedMember("s",e.name),"{}")),p.assign(t,p.nonComputedMember("s",e.name))})},t&&p.lazyAssign(t,p.nonComputedMember("l",e.name))),r(t);break;case ur.MemberExpression:a=n&&(n.context=this.nextId())||this.nextId(),t=t||this.nextId(),p.recurse(e.object,a,void 0,function(){p.if_(p.notNull(a),function(){e.computed?(l=p.nextId(),p.recurse(e.property,l),p.getStringValue(l),o&&1!==o&&p.if_(p.not(p.computedMember(a,l)),p.lazyAssign(p.computedMember(a,l),"{}")),u=p.computedMember(a,l),p.assign(t,u),n&&(n.computed=!0,n.name=l)):(o&&1!==o&&p.if_(p.isNull(p.nonComputedMember(a,e.property.name)),p.lazyAssign(p.nonComputedMember(a,e.property.name),"{}")),u=p.nonComputedMember(a,e.property.name),p.assign(t,u),n&&(n.computed=!1,n.name=e.property.name))},function(){p.assign(t,"undefined")}),r(t)},!!o);break;case ur.CallExpression:t=t||this.nextId(),e.filter?(l=p.filter(e.callee.name),c=[],i(e.arguments,function(e){var t=p.nextId();p.recurse(e,t),c.push(t)}),u=l+"("+c.join(",")+")",p.assign(t,u),r(t)):(l=p.nextId(),a={},c=[],p.recurse(e.callee,l,a,function(){p.if_(p.notNull(l),function(){i(e.arguments,function(t){p.recurse(t,e.constant?void 0:p.nextId(),void 0,function(e){c.push(e)})}),u=a.name?p.member(a.context,a.name,a.computed)+"("+c.join(",")+")":l+"("+c.join(",")+")",p.assign(t,u)},function(){p.assign(t,"undefined")}),r(t)}));break;case ur.AssignmentExpression:l=this.nextId(),a={},this.recurse(e.left,void 0,a,function(){p.if_(p.notNull(a.context),function(){p.recurse(e.right,l),u=p.member(a.context,a.name,a.computed)+e.operator+l,p.assign(t,u),r(t||u)})},1);break;case ur.ArrayExpression:c=[],i(e.elements,function(t){p.recurse(t,e.constant?void 0:p.nextId(),void 0,function(e){c.push(e)})}),u="["+c.join(",")+"]",this.assign(t,u),r(t||u);break;case ur.ObjectExpression:c=[],d=!1,i(e.properties,function(e){e.computed&&(d=!0)}),d?(t=t||this.nextId(),this.assign(t,"{}"),i(e.properties,function(e){e.computed?(a=p.nextId(),p.recurse(e.key,a)):a=e.key.type===ur.Identifier?e.key.name:""+e.key.value,l=p.nextId(),p.recurse(e.value,l),p.assign(p.member(t,a,e.computed),l)})):(i(e.properties,function(t){p.recurse(t.value,e.constant?void 0:p.nextId(),void 0,function(e){c.push(p.escape(t.key.type===ur.Identifier?t.key.name:""+t.key.value)+":"+e)})}),u="{"+c.join(",")+"}",this.assign(t,u)),r(t||u);break;case ur.ThisExpression:this.assign(t,"s"),r(t||"s");break;case ur.LocalsExpression:this.assign(t,"l"),r(t||"l");break;case ur.NGValueParameter:this.assign(t,"v"),r(t||"v")}},getHasOwnProperty:function(e,t){var n=e+"."+t,i=this.current().own;return i.hasOwnProperty(n)||(i[n]=this.nextId(!1,e+"&&("+this.escape(t)+" in "+e+")")),i[n]},assign:function(e,t){if(e)return this.current().body.push(e,"=",t,";"),e},filter:function(e){return this.state.filters.hasOwnProperty(e)||(this.state.filters[e]=this.nextId(!0)),this.state.filters[e]},ifDefined:function(e,t){return"ifDefined("+e+","+this.escape(t)+")"},plus:function(e,t){return"plus("+e+","+t+")"},return_:function(e){this.current().body.push("return ",e,";")},if_:function(e,t,n){if(!0===e)t();else{var i=this.current().body;i.push("if(",e,"){"),t(),i.push("}"),n&&(i.push("else{"),n(),i.push("}"))}},not:function(e){return"!("+e+")"},isNull:function(e){return e+"==null"},notNull:function(e){return e+"!=null"},nonComputedMember:function(e,t){return/^[$_a-zA-Z][$_a-zA-Z0-9]*$/.test(t)?e+"."+t:e+'["'+t.replace(/[^$_a-zA-Z0-9]/g,this.stringEscapeFn)+'"]'},computedMember:function(e,t){return e+"["+t+"]"},member:function(e,t,n){return n?this.computedMember(e,t):this.nonComputedMember(e,t)},getStringValue:function(e){this.assign(e,"getStringValue("+e+")")},lazyRecurse:function(e,t,n,i,r,o){var s=this;return function(){s.recurse(e,t,n,i,r,o)}},lazyAssign:function(e,t){var n=this;return function(){n.assign(e,t)}},stringEscapeRegex:/[^ a-zA-Z0-9]/g,stringEscapeFn:function(e){return"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)},escape:function(e){if(b(e))return"'"+e.replace(this.stringEscapeRegex,this.stringEscapeFn)+"'";if(y(e))return e.toString();if(!0===e)return"true";if(!1===e)return"false";if(null===e)return"null";if(void 0===e)return"undefined";throw or("esc")},nextId:function(e,t){var n="v"+this.state.nextId++;return e||this.current().vars.push(n+(t?"="+t:"")),n},current:function(){return this.state[this.state.computing]}},St.prototype={compile:function(e){var t=this;$t(e=this.astBuilder.ast(e),t.$filter);var n,r;(n=kt(e))&&(r=this.recurse(n));var o;(n=Ct(e.body))&&(o=[],i(n,function(e,n){var i=t.recurse(e);e.input=i,o.push(i),e.watchId=n}));var s=[];return i(e.body,function(e){s.push(t.recurse(e.expression))}),n=0===e.body.length?h:1===e.body.length?s[0]:function(e,t){var n;return i(s,function(i){n=i(e,t)}),n},r&&(n.assign=function(e,t,n){return r(e,n,t)}),o&&(n.inputs=o),n.literal=Et(e),n.constant=e.constant,n},recurse:function(e,t,n){var r,o,s,a=this;if(e.input)return this.inputs(e.input,e.watchId);switch(e.type){case ur.Literal:return this.value(e.value,t);case ur.UnaryExpression:return o=this.recurse(e.argument),this["unary"+e.operator](o,t);case ur.BinaryExpression:case ur.LogicalExpression:return r=this.recurse(e.left),o=this.recurse(e.right),this["binary"+e.operator](r,o,t);case ur.ConditionalExpression:return this["ternary?:"](this.recurse(e.test),this.recurse(e.alternate),this.recurse(e.consequent),t);case ur.Identifier:return a.identifier(e.name,t,n);case ur.MemberExpression:return r=this.recurse(e.object,!1,!!n),e.computed||(o=e.property.name),e.computed&&(o=this.recurse(e.property)),e.computed?this.computedMember(r,o,t,n):this.nonComputedMember(r,o,t,n);case ur.CallExpression:return s=[],i(e.arguments,function(e){s.push(a.recurse(e))}),e.filter&&(o=this.$filter(e.callee.name)),e.filter||(o=this.recurse(e.callee,!0)),e.filter?function(e,n,i,r){for(var a=[],l=0;l<s.length;++l)a.push(s[l](e,n,i,r));return e=o.apply(void 0,a,r),t?{context:void 0,name:void 0,value:e}:e}:function(e,n,i,r){var a,l=o(e,n,i,r);if(null!=l.value){a=[];for(var c=0;c<s.length;++c)a.push(s[c](e,n,i,r));a=l.value.apply(l.context,a)}return t?{value:a}:a};case ur.AssignmentExpression:return r=this.recurse(e.left,!0,1),o=this.recurse(e.right),function(e,n,i,s){var a=r(e,n,i,s);return e=o(e,n,i,s),a.context[a.name]=e,t?{value:e}:e};case ur.ArrayExpression:return s=[],i(e.elements,function(e){s.push(a.recurse(e))}),function(e,n,i,r){for(var o=[],a=0;a<s.length;++a)o.push(s[a](e,n,i,r));return t?{value:o}:o};case ur.ObjectExpression:return s=[],i(e.properties,function(e){e.computed?s.push({key:a.recurse(e.key),computed:!0,value:a.recurse(e.value)}):s.push({key:e.key.type===ur.Identifier?e.key.name:""+e.key.value,computed:!1,value:a.recurse(e.value)})}),function(e,n,i,r){for(var o={},a=0;a<s.length;++a)s[a].computed?o[s[a].key(e,n,i,r)]=s[a].value(e,n,i,r):o[s[a].key]=s[a].value(e,n,i,r);return t?{value:o}:o};case ur.ThisExpression:return function(e){return t?{value:e}:e};case ur.LocalsExpression:return function(e,n){return t?{value:n}:n};case ur.NGValueParameter:return function(e,n,i){return t?{value:i}:i}}},"unary+":function(e,t){return function(n,i,r,o){return n=e(n,i,r,o),n=m(n)?+n:0,t?{value:n}:n}},"unary-":function(e,t){return function(n,i,r,o){return n=e(n,i,r,o),n=m(n)?-n:-0,t?{value:n}:n}},"unary!":function(e,t){return function(n,i,r,o){return n=!e(n,i,r,o),t?{value:n}:n}},"binary+":function(e,t,n){return function(i,r,o,s){var a=e(i,r,o,s);return i=t(i,r,o,s),a=At(a,i),n?{value:a}:a}},"binary-":function(e,t,n){return function(i,r,o,s){var a=e(i,r,o,s);return i=t(i,r,o,s),a=(m(a)?a:0)-(m(i)?i:0),n?{value:a}:a}},"binary*":function(e,t,n){return function(i,r,o,s){return i=e(i,r,o,s)*t(i,r,o,s),n?{value:i}:i}},"binary/":function(e,t,n){return function(i,r,o,s){return i=e(i,r,o,s)/t(i,r,o,s),n?{value:i}:i}},"binary%":function(e,t,n){return function(i,r,o,s){return i=e(i,r,o,s)%t(i,r,o,s),n?{value:i}:i}},"binary===":function(e,t,n){return function(i,r,o,s){return i=e(i,r,o,s)===t(i,r,o,s),n?{value:i}:i}},"binary!==":function(e,t,n){return function(i,r,o,s){return i=e(i,r,o,s)!==t(i,r,o,s),n?{value:i}:i}},"binary==":function(e,t,n){return function(i,r,o,s){return i=e(i,r,o,s)==t(i,r,o,s),n?{value:i}:i}},"binary!=":function(e,t,n){return function(i,r,o,s){return i=e(i,r,o,s)!=t(i,r,o,s),n?{value:i}:i}},"binary<":function(e,t,n){return function(i,r,o,s){return i=e(i,r,o,s)<t(i,r,o,s),n?{value:i}:i}},"binary>":function(e,t,n){return function(i,r,o,s){return i=e(i,r,o,s)>t(i,r,o,s),n?{value:i}:i}},"binary<=":function(e,t,n){return function(i,r,o,s){return i=e(i,r,o,s)<=t(i,r,o,s),n?{value:i}:i}},"binary>=":function(e,t,n){return function(i,r,o,s){return i=e(i,r,o,s)>=t(i,r,o,s),n?{value:i}:i}},"binary&&":function(e,t,n){return function(i,r,o,s){return i=e(i,r,o,s)&&t(i,r,o,s),n?{value:i}:i}},"binary||":function(e,t,n){return function(i,r,o,s){return i=e(i,r,o,s)||t(i,r,o,s),n?{value:i}:i}},"ternary?:":function(e,t,n,i){return function(r,o,s,a){return r=e(r,o,s,a)?t(r,o,s,a):n(r,o,s,a),i?{value:r}:r}},value:function(e,t){return function(){return t?{context:void 0,name:void 0,value:e}:e}},identifier:function(e,t,n){return function(i,r,o,s){return i=r&&e in r?r:i,n&&1!==n&&i&&null==i[e]&&(i[e]={}),r=i?i[e]:void 0,t?{context:i,name:e,value:r}:r}},computedMember:function(e,t,n,i){return function(r,o,s,a){var l,c,u=e(r,o,s,a);return null!=u&&(l=t(r,o,s,a),l+="",i&&1!==i&&u&&!u[l]&&(u[l]={}),c=u[l]),n?{context:u,name:l,value:c}:c}},nonComputedMember:function(e,t,n,i){return function(r,o,s,a){return r=e(r,o,s,a),i&&1!==i&&r&&null==r[t]&&(r[t]={}),o=null!=r?r[t]:void 0,n?{context:r,name:t,value:o}:o}},inputs:function(e,t){return function(n,i,r,o){return o?o[t]:e(n,i,r)}}};var hr=function(e,t,n){this.lexer=e,this.$filter=t,this.options=n,this.ast=new ur(e,n),this.astCompiler=n.csp?new St(this.ast,t):new Ft(this.ast,t)};hr.prototype={constructor:hr,parse:function(e){return this.astCompiler.compile(e)}};var dr=t("$sce"),pr={HTML:"html",CSS:"css",URL:"url",RESOURCE_URL:"resourceUrl",JS:"js"},fr=/_([a-z])/g,gr=t("$compile"),mr=e.document.createElement("a"),vr=Ut(e.location.href);Kt.$inject=["$document"],Yt.$inject=["$provide"];var wr=22,br=".",yr="0";Qt.$inject=["$locale"],en.$inject=["$locale"];var Ar={yyyy:rn("FullYear",4,0,!1,!0),yy:rn("FullYear",2,0,!0,!0),y:rn("FullYear",1,0,!1,!0),MMMM:on("Month"),MMM:on("Month",!0),MM:rn("Month",2,1),M:rn("Month",1,1),LLLL:on("Month",!1,!0),dd:rn("Date",2),d:rn("Date",1),HH:rn("Hours",2),H:rn("Hours",1),hh:rn("Hours",2,-12),h:rn("Hours",1,-12),mm:rn("Minutes",2),m:rn("Minutes",1),ss:rn("Seconds",2),s:rn("Seconds",1),sss:rn("Milliseconds",3),EEEE:on("Day"),EEE:on("Day",!0),a:function(e,t){return 12>e.getHours()?t.AMPMS[0]:t.AMPMS[1]},Z:function(e,t,n){return e=-1*n,e=(0<=e?"+":"")+(nn(Math[0<e?"floor":"ceil"](e/60),2)+nn(Math.abs(e%60),2))},ww:an(2),w:an(1),G:ln,GG:ln,GGG:ln,GGGG:function(e,t){return 0>=e.getFullYear()?t.ERANAMES[0]:t.ERANAMES[1]}},$r=/((?:[^yMLdHhmsaZEwG']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|L+|d+|H+|h+|m+|s+|a|Z|G+|w+))(.*)/,Cr=/^-?\d+$/;cn.$inject=["$locale"];var xr=p(Pn),kr=p(Wn);pn.$inject=["$parse"];var Er=p({restrict:"E",compile:function(e,t){if(!t.href&&!t.xlinkHref)return function(e,t){if("a"===t[0].nodeName.toLowerCase()){var n="[object SVGAnimatedString]"===Un.call(t.prop("href"))?"xlink:href":"href";t.on("click",function(e){t.attr(n)||e.preventDefault()})}}}}),Fr={};i($i,function(e,t){function n(e,n,r){e.$watch(r[i],function(e){r.$set(t,!!e)})}if("multiple"!==e){var i=We("ng-"+t),r=n;"checked"===e&&(r=function(e,t,r){r.ngModel!==r[i]&&n(e,0,r)}),Fr[i]=function(){return{restrict:"A",priority:100,link:r}}}}),i(xi,function(e,t){Fr[t]=function(){return{priority:100,link:function(e,n,i){"ngPattern"===t&&"/"===i.ngPattern.charAt(0)&&(n=i.ngPattern.match(In))?i.$set("ngPattern",new RegExp(n[1],n[2])):e.$watch(i[t],function(e){i.$set(t,e)})}}}}),i(["src","srcset","href"],function(e){var t=We("ng-"+e);Fr[t]=function(){return{priority:99,link:function(n,i,r){var o=e,s=e;"href"===e&&"[object SVGAnimatedString]"===Un.call(i.prop("href"))&&(s="xlinkHref",r.$attr[s]="xlink:href",o=null),r.$observe(t,function(t){t?(r.$set(s,t),Rn&&o&&i.prop(o,r[s])):"href"===e&&r.$set(s,null)})}}}});var Sr={$addControl:h,$$renameControl:function(e,t){e.$name=t},$removeControl:h,$setValidity:h,$setDirty:h,$setPristine:h,$setSubmitted:h};gn.$inject=["$element","$attrs","$scope","$animate","$interpolate"],gn.prototype={$rollbackViewValue:function(){i(this.$$controls,function(e){e.$rollbackViewValue()})},$commitViewValue:function(){i(this.$$controls,function(e){e.$commitViewValue()})},$addControl:function(e){Z(e.$name,"input"),this.$$controls.push(e),e.$name&&(this[e.$name]=e),e.$$parentForm=this},$$renameControl:function(e,t){var n=e.$name;this[n]===e&&delete this[n],this[t]=e,e.$name=t},$removeControl:function(e){e.$name&&this[e.$name]===e&&delete this[e.$name],i(this.$pending,function(t,n){this.$setValidity(n,null,e)},this),i(this.$error,function(t,n){this.$setValidity(n,null,e)},this),i(this.$$success,function(t,n){this.$setValidity(n,null,e)},this),B(this.$$controls,e),e.$$parentForm=Sr},$setDirty:function(){this.$$animate.removeClass(this.$$element,uo),this.$$animate.addClass(this.$$element,ho),this.$dirty=!0,this.$pristine=!1,this.$$parentForm.$setDirty()},$setPristine:function(){this.$$animate.setClass(this.$$element,uo,ho+" ng-submitted"),this.$dirty=!1,this.$pristine=!0,this.$submitted=!1,i(this.$$controls,function(e){e.$setPristine()})},$setUntouched:function(){i(this.$$controls,function(e){e.$setUntouched()})},$setSubmitted:function(){this.$$animate.addClass(this.$$element,"ng-submitted"),this.$submitted=!0,this.$$parentForm.$setSubmitted()}},vn({clazz:gn,set:function(e,t,n){var i=e[t];i?-1===i.indexOf(n)&&i.push(n):e[t]=[n]},unset:function(e,t,n){var i=e[t];i&&(B(i,n),0===i.length&&delete e[t])}});var Br=function(e){return["$timeout","$parse",function(t,n){function i(e){return""===e?n('this[""]').assign:n(e).assign||h}return{name:"form",restrict:e?"EAC":"E",require:["form","^^?form"],controller:gn,compile:function(n,r){n.addClass(uo).addClass(lo);var o=r.name?"name":!(!e||!r.ngForm)&&"ngForm";return{pre:function(e,n,r,s){var l=s[0];if(!("action"in r)){var c=function(t){e.$apply(function(){l.$commitViewValue(),l.$setSubmitted()}),t.preventDefault()};n[0].addEventListener("submit",c),n.on("$destroy",function(){t(function(){n[0].removeEventListener("submit",c)},0,!1)})}(s[1]||l.$$parentForm).$addControl(l);var u=o?i(l.$name):h;o&&(u(e,l),r.$observe(o,function(t){l.$name!==t&&(u(e,void 0),l.$$parentForm.$$renameControl(l,t),(u=i(l.$name))(e,l))})),n.on("$destroy",function(){l.$$parentForm.$removeControl(l),u(e,void 0),a(l,Sr)})}}}}}]},Dr=Br(),Lr=Br(!0),Mr=/^\d{4,}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+(?:[+-][0-2]\d:[0-5]\d|Z)$/,Rr=/^[a-z][a-z\d.+-]*:\/*(?:[^:@]+(?::[^@]+)?@)?(?:[^\s:/?#]+|\[[a-f\d:]+])(?::\d+)?(?:\/[^?#]*)?(?:\?[^#]*)?(?:#.*)?$/i,Tr=/^(?=.{1,254}$)(?=.{1,64}@)[-!#$%&'*+/0-9=?A-Z^_`a-z{|}~]+(\.[-!#$%&'*+/0-9=?A-Z^_`a-z{|}~]+)*@[A-Za-z0-9]([A-Za-z0-9-]{0,61}[A-Za-z0-9])?(\.[A-Za-z0-9]([A-Za-z0-9-]{0,61}[A-Za-z0-9])?)*$/,_r=/^\s*(-|\+)?(\d+|(\d*(\.\d*)))([eE][+-]?\d+)?\s*$/,Or=/^(\d{4,})-(\d{2})-(\d{2})$/,Ir=/^(\d{4,})-(\d\d)-(\d\d)T(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/,Vr=/^(\d{4,})-W(\d\d)$/,Pr=/^(\d{4,})-(\d\d)$/,Wr=/^(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/,Nr=te();i(["date","datetime-local","month","time","week"],function(e){Nr[e]=!0});var Hr={text:function(e,t,n,i,r,o){yn(0,t,n,i,r,o),bn(i)},date:$n("date",Or,An(Or,["yyyy","MM","dd"]),"yyyy-MM-dd"),"datetime-local":$n("datetimelocal",Ir,An(Ir,"yyyy MM dd HH mm ss sss".split(" ")),"yyyy-MM-ddTHH:mm:ss.sss"),time:$n("time",Wr,An(Wr,["HH","mm","ss","sss"]),"HH:mm:ss.sss"),week:$n("week",Vr,function(e,t){if(A(e))return e;if(b(e)){Vr.lastIndex=0;var n=Vr.exec(e);if(n){var i=+n[1],r=+n[2],o=n=0,s=0,a=0,l=sn(i);r=7*(r-1);return t&&(n=t.getHours(),o=t.getMinutes(),s=t.getSeconds(),a=t.getMilliseconds()),new Date(i,0,l.getDate()+r,n,o,s,a)}}return NaN},"yyyy-Www"),month:$n("month",Pr,An(Pr,["yyyy","MM"]),"yyyy-MM"),number:function(e,t,n,i,r,o){Cn(0,t,0,i),xn(i),yn(0,t,n,i,r,o);var s,a;if((m(n.min)||n.ngMin)&&(i.$validators.min=function(e){return i.$isEmpty(e)||g(s)||e>=s},n.$observe("min",function(e){s=kn(e),i.$validate()})),(m(n.max)||n.ngMax)&&(i.$validators.max=function(e){return i.$isEmpty(e)||g(a)||e<=a},n.$observe("max",function(e){a=kn(e),i.$validate()})),m(n.step)||n.ngStep){var l;i.$validators.step=function(e,t){return i.$isEmpty(t)||g(l)||Fn(t,s||0,l)},n.$observe("step",function(e){l=kn(e),i.$validate()})}},url:function(e,t,n,i,r,o){yn(0,t,n,i,r,o),bn(i),i.$$parserName="url",i.$validators.url=function(e,t){var n=e||t;return i.$isEmpty(n)||Rr.test(n)}},email:function(e,t,n,i,r,o){yn(0,t,n,i,r,o),bn(i),i.$$parserName="email",i.$validators.email=function(e,t){var n=e||t;return i.$isEmpty(n)||Tr.test(n)}},radio:function(e,t,n,i){var r=!n.ngTrim||"false"!==Zn(n.ngTrim);g(n.name)&&t.attr("name",++Gn),t.on("click",function(e){var o;t[0].checked&&(o=n.value,r&&(o=Zn(o)),i.$setViewValue(o,e&&e.type))}),i.$render=function(){var e=n.value;r&&(e=Zn(e)),t[0].checked=e===i.$viewValue},n.$observe("value",i.$render)},range:function(e,t,n,i,r,o){function s(e,i){t.attr(e,n[e]),n.$observe(e,i)}Cn(0,t,0,i),xn(i),yn(0,t,n,i,r,o);var a=i.$$hasNativeValidators&&"range"===t[0].type,l=a?0:void 0,c=a?100:void 0,u=a?1:void 0,h=t[0].validity;e=m(n.min),r=m(n.max),o=m(n.step);var d=i.$render;i.$render=a&&m(h.rangeUnderflow)&&m(h.rangeOverflow)?function(){d(),i.$setViewValue(t.val())}:d,e&&(i.$validators.min=a?function(){return!0}:function(e,t){return i.$isEmpty(t)||g(l)||t>=l},s("min",function(e){l=kn(e),Yn(i.$modelValue)||(a?(e=t.val(),l>e&&(e=l,t.val(e)),i.$setViewValue(e)):i.$validate())})),r&&(i.$validators.max=a?function(){return!0}:function(e,t){return i.$isEmpty(t)||g(c)||t<=c},s("max",function(e){c=kn(e),Yn(i.$modelValue)||(a?(e=t.val(),c<e&&(t.val(c),e=c<l?l:c),i.$setViewValue(e)):i.$validate())})),o&&(i.$validators.step=a?function(){return!h.stepMismatch}:function(e,t){return i.$isEmpty(t)||g(u)||Fn(t,l||0,u)},s("step",function(e){u=kn(e),Yn(i.$modelValue)||(a&&i.$viewValue!==t.val()?i.$setViewValue(t.val()):i.$validate())}))},checkbox:function(e,t,n,i,r,o,s,a){var l=Sn(a,e,"ngTrueValue",n.ngTrueValue,!0),c=Sn(a,e,"ngFalseValue",n.ngFalseValue,!1);t.on("click",function(e){i.$setViewValue(t[0].checked,e&&e.type)}),i.$render=function(){t[0].checked=i.$viewValue},i.$isEmpty=function(e){return!1===e},i.$formatters.push(function(e){return L(e,l)}),i.$parsers.push(function(e){return e?l:c})},hidden:h,button:h,submit:h,reset:h,file:h},zr=["$browser","$sniffer","$filter","$parse",function(e,t,n,i){return{restrict:"E",require:["?ngModel"],link:{pre:function(r,o,s,a){a[0]&&(Hr[Pn(s.type)]||Hr.text)(r,o,s,a[0],t,e,n,i)}}}}],Ur=/^(true|false|\d+)$/,qr=function(){return{restrict:"A",priority:100,compile:function(e,t){return Ur.test(t.ngValue)?function(e,t,n){e=e.$eval(n.ngValue),t.prop("value",e),n.$set("value",e)}:function(e,t,n){e.$watch(n.ngValue,function(e){t.prop("value",e),n.$set("value",e)})}}}},jr=["$compile",function(e){return{restrict:"AC",compile:function(t){return e.$$addBindingClass(t),function(t,n,i){e.$$addBindingInfo(n,i.ngBind),n=n[0],t.$watch(i.ngBind,function(e){n.textContent=ne(e)})}}}}],Kr=["$interpolate","$compile",function(e,t){return{compile:function(n){return t.$$addBindingClass(n),function(n,i,r){n=e(i.attr(r.$attr.ngBindTemplate)),t.$$addBindingInfo(i,n.expressions),i=i[0],r.$observe("ngBindTemplate",function(e){i.textContent=g(e)?"":e})}}}}],Gr=["$sce","$parse","$compile",function(e,t,n){return{restrict:"A",compile:function(i,r){var o=t(r.ngBindHtml),s=t(r.ngBindHtml,function(t){return e.valueOf(t)});return n.$$addBindingClass(i),function(t,i,r){n.$$addBindingInfo(i,r.ngBindHtml),t.$watch(s,function(){var n=o(t);i.html(e.getTrustedHtml(n)||"")})}}}}],Yr=p({restrict:"A",require:"ngModel",link:function(e,t,n,i){i.$viewChangeListeners.push(function(){e.$eval(n.ngChange)})}}),Xr=Bn("",!0),Jr=Bn("Odd",0),Zr=Bn("Even",1),Qr=fn({compile:function(e,t){t.$set("ngCloak",void 0),e.removeClass("ng-cloak")}}),eo=[function(){return{restrict:"A",scope:!0,controller:"@",priority:500}}],to={},no={blur:!0,focus:!0};i("click dblclick mousedown mouseup mouseover mouseout mousemove mouseenter mouseleave keydown keyup keypress submit focus blur copy cut paste".split(" "),function(e){var t=We("ng-"+e);to[t]=["$parse","$rootScope",function(n,i){return{restrict:"A",compile:function(r,o){var s=n(o[t],null,!0);return function(t,n){n.on(e,function(n){var r=function(){s(t,{$event:n})};no[e]&&i.$$phase?t.$evalAsync(r):t.$apply(r)})}}}}]});var io=["$animate","$compile",function(e,t){return{multiElement:!0,transclude:"element",priority:600,terminal:!0,restrict:"A",$$tlb:!0,link:function(n,i,r,o,s){var a,l,c;n.$watch(r.ngIf,function(n){n?l||s(function(n,o){l=o,n[n.length++]=t.$$createComment("end ngIf",r.ngIf),a={clone:n},e.enter(n,i.parent(),i)}):(c&&(c.remove(),c=null),l&&(l.$destroy(),l=null),a&&(c=ee(a.clone),e.leave(c).done(function(e){!1!==e&&(c=null)}),a=null))})}}}],ro=["$templateRequest","$anchorScroll","$animate",function(e,t,n){return{restrict:"ECA",priority:400,terminal:!0,transclude:"element",controller:Kn.noop,compile:function(i,r){var o=r.ngInclude||r.src,s=r.onload||"",a=r.autoscroll;return function(i,r,l,c,u){var h,d,p,f=0,g=function(){d&&(d.remove(),d=null),h&&(h.$destroy(),h=null),p&&(n.leave(p).done(function(e){!1!==e&&(d=null)}),d=p,p=null)};i.$watch(o,function(o){var l=function(e){!1===e||!m(a)||a&&!i.$eval(a)||t()},d=++f;o?(e(o,!0).then(function(e){if(!i.$$destroyed&&d===f){var t=i.$new();c.template=e,e=u(t,function(e){g(),n.enter(e,null,r).done(l)}),p=e,(h=t).$emit("$includeContentLoaded",o),i.$eval(s)}},function(){i.$$destroyed||d!==f||(g(),i.$emit("$includeContentError",o))}),i.$emit("$includeContentRequested",o)):(g(),c.template=null)})}}}}],oo=["$compile",function(t){return{restrict:"ECA",priority:-400,require:"ngInclude",link:function(n,i,r,o){Un.call(i[0]).match(/SVG/)?(i.empty(),t(le(o.template,e.document).childNodes)(n,function(e){i.append(e)},{futureParentElement:i})):(i.html(o.template),t(i.contents())(n))}}}],so=fn({priority:450,compile:function(){return{pre:function(e,t,n){e.$eval(n.ngInit)}}}}),ao=function(){return{restrict:"A",priority:100,require:"ngModel",link:function(e,t,n,r){var o=n.ngList||", ",s="false"!==n.ngTrim,a=s?Zn(o):o;r.$parsers.push(function(e){if(!g(e)){var t=[];return e&&i(e.split(a),function(e){e&&t.push(s?Zn(e):e)}),t}}),r.$formatters.push(function(e){if(Xn(e))return e.join(o)}),r.$isEmpty=function(e){return!e||!e.length}}}},lo="ng-valid",co="ng-invalid",uo="ng-pristine",ho="ng-dirty",po=t("ngModel");Dn.$inject="$scope $exceptionHandler $attrs $element $parse $animate $timeout $q $interpolate".split(" "),Dn.prototype={$$initGetterSetters:function(){if(this.$options.getOption("getterSetter")){var e=this.$$parse(this.$$attr.ngModel+"()"),t=this.$$parse(this.$$attr.ngModel+"($$$p)");this.$$ngModelGet=function(t){var n=this.$$parsedNgModel(t);return $(n)&&(n=e(t)),n},this.$$ngModelSet=function(e,n){$(this.$$parsedNgModel(e))?t(e,{$$$p:n}):this.$$parsedNgModelAssign(e,n)}}else if(!this.$$parsedNgModel.assign)throw po("nonassign",this.$$attr.ngModel,P(this.$$element))},$render:h,$isEmpty:function(e){return g(e)||""===e||null===e||e!=e},$$updateEmptyClasses:function(e){this.$isEmpty(e)?(this.$$animate.removeClass(this.$$element,"ng-not-empty"),this.$$animate.addClass(this.$$element,"ng-empty")):(this.$$animate.removeClass(this.$$element,"ng-empty"),this.$$animate.addClass(this.$$element,"ng-not-empty"))},$setPristine:function(){this.$dirty=!1,this.$pristine=!0,this.$$animate.removeClass(this.$$element,ho),this.$$animate.addClass(this.$$element,uo)},$setDirty:function(){this.$dirty=!0,this.$pristine=!1,this.$$animate.removeClass(this.$$element,uo),this.$$animate.addClass(this.$$element,ho),this.$$parentForm.$setDirty()},$setUntouched:function(){this.$touched=!1,this.$untouched=!0,this.$$animate.setClass(this.$$element,"ng-untouched","ng-touched")},$setTouched:function(){this.$touched=!0,this.$untouched=!1,this.$$animate.setClass(this.$$element,"ng-touched","ng-untouched")},$rollbackViewValue:function(){this.$$timeout.cancel(this.$$pendingDebounce),this.$viewValue=this.$$lastCommittedViewValue,this.$render()},$validate:function(){if(!Yn(this.$modelValue)){var e=this.$$lastCommittedViewValue,t=this.$$rawModelValue,n=this.$valid,i=this.$modelValue,r=this.$options.getOption("allowInvalid"),o=this;this.$$runValidators(t,e,function(e){r||n===e||(o.$modelValue=e?t:void 0,o.$modelValue!==i&&o.$$writeModelToScope())})}},$$runValidators:function(e,t,n){function r(e,t){s===a.$$currentValidationRunId&&a.$setValidity(e,t)}function o(e){s===a.$$currentValidationRunId&&n(e)}this.$$currentValidationRunId++;var s=this.$$currentValidationRunId,a=this;!function(){var e=a.$$parserName||"parse";return g(a.$$parserValid)?(r(e,null),!0):(a.$$parserValid||(i(a.$validators,function(e,t){r(t,null)}),i(a.$asyncValidators,function(e,t){r(t,null)})),r(e,a.$$parserValid),a.$$parserValid)}()?o(!1):function(){var n=!0;return i(a.$validators,function(i,o){var s=Boolean(i(e,t));n=n&&s,r(o,s)}),!!n||(i(a.$asyncValidators,function(e,t){r(t,null)}),!1)}()?function(){var n=[],s=!0;i(a.$asyncValidators,function(i,o){var a=i(e,t);if(!a||!$(a.then))throw po("nopromise",a);r(o,void 0),n.push(a.then(function(){r(o,!0)},function(){s=!1,r(o,!1)}))}),n.length?a.$$q.all(n).then(function(){o(s)},h):o(!0)}():o(!1)},$commitViewValue:function(){var e=this.$viewValue;this.$$timeout.cancel(this.$$pendingDebounce),(this.$$lastCommittedViewValue!==e||""===e&&this.$$hasNativeValidators)&&(this.$$updateEmptyClasses(e),this.$$lastCommittedViewValue=e,this.$pristine&&this.$setDirty(),this.$$parseAndValidate())},$$parseAndValidate:function(){var e=this.$$lastCommittedViewValue,t=this;if(this.$$parserValid=!g(e)||void 0)for(var n=0;n<this.$parsers.length;n++)if(e=this.$parsers[n](e),g(e)){this.$$parserValid=!1;break}Yn(this.$modelValue)&&(this.$modelValue=this.$$ngModelGet(this.$$scope));var i=this.$modelValue,r=this.$options.getOption("allowInvalid");this.$$rawModelValue=e,r&&(this.$modelValue=e,t.$modelValue!==i&&t.$$writeModelToScope()),this.$$runValidators(e,this.$$lastCommittedViewValue,function(n){r||(t.$modelValue=n?e:void 0,t.$modelValue!==i&&t.$$writeModelToScope())})},$$writeModelToScope:function(){this.$$ngModelSet(this.$$scope,this.$modelValue),i(this.$viewChangeListeners,function(e){try{e()}catch(e){this.$$exceptionHandler(e)}},this)},$setViewValue:function(e,t){this.$viewValue=e,this.$options.getOption("updateOnDefault")&&this.$$debounceViewValueCommit(t)},$$debounceViewValueCommit:function(e){var t=this.$options.getOption("debounce");y(t[e])?t=t[e]:y(t.default)&&(t=t.default),this.$$timeout.cancel(this.$$pendingDebounce);var n=this;0<t?this.$$pendingDebounce=this.$$timeout(function(){n.$commitViewValue()},t):this.$$scope.$root.$$phase?this.$commitViewValue():this.$$scope.$apply(function(){n.$commitViewValue()})}},vn({clazz:Dn,set:function(e,t){e[t]=!0},unset:function(e,t){delete e[t]}});var fo,go=["$rootScope",function(e){return{restrict:"A",require:["ngModel","^?form","^?ngModelOptions"],controller:Dn,priority:1,compile:function(t){return t.addClass(uo).addClass("ng-untouched").addClass(lo),{pre:function(e,t,n,i){var r=i[0];t=i[1]||r.$$parentForm,(i=i[2])&&(r.$options=i.$options),r.$$initGetterSetters(),t.$addControl(r),n.$observe("name",function(e){r.$name!==e&&r.$$parentForm.$$renameControl(r,e)}),e.$on("$destroy",function(){r.$$parentForm.$removeControl(r)})},post:function(t,n,i,r){function o(){s.$setTouched()}var s=r[0];s.$options.getOption("updateOn")&&n.on(s.$options.getOption("updateOn"),function(e){s.$$debounceViewValueCommit(e&&e.type)}),n.on("blur",function(){s.$touched||(e.$$phase?t.$evalAsync(o):t.$apply(o))})}}}}}],mo=/(\s+|^)default(\s+|$)/;Ln.prototype={getOption:function(e){return this.$$options[e]},createChild:function(e){var t=!1;return e=a({},e),i(e,function(n,i){"$inherit"===n?"*"===i?t=!0:(e[i]=this.$$options[i],"updateOn"===i&&(e.updateOnDefault=this.$$options.updateOnDefault)):"updateOn"===i&&(e.updateOnDefault=!1,e[i]=Zn(n.replace(mo,function(){return e.updateOnDefault=!0," "})))},this),t&&(delete e["*"],Mn(e,this.$$options)),Mn(e,fo.$$options),new Ln(e)}},fo=new Ln({updateOn:"",updateOnDefault:!0,debounce:0,getterSetter:!1,allowInvalid:!1,timezone:null});var vo=function(){function e(e,t){this.$$attrs=e,this.$$scope=t}return e.$inject=["$attrs","$scope"],e.prototype={$onInit:function(){var e=this.parentCtrl?this.parentCtrl.$options:fo,t=this.$$scope.$eval(this.$$attrs.ngModelOptions);this.$options=e.createChild(t)}},{restrict:"A",priority:10,require:{parentCtrl:"?^^ngModelOptions"},bindToController:!0,controller:e}},wo=fn({terminal:!0,priority:1e3}),bo=t("ngOptions"),yo=/^\s*([\s\S]+?)(?:\s+as\s+([\s\S]+?))?(?:\s+group\s+by\s+([\s\S]+?))?(?:\s+disable\s+when\s+([\s\S]+?))?\s+for\s+(?:([$\w][$\w]*)|(?:\(\s*([$\w][$\w]*)\s*,\s*([$\w][$\w]*)\s*\)))\s+in\s+([\s\S]+?)(?:\s+track\s+by\s+([\s\S]+?))?$/,Ao=["$compile","$document","$parse",function(t,r,o){var s=e.document.createElement("option"),a=e.document.createElement("optgroup");return{restrict:"A",terminal:!0,require:["select","ngModel"],link:{pre:function(e,t,n,i){i[0].registerOption=h},post:function(e,l,c,u){function h(e){var t=(e=y.getOptionFromViewValue(e))&&e.element;return t&&!t.selected&&(t.selected=!0),e}function d(){var e=y&&p.readValue();if(y)for(var t=y.items.length-1;0<=t;t--){var n=y.items[t];Ce(m(n.group)?n.element.parentNode:n.element)}y=A.getOptions();var i={};b&&l.prepend(p.emptyOption),y.items.forEach(function(e){var t;if(m(e.group)){(t=i[e.group])||(t=a.cloneNode(!1),$.appendChild(t),t.label=null===e.group?"null":e.group,i[e.group]=t);var n=s.cloneNode(!1)}else t=$,n=s.cloneNode(!1);t.appendChild(n),function(e,t){e.element=t,t.disabled=e.disabled,e.label!==t.label&&(t.label=e.label,t.textContent=e.label),t.value=e.selectValue}(e,n)}),l[0].appendChild($),f.$render(),f.$isEmpty(e)||(t=p.readValue(),(A.trackBy||g?L(e,t):e===t)||(f.$setViewValue(t),f.$render()))}var p=u[0],f=u[1],g=c.multiple;u=0;for(var v=l.children(),w=v.length;u<w;u++)if(""===v[u].value){p.hasEmptyOption=!0,p.emptyOption=v.eq(u);break}var b=!!p.emptyOption;Tn(s.cloneNode(!1)).val("?");var y,A=function(e,t,i){function r(e,t,n,i,r){this.selectValue=e,this.viewValue=t,this.label=n,this.group=i,this.disabled=r}function s(e){var t;if(!c&&n(e))t=e;else{t=[];for(var i in e)e.hasOwnProperty(i)&&"$"!==i.charAt(0)&&t.push(i)}return t}var a=e.match(yo);if(!a)throw bo("iexp",e,P(t));var l=a[5]||a[7],c=a[6];e=/ as /.test(a[0])&&a[1];var u=a[9];t=o(a[2]?a[1]:l);var h=e&&o(e)||t,d=u&&o(u),p=u?function(e,t){return d(i,t)}:function(e){return Se(e)},f=function(e,t){return p(e,y(e,t))},g=o(a[2]||a[1]),m=o(a[3]||""),v=o(a[4]||""),w=o(a[8]),b={},y=c?function(e,t){return b[c]=t,b[l]=e,b}:function(e){return b[l]=e,b};return{trackBy:u,getTrackByValue:f,getWatchables:o(w,function(e){for(var t=[],n=s(e=e||[]),r=n.length,o=0;o<r;o++){var l=e[c=e===n?o:n[o]],c=y(l,c);l=p(l,c),t.push(l),(a[2]||a[1])&&(l=g(i,c),t.push(l)),a[4]&&(c=v(i,c),t.push(c))}return t}),getOptions:function(){for(var e=[],t={},n=w(i)||[],o=s(n),a=o.length,l=0;l<a;l++){var c=n===o?l:o[l],d=y(n[c],c),b=h(i,d);b=new r(c=p(b,d),b,g(i,d),m(i,d),d=v(i,d)),e.push(b),t[c]=b}return{items:e,selectValueMap:t,getOptionFromViewValue:function(e){return t[f(e)]},getViewValueFromOption:function(e){return u?D(e.viewValue):e.viewValue}}}}}(c.ngOptions,l,e),$=r[0].createDocumentFragment();p.generateUnknownOptionValue=function(e){return"?"},g?(p.writeValue=function(e){var t=e&&e.map(h)||[];y.items.forEach(function(e){e.element.selected&&-1===Array.prototype.indexOf.call(t,e)&&(e.element.selected=!1)})},p.readValue=function(){var e=[];return i(l.val()||[],function(t){(t=y.selectValueMap[t])&&!t.disabled&&e.push(y.getViewValueFromOption(t))}),e},A.trackBy&&e.$watchCollection(function(){if(Xn(f.$viewValue))return f.$viewValue.map(function(e){return A.getTrackByValue(e)})},function(){f.$render()})):(p.writeValue=function(e){var t=y.selectValueMap[l.val()],n=y.getOptionFromViewValue(e);t&&t.element.removeAttribute("selected"),n?(l[0].value!==n.selectValue&&(p.removeUnknownOption(),p.unselectEmptyOption(),l[0].value=n.selectValue,n.element.selected=!0),n.element.setAttribute("selected","selected")):b?p.selectEmptyOption():p.unknownOption.parent().length?p.updateUnknownOption(e):p.renderUnknownOption(e)},p.readValue=function(){var e=y.selectValueMap[l.val()];return e&&!e.disabled?(p.unselectEmptyOption(),p.removeUnknownOption(),y.getViewValueFromOption(e)):null},A.trackBy&&e.$watch(function(){return A.getTrackByValue(f.$viewValue)},function(){f.$render()})),b&&(p.emptyOption.remove(),t(p.emptyOption)(e),8===p.emptyOption[0].nodeType?(p.hasEmptyOption=!1,p.registerOption=function(e,t){""===t.val()&&(p.hasEmptyOption=!0,p.emptyOption=t,p.emptyOption.removeClass("ng-scope"),f.$render(),t.on("$destroy",function(){p.hasEmptyOption=!1,p.emptyOption=void 0}))}):p.emptyOption.removeClass("ng-scope")),l.empty(),d(),e.$watchCollection(A.getWatchables,d)}}}}],$o=["$locale","$interpolate","$log",function(e,t,n){var r=/{}/g,o=/^when(Minus)?(.+)$/;return{link:function(s,a,l){function c(e){a.text(e||"")}var u,d=l.count,p=l.$attr.when&&a.attr(l.$attr.when),f=l.offset||0,m=s.$eval(p)||{},v={},w=t.startSymbol(),b=t.endSymbol(),y=w+d+"-"+f+b,A=Kn.noop;i(l,function(e,t){var n=o.exec(t);n&&(n=(n[1]?"-":"")+Pn(n[2]),m[n]=a.attr(l.$attr[t]))}),i(m,function(e,n){v[n]=t(e.replace(r,y))}),s.$watch(d,function(t){var i=parseFloat(t),r=Yn(i);r||i in m||(i=e.pluralCat(i-f)),i===u||r&&Yn(u)||(A(),r=v[i],g(r)?(null!=t&&n.debug("ngPluralize: no rule defined for '"+i+"' in "+p),A=h,c()):A=s.$watch(r,c),u=i)})}}}],Co=["$parse","$animate","$compile",function(e,r,o){var s=t("ngRepeat"),a=function(e,t,n,i,r,o,s){e[n]=i,r&&(e[r]=o),e.$index=t,e.$first=0===t,e.$last=t===s-1,e.$middle=!(e.$first||e.$last),e.$odd=!(e.$even=0==(1&t))};return{restrict:"A",multiElement:!0,transclude:"element",priority:1e3,terminal:!0,$$tlb:!0,compile:function(t,l){var c=l.ngRepeat,u=o.$$createComment("end ngRepeat",c);if(!(h=c.match(/^\s*([\s\S]+?)\s+in\s+([\s\S]+?)(?:\s+as\s+([\s\S]+?))?(?:\s+track\s+by\s+([\s\S]+?))?\s*$/)))throw s("iexp",c);var h,d=h[1],p=h[2],f=h[3],g=h[4];if(!(h=d.match(/^(?:(\s*[$\w]+)|\(\s*([$\w]+)\s*,\s*([$\w]+)\s*\))$/)))throw s("iidexp",d);var m=h[3]||h[1],v=h[2];if(f&&(!/^[$a-zA-Z_][$a-zA-Z0-9_]*$/.test(f)||/^(null|undefined|this|\$index|\$first|\$middle|\$last|\$even|\$odd|\$parent|\$root|\$id)$/.test(f)))throw s("badident",f);var w,b,y,A,$={$id:Se};return g?w=e(g):(y=function(e,t){return Se(t)},A=function(e){return e}),function(e,t,o,l,h){w&&(b=function(t,n,i){return v&&($[v]=t),$[m]=n,$.$index=i,w(e,$)});var d=te();e.$watchCollection(p,function(o){var l,p,g,w,$,C,x,k,E,F,S=t[0],B=te();if(f&&(e[f]=o),n(o))k=o,p=b||y;else for(F in p=b||A,k=[],o)Vn.call(o,F)&&"$"!==F.charAt(0)&&k.push(F);for(w=k.length,F=Array(w),l=0;l<w;l++)if($=o===k?l:k[l],C=o[$],x=p($,C,l),d[x])E=d[x],delete d[x],B[x]=E,F[l]=E;else{if(B[x])throw i(F,function(e){e&&e.scope&&(d[e.id]=e)}),s("dupes",c,x,C);F[l]={id:x,scope:void 0,clone:void 0},B[x]=!0}for(g in d){if(E=d[g],x=ee(E.clone),r.leave(x),x[0].parentNode)for(l=0,p=x.length;l<p;l++)x[l].$$NG_REMOVED=!0;E.scope.$destroy()}for(l=0;l<w;l++)if($=o===k?l:k[l],C=o[$],(E=F[l]).scope){g=S;do{g=g.nextSibling}while(g&&g.$$NG_REMOVED);E.clone[0]!==g&&r.move(ee(E.clone),null,S),S=E.clone[E.clone.length-1],a(E.scope,l,m,C,v,$,w)}else h(function(e,t){E.scope=t;var n=u.cloneNode(!1);e[e.length++]=n,r.enter(e,null,S),S=n,E.clone=e,B[E.id]=E,a(E.scope,l,m,C,v,$,w)});d=B})}}}}],xo=["$animate",function(e){return{restrict:"A",multiElement:!0,link:function(t,n,i){t.$watch(i.ngShow,function(t){e[t?"removeClass":"addClass"](n,"ng-hide",{tempClasses:"ng-hide-animate"})})}}}],ko=["$animate",function(e){return{restrict:"A",multiElement:!0,link:function(t,n,i){t.$watch(i.ngHide,function(t){e[t?"addClass":"removeClass"](n,"ng-hide",{tempClasses:"ng-hide-animate"})})}}}],Eo=fn(function(e,t,n){e.$watch(n.ngStyle,function(e,n){n&&e!==n&&i(n,function(e,n){t.css(n,"")}),e&&t.css(e)},!0)}),Fo=["$animate","$compile",function(e,t){return{require:"ngSwitch",controller:["$scope",function(){this.cases={}}],link:function(n,r,o,s){var a=[],l=[],c=[],u=[],h=function(e,t){return function(n){!1!==n&&e.splice(t,1)}};n.$watch(o.ngSwitch||o.on,function(n){for(var r,o;c.length;)e.cancel(c.pop());for(r=0,o=u.length;r<o;++r){var d=ee(l[r].clone);u[r].$destroy(),(c[r]=e.leave(d)).done(h(c,r))}l.length=0,u.length=0,(a=s.cases["!"+n]||s.cases["?"])&&i(a,function(n){n.transclude(function(i,r){u.push(r);var o=n.element;i[i.length++]=t.$$createComment("end ngSwitchWhen"),l.push({clone:i}),e.enter(i,o.parent(),o)})})})}}}],So=fn({transclude:"element",priority:1200,require:"^ngSwitch",multiElement:!0,link:function(e,t,n,r,o){i(n.ngSwitchWhen.split(n.ngSwitchWhenSeparator).sort().filter(function(e,t,n){return n[t-1]!==e}),function(e){r.cases["!"+e]=r.cases["!"+e]||[],r.cases["!"+e].push({transclude:o,element:t})})}}),Bo=fn({transclude:"element",priority:1200,require:"^ngSwitch",multiElement:!0,link:function(e,t,n,i,r){i.cases["?"]=i.cases["?"]||[],i.cases["?"].push({transclude:r,element:t})}}),Do=t("ngTransclude"),Lo=["$compile",function(e){return{restrict:"EAC",terminal:!0,compile:function(t){var n=e(t.contents());return t.empty(),function(e,t,i,r,o){function s(){n(e,function(e){t.append(e)})}if(!o)throw Do("orphan",P(t));i.ngTransclude===i.$attr.ngTransclude&&(i.ngTransclude=""),o(function(e,n){var i;if(i=e.length)e:{i=0;for(var r=e.length;i<r;i++){var o=e[i];if(o.nodeType!==ai||o.nodeValue.trim()){i=!0;break e}}i=void 0}i?t.append(e):(s(),n.$destroy())},null,i=i.ngTransclude||i.ngTranscludeSlot),i&&!o.isSlotFilled(i)&&s()}}}}],Mo=["$templateCache",function(e){return{restrict:"E",terminal:!0,compile:function(t,n){"text/ng-template"===n.type&&e.put(n.id,t[0].text)}}}],Ro={$setViewValue:h,$render:h},To=["$element","$scope",function(t,n){function i(e){l||(l=!0,n.$$postDigest(function(){n.$$destroyed||(l=!1,o.ngModelCtrl.$setViewValue(o.readValue()),e&&o.ngModelCtrl.$render())}))}function r(e){e.prop("selected",!0),e.attr("selected",!0)}var o=this,s=new Be;o.selectValueMap={},o.ngModelCtrl=Ro,o.multiple=!1,o.unknownOption=Tn(e.document.createElement("option")),o.hasEmptyOption=!1,o.emptyOption=void 0,o.renderUnknownOption=function(e){e=o.generateUnknownOptionValue(e),o.unknownOption.val(e),t.prepend(o.unknownOption),r(o.unknownOption),t.val(e)},o.updateUnknownOption=function(e){e=o.generateUnknownOptionValue(e),o.unknownOption.val(e),r(o.unknownOption),t.val(e)},o.generateUnknownOptionValue=function(e){return"? "+Se(e)+" ?"},o.removeUnknownOption=function(){o.unknownOption.parent()&&o.unknownOption.remove()},o.selectEmptyOption=function(){o.emptyOption&&(t.val(""),r(o.emptyOption))},o.unselectEmptyOption=function(){o.hasEmptyOption&&o.emptyOption.removeAttr("selected")},n.$on("$destroy",function(){o.renderUnknownOption=h}),o.readValue=function(){var e=(e=t.val())in o.selectValueMap?o.selectValueMap[e]:e;return o.hasOption(e)?e:null},o.writeValue=function(e){var n=t[0].options[t[0].selectedIndex];n&&n.removeAttribute("selected"),o.hasOption(e)?(o.removeUnknownOption(),n=Se(e),t.val(n in o.selectValueMap?n:e),r(Tn(t[0].options[t[0].selectedIndex]))):null==e&&o.emptyOption?(o.removeUnknownOption(),o.selectEmptyOption()):o.unknownOption.parent().length?o.updateUnknownOption(e):o.renderUnknownOption(e)},o.addOption=function(e,t){if(8!==t[0].nodeType){Z(e,'"option value"'),""===e&&(o.hasEmptyOption=!0,o.emptyOption=t);var i=s.get(e)||0;s.put(e,i+1),a||(a=!0,n.$$postDigest(function(){a=!1,o.ngModelCtrl.$render()}))}},o.removeOption=function(e){var t=s.get(e);t&&(1===t?(s.remove(e),""===e&&(o.hasEmptyOption=!1,o.emptyOption=void 0)):s.put(e,t-1))},o.hasOption=function(e){return!!s.get(e)};var a=!1,l=!1;o.registerOption=function(e,t,n,r,s){if(n.$attr.ngValue){var a,l=NaN;n.$observe("value",function(e){var n,r=t.prop("selected");m(l)&&(o.removeOption(a),delete o.selectValueMap[l],n=!0),l=Se(e),a=e,o.selectValueMap[l]=e,o.addOption(e,t),t.attr("value",l),n&&r&&i()})}else r?n.$observe("value",function(e){o.readValue();var n,r=t.prop("selected");m(a)&&(o.removeOption(a),n=!0),a=e,o.addOption(e,t),n&&r&&i()}):s?e.$watch(s,function(e,r){n.$set("value",e);var s=t.prop("selected");r!==e&&o.removeOption(r),o.addOption(e,t),r&&s&&i()}):o.addOption(n.value,t);n.$observe("disabled",function(e){("true"===e||e&&t.prop("selected"))&&(o.multiple?i(!0):(o.ngModelCtrl.$setViewValue(null),o.ngModelCtrl.$render()))}),t.on("$destroy",function(){var e=o.readValue(),t=n.value;o.removeOption(t),o.ngModelCtrl.$render(),(o.multiple&&e&&-1!==e.indexOf(t)||e===t)&&i(!0)})}}],_o=function(){return{restrict:"E",require:["select","?ngModel"],controller:To,priority:1,link:{pre:function(e,t,n,r){var o=r[0],s=r[1];if(s){if(o.ngModelCtrl=s,t.on("change",function(){o.removeUnknownOption(),e.$apply(function(){s.$setViewValue(o.readValue())})}),n.multiple){o.multiple=!0,o.readValue=function(){var e=[];return i(t.find("option"),function(t){t.selected&&!t.disabled&&(t=t.value,e.push(t in o.selectValueMap?o.selectValueMap[t]:t))}),e},o.writeValue=function(e){var n=new Be(e);i(t.find("option"),function(e){e.selected=m(n.get(e.value))||m(n.get(o.selectValueMap[e.value]))})};var a,l=NaN;e.$watch(function(){l!==s.$viewValue||L(a,s.$viewValue)||(a=ie(s.$viewValue),s.$render()),l=s.$viewValue}),s.$isEmpty=function(e){return!e||0===e.length}}}else o.registerOption=h},post:function(e,t,n,i){var r=i[1];if(r){var o=i[0];r.$render=function(){o.writeValue(r.$viewValue)}}}}}},Oo=["$interpolate",function(e){return{restrict:"E",priority:100,compile:function(t,n){var i,r;return m(n.ngValue)||(m(n.value)?i=e(n.value,!0):(r=e(t.text(),!0))||n.$set("value",t.text())),function(e,t,n){var o=t.parent();(o=o.data("$selectController")||o.parent().data("$selectController"))&&o.registerOption(e,t,n,i,r)}}}}],Io=function(){return{restrict:"A",require:"?ngModel",link:function(e,t,n,i){i&&(n.required=!0,i.$validators.required=function(e,t){return!n.required||!i.$isEmpty(t)},n.$observe("required",function(){i.$validate()}))}}},Vo=function(){return{restrict:"A",require:"?ngModel",link:function(e,n,i,r){if(r){var o,s=i.ngPattern||i.pattern;i.$observe("pattern",function(e){if(b(e)&&0<e.length&&(e=new RegExp("^"+e+"$")),e&&!e.test)throw t("ngPattern")("noregexp",s,e,P(n));o=e||void 0,r.$validate()}),r.$validators.pattern=function(e,t){return r.$isEmpty(t)||g(o)||o.test(t)}}}}},Po=function(){return{restrict:"A",require:"?ngModel",link:function(e,t,n,i){if(i){var r=-1;n.$observe("maxlength",function(e){e=c(e),r=Yn(e)?-1:e,i.$validate()}),i.$validators.maxlength=function(e,t){return 0>r||i.$isEmpty(t)||t.length<=r}}}}},Wo=function(){return{restrict:"A",require:"?ngModel",link:function(e,t,n,i){if(i){var r=0;n.$observe("minlength",function(e){r=c(e)||0,i.$validate()}),i.$validators.minlength=function(e,t){return i.$isEmpty(t)||t.length>=r}}}}};e.angular.bootstrap?e.console&&console.log("WARNING: Tried to load angular more than once."):(function(){var t;if(!si){var n=ti();(_n=g(n)?e.jQuery:n?e[n]:void 0)&&_n.fn.on?(Tn=_n,a(_n.fn,{scope:Ai.scope,isolateScope:Ai.isolateScope,controller:Ai.controller,injector:Ai.injector,inheritedData:Ai.inheritedData}),t=_n.cleanData,_n.cleanData=function(e){for(var n,i,r=0;null!=(i=e[r]);r++)(n=_n._data(i,"events"))&&n.$destroy&&_n(i).triggerHandler("$destroy");t(e)}):Tn=ce,Kn.element=Tn,si=!0}}(),function(n){a(n,{bootstrap:j,copy:D,extend:a,merge:l,equals:L,element:Tn,forEach:i,injector:Le,noop:h,bind:R,toJson:_,fromJson:O,identity:d,isUndefined:g,isDefined:m,isString:b,isFunction:$,isObject:v,isNumber:y,isElement:F,isArray:Xn,version:li,isDate:A,lowercase:Pn,uppercase:Wn,callbacks:{$$counter:0},getTestability:G,reloadWithDebugInfo:K,$$minErr:t,$$csp:ei,$$encodeUriSegment:z,$$encodeUriQuery:U,$$stringify:ne}),(On=function(e){function n(e,t,n){return e[t]||(e[t]=n())}var i=t("$injector"),r=t("ng");return e=n(e,"angular",Object),e.$$minErr=e.$$minErr||t,n(e,"module",function(){var e={};return function(t,o,s){if("hasOwnProperty"===t)throw r("badname","module");return o&&e.hasOwnProperty(t)&&(e[t]=null),n(e,t,function(){function e(e,t,n,i){return i||(i=r),function(){return i[n||"push"]([e,t,arguments]),u}}function n(e,n,i){return i||(i=r),function(r,o){return o&&$(o)&&(o.$$moduleName=t),i.push([e,n,arguments]),u}}if(!o)throw i("nomod",t);var r=[],a=[],l=[],c=e("$injector","invoke","push",a),u={_invokeQueue:r,_configBlocks:a,_runBlocks:l,requires:o,name:t,provider:n("$provide","provider"),factory:n("$provide","factory"),service:n("$provide","service"),value:e("$provide","value"),constant:e("$provide","constant","unshift"),decorator:n("$provide","decorator",a),animation:n("$animateProvider","register"),filter:n("$filterProvider","register"),controller:n("$controllerProvider","register"),directive:n("$compileProvider","directive"),component:n("$compileProvider","component"),config:c,run:function(e){return l.push(e),this}};return s&&c(s),u})}})}(e))("ng",["ngLocale"],["$provide",function(e){e.provider({$$sanitizeUri:Ot}),e.provider("$compile",Ve).directive({a:Er,input:zr,textarea:zr,form:Dr,script:Mo,select:_o,option:Oo,ngBind:jr,ngBindHtml:Gr,ngBindTemplate:Kr,ngClass:Xr,ngClassEven:Zr,ngClassOdd:Jr,ngCloak:Qr,ngController:eo,ngForm:Lr,ngHide:ko,ngIf:io,ngInclude:ro,ngInit:so,ngNonBindable:wo,ngPluralize:$o,ngRepeat:Co,ngShow:xo,ngStyle:Eo,ngSwitch:Fo,ngSwitchWhen:So,ngSwitchDefault:Bo,ngOptions:Ao,ngTransclude:Lo,ngModel:go,ngList:ao,ngChange:Yr,pattern:Vo,ngPattern:Vo,required:Io,ngRequired:Io,minlength:Wo,ngMinlength:Wo,maxlength:Po,ngMaxlength:Po,ngValue:qr,ngModelOptions:vo}).directive({ngInclude:oo}).directive(Fr).directive(to),e.provider({$anchorScroll:Me,$animate:_i,$animateCss:Vi,$$animateJs:Ri,$$animateQueue:Ti,$$AnimateRunner:Ii,$$animateAsyncRun:Oi,$browser:_e,$cacheFactory:Oe,$controller:ze,$document:Ue,$$isDocumentHidden:qe,$exceptionHandler:je,$filter:Yt,$$forceReflow:qi,$interpolate:it,$interval:rt,$http:et,$httpParamSerializer:Ge,$httpParamSerializerJQLike:Ye,$httpBackend:nt,$xhrFactory:tt,$jsonpCallbacks:Qi,$location:vt,$log:wt,$parse:Dt,$rootScope:_t,$q:Lt,$$q:Mt,$sce:Pt,$sceDelegate:Vt,$sniffer:Wt,$templateCache:Ie,$templateRequest:Nt,$$testability:Ht,$timeout:zt,$window:jt,$$rAF:Tt,$$jqLite:Fe,$$HashMap:ki,$$cookieReader:Gt})}])}(Kn),Kn.module("ngLocale",[],["$provide",function(e){e.value("$locale",{DATETIME_FORMATS:{AMPMS:["AM","PM"],DAY:"Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),ERANAMES:["Before Christ","Anno Domini"],ERAS:["BC","AD"],FIRSTDAYOFWEEK:6,MONTH:"January February March April May June July August September October November December".split(" "),SHORTDAY:"Sun Mon Tue Wed Thu Fri Sat".split(" "),SHORTMONTH:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),STANDALONEMONTH:"January February March April May June July August September October November December".split(" "),WEEKENDRANGE:[5,6],fullDate:"EEEE, MMMM d, y",longDate:"MMMM d, y",medium:"MMM d, y h:mm:ss a",mediumDate:"MMM d, y",mediumTime:"h:mm:ss a",short:"M/d/yy h:mm a",shortDate:"M/d/yy",shortTime:"h:mm a"},NUMBER_FORMATS:{CURRENCY_SYM:"$",DECIMAL_SEP:".",GROUP_SEP:",",PATTERNS:[{gSize:3,lgSize:3,maxFrac:3,minFrac:0,minInt:1,negPre:"-",negSuf:"",posPre:"",posSuf:""},{gSize:3,lgSize:3,maxFrac:2,minFrac:2,minInt:1,negPre:"-¤",negSuf:"",posPre:"¤",posSuf:""}]},id:"en-us",localeID:"en_US",pluralCat:function(e,t){var n=0|e,i=t;return void 0===i&&(i=Math.min(function(e){var t=(e+="").indexOf(".");return-1==t?0:e.length-t-1}(e),3)),Math.pow(10,i),1==n&&0==i?"one":"other"}})}]),Tn(function(){q(e.document,j)}))}(window),!window.angular.$$csp().noInlineStyle&&window.angular.element(document.head).prepend('<style type="text/css">@charset "UTF-8";[ng\\:cloak],[ng-cloak],[data-ng-cloak],[x-ng-cloak],.ng-cloak,.x-ng-cloak,.ng-hide:not(.ng-hide-animate){display:none !important;}ng\\:form{display:block;}.ng-animate-shim{visibility:hidden;}.ng-anchor{position:absolute;}</style>'),function(e){function t(i){if(n[i])return n[i].exports;var r=n[i]={exports:{},id:i,loaded:!1};return e[i].call(r.exports,r,r.exports,t),r.loaded=!0,r.exports}var n={};t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}n(1),n(3),n(4);var r=i(n(5)),o=i(n(7)),s=i(n(8)),a=i(n(10)),l=i(n(13)),c=i(n(15)),u=i(n(17)),h=i(n(19)),d=i(n(21)),p=i(n(23)),f=i(n(25)),g=i(n(27)),m=i(n(29)),v=i(n(32)),w=i(n(34)),b=i(n(36)),y=i(n(38)),A=i(n(40)),$=i(n(42)),C=i(n(44)),x=i(n(46)),k=i(n(47)),E=i(n(49)),F=i(n(54)),S=i(n(56)),B=i(n(58)),D=i(n(60));n(62),angular.module("elfsightAppsEditor",["checklist-model","color.picker","angular-sortable-view"]).directive("elfsightAppsEditor",r.default).directive("control",o.default).directive("elfsightAppsControlText",s.default).directive("elfsightAppsControlTextarea",a.default).directive("elfsightAppsControlNumber",l.default).directive("elfsightAppsControlSelect",c.default).directive("elfsightAppsControlSelectInline",u.default).directive("elfsightAppsControlSelectVisual",h.default).directive("elfsightAppsControlTags",d.default).directive("elfsightAppsControlToggle",p.default).directive("elfsightAppsControlChecklist",f.default).directive("elfsightAppsControlColor",g.default).directive("elfsightAppsControlComplex",m.default).directive("elfsightAppsControlSubgroup",v.default).directive("elfsightAppsControlDivider",w.default).directive("elfsightAppsControlFile",A.default).directive("elfsightAppsControlCustomGoogleMapsCoordinates",b.default).directive("elfsightAppsControlCustomInstagramToken",y.default).directive("elfsightAppsSub",$.default).directive("elfsightAppsVisual",C.default).directive("editorHint",x.default).directive("elfsightAppsEditorToolbar",k.default).directive("elfsightAppsEditorToolbarResolution",E.default).directive("elfsightAppsEditorToolbarBackground",F.default).factory("$elfsightAppsEditor",S.default).factory("$sub",B.default).factory("$visual",D.default).config(["$provide",function(e){e.decorator("ColorPickerOptions",["$delegate",function(e){var t=angular.copy(e);return t.saturation=!1,t.lightness=!1,t.format="rgb",t}])}])},function(e,t,n){!function(t,i){e.exports=i(n(2))}(0,function(e){"use strict";function t(e){e.put("template/color-picker/directive.html",'<div class="color-picker-wrapper" ng-class="{\'color-picker-disabled\': AngularColorPickerController.options.disabled,\'color-picker-swatch-only\': AngularColorPickerController.options.swatchOnly,\'color-picker-open\': AngularColorPickerController.is_open,\'color-picker-closed\': !AngularColorPickerController.is_open,\'color-picker-horizontal\': AngularColorPickerController.options.horizontal,}"><div class="color-picker-input-wrapper" ng-class="{\'input-group\': AngularColorPickerController.options.swatchBootstrap && AngularColorPickerController.options.swatch}"><span ng-if="AngularColorPickerController.options.swatchPos === \'left\'" class="color-picker-swatch" ng-click="AngularColorPickerController.onSwatchClick($event)" ng-show="AngularColorPickerController.options.swatch" ng-class="{\'color-picker-swatch-left\': AngularColorPickerController.options.swatchPos !== \'right\', \'color-picker-swatch-right\': AngularColorPickerController.options.swatchPos === \'right\', \'input-group-addon\': AngularColorPickerController.options.swatchBootstrap}"></span><input ng-attr-id="{{AngularColorPickerController.options.id}}" ng-attr-name="{{AngularColorPickerController.options.name}}" class="color-picker-input {{AngularColorPickerController.options.inputClass}}" type="text" ng-model="AngularColorPickerController.internalNgModel" ng-model-options="AngularColorPickerController.ngModelOptions" ng-readonly="AngularColorPickerController.options.swatchOnly" ng-disabled="AngularColorPickerController.options.disabled" ng-change="AngularColorPickerController.onChange($event)" size="7" ng-class="{\'color-picker-input-swatch\': AngularColorPickerController.options.swatch && !AngularColorPickerController.options.swatchOnly && AngularColorPickerController.options.swatchPos === \'left\'}" placeholder="{{AngularColorPickerController.options.placeholder}}" ng-required="AngularColorPickerController.options.required"><span ng-if="AngularColorPickerController.options.swatchPos === \'right\'" class="color-picker-swatch" ng-click="AngularColorPickerController.onSwatchClick($event)" ng-show="AngularColorPickerController.options.swatch" ng-class="{\'color-picker-swatch-left\': AngularColorPickerController.options.swatchPos !== \'right\', \'color-picker-swatch-right\': AngularColorPickerController.options.swatchPos === \'right\', \'input-group-addon\': AngularColorPickerController.options.swatchBootstrap}"></span></div><div class="color-picker-panel" ng-class="{\'color-picker-panel-top color-picker-panel-right\': AngularColorPickerController.options.pos === \'top right\',\'color-picker-panel-top color-picker-panel-left\': AngularColorPickerController.options.pos === \'top left\',\'color-picker-panel-bottom color-picker-panel-right\': AngularColorPickerController.options.pos === \'bottom right\',\'color-picker-panel-bottom color-picker-panel-left\': AngularColorPickerController.options.pos === \'bottom left\',\'color-picker-panel-round\': AngularColorPickerController.options.round,\'color-picker-show-hue\': AngularColorPickerController.options.hue,\'color-picker-show-saturation\': AngularColorPickerController.options.saturation,\'color-picker-show-lightness\': AngularColorPickerController.options.lightness,\'color-picker-show-alpha\': AngularColorPickerController.options.alpha && AngularColorPickerController.options.format !== \'hex\',\'color-picker-show-inline\': AngularColorPickerController.options.inline,}"><div class="color-picker-grid-wrapper"><div class="color-picker-row"><div class="color-picker-grid"><div class="color-picker-overlay"></div><div class="color-picker-grid-inner"></div><div class="color-picker-picker"><div></div></div></div><div class="color-picker-hue" ng-show="AngularColorPickerController.options.hue"><div class="color-picker-overlay"></div><div class="color-picker-slider"></div></div><div class="color-picker-saturation" ng-show="AngularColorPickerController.options.saturation"><div class="color-picker-overlay"></div><div class="color-picker-slider"></div></div><div class="color-picker-lightness" ng-show="AngularColorPickerController.options.lightness"><div class="color-picker-overlay"></div><div class="color-picker-slider"></div></div><div class="color-picker-opacity" ng-show="AngularColorPickerController.options.alpha && AngularColorPickerController.options.format !== \'hex\'"><div class="color-picker-overlay"></div><div class="color-picker-slider"></div></div></div></div><div class="color-picker-actions"><button type="button"class="color-picker-action color-picker-action-clear"tabindex="-1"ng-class="AngularColorPickerController.options.clear.class"ng-show="AngularColorPickerController.options.clear.show"ng-click="AngularColorPickerController.api.clear($event)">{{AngularColorPickerController.options.clear.label}}</button><button type="button"class="color-picker-action color-picker-action-reset"tabindex="-1"ng-class="AngularColorPickerController.options.reset.class"ng-show="AngularColorPickerController.options.reset.show"ng-click="AngularColorPickerController.api.reset($event)">{{AngularColorPickerController.options.reset.label}}</button><button type="button"class="color-picker-action color-picker-action-close"tabindex="-1"ng-class="AngularColorPickerController.options.close.class"ng-show="AngularColorPickerController.options.close.show"ng-click="AngularColorPickerController.api.close($event)">{{AngularColorPickerController.options.close.label}}</button></div></div></div>')}t.$inject=["o"],e=e&&e.hasOwnProperty("default")?e.default:e;var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=(function(){function e(e){function t(i,r){try{var o=e[i](r),s=o.value;s instanceof function(e){this.value=e}?Promise.resolve(s.value).then(function(e){t("next",e)},function(e){t("throw",e)}):n(o.done?"return":"normal",o.value)}catch(e){n("throw",e)}}function n(e,n){switch(e){case"return":i.resolve({value:n,done:!0});break;case"throw":i.reject(n);break;default:i.resolve({value:n,done:!1})}(i=i.next)?t(i.key,i.arg):r=null}var i,r;this._invoke=function(e,n){return new Promise(function(o,s){var a={key:e,arg:n,resolve:o,reject:s,next:null};r?r=r.next=a:(i=r=a,t(e,n))})},"function"!=typeof e.return&&(this.return=void 0)}"function"==typeof Symbol&&Symbol.asyncIterator&&(e.prototype[Symbol.asyncIterator]=function(){return this}),e.prototype.next=function(e){return this._invoke("next",e)},e.prototype.throw=function(e){return this._invoke("throw",e)},e.prototype.return=function(e){return this._invoke("return",e)}}(),function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}),r=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),o=function(){function t(e,n,r,o,s){i(this,t),this.$scope=e,this.$element=n,this.$document=r,this.$timeout=o,this.ColorPickerOptions=s,this.$scope.init=this.init.bind(this),this.ngModelOptions={},this.hue=0,this.saturation=void 0,this.lightness=void 0,this.opacity=void 0,this.basicEventTypes=["hue","saturation","lightness","opacity"],this.fullEventTypes=["color","hue","saturation","lightness","opacity"]}return r(t,[{key:"init",value:function(){this.$scope.control[0].$options&&this.$scope.control[0].$options.$$options&&(this.ngModelOptions=this.$scope.control[0].$options.$$options),this.chrome=Boolean(window.chrome);var e=window.navigator.userAgent.match(/Android\s([0-9\.]*)/i);this.android_version=e&&e.length>1?parseFloat(e[1]):NaN,this.updateModel=!0,this.initWatchers(),this.initConfig(),this.initMouseEvents()}},{key:"initConfig",value:function(){this.options||(this.options={}),this.mergeOptions(this.options,this.ColorPickerOptions),this.is_open=this.options.inline,this.options.inline&&(this.options.close.show=!1),this.pickerDimensions={width:150,height:150},this.sliderDimensions={width:this.options.horizontal?this.pickerDimensions.width:20,height:this.options.horizontal?20:this.pickerDimensions.height}}},{key:"mergeOptions",value:function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e&&e.hasOwnProperty(i)?"object"===n(t[i])&&this.mergeOptions(e[i],t[i]):e[i]=t[i])}},{key:"initWatchers",value:function(){var e=this;this.$scope.$watch("AngularColorPickerController.internalNgModel",this.watchInternalNgModel.bind(this)),this.$scope.$watch("AngularColorPickerController.ngModel",this.watchNgModel.bind(this)),this.$scope.$watch("AngularColorPickerController.options.swatchPos",function(t){void 0!==t&&(e.initConfig(),e.$timeout(function(){e.updateSwatchBackground()}))}),this.$scope.$watchGroup(["AngularColorPickerController.options.format","AngularColorPickerController.options.alpha","AngularColorPickerController.options.case","AngularColorPickerController.options.round","AngularColorPickerController.options.restrictToFormat","AngularColorPickerController.options.preserveInputFormat","AngularColorPickerController.options.allowEmpty","AngularColorPickerController.options.horizontal","AngularColorPickerController.options.dynamicHue","AngularColorPickerController.options.dynamicSaturation","AngularColorPickerController.options.dynamicLightness","AngularColorPickerController.options.dynamicAlpha"],function(t){void 0!==t&&(e.initConfig(),e.update())}),this.$scope.$watchGroup(["AngularColorPickerController.options.disabled","AngularColorPickerController.options.swatchBootstrap","AngularColorPickerController.options.swatchOnly","AngularColorPickerController.options.swatch","AngularColorPickerController.options.pos","AngularColorPickerController.options.inline","AngularColorPickerController.options.placeholder"],function(t){void 0!==t&&e.initConfig()}),this.$scope.$watch("AngularColorPickerController.api",this.setupApi.bind(this)),this.$scope.$watch("AngularColorPickerController.swatchColor",this.updateSwatchBackground.bind(this)),this.$scope.$watch("AngularColorPickerController.hue",function(){e.valueUpdate("hue")}),this.$scope.$watch("AngularColorPickerController.saturation",function(){e.valueUpdate("saturation")}),this.$scope.$watch("AngularColorPickerController.lightness",function(){e.valueUpdate("lightness")}),this.$scope.$watch("AngularColorPickerController.opacity",function(){e.valueUpdate("opacity")})}},{key:"watchInternalNgModel",value:function(e,t){this.colorMouse||this.watchNgModelSet(e)}},{key:"watchNgModel",value:function(e,t){void 0===e||this.hasOwnProperty("initialNgModel")||(this.initialNgModel=e),this.checkDirty(e),this.internalNgModel=this.ngModelOptions.getterSetter?this.ngModel():this.ngModel,this.colorMouse||this.watchNgModelSet(e)}},{key:"watchNgModelSet",value:function(t){var n=this;if(void 0!==t&&null!==t){var i=e(t),r=this.isColorValid(i);r&&(this.setColorValue(i),this.updateModel=!1,this.$timeout(function(){n.updateModel=!0})),this.$scope.control[0].$setValidity("color",r)}else null!==t&&""!==t||(this.hue=0,this.saturation=void 0,this.lightness=void 0,this.opacity=void 0),this.swatchColor=""}},{key:"initMouseEvents",value:function(){var e=this,t={mouseDown:this.onMouseDown.bind(this),mouseUp:this.onMouseUp.bind(this),mouseMove:this.onMouseMove.bind(this),keyUp:this.onKeyUp.bind(this)};this.$document.on("mousedown",t.mouseDown),this.$document.on("mouseup",t.mouseUp),this.$document.on("mousemove",t.mouseMove),this.$document.on("touchstart",t.mouseDown),this.$document.on("touchend",t.mouseUp),this.$document.on("touchmove",t.mouseMove),this.$document.on("keyup",t.keyUp),this.find(".color-picker-grid").on("click",function(t){e.onClick("color",t)}),this.find(".color-picker-grid").on("touchend",function(t){e.onClick("color",t)}),this.find(".color-picker-hue").on("click",function(t){e.onClick("hue",t)}),this.find(".color-picker-hue").on("touchend",function(t){e.onClick("hue",t)}),this.find(".color-picker-saturation").on("click",function(t){e.onClick("saturation",t)}),this.find(".color-picker-saturation").on("touchend",function(t){e.onClick("saturation",t)}),this.find(".color-picker-lightness").on("click",function(t){e.onClick("lightness",t)}),this.find(".color-picker-lightness").on("touchend",function(t){e.onClick("lightness",t)}),this.find(".color-picker-opacity").on("click",function(t){e.onClick("opacity",t)}),this.find(".color-picker-opacity").on("touchend",function(t){e.onClick("opacity",t)}),this.find(".color-picker-input").on("focusin",this.onFocus.bind(this)),this.find(".color-picker-input").on("focusout",this.onBlur.bind(this)),this.$scope.$on("$destroy",function(){e.$document.off("mousedown",t.mouseDown),e.$document.off("mouseup",t.mouseUp),e.$document.off("mousemove",t.mouseMove),e.$document.off("touchstart",t.mouseDown),e.$document.off("touchend",t.mouseUp),e.$document.off("touchmove",t.mouseMove),e.$document.off("keyup",t.keyUp),e.eventApiDispatch("onDestroy")})}},{key:"onMouseDown",value:function(e){if(this.has_moused_moved=!1,this.options.disabled||0===this.find(e.target).length)return!0;for(var t=0;t<this.fullEventTypes.length;t++)this.onMouseDownType(this.fullEventTypes[t],e)}},{key:"onMouseDownType",value:function(e,t){"color"===e&&(t.target.classList.contains("color-picker-grid-inner")||t.target.classList.contains("color-picker-picker")||t.target.parentNode.classList.contains("color-picker-picker"))?this.mouseEventToggle(e,!1,t):(t.target.classList.contains("color-picker-"+e)||t.target.parentNode.classList.contains("color-picker-"+e))&&this.mouseEventToggle(e,!1,t)}},{key:"onMouseUp",value:function(e){if(this.anyMouseEvents()||0!==this.find(e.target).length)for(var t=0;t<this.fullEventTypes.length;t++)this.onMouseUpType(this.fullEventTypes[t],e);else this.setupApi(),this.options.hide.click&&this.api.close(e),this.$scope.$apply()}},{key:"onMouseUpType",value:function(e,t){this[e+"Mouse"]&&this.has_moused_moved&&(this.mouseEventToggle(e,!0,t),this.onChange(t))}},{key:"onMouseMove",value:function(e){for(var t=0;t<this.fullEventTypes.length;t++)this.onMouseMoveType(this.fullEventTypes[t],e)}},{key:"onMouseMoveType",value:function(e,t){this[e+"Mouse"]&&(this.has_moused_moved=!0,this.valueChange(e,t),this.$scope.$apply())}},{key:"onKeyUp",value:function(e){this.options.hide.escape&&27===e.keyCode&&this.api.close(e)}},{key:"onClick",value:function(e,t){this.options.disabled||this.has_moused_moved||(this.valueChange(e,t),this.mouseEventToggle(e,!0,t),this.onChange(t))}},{key:"onChange",value:function(e){this.internalNgModel!==this.onChangeValue&&(this.onChangeValue=this.internalNgModel,this.eventApiDispatch("onChange",[e]))}},{key:"onBlur",value:function(e){this.internalNgModel!==this.onChangeValue&&(this.updateModel=!0,this.update()),this.$scope.control[0].$setTouched(),this.eventApiDispatch("onBlur",[e]),this.options.hide.blur&&0===this.find(e.relatedTarget).length&&this.api.close(e)}},{key:"onSwatchClick",value:function(e){this.options.show.swatch&&!this.options.disabled&&this.api.open(e)}},{key:"onFocus",value:function(e){this.options.show.focus&&this.api.open(e)}},{key:"setupApi",value:function(){var e=this;this.api||(this.api={}),this.api.open=function(t){if(e.is_open)return!0;e.is_open=!0,e.hueMouse=!1,e.opacityMouse=!1,e.colorMouse=!1,e.$scope.$applyAsync();for(var n=0;n<e.basicEventTypes.length;n++)e.valueUpdate(e.basicEventTypes[n]);e.eventApiDispatch("onOpen",[t])},this.api.close=function(t){e.options.inline||!e.is_open&&null===e.$element[0].querySelector(".color-picker-panel").offsetParent||(e.is_open=!1,e.$scope.$applyAsync(),e.update(),e.eventApiDispatch("onClose",[t]))},this.api.clear=function(t){e.setNgModel(null),e.eventApiDispatch("onClear",[t])},this.api.reset=function(t){e.internalNgModel!==e.initialNgModel&&(e.setNgModel(e.initialNgModel),e.eventApiDispatch("onReset",[t]))},this.api.getElement=function(){return e.$element},this.api.getScope=function(){return e.$scope}}},{key:"setNgModel",value:function(e){this.internalNgModel=e,this.ngModelOptions.getterSetter?this.ngModel(e):this.ngModel=e}},{key:"update",value:function(){if(!this.areAllValuesSet())return!1;var t=e(this.getColorValue());this.swatchColor=t.toHslString(),this.updateGridBackground(t),this.updateHueBackground(t),this.huePosUpdate(),this.updateSaturationBackground(t),this.saturationPosUpdate(),this.updateLightnessBackground(t),this.lightnessPosUpdate(),this.updateOpacityBackground(t),this.opacityPosUpdate();var n=this.options.preserveInputFormat&&e(this.internalNgModel).toHsvString()===t.toHsvString();if(this.updateModel&&!n){var i=t[{rgb:"toRgbString",hex:"toHex",hex8:"toHex8",hexstring:"toHexString",hex8string:"toHex8String",hsv:"toHsvString",hsl:"toHslString",raw:"clone"}[this.options.format.toLowerCase()]]();this.options.format.match(/hex/i)&&(i="upper"===this.options.case?i.toUpperCase():i.toLowerCase()),this.setNgModel(i)}}},{key:"mouseEventToggle",value:function(e,t,n){this.stopEvent(n),this[e+"Mouse"]=!t,this.$scope.$apply()}},{key:"valueChange",value:function(e,t){if(this.stopEvent(t),"color"===e)return this.colorChange(t);var n=this.find(".color-picker-"+e),i=this.getEventPos(t),r=this.getMaxFromType(e);this[e]=this.calculateSliderPos(n,i,r),this[e]>r?this[e]=r:this[e]<0&&(this[e]=0)}},{key:"valueUpdate",value:function(e){if(void 0!==this[e]){if("saturation"===e)this[e+"Pos"]=this[e];else{var t=this.getMaxFromType(e);this[e+"Pos"]=100*(1-this[e]/t)}this[e+"Pos"]<0?this[e+"Pos"]=0:this[e+"Pos"]>100&&(this[e+"Pos"]=100),this.options.round&&(this.getRoundPos(),this.updateRoundPos()),this[e+"PosUpdate"](),this.update()}}},{key:"huePosUpdate",value:function(){var e=angular.element(this.$element[0].querySelector(".color-picker-hue .color-picker-slider"));this.options.horizontal?e.css({left:this.sliderDimensions.width*this.huePos/100+"px",top:0}):e.css({left:0,top:this.sliderDimensions.height*this.huePos/100+"px"})}},{key:"updateHueBackground",value:function(t){var n=this.find(".color-picker-hue .color-picker-overlay"),i=this.options.horizontal?"left":"top",r=this.getColorValue(this.options.dynamicHue),o=this.getColorValue(this.options.dynamicHue),s=this.getColorValue(this.options.dynamicHue),a=this.getColorValue(this.options.dynamicHue),l=this.getColorValue(this.options.dynamicHue),c=this.getColorValue(this.options.dynamicHue),u=this.getColorValue(this.options.dynamicHue);r.h=0,o.h=60,s.h=120,a.h=180,l.h=240,c.h=300,u.h=359,n.css({background:"linear-gradient(to "+i+", "+e(r).toRgbString()+" 0%, "+e(o).toRgbString()+" 17%, "+e(s).toRgbString()+" 33%, "+e(a).toRgbString()+" 50%, "+e(l).toRgbString()+" 67%, "+e(c).toRgbString()+" 83%, "+e(u).toRgbString()+" 100%)"})}},{key:"saturationPosUpdate",value:function(){var e;this.options.round||(e=angular.element(this.$element[0].querySelector(".color-picker-grid .color-picker-picker"))).css({left:this.pickerDimensions.height*this.saturationPos/100+"px"}),e=angular.element(this.$element[0].querySelector(".color-picker-saturation .color-picker-slider")),this.options.horizontal?e.css({left:this.sliderDimensions.width*(100-this.saturationPos)/100+"px",top:0}):e.css({left:0,top:this.sliderDimensions.height*(100-this.saturationPos)/100+"px"})}},{key:"updateSaturationBackground",value:function(t){var n=this.find(".color-picker-saturation .color-picker-overlay"),i=this.options.horizontal?"right":"bottom",r=this.getColorValue(this.options.dynamicSaturation),o=this.getColorValue(this.options.dynamicSaturation);r.s="100%",o.s="0%",n.css({background:"linear-gradient(to "+i+", "+e(r).toRgbString()+" 0%, "+e(o).toRgbString()+" 100%)"})}},{key:"lightnessPosUpdate",value:function(){var e;this.options.round||(e=angular.element(this.$element[0].querySelector(".color-picker-grid .color-picker-picker"))).css({top:this.pickerDimensions.width*this.lightnessPos/100+"px"}),e=angular.element(this.$element[0].querySelector(".color-picker-lightness .color-picker-slider")),this.options.horizontal?e.css({left:this.sliderDimensions.width*this.lightnessPos/100+"px",top:0}):e.css({left:0,top:this.sliderDimensions.height*this.lightnessPos/100+"px"})}},{key:"updateLightnessBackground",value:function(t){var n=this.find(".color-picker-lightness .color-picker-overlay"),i=this.options.horizontal?"right":"bottom",r=this.getColorValue(this.options.dynamicLightness),o=this.getColorValue(this.options.dynamicLightness),s=this.getColorValue(this.options.dynamicLightness);this.options.round?(r.l=100,o.l=50,s.l=0):(r.v=100,o.v=50,s.v=0),n.css({background:"linear-gradient(to "+i+", "+e(r).toRgbString()+" 0%, "+e(o).toRgbString()+" 50%, "+e(s).toRgbString()+" 100%)"})}},{key:"opacityPosUpdate",value:function(){var e=angular.element(this.$element[0].querySelector(".color-picker-opacity .color-picker-slider"));this.options.horizontal?e.css({left:this.sliderDimensions.width*this.opacityPos/100+"px",top:0}):e.css({left:0,top:this.sliderDimensions.height*this.opacityPos/100+"px"})}},{key:"updateOpacityBackground",value:function(t){var n=this.find(".color-picker-opacity .color-picker-overlay"),i=this.options.horizontal?"right":"bottom",r=this.getColorValue(this.options.dynamicAlpha),o=this.getColorValue(this.options.dynamicAlpha);r.a=1,o.a=0,n.css({background:"linear-gradient(to "+i+", "+e(r).toRgbString()+" 0%, "+e(o).toRgbString()+" 100%)"})}},{key:"colorChange",value:function(e){this.stopEvent(e);var t=this.find(".color-picker-grid-inner"),n=this.getEventPos(e),i=this.offset(t);this.options.round?this.colorChangeRound(t,i,n):this.colorChangeSquare(t,i,n)}},{key:"colorChangeRound",value:function(e,t,n){var i=2*(n.pageX-t.left)/e.prop("offsetWidth")-1,r=-2*(n.pageY-t.top)/e.prop("offsetHeight")+1,o=Math.atan2(r,i),s=Math.round(57.29577951308233*o);s<0&&(s+=360),this.hue=s;var a=Math.sqrt(i*i+r*r);a>1?a=1:a<0&&(a=0),this.saturation=100*a,void 0===this.lightness&&(this.lightness=50)}},{key:"colorChangeSquare",value:function(e,t,n){this.saturation=(n.pageX-t.left)/e.prop("offsetWidth")*100,this.lightness=100*(1-(n.pageY-t.top)/e.prop("offsetHeight")),this.saturation>100?this.saturation=100:this.saturation<0&&(this.saturation=0),this.lightness>100?this.lightness=100:this.lightness<0&&(this.lightness=0)}},{key:"updateGridBackground",value:function(t){var n=this.find(".color-picker-grid .color-picker-overlay"),i=this.getColorValue();this.options.round?i.s="0%":(i.s="100%",i.v="100%",i.a=1),n.css({"background-color":e(i).toRgbString(),opacity:t.getAlpha()}),this.find(".color-picker-grid .color-picker-grid-inner").css({opacity:t.getAlpha()})}},{key:"updateSwatchBackground",value:function(){angular.element(this.$element[0].querySelector(".color-picker-swatch")).css({"background-color":this.swatchColor})}},{key:"isColorValid",value:function(e){var t=e.isValid();if(t&&this.options.restrictToFormat&&(t=e.getFormat()===this.getTinyColorFormat()),!t&&this.options.allowEmpty){var n=e.getOriginalInput();void 0!==n&&null!==n&&""!==n||(t=!0)}return t}},{key:"getTinyColorFormat",value:function(){return"hexString"===this.options.format?"hex":"hex8String"===this.options.format?"hex8":this.options.format}},{key:"areAllValuesSet",value:function(){return void 0!==this.hue&&void 0!==this.saturation&&void 0!==this.lightness}},{key:"getColorValue",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n={h:this.hue,s:e?this.saturation+"%":"100%",v:e?this.lightness+"%":"100%"};return this.options.round&&(n={h:this.hue,s:e?this.saturation+"%":"100%",l:e?this.lightness+"%":"50%"}),t&&(n.a=e?this.opacity/100:1),n}},{key:"setColorValue",value:function(e){var t=!this.anyMouseEvents(),n=this.options.round?e.toHsl():e.toHsv();(t||this.hueMouse)&&(this.hue=n.h),(t||this.saturationMouse)&&(this.saturation=100*n.s),(t||this.lightnessMouse)&&(this.lightness=100*(this.options.round?n.l:n.v)),this.options.alpha&&(t||this.opacityMouse)&&(this.opacity=100*n.a)}},{key:"checkDirty",value:function(e){this.hasOwnProperty("initialNgModel")&&(e===this.initialNgModel?"function"==typeof this.$scope.control[0].$setPristine&&this.$scope.control[0].$setPristine():"function"==typeof this.$scope.control[0].$setDirty&&this.$scope.control[0].$setDirty())}},{key:"stopEvent",value:function(e){e.stopPropagation(),e.preventDefault()}},{key:"getRoundPos",value:function(){var e=.01745329251994*this.hue,t=Math.cos(e)*this.saturation,n=-Math.sin(e)*this.saturation;if(this.xPos=.5*(t+100),this.yPos=.5*(n+100),Math.pow(50-this.xPos,2)+Math.pow(50-this.yPos,2)>Math.pow(50,2)){var i=Math.atan2(this.yPos-50,this.xPos-50);this.xPos=50*Math.cos(i)+50,this.yPos=50*Math.sin(i)+50}}},{key:"updateRoundPos",value:function(){angular.element(this.$element[0].querySelector(".color-picker-grid .color-picker-picker")).css({left:this.pickerDimensions.width*this.xPos/100+"px",top:this.pickerDimensions.height*this.yPos/100+"px"})}},{key:"getEventPos",value:function(e){if(0===e.type.search("touch")){if(e.originalEvent&&e.originalEvent.changedTouches)return e.originalEvent.changedTouches[0];if(e.changedTouches)return e.changedTouches[0]}return e}},{key:"calculateSliderPos",value:function(e,t,n){return this.options.horizontal?Math.round((1-(t.pageX-this.offset(e).left)/e.prop("offsetWidth"))*n):Math.round((1-(t.pageY-this.offset(e).top)/e.prop("offsetHeight"))*n)}},{key:"eventApiDispatch",value:function(e,t){this.eventApi&&"function"==typeof this.eventApi[e]&&(t||(t=[]),t.unshift(this.internalNgModel),t.unshift(this.api),this.eventApi[e].apply(this,t))}},{key:"find",value:function(e){var t,n=this.wrapper?this.wrapper[0]:this.$element[0],i=[];if(!e)return i;if("string"==typeof e){if(1!==(t=n.nodeType)&&9!==t)return[];i=n.querySelectorAll(e)}else n.contains(e)&&i.push(e);return angular.element(i)}},{key:"offset",value:function(e){var t,n,i,r,o=e[0];if(o)return o.getClientRects().length?(i=o.getBoundingClientRect()).width||i.height?(r=o.ownerDocument,n=this.getWindowElements(r),t=r.documentElement,this.chrome&&this.android_version<6&&screen.width<=768?{top:i.top-t.clientTop,left:i.left-t.clientLeft}:{top:i.top+n.pageYOffset-t.clientTop,left:i.left+n.pageXOffset-t.clientLeft}):i:{top:0,left:0}}},{key:"getWindowElements",value:function(e){return null!==e&&e===e.window?e:9===e.nodeType&&e.defaultView}},{key:"anyMouseEvents",value:function(){return this.colorMouse||this.hueMouse||this.saturationMouse||this.lightnessMouse||this.opacityMouse}},{key:"getMaxFromType",value:function(e){return"hue"===e?360:100}}]),t}();return o.$inject=["$scope","$element","$document","$timeout","ColorPickerOptions"],t.$inject=["$templateCache"],angular.module("color.picker",[]).service("ColorPickerOptions",function e(){return i(this,e),{id:void 0,name:void 0,required:!1,disabled:!1,placeholder:"",inputClass:"",restrictToFormat:!1,preserveInputFormat:!1,allowEmpty:!1,format:"hsl",case:"upper",hue:!0,saturation:!1,lightness:!1,alpha:!0,dynamicHue:!0,dynamicSaturation:!0,dynamicLightness:!0,dynamicAlpha:!0,round:!1,pos:"bottom left",inline:!1,horizontal:!1,swatch:!0,swatchOnly:!1,swatchPos:"left",swatchBootstrap:!0,show:{swatch:!0,focus:!0},hide:{blur:!0,escape:!0,click:!0},close:{show:!1,label:"Close",class:""},clear:{show:!1,label:"Clear",class:""},reset:{show:!1,label:"Reset",class:""}}}).directive("colorPicker",function(){return{restrict:"E",require:["^ngModel"],scope:{ngModel:"=",options:"=?",api:"=?",eventApi:"=?"},bindToController:!0,templateUrl:"template/color-picker/directive.html",controller:o,controllerAs:"AngularColorPickerController",link:function(e,t,n,i){e.control=i,e.init()}}}).run(t)})},function(e,t,n){var i;!function(r){function o(e,t){if(e=e||"",t=t||{},e instanceof o)return e;if(!(this instanceof o))return new o(e,t);var n=function(e){var t={r:0,g:0,b:0},n=1,i=null,o=null,s=null,a=!1,l=!1;"string"==typeof e&&(e=function(e){e=e.replace(M,"").replace(R,"").toLowerCase();var t=!1;if(P[e])e=P[e],t=!0;else if("transparent"==e)return{r:0,g:0,b:0,a:0,format:"name"};var n;if(n=N.rgb.exec(e))return{r:n[1],g:n[2],b:n[3]};if(n=N.rgba.exec(e))return{r:n[1],g:n[2],b:n[3],a:n[4]};if(n=N.hsl.exec(e))return{h:n[1],s:n[2],l:n[3]};if(n=N.hsla.exec(e))return{h:n[1],s:n[2],l:n[3],a:n[4]};if(n=N.hsv.exec(e))return{h:n[1],s:n[2],v:n[3]};if(n=N.hsva.exec(e))return{h:n[1],s:n[2],v:n[3],a:n[4]};if(n=N.hex8.exec(e))return{r:E(n[1]),g:E(n[2]),b:E(n[3]),a:D(n[4]),format:t?"name":"hex8"};if(n=N.hex6.exec(e))return{r:E(n[1]),g:E(n[2]),b:E(n[3]),format:t?"name":"hex"};if(n=N.hex4.exec(e))return{r:E(n[1]+""+n[1]),g:E(n[2]+""+n[2]),b:E(n[3]+""+n[3]),a:D(n[4]+""+n[4]),format:t?"name":"hex8"};if(n=N.hex3.exec(e))return{r:E(n[1]+""+n[1]),g:E(n[2]+""+n[2]),b:E(n[3]+""+n[3]),format:t?"name":"hex"};return!1}(e));"object"==typeof e&&(L(e.r)&&L(e.g)&&L(e.b)?(t=function(e,t,n){return{r:255*x(e,255),g:255*x(t,255),b:255*x(n,255)}}(e.r,e.g,e.b),a=!0,l="%"===String(e.r).substr(-1)?"prgb":"rgb"):L(e.h)&&L(e.s)&&L(e.v)?(i=S(e.s),o=S(e.v),t=function(e,t,n){e=6*x(e,360),t=x(t,100),n=x(n,100);var i=r.floor(e),o=e-i,s=n*(1-t),a=n*(1-o*t),l=n*(1-(1-o)*t),c=i%6;return{r:255*[n,a,s,s,l,n][c],g:255*[l,n,n,a,s,s][c],b:255*[s,s,l,n,n,a][c]}}(e.h,i,o),a=!0,l="hsv"):L(e.h)&&L(e.s)&&L(e.l)&&(i=S(e.s),s=S(e.l),t=function(e,t,n){function i(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}var r,o,s;e=x(e,360),t=x(t,100),n=x(n,100);if(0===t)r=o=s=n;else{var a=n<.5?n*(1+t):n+t-n*t,l=2*n-a;r=i(l,a,e+1/3),o=i(l,a,e),s=i(l,a,e-1/3)}return{r:255*r,g:255*o,b:255*s}}(e.h,i,s),a=!0,l="hsl"),e.hasOwnProperty("a")&&(n=e.a));return n=C(n),{ok:a,format:e.format||l,r:O(255,I(t.r,0)),g:O(255,I(t.g,0)),b:O(255,I(t.b,0)),a:n}}(e);this._originalInput=e,this._r=n.r,this._g=n.g,this._b=n.b,this._a=n.a,this._roundA=_(100*this._a)/100,this._format=t.format||n.format,this._gradientType=t.gradientType,this._r<1&&(this._r=_(this._r)),this._g<1&&(this._g=_(this._g)),this._b<1&&(this._b=_(this._b)),this._ok=n.ok,this._tc_id=T++}function s(e,t,n){e=x(e,255),t=x(t,255),n=x(n,255);var i,r,o=I(e,t,n),s=O(e,t,n),a=(o+s)/2;if(o==s)i=r=0;else{var l=o-s;switch(r=a>.5?l/(2-o-s):l/(o+s),o){case e:i=(t-n)/l+(t<n?6:0);break;case t:i=(n-e)/l+2;break;case n:i=(e-t)/l+4}i/=6}return{h:i,s:r,l:a}}function a(e,t,n){e=x(e,255),t=x(t,255),n=x(n,255);var i,r,o=I(e,t,n),s=O(e,t,n),a=o-s;if(r=0===o?0:a/o,o==s)i=0;else{switch(o){case e:i=(t-n)/a+(t<n?6:0);break;case t:i=(n-e)/a+2;break;case n:i=(e-t)/a+4}i/=6}return{h:i,s:r,v:o}}function l(e,t,n,i){var r=[F(_(e).toString(16)),F(_(t).toString(16)),F(_(n).toString(16))];return i&&r[0].charAt(0)==r[0].charAt(1)&&r[1].charAt(0)==r[1].charAt(1)&&r[2].charAt(0)==r[2].charAt(1)?r[0].charAt(0)+r[1].charAt(0)+r[2].charAt(0):r.join("")}function c(e,t,n,i){return[F(B(i)),F(_(e).toString(16)),F(_(t).toString(16)),F(_(n).toString(16))].join("")}function u(e,t){t=0===t?0:t||10;var n=o(e).toHsl();return n.s-=t/100,n.s=k(n.s),o(n)}function h(e,t){t=0===t?0:t||10;var n=o(e).toHsl();return n.s+=t/100,n.s=k(n.s),o(n)}function d(e){return o(e).desaturate(100)}function p(e,t){t=0===t?0:t||10;var n=o(e).toHsl();return n.l+=t/100,n.l=k(n.l),o(n)}function f(e,t){t=0===t?0:t||10;var n=o(e).toRgb();return n.r=I(0,O(255,n.r-_(-t/100*255))),n.g=I(0,O(255,n.g-_(-t/100*255))),n.b=I(0,O(255,n.b-_(-t/100*255))),o(n)}function g(e,t){t=0===t?0:t||10;var n=o(e).toHsl();return n.l-=t/100,n.l=k(n.l),o(n)}function m(e,t){var n=o(e).toHsl(),i=(n.h+t)%360;return n.h=i<0?360+i:i,o(n)}function v(e){var t=o(e).toHsl();return t.h=(t.h+180)%360,o(t)}function w(e){var t=o(e).toHsl(),n=t.h;return[o(e),o({h:(n+120)%360,s:t.s,l:t.l}),o({h:(n+240)%360,s:t.s,l:t.l})]}function b(e){var t=o(e).toHsl(),n=t.h;return[o(e),o({h:(n+90)%360,s:t.s,l:t.l}),o({h:(n+180)%360,s:t.s,l:t.l}),o({h:(n+270)%360,s:t.s,l:t.l})]}function y(e){var t=o(e).toHsl(),n=t.h;return[o(e),o({h:(n+72)%360,s:t.s,l:t.l}),o({h:(n+216)%360,s:t.s,l:t.l})]}function A(e,t,n){t=t||6,n=n||30;var i=o(e).toHsl(),r=360/n,s=[o(e)];for(i.h=(i.h-(r*t>>1)+720)%360;--t;)i.h=(i.h+r)%360,s.push(o(i));return s}function $(e,t){t=t||6;for(var n=o(e).toHsv(),i=n.h,r=n.s,s=n.v,a=[],l=1/t;t--;)a.push(o({h:i,s:r,v:s})),s=(s+l)%1;return a}function C(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function x(e,t){(function(e){return"string"==typeof e&&-1!=e.indexOf(".")&&1===parseFloat(e)})(e)&&(e="100%");var n=function(e){return"string"==typeof e&&-1!=e.indexOf("%")}(e);return e=O(t,I(0,parseFloat(e))),n&&(e=parseInt(e*t,10)/100),r.abs(e-t)<1e-6?1:e%t/parseFloat(t)}function k(e){return O(1,I(0,e))}function E(e){return parseInt(e,16)}function F(e){return 1==e.length?"0"+e:""+e}function S(e){return e<=1&&(e=100*e+"%"),e}function B(e){return r.round(255*parseFloat(e)).toString(16)}function D(e){return E(e)/255}function L(e){return!!N.CSS_UNIT.exec(e)}var M=/^\s+/,R=/\s+$/,T=0,_=r.round,O=r.min,I=r.max,V=r.random;o.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var e=this.toRgb();return(299*e.r+587*e.g+114*e.b)/1e3},getLuminance:function(){var e,t,n,i,o,s,a=this.toRgb();return e=a.r/255,t=a.g/255,n=a.b/255,i=e<=.03928?e/12.92:r.pow((e+.055)/1.055,2.4),o=t<=.03928?t/12.92:r.pow((t+.055)/1.055,2.4),s=n<=.03928?n/12.92:r.pow((n+.055)/1.055,2.4),.2126*i+.7152*o+.0722*s},setAlpha:function(e){return this._a=C(e),this._roundA=_(100*this._a)/100,this},toHsv:function(){var e=a(this._r,this._g,this._b);return{h:360*e.h,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=a(this._r,this._g,this._b),t=_(360*e.h),n=_(100*e.s),i=_(100*e.v);return 1==this._a?"hsv("+t+", "+n+"%, "+i+"%)":"hsva("+t+", "+n+"%, "+i+"%, "+this._roundA+")"},toHsl:function(){var e=s(this._r,this._g,this._b);return{h:360*e.h,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=s(this._r,this._g,this._b),t=_(360*e.h),n=_(100*e.s),i=_(100*e.l);return 1==this._a?"hsl("+t+", "+n+"%, "+i+"%)":"hsla("+t+", "+n+"%, "+i+"%, "+this._roundA+")"},toHex:function(e){return l(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){return function(e,t,n,i,r){var o=[F(_(e).toString(16)),F(_(t).toString(16)),F(_(n).toString(16)),F(B(i))];return r&&o[0].charAt(0)==o[0].charAt(1)&&o[1].charAt(0)==o[1].charAt(1)&&o[2].charAt(0)==o[2].charAt(1)&&o[3].charAt(0)==o[3].charAt(1)?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0)+o[3].charAt(0):o.join("")}(this._r,this._g,this._b,this._a,e)},toHex8String:function(e){return"#"+this.toHex8(e)},toRgb:function(){return{r:_(this._r),g:_(this._g),b:_(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+_(this._r)+", "+_(this._g)+", "+_(this._b)+")":"rgba("+_(this._r)+", "+_(this._g)+", "+_(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:_(100*x(this._r,255))+"%",g:_(100*x(this._g,255))+"%",b:_(100*x(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+_(100*x(this._r,255))+"%, "+_(100*x(this._g,255))+"%, "+_(100*x(this._b,255))+"%)":"rgba("+_(100*x(this._r,255))+"%, "+_(100*x(this._g,255))+"%, "+_(100*x(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(W[l(this._r,this._g,this._b,!0)]||!1)},toFilter:function(e){var t="#"+c(this._r,this._g,this._b,this._a),n=t,i=this._gradientType?"GradientType = 1, ":"";if(e){var r=o(e);n="#"+c(r._r,r._g,r._b,r._a)}return"progid:DXImageTransform.Microsoft.gradient("+i+"startColorstr="+t+",endColorstr="+n+")"},toString:function(e){var t=!!e;e=e||this._format;var n=!1,i=this._a<1&&this._a>=0;return t||!i||"hex"!==e&&"hex6"!==e&&"hex3"!==e&&"hex4"!==e&&"hex8"!==e&&"name"!==e?("rgb"===e&&(n=this.toRgbString()),"prgb"===e&&(n=this.toPercentageRgbString()),"hex"!==e&&"hex6"!==e||(n=this.toHexString()),"hex3"===e&&(n=this.toHexString(!0)),"hex4"===e&&(n=this.toHex8String(!0)),"hex8"===e&&(n=this.toHex8String()),"name"===e&&(n=this.toName()),"hsl"===e&&(n=this.toHslString()),"hsv"===e&&(n=this.toHsvString()),n||this.toHexString()):"name"===e&&0===this._a?this.toName():this.toRgbString()},clone:function(){return o(this.toString())},_applyModification:function(e,t){var n=e.apply(null,[this].concat([].slice.call(t)));return this._r=n._r,this._g=n._g,this._b=n._b,this.setAlpha(n._a),this},lighten:function(){return this._applyModification(p,arguments)},brighten:function(){return this._applyModification(f,arguments)},darken:function(){return this._applyModification(g,arguments)},desaturate:function(){return this._applyModification(u,arguments)},saturate:function(){return this._applyModification(h,arguments)},greyscale:function(){return this._applyModification(d,arguments)},spin:function(){return this._applyModification(m,arguments)},_applyCombination:function(e,t){return e.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(A,arguments)},complement:function(){return this._applyCombination(v,arguments)},monochromatic:function(){return this._applyCombination($,arguments)},splitcomplement:function(){return this._applyCombination(y,arguments)},triad:function(){return this._applyCombination(w,arguments)},tetrad:function(){return this._applyCombination(b,arguments)}},o.fromRatio=function(e,t){if("object"==typeof e){var n={};for(var i in e)e.hasOwnProperty(i)&&(n[i]="a"===i?e[i]:S(e[i]));e=n}return o(e,t)},o.equals=function(e,t){return!(!e||!t)&&o(e).toRgbString()==o(t).toRgbString()},o.random=function(){return o.fromRatio({r:V(),g:V(),b:V()})},o.mix=function(e,t,n){n=0===n?0:n||50;var i=o(e).toRgb(),r=o(t).toRgb(),s=n/100;return o({r:(r.r-i.r)*s+i.r,g:(r.g-i.g)*s+i.g,b:(r.b-i.b)*s+i.b,a:(r.a-i.a)*s+i.a})},o.readability=function(e,t){var n=o(e),i=o(t);return(r.max(n.getLuminance(),i.getLuminance())+.05)/(r.min(n.getLuminance(),i.getLuminance())+.05)},o.isReadable=function(e,t,n){var i,r,s=o.readability(e,t);switch(r=!1,(i=function(e){var t,n;return e=e||{level:"AA",size:"small"},t=(e.level||"AA").toUpperCase(),n=(e.size||"small").toLowerCase(),"AA"!==t&&"AAA"!==t&&(t="AA"),"small"!==n&&"large"!==n&&(n="small"),{level:t,size:n}}(n)).level+i.size){case"AAsmall":case"AAAlarge":r=s>=4.5;break;case"AAlarge":r=s>=3;break;case"AAAsmall":r=s>=7}return r},o.mostReadable=function(e,t,n){var i,r,s,a,l=null,c=0;r=(n=n||{}).includeFallbackColors,s=n.level,a=n.size;for(var u=0;u<t.length;u++)(i=o.readability(e,t[u]))>c&&(c=i,l=o(t[u]));return o.isReadable(e,l,{level:s,size:a})||!r?l:(n.includeFallbackColors=!1,o.mostReadable(e,["#fff","#000"],n))};var P=o.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},W=o.hexNames=function(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[e[n]]=n);return t}(P),N=function(){var e="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)",t="[\\s|\\(]+("+e+")[,|\\s]+("+e+")[,|\\s]+("+e+")\\s*\\)?",n="[\\s|\\(]+("+e+")[,|\\s]+("+e+")[,|\\s]+("+e+")[,|\\s]+("+e+")\\s*\\)?";return{CSS_UNIT:new RegExp(e),rgb:new RegExp("rgb"+t),rgba:new RegExp("rgba"+n),hsl:new RegExp("hsl"+t),hsla:new RegExp("hsla"+n),hsv:new RegExp("hsv"+t),hsva:new RegExp("hsva"+n),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();void 0!==e&&e.exports?e.exports=o:void 0===(i=function(){return o}.call(t,n,t,e))||(e.exports=i)}(Math)},function(e,t){void 0!==e&&void 0!==t&&e.exports===t&&(e.exports="checklist-model"),angular.module("checklist-model",[]).directive("checklistModel",["$parse","$compile",function(e,t){function n(e,t,n){if(angular.isArray(e))for(var i=e.length;i--;)if(n(e[i],t))return!0;return!1}function i(e,t,i){return e=angular.isArray(e)?e:[],n(e,t,i)||e.push(t),e}function r(e,t,n){if(angular.isArray(e))for(var i=e.length;i--;)if(n(e[i],t)){e.splice(i,1);break}return e}function o(o,s,a){function l(){return a.checklistValue?e(a.checklistValue)(o.$parent):a.value}function c(e,t){var n=d(o.$parent);angular.isFunction(d.assign)&&(!0===t?d.assign(o.$parent,i(n,e,m)):d.assign(o.$parent,r(n,e,m)))}function u(e,t){f&&!1===f(o)?c(l(),g(o)):g.assign(o,n(e,l(),m))}var h=a.checklistModel;a.$set("checklistModel",null),t(s)(o),a.$set("checklistModel",h);var d=e(h),p=e(a.checklistChange),f=e(a.checklistBeforeChange),g=e(a.ngModel),m=function(e,t){return isNaN(e)||isNaN(t)?angular.equals(e,t):String(e)===String(t)};if(a.hasOwnProperty("checklistComparator"))if("."==a.checklistComparator[0]){var v=a.checklistComparator.substring(1);m=function(e,t){return e[v]===t[v]}}else m=e(a.checklistComparator)(o.$parent);var w=o.$watch(a.ngModel,function(e,t){e!==t&&(f&&!1===f(o)?g.assign(o,n(d(o.$parent),l(),m)):(c(l(),e),p&&p(o)))}),b=o.$watch(l,function(e,t){if(e!=t&&angular.isDefined(t)&&!0===o[a.ngModel]){var n=d(o.$parent);d.assign(o.$parent,r(n,t,m)),d.assign(o.$parent,i(n,e,m))}},!0),y=o.$on("$destroy",function(){w(),b(),y()});angular.isFunction(o.$parent.$watchCollection)?o.$parent.$watchCollection(h,u):o.$parent.$watch(h,u,!0)}return{restrict:"A",priority:1e3,terminal:!0,scope:!0,compile:function(e,t){if(!t.checklistValue&&!t.value)throw"You should provide `value` or `checklist-value`.";return t.ngModel||t.$set("ngModel","checked"),o}}}])},function(e,t){!function(e,t){"use strict";function n(e){if(!("clientX"in e||"clientY"in e)){var t=e.touches||e.originalEvent.touches;t&&t.length&&(e.clientX=t[0].clientX,e.clientY=t[0].clientY),e.preventDefault()}}function i(e,n){var i=function(e){if((e=e[0]).previousElementSibling)return t.element(e.previousElementSibling);for(var n=e.previousSibling;null!=n&&1!=n.nodeType;)n=n.previousSibling;return t.element(n)}(e);i.length>0?i.after(n):e.parent().prepend(n)}function r(e,n){if(e instanceof t.element&&(e=e[0]),null!==a)return e[a](n)}var o=t.module("angular-sortable-view",[]);o.directive("svRoot",[function(){function e(e){return n[e]}var t,n=Object.create(null);return{restrict:"A",controller:["$scope","$attrs","$interpolate","$parse",function(o,s,a,l){var c=a(s.svRoot)(o)||o.$id;n[c]||(n[c]=[]);var u,h,d,p,f,g,m=!1,v=l(s.svOnSort);s.svOnStart=s.$$element[0].attributes["sv-on-start"],s.svOnStart=s.svOnStart&&s.svOnStart.value,s.svOnStop=s.$$element[0].attributes["sv-on-stop"],s.svOnStop=s.svOnStop&&s.svOnStop.value;var w=l(s.svOnStart),b=l(s.svOnStop);if(this.sortingInProgress=function(){return t},s.svGrid){if(null===(m="true"===s.svGrid||"false"!==s.svGrid&&null))throw"Invalid value of sv-grid attribute"}else o.$watchCollection(function(){return e(c)},function(e){m=!1;var t=e.filter(function(e){return!e.container}).map(function(e){return{part:e.getPart().id,y:e.element[0].getBoundingClientRect().top}}),n=Object.create(null);t.forEach(function(e){n[e.part]?n[e.part].push(e.y):n[e.part]=[e.y]}),Object.keys(n).forEach(function(e){n[e].sort(),n[e].forEach(function(t,i){i<n[e].length-1&&t>0&&t===n[e][i+1]&&(m=!0)})})});this.$moveUpdate=function(n,s,a,l,v,b,y){var A=a[0].getBoundingClientRect();"element"===n.tolerance&&(s={x:~~(A.left+A.width/2),y:~~(A.top+A.height/2)}),t=!0,u=[],h||(v?(h=v.clone()).removeClass("ng-hide"):((h=l.clone()).addClass("sv-visibility-hidden"),h.addClass("sv-placeholder"),h.css({height:A.height+"px",width:A.width+"px"})),l.after(h),l.addClass("ng-hide"),f=l,d=n,w(o,{$helper:{element:p=a},$part:b.model(b.scope),$index:y,$item:b.model(b.scope)[y]}),o.$root&&o.$root.$$phase||o.$apply()),p[0].reposition({x:s.x+document.body.scrollLeft-s.offset.x*A.width,y:s.y+document.body.scrollTop-s.offset.y*A.height}),e(c).forEach(function(e,t){if(null==n.containment||r(e.element,n.containment)||r(e.element,n.containment+" *")){var i=e.element[0].getBoundingClientRect(),o={x:~~(i.left+i.width/2),y:~~(i.top+i.height/2)};e.container||!e.element[0].scrollHeight&&!e.element[0].scrollWidth||u.push({element:e.element,q:(o.x-s.x)*(o.x-s.x)+(o.y-s.y)*(o.y-s.y),view:e.getPart(),targetIndex:e.getIndex(),after:function(e,t,n){return n?e.x-t.x<0:e.y-t.y<0}(o,s,m)}),e.container&&!e.element[0].querySelector("[sv-element]:not(.sv-placeholder):not(.sv-source)")&&u.push({element:e.element,q:(o.x-s.x)*(o.x-s.x)+(o.y-s.y)*(o.y-s.y),view:e.getPart(),targetIndex:0,container:!0})}});var $=h[0].getBoundingClientRect(),C=~~($.left+$.width/2),x=~~($.top+$.height/2);u.push({q:(C-s.x)*(C-s.x)+(x-s.y)*(x-s.y),element:h,placeholder:!0}),u.sort(function(e,t){return e.q-t.q}),u.forEach(function(e,t){0!==t||e.placeholder||e.container?0===t&&e.container?(g=e,e.element.append(h)):e.element.removeClass("sv-candidate"):(g=e,e.element.addClass("sv-candidate"),e.after?e.element.after(h):i(e.element,h))})},this.$drop=function(e,n,i){function r(){if(t=!1,h.remove(),p.remove(),f.removeClass("ng-hide"),u=void 0,h=void 0,i=void 0,p=void 0,f=void 0,b(o,{$part:e.model(e.scope),$index:n,$item:e.model(e.scope)[n]}),g){g.element.removeClass("sv-candidate");var r=e.model(e.scope).splice(n,1),s=g.targetIndex;g.view===e&&g.targetIndex>n&&s--,g.after&&s++,g.view.model(g.view.scope).splice(s,0,r[0]),g.view===e&&n===s||v(o,{$partTo:g.view.model(g.view.scope),$partFrom:e.model(e.scope),$item:r[0],$indexTo:s,$indexFrom:n})}g=void 0,o.$root&&o.$root.$$phase||o.$apply()}if(h)if(i.revert){var s=h[0].getBoundingClientRect(),a=p[0].getBoundingClientRect(),l=Math.sqrt(Math.pow(a.top-s.top,2)+Math.pow(a.left-s.left,2)),c=+i.revert*l/200;c=Math.min(c,+i.revert),["-webkit-","-moz-","-ms-","-o-",""].forEach(function(e){void 0!==p[0].style[e+"transition"]&&(p[0].style[e+"transition"]="all "+c+"ms ease")}),setTimeout(r,c),p.css({top:s.top+document.body.scrollTop+"px",left:s.left+document.body.scrollLeft+"px"})}else r()},this.addToSortableElements=function(t){e(c).push(t)},this.removeFromSortableElements=function(t){var i=e(c),r=i.indexOf(t);r>-1&&(i.splice(r,1),0===i.length&&function(e){delete n[e]}(c))}}]}}]),o.directive("svPart",["$parse",function(e){return{restrict:"A",require:"^svRoot",controller:["$scope",function(e){e.$ctrl=this,this.getPart=function(){return e.part},this.$drop=function(t,n){e.$sortableRoot.$drop(e.part,t,n)}}],scope:!0,link:function(t,n,i,r){if(!i.svPart)throw new Error("no model provided");var o=e(i.svPart);if(!o.assign)throw new Error("model not assignable");t.part={id:t.$id,element:n,model:o,scope:t},t.$sortableRoot=r;var s={element:n,getPart:t.$ctrl.getPart,container:!0};r.addToSortableElements(s),t.$on("$destroy",function(){r.removeFromSortableElements(s)})}}}]),o.directive("svElement",["$parse",function(e){return{restrict:"A",require:["^svPart","^svRoot"],controller:["$scope",function(e){e.$ctrl=this}],link:function(i,r,o,s){function a(a){function c(e){n(e),p||(r.parent().prepend(m),p=!0),s[1].$moveUpdate(u,{x:e.clientX,y:e.clientY,offset:b},m,r,d,s[0].getPart(),i.$index)}if(n(a),!s[1].sortingInProgress()&&(0==a.button||"mousedown"!==a.type)){p=!1;var u=e(o.svElement)(i);if((u=t.extend({},{tolerance:"pointer",revert:200,containment:"html"},u)).containment)var g=l.call(r,u.containment)[0].getBoundingClientRect();var m,v=r,w=r[0].getBoundingClientRect();h||(h=s[0].helper),d||(d=s[0].placeholder),h?((m=h.clone()).removeClass("ng-hide"),m.css({left:w.left+document.body.scrollLeft+"px",top:w.top+document.body.scrollTop+"px"}),v.addClass("sv-visibility-hidden")):(m=v.clone()).addClass("sv-helper").css({left:w.left+document.body.scrollLeft+"px",top:w.top+document.body.scrollTop+"px",width:w.width+"px"}),m[0].reposition=function(e){var t=e.x,n=e.y,i=m[0].getBoundingClientRect(),r=document.body;g&&(n<g.top+r.scrollTop&&(n=g.top+r.scrollTop),n+i.height>g.top+r.scrollTop+g.height&&(n=g.top+r.scrollTop+g.height-i.height),t<g.left+r.scrollLeft&&(t=g.left+r.scrollLeft),t+i.width>g.left+r.scrollLeft+g.width&&(t=g.left+r.scrollLeft+g.width-i.width)),this.style.left=t-r.scrollLeft+"px",this.style.top=n-r.scrollTop+"px"};var b={x:(a.clientX-w.left)/w.width,y:(a.clientY-w.top)/w.height};f.addClass("sv-sorting-in-progress"),f.on("mousemove touchmove",c).on("mouseup touchend touchcancel",function e(t){f.off("mousemove touchmove",c),f.off("mouseup touchend",e),f.removeClass("sv-sorting-in-progress"),p&&s[0].$drop(i.$index,u),r.removeClass("sv-visibility-hidden")})}}var c={element:r,getPart:s[0].getPart,getIndex:function(){return i.$index}};s[1].addToSortableElements(c),i.$on("$destroy",function(){s[1].removeFromSortableElements(c)});var u=r;u.on("mousedown touchstart",a),i.$watch("$ctrl.handle",function(e){e&&(u.off("mousedown touchstart",a),(u=e).on("mousedown touchstart",a))});var h;i.$watch("$ctrl.helper",function(e){e&&(h=e)});var d;i.$watch("$ctrl.placeholder",function(e){e&&(d=e)});t.element(document.body);var p,f=t.element(document.documentElement)}}}]),o.directive("svHandle",function(){return{require:"?^svElement",link:function(e,t,n,i){i&&(i.handle=t.add(i.handle))}}}),o.directive("svHelper",function(){return{require:["?^svPart","?^svElement"],link:function(e,t,n,i){t.addClass("sv-helper").addClass("ng-hide"),i[1]?i[1].helper=t:i[0]&&(i[0].helper=t)}}}),o.directive("svPlaceholder",function(){return{require:["?^svPart","?^svElement"],link:function(e,t,n,i){t.addClass("sv-placeholder").addClass("ng-hide"),i[1]?i[1].placeholder=t:i[0]&&(i[0].placeholder=t)}}}),t.element(document.head).append(["<style>.sv-helper{position: fixed !important;z-index: 99999;margin: 0 !important;}.sv-candidate{}.sv-placeholder{}.sv-sorting-in-progress{-webkit-user-select: none;-moz-user-select: none;-ms-user-select: none;user-select: none;}.sv-visibility-hidden{visibility: hidden !important;opacity: 0 !important;}</style>"].join(""));var s=document.documentElement,a=s.matches?"matches":s.matchesSelector?"matchesSelector":s.webkitMatches?"webkitMatches":s.webkitMatchesSelector?"webkitMatchesSelector":s.msMatches?"msMatches":s.msMatchesSelector?"msMatchesSelector":s.mozMatches?"mozMatches":s.mozMatchesSelector?"mozMatchesSelector":null;if(null==a)throw"This browser doesn't support the HTMLElement.matches method";var l=t.element.prototype.closest||function(e){for(var n=this[0].parentNode;n!==document.documentElement&&!n[a](e);)n=n.parentNode;return n[a](e)?t.element(n):t.element()};"function"!=typeof t.element.prototype.add&&(t.element.prototype.add=function(e){var n,i=t.element();for(e=t.element(e),n=0;n<this.length;n++)i.push(this[n]);for(n=0;n<e.length;n++)i.push(e[n]);return i})}(window,window.angular)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){return{template:i.default,replace:!0,link:function(e){},controller:["$scope",function(e){e.openTab=function(t){angular.forEach(e.tabs,function(e){e.active=!1}),e.tabs[t].active=!0}}]}};var i=function(e){return e&&e.__esModule?e:{default:e}}(n(6))},function(e,t){e.exports='<div class="ea-editor ea-editor-{{adaptiveClass}}" ng-class="expanded ? \'ea-editor-expanded\' : \'\'">\n    <div class="ea-editor-overlay" ng-click="expanded = !expanded"></div>\n\n    <div class="ea-editor-responsive-button" ng-click="expanded = !expanded">\n        <svg viewBox="0 0 18 18" class="ea-editor-responsive-button-label-icon" width="18" height="18"\n             ng-show="adaptiveClass !== \'small\'">\n            <path d="M14.6,12c0.2-0.4,0.4-0.8,0.5-1.2c0.1-0.3,0.3-0.4,0.6-0.5l2.3-0.3l0,0V7.9l-2.3-0.3c-0.3,0-0.5-0.2-0.6-0.5\n                C15,6.7,14.8,6.4,14.6,6c-0.1-0.2-0.1-0.5,0.1-0.7l1.4-1.9l-1.5-1.5l-1.9,1.4c-0.2,0.2-0.5,0.2-0.7,0.1c-0.4-0.2-0.8-0.4-1.2-0.5\n                c-0.3-0.1-0.4-0.3-0.5-0.6L10.1,0H7.9L7.6,2.3c0,0.3-0.2,0.5-0.5,0.6C6.8,3,6.4,3.2,6,3.4C5.8,3.5,5.5,3.5,5.3,3.3L3.4,1.9L1.9,3.4\n                l1.4,1.9C3.5,5.5,3.5,5.7,3.4,6C3.2,6.4,3,6.7,2.9,7.2C2.8,7.4,2.6,7.6,2.3,7.6L0,7.9v2.2l2.3,0.3c0.3,0,0.5,0.2,0.6,0.5\n                C3,11.2,3.2,11.6,3.4,12c0.1,0.2,0.1,0.5-0.1,0.7l-1.4,1.9l1.5,1.5l1.9-1.4c0.2-0.2,0.5-0.2,0.7-0.1c0.4,0.2,0.8,0.4,1.2,0.5\n                c0.3,0.1,0.4,0.3,0.5,0.6L7.9,18h2.2l0.3-2.3c0-0.3,0.2-0.5,0.5-0.6c0.4-0.1,0.8-0.3,1.2-0.5c0.2-0.1,0.5-0.1,0.7,0.1l1.9,1.4\n                l1.5-1.5l-1.4-1.9C14.5,12.5,14.5,12.2,14.6,12z M9,11.9c-1.6,0-2.8-1.3-2.8-2.8S7.4,6.1,9,6.1s2.8,1.3,2.8,2.9\n                C11.9,10.6,10.6,11.9,9,11.9z"></path>\n        </svg>\n\n        <span class="ea-editor-responsive-button-label" ng-show="!expanded && adaptiveClass === \'small\'">\n            <svg viewBox="0 0 18 18" class="ea-editor-responsive-button-label-icon" width="18" height="18">\n                <path d="M14.6,12c0.2-0.4,0.4-0.8,0.5-1.2c0.1-0.3,0.3-0.4,0.6-0.5l2.3-0.3l0,0V7.9l-2.3-0.3c-0.3,0-0.5-0.2-0.6-0.5\n                    C15,6.7,14.8,6.4,14.6,6c-0.1-0.2-0.1-0.5,0.1-0.7l1.4-1.9l-1.5-1.5l-1.9,1.4c-0.2,0.2-0.5,0.2-0.7,0.1c-0.4-0.2-0.8-0.4-1.2-0.5\n                    c-0.3-0.1-0.4-0.3-0.5-0.6L10.1,0H7.9L7.6,2.3c0,0.3-0.2,0.5-0.5,0.6C6.8,3,6.4,3.2,6,3.4C5.8,3.5,5.5,3.5,5.3,3.3L3.4,1.9L1.9,3.4\n                    l1.4,1.9C3.5,5.5,3.5,5.7,3.4,6C3.2,6.4,3,6.7,2.9,7.2C2.8,7.4,2.6,7.6,2.3,7.6L0,7.9v2.2l2.3,0.3c0.3,0,0.5,0.2,0.6,0.5\n                    C3,11.2,3.2,11.6,3.4,12c0.1,0.2,0.1,0.5-0.1,0.7l-1.4,1.9l1.5,1.5l1.9-1.4c0.2-0.2,0.5-0.2,0.7-0.1c0.4,0.2,0.8,0.4,1.2,0.5\n                    c0.3,0.1,0.4,0.3,0.5,0.6L7.9,18h2.2l0.3-2.3c0-0.3,0.2-0.5,0.5-0.6c0.4-0.1,0.8-0.3,1.2-0.5c0.2-0.1,0.5-0.1,0.7,0.1l1.9,1.4\n                    l1.5-1.5l-1.4-1.9C14.5,12.5,14.5,12.2,14.6,12z M9,11.9c-1.6,0-2.8-1.3-2.8-2.8S7.4,6.1,9,6.1s2.8,1.3,2.8,2.9\n                    C11.9,10.6,10.6,11.9,9,11.9z"></path>\n            </svg>\n\n            <span class="ea-editor-responsive-button-label-text">\n                Widget Settings\n            </span>\n\n            <svg viewBox="0 0 8 12" class="ea-editor-responsive-button-arrow">\n                <path d="M5.71,4.286L1.727,0.302c-0.39-0.392-1.023-0.392-1.414,0c-0.39,0.39-0.39,1.023,0,1.414L3.59,4.992\n\t                L0.289,8.284c-0.39,0.39-0.39,1.025,0,1.415c0.39,0.39,1.023,0.39,1.414,0l4.008-4C6.101,5.309,6.101,4.675,5.71,4.286z"></path>\n            </svg>\n        </span>\n\n        <span class="ea-editor-responsive-button-label" ng-show="expanded && adaptiveClass === \'small\'">\n            <svg viewBox="0 0 12 17" class="ea-editor-responsive-button-label-icon" width="18" height="12">\n                <path d="M4.3,8.7l6,5.9c0.4,0.4,1.1,0.4,1.5,0c0.4-0.4,0.4-1.1,0-1.5L6.5,8l5.2-5.2c0.4-0.4,0.4-1.1,0-1.5\n                c-0.4-0.4-1.1-0.4-1.5,0l-6,6C3.9,7.7,3.9,8.3,4.3,8.7z"></path>\n            </svg>\n\n            <span class="ea-editor-responsive-button-label-text">\n                Back to preview\n            </span>\n\n        </span>\n\n        \x3c!--<div class="ea-editor-responsive-button-hint">Try Settings</div>--\x3e\n    </div>\n\n    <div class="ea-editor-form">\n        <div class="ea-editor-tabs">\n            <div class="ea-editor-tabs-nav">\n                <div class="ea-editor-tabs-nav-item" ng-class="{ \'ea-editor-tabs-nav-item-active\': tab.active }"\n                     ng-click="openTab(key)" ng-repeat="(key, tab) in tabs">\n                    {{tab.name}}\n                </div>\n            </div>\n\n            <div class="ea-editor-tabs-content">\n                <div class="ea-editor-tabs-content-item" ng-class="{ \'ea-editor-tabs-content-item-active\': tab.active }"\n                     ng-repeat="tab in tabs">\n                    <div class="ea-editor-property" ng-repeat="property in tab.properties"\n                         ng-class="property.visible === false ? \'ea-editor-property-hide\' : \'\'">\n                        <div ng-show="property.visible !== false">\n                            <div control="property" ng-model="widget.data" ng-if="property.type === \'subgroup\'"></div>\n                            <div control="property" ng-model="widget.data[property.id]"\n                                 ng-if="property.type !== \'subgroup\'"></div>\n                        </div>\n                    </div>\n                </div>\n            </div>\n        </div>\n\n        <div class="ea-editor-hint" ng-class="{ \'ea-editor-hint-visible\': editorHintVisible }">{{editorHint}}</div>\n    </div>\n\n    <div class="ea-editor-preview-container">\n        <div class="ea-editor-preview-overlay"></div>\n\n        <div class="ea-editor-preview-loader" ng-class="showLoader ? \'ea-editor-preview-loader-show\' : \'\'"></div>\n    </div>\n</div>\n'},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=["$compile","$rootScope","$sce",function(e,t,n){return{scope:{control:"=",ngModel:"="},replace:!0,controller:["$scope",function(e){}],link:function(t,i){t.setDefaultValueIfEmpty=function(){t.control.allowEmpty||""!==t.ngModel&&null!==t.ngModel&&angular.isDefined(t.ngModel)||(t.ngModel=void 0===t.control.defaultValue?null:angular.copy(t.control.defaultValue))},angular.isDefined(t.ngModel)||(t.ngModel=void 0===t.control.defaultValue?null:angular.copy(t.control.defaultValue)),t.control.caption&&(t.control.caption=n.trustAsHtml(t.control.caption));var r="<elfsight-apps-control-#type#></elfsight-apps-control-#type#>",o=void 0;o="custom"===t.control.type&&t.control.custom.type?angular.element(r.replace("#type#","custom-"+t.control.custom.type)):angular.element(r.replace("#type#",t.control.type)),i.replaceWith(e(o)(t))}}}]},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=["$rootScope",function(e){return{template:i.default,replace:!0,controller:["$scope","$rootScope",function(e,t){}],link:function(e,t){var n=document.createElement("div"),i=!1;e.$watch("ngModel",function(t){if(i)i=!1;else{var r=!1;n.innerHTML=t,n.querySelectorAll("script").forEach(function(e){e.parentNode.removeChild(e),r=!0}),n.querySelectorAll("iframe").forEach(function(e){e.parentNode.removeChild(e),r=!0}),n.querySelectorAll("a").forEach(function(e){e.target="blank",r=!0}),r&&(e.ngModel=n.innerHTML,i=!0)}})}}}];var i=function(e){return e&&e.__esModule?e:{default:e}}(n(9))},function(e,t){e.exports='<label class="ea-editor-property-inner">\n    <div class="ea-editor-property-label" editor-hint="control.description">{{control.name}}</div>\n    <div class="ea-editor-property-caption" ng-if="control.caption" ng-bind-html="control.caption"></div>\n\n    <div class="ea-editor-property-control-text ea-editor-property-control">\n        <input ng-model="ngModel" ng-model-options="{ debounce: 300 }" type="text" ng-blur="setDefaultValueIfEmpty()">\n    </div>\n</label>'},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=["$timeout",function(e){return{template:r.default,replace:!0,controller:["$scope","$element",function(e,t){setTimeout(function(){(0,o.default)(t.find("textarea"))},100)}],link:function(e,t){var n=document.createElement("div"),i=!1;e.$watch("ngModel",function(t){if(i)i=!1;else{var r=!1;n.innerHTML=t,n.querySelectorAll("script").forEach(function(e){e.parentNode.removeChild(e),r=!0}),n.querySelectorAll("iframe").forEach(function(e){e.parentNode.removeChild(e),r=!0}),n.querySelectorAll("a").forEach(function(e){e.target="blank",r=!0}),r&&(e.ngModel=n.innerHTML,i=!0)}})}}}];var r=i(n(11)),o=i(n(12))},function(e,t){e.exports='<label class="ea-editor-property-inner">\n    <div class="ea-editor-property-label" editor-hint="control.description">{{control.name}}</div>\n    <div class="ea-editor-property-caption" ng-if="control.caption" ng-bind-html="control.caption"></div>\n\n    <div class="ea-editor-property-control-textarea ea-editor-property-control">\n        <textarea ng-model="ngModel" ng-model-options="{ debounce: 300 }" ng-blur="setDefaultValueIfEmpty()"></textarea>\n    </div>\n</label>'},function(e,t,n){var i,r,o;!function(n,s){r=[t,e],void 0===(o="function"==typeof(i=s)?i.apply(t,r):i)||(e.exports=o)}(0,function(e,t){"use strict";function n(e){function t(t){var n=e.style.width;e.style.width="0px",e.offsetWidth,e.style.width=n,e.style.overflowY=t}function n(){var t=e.style.height,n=function(e){for(var t=[];e&&e.parentNode&&e.parentNode instanceof Element;)e.parentNode.scrollTop&&t.push({node:e.parentNode,scrollTop:e.parentNode.scrollTop}),e=e.parentNode;return t}(e),i=document.documentElement&&document.documentElement.scrollTop;e.style.height="";var o=e.scrollHeight+r;0!==e.scrollHeight?(e.style.height=o+"px",a=e.clientWidth,n.forEach(function(e){e.node.scrollTop=e.scrollTop}),i&&(document.documentElement.scrollTop=i)):e.style.height=t}function i(){n();var i=Math.round(parseFloat(e.style.height)),r=window.getComputedStyle(e,null),o="content-box"===r.boxSizing?Math.round(parseFloat(r.height)):e.offsetHeight;if(o!==i?"hidden"===r.overflowY&&(t("scroll"),n(),o="content-box"===r.boxSizing?Math.round(parseFloat(window.getComputedStyle(e,null).height)):e.offsetHeight):"hidden"!==r.overflowY&&(t("hidden"),n(),o="content-box"===r.boxSizing?Math.round(parseFloat(window.getComputedStyle(e,null).height)):e.offsetHeight),l!==o){l=o;var a=s("autosize:resized");try{e.dispatchEvent(a)}catch(e){}}}if(e&&e.nodeName&&"TEXTAREA"===e.nodeName&&!o.has(e)){var r=null,a=e.clientWidth,l=null,c=function(){e.clientWidth!==a&&i()},u=function(t){window.removeEventListener("resize",c,!1),e.removeEventListener("input",i,!1),e.removeEventListener("keyup",i,!1),e.removeEventListener("autosize:destroy",u,!1),e.removeEventListener("autosize:update",i,!1),Object.keys(t).forEach(function(n){e.style[n]=t[n]}),o.delete(e)}.bind(e,{height:e.style.height,resize:e.style.resize,overflowY:e.style.overflowY,overflowX:e.style.overflowX,wordWrap:e.style.wordWrap});e.addEventListener("autosize:destroy",u,!1),"onpropertychange"in e&&"oninput"in e&&e.addEventListener("keyup",i,!1),window.addEventListener("resize",c,!1),e.addEventListener("input",i,!1),e.addEventListener("autosize:update",i,!1),e.style.overflowX="hidden",e.style.wordWrap="break-word",o.set(e,{destroy:u,update:i}),function(){var t=window.getComputedStyle(e,null);"vertical"===t.resize?e.style.resize="none":"both"===t.resize&&(e.style.resize="horizontal"),r="content-box"===t.boxSizing?-(parseFloat(t.paddingTop)+parseFloat(t.paddingBottom)):parseFloat(t.borderTopWidth)+parseFloat(t.borderBottomWidth),isNaN(r)&&(r=0),i()}()}}function i(e){var t=o.get(e);t&&t.destroy()}function r(e){var t=o.get(e);t&&t.update()}var o="function"==typeof Map?new Map:function(){var e=[],t=[];return{has:function(t){return e.indexOf(t)>-1},get:function(n){return t[e.indexOf(n)]},set:function(n,i){-1===e.indexOf(n)&&(e.push(n),t.push(i))},delete:function(n){var i=e.indexOf(n);i>-1&&(e.splice(i,1),t.splice(i,1))}}}(),s=function(e){return new Event(e,{bubbles:!0})};try{new Event("test")}catch(e){s=function(e){var t=document.createEvent("Event");return t.initEvent(e,!0,!1),t}}var a=null;"undefined"==typeof window||"function"!=typeof window.getComputedStyle?((a=function(e){return e}).destroy=function(e){return e},a.update=function(e){return e}):((a=function(e,t){return e&&Array.prototype.forEach.call(e.length?e:[e],function(e){return n(e)}),e}).destroy=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],i),e},a.update=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],r),e}),t.exports=a})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){return{template:i.default,replace:!0,controller:["$scope",function(e){e.control.number||(e.control.number={}),e.control.number.min||(e.control.number.min=0)}]}};var i=function(e){return e&&e.__esModule?e:{default:e}}(n(14))},function(e,t){e.exports='<label class="ea-editor-property-inner">\n    <div class="ea-editor-property-label" editor-hint="control.description">{{control.name}}</div>\n    <div class="ea-editor-property-caption" ng-if="control.caption" ng-bind-html="control.caption"></div>\n\n    <div class="ea-editor-property-control-number ea-editor-property-control">\n        <input ng-model="ngModel" ng-model-options="{ debounce: 300 }" type="number" ng-blur="setDefaultValueIfEmpty()" min="{{control.number.min}}" max="{{control.number.max}}">\n    </div>\n</label>'},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=["$rootScope",function(e){return{template:i.default,replace:!0,controller:["$scope","$rootScope","$element","$timeout",function(e,t,n,i){e.show=!1,e.readonly=!e.control.select.enableInput,e.currentValue=e.control.select.options.find(function(t,n){return t.value===e.ngModel}),e.showOptions=function(){!1===e.show&&(e.show=!0,e.binded=!1,e.show&&!e.binded&&(n.bind("keydown keypress",function(t){e.binded=!0,38===t.keyCode?(e.currentValue=e.control.select.options.find(function(e,n){return e.name===t.target.value}),e.currentId=e.control.select.options.indexOf(e.currentValue),i(function(){o()}),t.preventDefault()):40===t.keyCode?(e.currentValue=e.control.select.options.find(function(e,n){return e.name===t.target.value}),e.currentId=e.control.select.options.indexOf(e.currentValue),i(function(){r()}),t.preventDefault()):13===t.keyCode&&(n[0].querySelector(".ea-editor-property-control-select input").blur(),e.hideOptions(),t.preventDefault())}),n.bind("keyup",function(t){var n=String.fromCharCode(t.keyCode);(/[a-zA-Z0-9-_ ]/.test(n)||/[\b]/.test(n))&&i(function(){e.currentValue=t.target.value,e.setValue(e.currentValue),e.$apply()})})),angular.element(document).bind("click",function(t){n[0]===t.target||n[0].contains(t.target)?t.preventDefault():e.hideOptions()}))};var r=function(){var t=e.currentValue,i=0;e.control.select.options.indexOf(e.currentValue)+1>=e.control.select.options.length?(t=e.control.select.options[0].value,i=0):(t=e.control.select.options[e.control.select.options.indexOf(e.currentValue)+1].value,i=32*(e.currentId-1)),e.setValue(t),n[0].querySelector(".ea-editor-property-control-select-options").scrollTop=i},o=function(){var t=e.currentValue,i=0;e.control.select.options.indexOf(e.currentValue)<=0?(t=e.control.select.options[e.control.select.options.length-1].value,i=32*e.control.select.options.length):(t=e.control.select.options[e.control.select.options.indexOf(e.currentValue)-1].value,i=32*(e.currentId-2)),e.setValue(t),n[0].querySelector(".ea-editor-property-control-select-options").scrollTop=i};e.hideOptions=function(){e.show=!1,e.binded=!1,e.unbind(),e.$apply()},e.unbind=function(){n.unbind("keydown keypress keyup")},e.setValue=function(t,n){e.currentValue=e.control.select.options.find(function(e,n){return e.value===t||e.name===t})||t,e.ngModel=t.value?t.value:t,n&&"click"===n.type&&i(function(){e.hideOptions()})}}]}}];var i=function(e){return e&&e.__esModule?e:{default:e}}(n(16))},function(e,t){e.exports='<label class="ea-editor-property-inner">\n    <div class="ea-editor-property-label" editor-hint="control.description">{{control.name}}</div>\n    <div class="ea-editor-property-caption" ng-if="control.caption" ng-bind-html="control.caption"></div>\n\n    <div class="ea-editor-property-control-select ea-editor-property-control" ng-class="{\'ea-editor-property-control-select-readonly\': readonly}">\n        <input type="text" ng-click="showOptions()" ng-value="currentValue.name || currentValue || ngModel" ng-readonly="readonly">\n\n        <div class="ea-editor-property-control-select-options" ng-if="show">\n            <div class="ea-editor-property-control-select-options-item"\n                 ng-repeat="option in control.select.options"\n                 ng-click="setValue(option.value, $event)"\n                 ng-class="{\'ea-editor-property-control-select-options-item-selected\': option.name === currentValue.name || option.name === currentValue}">\n                {{option.name}}\n            </div>\n        </div>\n    </div>\n</label>'},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=["$rootScope",function(e){return{template:i.default,replace:!0,controller:["$scope","$rootScope",function(e,t){}]}}];var i=function(e){return e&&e.__esModule?e:{default:e}}(n(18))},function(e,t){e.exports='<div class="ea-editor-property-inner">\n    <div class="ea-editor-property-label" editor-hint="control.description">{{control.name}}</div>\n    <div class="ea-editor-property-caption" ng-if="control.caption" ng-bind-html="control.caption"></div>\n\n    <div class="ea-editor-property-control-select-inline ea-editor-property-control">\n        <div class="ea-editor-property-control-select-inline-wrapper">\n            <label class="ea-editor-property-control-select-inline-item" ng-repeat="option in control.selectInline.options">\n                <input class="ea-editor-property-control-select-inline-item-radio" ng-model="$parent.ngModel" type="radio" ng-value="option.value">\n\n                <span class="ea-editor-property-control-select-inline-item-label">{{option.name}}</span>\n            </label>\n        </div>\n    </div>\n</div>'},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=["$rootScope",function(e){return{template:i.default,replace:!0,controller:["$scope","$rootScope","$visual",function(e,t,n){e.openSelectVisual=function(){n.show(e)},e.selected=e.control.select.options.find(function(t){return t.value===e.ngModel})}]}}];var i=function(e){return e&&e.__esModule?e:{default:e}}(n(20))},function(e,t){e.exports='<label class="ea-editor-property-inner">\n    <div class="ea-editor-property-label" editor-hint="control.description">{{control.name}}</div>\n    <div class="ea-editor-property-caption" ng-if="control.caption" ng-bind-html="control.caption"></div>\n\n    <div class="ea-editor-select-visual-control ea-editor-property-control" ng-click="openSelectVisual()">\n        <div class="ea-editor-select-visual-control-image-container">\n            <img src="{{selected.img}}" alt="" class="ea-editor-select-visual-control-image">\n        </div>\n\n        <div class="ea-editor-select-visual-control-name">\n            {{selected.name}}\n        </div>\n\n        <div class="ea-editor-select-visual-control-trigger">\n            <div class="ea-editor-select-visual-control-trigger-arrow">\n                <svg width="6px" height="10px" viewBox="0 0 6 10" fill="#c2c6ca" focusable="false">\n                    <path d="M5.71,4.286L1.727,0.302c-0.39-0.392-1.023-0.392-1.414,0c-0.39,0.39-0.39,1.023,0,1.414L3.59,4.992\n\t                L0.289,8.284c-0.39,0.39-0.39,1.025,0,1.415c0.39,0.39,1.023,0.39,1.414,0l4.008-4C6.101,5.309,6.101,4.675,5.71,4.286z"></path>\n                </svg>\n            </div>\n        </div>\n    </div>\n</label>'},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=["$rootScope",function(e){return{template:i.default,replace:!0,controller:["$scope","$rootScope",function(e,t){}],link:function(e,t){e.addTag=function(){e.newTag&&(angular.isArray(e.ngModel)||(e.ngModel=[]),-1===e.ngModel.indexOf(e.newTag)&&e.ngModel.push(e.newTag),e.newTag="")},e.removeTag=function(t){angular.isArray(e.ngModel)&&e.ngModel.splice(t,1)},t.bind("keydown",function(t){var n=t.which;9!=n&&13!=n||e.newTag&&t.preventDefault()}),t.bind("keyup",function(t){var n=t.which;Array.isArray(e.control.allowedKeys)||(e.control.allowedKeys=[]),9!=n&&13!=n&&-1===e.control.allowedKeys.indexOf(n)||(e.newTag&&t.preventDefault(),e.$apply("addTag()"))}),t.bind("change",function(t){e.$apply("addTag()")})}}}];var i=function(e){return e&&e.__esModule?e:{default:e}}(n(22))},function(e,t){e.exports='<label class="ea-editor-property-inner">\n    <div class="ea-editor-property-label" editor-hint="control.description">{{control.name}}</div>\n    <div class="ea-editor-property-caption" ng-if="control.caption" ng-bind-html="control.caption"></div>\n\n    <div class="ea-editor-property-control-tags ea-editor-property-control">\n        <input class="ea-editor-property-control-tags-input" type="text" ng-model="newTag" placeholder="{{control.tags.placeholder}}">\n\n        <div class="ea-editor-property-control-tags-wrapper">\n            <div class="ea-editor-property-control-tags-item" ng-repeat="(key, value) in ngModel">\n                <div class="ea-editor-property-control-tags-item-label" title="{{value}}">{{value}}</div>\n                <div class="ea-editor-property-control-tags-item-remove" ng-click="removeTag(key)">\n                    <svg width="8px" height="8px" viewBox="0 0 8 8" fill="#fff" focusable="false">\n                        <path fill="#fff" d="M4.708,4l3.146-3.146c0.195-0.195,0.195-0.511,0-0.708c-0.196-0.195-0.513-0.195-0.708,0L4,3.292\n                            L0.854,0.146c-0.195-0.195-0.511-0.195-0.708,0c-0.195,0.196-0.195,0.513,0,0.708L3.292,4L0.146,7.146\n                            c-0.195,0.195-0.195,0.511,0,0.708c0.196,0.195,0.513,0.195,0.708,0L4,4.708l3.146,3.146c0.195,0.195,0.511,0.195,0.708,0\n                            c0.195-0.196,0.195-0.513,0-0.708L4.708,4z"></path>\n                    </svg>\n                </div>\n            </div>\n        </div>\n    </div>\n</label>'},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=["$rootScope",function(e){return{template:i.default,replace:!0,controller:["$scope","$rootScope",function(e,t){}]}}];var i=function(e){return e&&e.__esModule?e:{default:e}}(n(24))},function(e,t){e.exports='<div class="ea-editor-property-inner">\n    <label for="ea-editor-control-{{control.id}}" class="ea-editor-property-label" editor-hint="control.description">{{control.name}}</label>\n\n    <div class="ea-editor-property-control-toggle ea-editor-property-control" ng-class="{ \'ea-editor-property-control-toggle-on\': ngModel }">\n        <label class="ea-editor-property-control-toggle-wrapper">\n            <span class="ea-editor-property-control-toggle-inner">\n                <input id="ea-editor-control-{{control.id}}" type="checkbox" ng-model="ngModel" ng-checked="ngModel">\n            </span>\n        </label>\n    </div>\n</div>'},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=["$rootScope",function(e){return{template:i.default,replace:!0,controller:["$scope","$rootScope",function(e,t){}]}}];var i=function(e){return e&&e.__esModule?e:{default:e}}(n(26))},function(e,t){e.exports='<div class="ea-editor-property-inner">\n    <div class="ea-editor-property-label" editor-hint="control.description">{{control.name}}</div>\n    <div class="ea-editor-property-caption" ng-if="control.caption" ng-bind-html="control.caption"></div>\n\n    <div class="ea-editor-property-control-checklist ea-editor-property-control">\n        <label class="ea-editor-property-control-checklist-item" ng-repeat="option in control.checklist.options">\n            <div class="ea-editor-property-control-checklist-checkbox-wrapper">\n                <input type="checkbox" checklist-value="option.value" checklist-model="ngModel">\n\n                <span class="ea-editor-property-control-checklist-checkbox"></span>\n            </div>\n\n            <span class="ea-editor-property-control-checklist-item-label">{{option.name}}</span>\n        </label>\n    </div>\n</div>'},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=["$rootScope",function(e){return{template:i.default,replace:!0,controller:["$scope","$rootScope",function(e,t){e.options={clear:{show:!0,label:"Clear color"}},e.eventApi={onClear:function(e){!function(e){var t=e.getElement()[0];angular.element(t.querySelector(".color-picker-swatch")).removeAttr("style")}(e)}}}]}}];var i=function(e){return e&&e.__esModule?e:{default:e}}(n(28))},function(e,t){e.exports='<label class="ea-editor-property-inner">\n    <div class="ea-editor-property-label" editor-hint="control.description">{{control.name}}</div>\n    <div class="ea-editor-property-caption" ng-if="control.caption" ng-bind-html="control.caption"></div>\n\n    <div class="ea-editor-property-control-color ea-editor-property-control">\n        <color-picker ng-model="ngModel" options="options" event-api="eventApi"></color-picker>\n    </div>\n</label>'},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=["$timeout",function(e){return{template:r.default,replace:!0,link:function(e,t){},controller:["$scope","$rootScope","$sub",function(t,n,i){t.itemsToRemove=[],t.getItemName=function(e){var n=t.control.complex.nameProperty;return n?function(e,n){function i(t){if(!r){var s=!0,a=!1,l=void 0;try{for(var c,u=t[Symbol.iterator]();!(s=(c=u.next()).done);s=!0){var h=c.value;if(r)return;if("subgroup"===h.type)i(h.subgroup.properties);else if(h.id===n)return r=!0,void(o=e[n]||h.defaultValue)}}catch(e){a=!0,l=e}finally{try{!s&&u.return&&u.return()}finally{if(a)throw l}}}}var r=!1,o="";return i(t.control.complex.properties),o}(e,n):function(e){var n="";angular.isObject(e)||(n=e);var i=!0,r=!1,o=void 0;try{for(var s,a=t.control.complex.properties[Symbol.iterator]();!(i=(s=a.next()).done);i=!0){var l=s.value;if("subgroup"!==l.type){if(l.complexGroup){n=e.name;break}if("select"===l.type){var c=!0,u=!1,h=void 0;try{for(var d,p=l.select.options[Symbol.iterator]();!(c=(d=p.next()).done);c=!0){var f=d.value;if(f.value===e[l.id]){n=f.name;break}}}catch(e){u=!0,h=e}finally{try{!c&&p.return&&p.return()}finally{if(u)throw h}}}else n=e[l.id];break}}}catch(e){r=!0,o=e}finally{try{!i&&a.return&&a.return()}finally{if(r)throw o}}return n||""}(e)},t.openSub=function(r){angular.isArray(t.ngModel)||(t.ngModel=[]);var s=n.$new();r&&r.complexGroup?t.control.complex.properties.forEach(function(e){e.complexGroup&&e.complexGroup===r.complexGroup&&(s.name=e.name,s.properties=e.properties)}):(s.name=t.control.name,s.properties=t.control.complex.properties),r||(r={},e(function(){o.default.recursivelyGetAllProps(s.properties,r,"subgroup"),t.ngModel.push(r)},300)),s.data=r,n.currentComplex=r,i.show(s)},t.reorderClick=function(e){e.stopPropagation()},t.duplicateItem=function(e,n){t.ngModel.push(angular.copy(e)),n.stopPropagation()},t.removeItem=function(e,n){t.itemsToRemove.splice(t.itemsToRemove.indexOf(e),1),t.ngModel.splice(e,1),n.stopPropagation()},t.showRemoveConfirm=function(e,n){t.itemsToRemove.push(e),n.stopPropagation()},t.hideRemoveConfirm=function(e,n){t.itemsToRemove.splice(t.itemsToRemove.indexOf(e),1),n.stopPropagation()}}]}}];var r=i(n(30)),o=i(n(31))},function(e,t){e.exports='<div class="ea-editor-property-inner">\n    <div class="ea-editor-property-label" editor-hint="control.description">{{control.name}}</div>\n    <div class="ea-editor-property-caption" ng-if="control.caption" ng-bind-html="control.caption"></div>\n\n    <div class="ea-editor-property-control-complex ea-editor-property-control" sv-root>\n        <div class="ea-editor-property-control-complex-list" sv-part="ngModel">\n            <div sv-placeholder class="ea-editor-property-control-complex-item-placeholder"></div>\n\n            <div class="ea-editor-property-control-complex-item" ng-repeat="(key, item) in ngModel" ng-click="openSub(item)" sv-element ng-class="{ \'ea-editor-property-control-complex-item-removing\': itemsToRemove.indexOf(key) > -1 }">\n                <div class="ea-editor-property-control-complex-item-inner">\n                    <div class="ea-editor-property-control-complex-item-reorder" ng-click="reorderClick($event)" sv-handle>\n                        <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 7 14" focusable="false">\n                            <path d="M1,4c0.6,0,1,0.4,1,1S1.6,6,1,6S0,5.6,0,5S0.4,4,1,4L1,4z"/>\n                            <path d="M1,0c0.6,0,1,0.4,1,1S1.6,2,1,2S0,1.6,0,1S0.4,0,1,0L1,0z"/>\n                            <path d="M1,8c0.6,0,1,0.4,1,1s-0.4,1-1,1S0,9.6,0,9S0.4,8,1,8L1,8z"/>\n                            <path d="M1,12c0.6,0,1,0.4,1,1s-0.4,1-1,1s-1-0.4-1-1S0.4,12,1,12L1,12z"/>\n                            <path d="M6,0c0.6,0,1,0.4,1,1S6.6,2,6,2S5,1.6,5,1S5.4,0,6,0L6,0z"/>\n                            <path d="M6,4c0.6,0,1,0.4,1,1S6.6,6,6,6S5,5.6,5,5S5.4,4,6,4L6,4z"/>\n                            <path d="M6,8c0.6,0,1,0.4,1,1s-0.4,1-1,1S5,9.6,5,9S5.4,8,6,8L6,8z"/>\n                            <path d="M6,12c0.6,0,1,0.4,1,1s-0.4,1-1,1s-1-0.4-1-1S5.4,12,6,12L6,12z"/>\n                        </svg>\n                    </div>\n\n                    <div class="ea-editor-property-control-complex-item-name" title="{{getItemName(item)}}">{{getItemName(item)}}</div>\n\n                    <div class="ea-editor-property-control-complex-item-duplicate" ng-show="control.complex.duplicateAction !== false" title="Duplicate item" ng-click="duplicateItem(item, $event)">\n                        <svg viewBox="0 0 12 12" focusable="false">\n\n                        <g><path d="M11.3,0H3.8C3.3,0,3,0.3,3,0.8V3H0.8C0.3,3,0,3.3,0,3.8v7.5C0,11.7,0.3,12,0.8,12h7.5C8.7,12,9,11.7,9,11.3V9h2.3\n                        C11.7,9,12,8.7,12,8.3V0.8C12,0.3,11.7,0,11.3,0z M7.9,10.9H1.1V4.1H3v4.1C3,8.7,3.3,9,3.8,9h4.1V10.9z M10.9,7.9H4.1V1.1h6.8\n                        V7.9z"/></g></svg>\n                    </div>\n\n                    <div class="ea-editor-property-control-complex-item-remove" ng-show="control.complex.removeAction !== false" title="Remove item" ng-click="showRemoveConfirm(key, $event)">\n                        <svg viewBox="0 0 753.2 753.2" focusable="false"><g><path d="M647.3,117.7H517.8V47.1c0-26-21.1-47.1-47.1-47.1H282.5c-26,0-47.1,21.1-47.1,47.1v70.6H105.9\n\t\t\t\t        c-19.5,0-35.3,15.8-35.3,35.3s15.8,35.3,35.3,35.3h11.8v517.8c0,26,21.1,47.1,47.1,47.1h423.7c26,0,47.1-21.1,47.1-47.1V188.3\n\t\t\t\t        h11.8c19.5,0,35.3-15.8,35.3-35.3C682.6,133.5,666.8,117.7,647.3,117.7z M306,70.6h141.2v47.1H306V70.6z M564.9,682.6H188.3\n\t\t\t\t        V188.3h376.6V682.6z"/></g><path d="M290,617.4h23.5c13,0,23.7-10.6,23.7-23.7V276.9c0-13-10.6-23.7-23.7-23.7H290c-13,0-23.7,10.6-23.7,23.7v316.9\n\t                    C266.3,606.8,277,617.4,290,617.4z"/><path d="M441,617.4h23.5c13,0,23.7-10.6,23.7-23.7V276.9c0-13-10.6-23.7-23.7-23.7H441c-13,0-23.7,10.6-23.7,23.7v316.9\n\t                    C417.3,606.8,428,617.4,441,617.4z"/></svg>\n                    </div>\n                </div>\n\n                <div class="ea-editor-property-control-complex-item-remove-confirm">\n                    <div class="ea-editor-property-control-complex-item-remove-confirm-label">Are you sure you want to remove?</div>\n\n                    <div class="ea-editor-property-control-complex-item-remove-confirm-actions">\n                        <div class="ea-editor-property-control-complex-item-remove-confirm-actions-yes" ng-click="removeItem(key, $event)">Yes</div>\n                        <div class="ea-editor-property-control-complex-item-remove-confirm-actions-no" ng-click="hideRemoveConfirm(key, $event)">No</div>\n                    </div>\n                </div>\n            </div>\n        </div>\n\n        <div class="ea-editor-property-control-complex-add-new ea-editor-property-control-complex-item" ng-show="control.complex.addAction !== false" ng-class="{ \'ea-editor-property-control-complex-add-new-transparent\': ngModel && ngModel.length }" ng-click="openSub()">\n            <div class="ea-editor-property-control-complex-item-inner">\n                <svg viewBox="1 1 10 10" focusable="false">\n                    <path d="M9.987,4.999H7V2.013C7,1.454,6.552,1,6,1S5,1.454,5,2.013v2.986H2.013C1.453,4.999,1,5.449,1,6.001\n                    s0.453,1,1.012,1H5v2.987C5,10.548,5.448,11,6,11s1-0.453,1-1.012V7.001h2.987c0.559,0,1.012-0.448,1.012-1\n                    S10.547,4.999,9.987,4.999z"></path>\n                </svg>\n\n                <span class="ea-editor-property-control-complex-add-new-label">Add</span>\n            </div>\n        </div>\n    </div>\n</div>'},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),i=new(function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return n(e,[{key:"recursivelyGetAllProps",value:function(e,t,n){var i=this;angular.forEach(e,function(e){e[n]?(angular.forEach(e[n].properties,function(e){t.hasOwnProperty(e.id)||(t[e.id]=e.defaultValue)}),i.recursivelyGetAllProps(e[n].properties,t,n)):t.hasOwnProperty(e.id)||(t[e.id]=e.defaultValue)})}}]),e}());t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=["$rootScope",function(e){return{template:i.default,replace:!0,controller:["$scope","$rootScope","$sub",function(e,t,n){e.openSub=function(){var i=t.$new();i.name=e.control.name,i.properties=e.control.subgroup.properties,i.data=e.ngModel,n.show(i)}}]}}];var i=function(e){return e&&e.__esModule?e:{default:e}}(n(33))},function(e,t){e.exports='<label class="ea-editor-property-inner">\n    <div class="ea-editor-property-control-subgroup ea-editor-property-control" ng-click="openSub()">\n        <div class="ea-editor-property-control-subgroup-name">\n            {{control.name}}\n        </div>\n\n        <div class="ea-editor-property-control-subgroup-icon">\n            <svg width="12" height="12" viewBox="0 0 12 12">\n                <path id="Rounded_Rectangle_57_copy_6_копия_2"  class="cls-1" d="M4.566,2.256L8.317,5.7a0.512,0.512,0,0,1,0,.785,0.681,0.681,0,0,1-.883,0L3.683,3.041a0.512,0.512,0,0,1,0-.785A0.681,0.681,0,0,1,4.566,2.256ZM3.683,9.146L7.433,5.7a0.68,0.68,0,0,1,.883,0,0.512,0.512,0,0,1,0,.785L4.566,9.931a0.681,0.681,0,0,1-.883,0A0.512,0.512,0,0,1,3.683,9.146Z"/>\n            </svg>\n        </div>\n    </div>\n</label>'},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=["$rootScope",function(e){return{template:i.default,replace:!0,controller:["$scope","$rootScope",function(e,t){}]}}];var i=function(e){return e&&e.__esModule?e:{default:e}}(n(35))},function(e,t){e.exports='<div class="ea-editor-property-inner">\n    <div class="ea-editor-property-control-divider ea-editor-property-control"></div>\n</div>'},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=["$rootScope",function(e){return{scope:"=",template:i.default,replace:!0,controller:["$scope","$rootScope","$q",function(e,t,n){e.loadDependencies=function(){var t=n.defer();if(window.google&&window.google.maps)t.resolve();else{var i=document.createElement("script");i.src="https://maps.googleapis.com/maps/api/js?key="+e.setApiKey(),document.head.appendChild(i),i.onload=function(){t.resolve()}}return t.promise},e.setApiKey=function(){var e=["AIzaSyAM1FPyPZPbyYD9980UsyOD9cQS_T5B-ws","AIzaSyBLnSb5Afow7jSyHKrjeyEYvZqX0XH34t0","AIzaSyCh-KBwCBiJ_m-0qEOyKdLUCAmuvGSDclw","AIzaSyBcyGaHLsoDCoUIKiLtJajtoYxjjXw9BdM"];return e[Math.floor(Math.random()*e.length)]},e.processCoordinates=function(t){var i=n.defer(),r=void 0;t||i.reject("Position is not specified.");var o={};if(/^(\-?\d+(\.\d+)?),\s*(\-?\d+(\.\d+)?)$/.test(t)){var s=t.split(/, ?/);o.lat=parseFloat(s[0],10),o.lng=parseFloat(s[1],10),i.resolve(o.lat+", "+o.lng)}else{var a=function e(n,s){if(s&&"OK"!==s)return"OVER_QUERY_LIMIT"===s?(r&&clearTimeout(r),r=setTimeout(function(){(new google.maps.Geocoder).geocode({address:t},e)},1e3),!1):(i.reject("Geocode was not successful for the following reason: "+s),!1);"OK"===s&&(o.lat=n[0].geometry.location.lat(),o.lng=n[0].geometry.location.lng(),i.resolve(o.lat+", "+o.lng))};e.loadDependencies().then(function(){(new google.maps.Geocoder).geocode({address:t},a)})}return i.promise}}],link:function(t){"send"===t.control.custom.action&&t.$watch("ngModel",function(n){t.processCoordinates(n).then(function(t){e.coordinates=t})}),"receive"===t.control.custom.action&&e.$watch("coordinates",function(e){t.ngModel=e})}}}];var i=function(e){return e&&e.__esModule?e:{default:e}}(n(37))},function(e,t){e.exports='<label class="ea-editor-property-inner">\n    <div class="ea-editor-property-label" editor-hint="control.description">{{control.name}}</div>\n    <div class="ea-editor-property-caption" ng-if="control.caption" ng-bind-html="control.caption"></div>\n\n    <div class="ea-editor-property-control-text ea-editor-property-control">\n        <input ng-model="ngModel" ng-model-options="{ debounce: 1000 }" type="text" ng-blur="setDefaultValueIfEmpty()">\n    </div>\n</label>'},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=["$rootScope",function(e){return{template:i.default,replace:!0,controller:["$scope","$rootScope","$window",function(e,t,n){e.openModal=function(){!function(t,i,r,o){var s=void 0!==n.screenLeft?n.screenLeft:screen.left,a=void 0!==n.screenTop?n.screenTop:screen.top,l=(n.innerWidth?n.innerWidth:document.documentElement.clientWidth?document.documentElement.clientWidth:screen.width)/2-r/2+s,c=(n.innerHeight?n.innerHeight:document.documentElement.clientHeight?document.documentElement.clientHeight:screen.height)/2-o/2+a,u=window.open(t,i,"scrollbars=yes, location=no, width="+r+", height="+o+", top="+c+", left="+l);window.focus&&u.focus(),e.windowVisible=!0}("http://"+e.control.link,"elfsight-apps-embedded-window",600,748);n.onmessage=function(t){t.data.token&&(e.ngModel=t.data.token,e.$apply())}}}]}}];var i=function(e){return e&&e.__esModule?e:{default:e}}(n(39))},function(e,t){e.exports='<label class="ea-editor-property-inner">\n    <div class="ea-editor-property-label" editor-hint="control.description">{{control.name}}</div>\n    <div class="ea-editor-property-caption" ng-if="control.caption" ng-bind-html="control.caption"></div>\n\n    <div class="ea-editor-property-control-text ea-editor-property-control">\n        <input ng-model="ngModel" ng-model-options="{ debounce: 300 }" type="text" ng-blur="setDefaultValueIfEmpty()">\n\n        <button ng-click="openModal()">open</button>\n    </div>\n</label>'},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=["$rootScope",function(e){return{template:i.default,replace:!0,controller:["$scope","$rootScope","$window",function(e,t,n){var i={extensions:[".jpg",".png"],linkType:"direct",success:function(t){e.ngModel=t[0].link,e.$apply()}};e.uploadByDropbox=function(){Dropbox.choose(i)}}]}}];var i=function(e){return e&&e.__esModule?e:{default:e}}(n(41))},function(e,t){e.exports='<label class="ea-editor-property-inner">\n    <script type="text/javascript" src="https://www.dropbox.com/static/api/2/dropins.js" id="dropboxjs"\n            data-app-key="twna88dpnr8c17c"><\/script>\n\n    <div class="ea-editor-property-label" editor-hint="control.description">{{control.name}}</div>\n    <div class="ea-editor-property-caption" ng-if="control.caption" ng-bind-html="control.caption"></div>\n\n    <div class="ea-editor-property-control-file ea-editor-property-control">\n        <input ng-model="ngModel" ng-model-options="{ debounce: 300 }" type="text" ng-blur="setDefaultValueIfEmpty()">\n\n        <button class="ea-editor-property-control-file-button" ng-click="uploadByDropbox()">\n            <svg class="ea-editor-property-control-file-button-icon" width="24" viewBox="0 0 43 40" version="1.1"\n                 height="24">\n                <path fill="#007EE5"\n                      d="m12.5 0l-12.5 8.1 8.7 7 12.5-7.8-8.7-7.3zm-12.5 21.9l12.5 8.2 8.7-7.3-12.5-7.7-8.7 6.8zm21.2 0.9l8.8 7.3 12.4-8.1-8.6-6.9-12.6 7.7zm21.2-14.7l-12.4-8.1-8.8 7.3 12.6 7.8 8.6-7zm-21.1 16.3l-8.8 7.3-3.7-2.5v2.8l12.5 7.5 12.5-7.5v-2.8l-3.8 2.5-8.7-7.3z"></path>\n            </svg>\n        </button>\n\n        \x3c!--<button class="ea-editor-property-control-file-button" ng-click="uploadByDrive()">--\x3e\n            \x3c!--<svg viewBox="0 0 139 120.4" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">--\x3e\n                \x3c!--<radialGradient id="a" cx="-254.81979" cy="705.83588"--\x3e\n                                \x3c!--gradientTransform="matrix(2.827 1.6322 -1.6322 2.827 2092.1199 -1494.5786)"--\x3e\n                                \x3c!--gradientUnits="userSpaceOnUse" r="82.978401">--\x3e\n                    \x3c!--<stop offset="0" stop-color="#4387fd"></stop>--\x3e\n                    \x3c!--<stop offset=".65" stop-color="#3078f0"></stop>--\x3e\n                    \x3c!--<stop offset=".9099" stop-color="#2b72ea"></stop>--\x3e\n                    \x3c!--<stop offset="1" stop-color="#286ee6"></stop>--\x3e\n                \x3c!--</radialGradient>--\x3e\n                \x3c!--<radialGradient id="b" cx="-254.8174" cy="705.83691"--\x3e\n                                \x3c!--gradientTransform="matrix(2.827 1.6322 -1.6322 2.827 2092.1199 -1494.5786)"--\x3e\n                                \x3c!--gradientUnits="userSpaceOnUse" r="82.973">--\x3e\n                    \x3c!--<stop offset="0" stop-color="#ffd24d"></stop>--\x3e\n                    \x3c!--<stop offset="1" stop-color="#f6c338"></stop>--\x3e\n                \x3c!--</radialGradient>--\x3e\n                \x3c!--<path d="m24.2 120.4-24.2-41.9 45.3-78.5 24.2 41.9z" fill="#0da960"></path>--\x3e\n                \x3c!--<path d="m24.2 120.4 24.2-41.9h90.6l-24.2 41.9z" fill="url(#a)"></path>--\x3e\n                \x3c!--<path d="m139 78.5h-48.4l-45.3-78.5h48.4z" fill="url(#b)"></path>--\x3e\n                \x3c!--<path d="m69.5 78.5h-21.1l10.5-18.3-34.7 60.2z" fill="#2d6fdd"></path>--\x3e\n                \x3c!--<path d="m90.6 78.5h48.4l-58.9-18.3z" fill="#e5b93c"></path>--\x3e\n                \x3c!--<path d="m58.9 60.2 10.6-18.3-24.2-41.9z" fill="#0c9b57"></path>--\x3e\n            \x3c!--</svg>--\x3e\n        \x3c!--</button>--\x3e\n    </div>\n</label>\n\n'},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=["$sub","$timeout",function(e,t){return{template:i.default,replace:!0,link:function(n,i){var r=[],o=null;t(function(){angular.forEach(i[0].getElementsByClassName("ea-editor-property-control"),function(e){r.push(e)}),r.forEach(function(e,t,n){(angular.element(e).hasClass("ea-editor-property-control-text")&&!o||angular.element(e).hasClass("ea-editor-property-control-textarea")&&!o||angular.element(e).hasClass("ea-editor-property-control-number")&&!o)&&(o=angular.element(e))}),o&&(o[0].getElementsByTagName("input")[0]?o[0].getElementsByTagName("input")[0].focus():o[0].getElementsByTagName("textarea")[0]&&o[0].getElementsByTagName("textarea")[0].focus())},100),n.$on("$destroy",function(){e.hide(i)}),n.hide=function(){e.hide(n,i)}},controller:["$scope",function(e){}]}}];var i=function(e){return e&&e.__esModule?e:{default:e}}(n(43))},function(e,t){e.exports='<div class="ea-editor-sub" ng-class="{ \'ea-editor-sub-active\': visible }">\n    <div class="ea-editor-sub-header" ng-click="hide()">\n        <div class="ea-editor-sub-back-button">\n            <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 12 12">\n            <path d="M11.3,5.2H2.5l4-4c0.3-0.3,0.3-0.8,0-1.1c-0.3-0.3-0.8-0.3-1.1,0L0.2,5.4C0.1,5.6,0,5.8,0,6\n                c0,0.2,0.1,0.4,0.2,0.5l5.2,5.2c0.3,0.3,0.8,0.3,1.1,0c0.3-0.3,0.3-0.8,0-1.1l-4-4h8.7C11.7,6.7,12,6.4,12,6\n                C12,5.6,11.7,5.2,11.3,5.2z"/>\n            </svg>\n        </div>\n\n        <div class="ea-editor-sub-title">{{name}}</div>\n    </div>\n\n    <div class="ea-editor-sub-content">\n        <div class="ea-editor-property" ng-repeat="property in properties">\n            <div ng-show="property.visible !== false">\n                <div control="property" ng-model="data[property.id]" ng-if="property.type !== \'subgroup\'"></div>\n                <div control="property"  ng-model="data" ng-if="property.type == \'subgroup\'"></div>\n            </div>\n        </div>\n    </div>\n</div>'},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=["$visual","$timeout",function(e,t){return{template:i.default,replace:!0,link:function(t,n){t.$on("$destroy",function(){e.hide(n)}),t.hide=function(){e.hide(t,n)},n.on("change",function(){t.selected=t.control.select.options.find(function(e){return e.value===t.ngModel})})},controller:["$scope",function(e){}]}}];var i=function(e){return e&&e.__esModule?e:{default:e}}(n(45))},function(e,t){e.exports='<div class="ea-editor-select-visual-group" ng-class="{ \'ea-editor-select-visual-group-active\': visible }">\n    <div class="ea-editor-select-visual-group-header" ng-click="hide()">\n        <div class="ea-editor-select-visual-group-back-button">\n            <svg width="16px" height="16px" viewBox="0 0 16 16" fill="#989fa4" focusable="false"><path d="M15.001,6.993H3.367l5.3-5.286c0.391-0.391,0.391-1.024,0-1.415\n            c-0.39-0.39-1.024-0.39-1.414,0L0.292,7.236C0.079,7.45-0.006,7.735,0.014,8.014C0.007,8.278,0.1,8.544,0.302,8.745l6.942,6.961\n            c0.391,0.391,1.024,0.391,1.415,0c0.39-0.39,0.39-1.024,0-1.414L3.374,8.994h11.628c0.551,0,0.999-0.447,0.999-1\n            C16,7.44,15.552,6.993,15.001,6.993z"></path></svg>\n        </div>\n\n        <div class="ea-editor-select-visual-group-title">{{control.name}}</div>\n    </div>\n\n    <div class="ea-editor-select-visual-group-content">\n        <label class="ea-editor-select-visual-group-option" ng-repeat="option in control.select.options" ng-class="option.value === ngModel ? \'ea-editor-select-visual-group-option-selected\' : \'\'">\n            <div class="ea-editor-select-visual-group-option-image-container">\n                <img ng-src="{{option.img}}" alt="{{option.name}}" class="ea-editor-select-visual-group-option-image">\n            </div>\n\n            <span class="ea-editor-select-visual-group-option-title">{{option.name}}</span>\n\n            <input name="skin" type="radio" ng-value="option.value" ng-model="$parent.ngModel" class="ea-editor-select-visual-group-option-radio">\n        </label>\n    </div>\n</div>'},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=["$rootScope","$timeout",function(e,t){return{link:function(t,n){n.bind("mouseenter",function(){t.control.description&&t.$apply(function(){e.editorHint=t.control.description,e.editorHintVisible=!0})}),n.bind("mouseleave",function(){e.editorHint==t.control.description&&t.$apply(function(){e.editorHintVisible=!1})})}}}]},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){return{template:i.default,replace:!0,link:function(e,t){var n=t[0].getElementsByClassName("ea-editor-toolbar-item");angular.forEach(n,function(e){e.addEventListener("click",function(t){var i=angular.element(e).hasClass("toolbar-item-active");angular.element(n).removeClass("toolbar-item-active"),i||angular.element(e).addClass("toolbar-item-active")})})},controller:["$scope",function(e){}]}};var i=function(e){return e&&e.__esModule?e:{default:e}}(n(48))},function(e,t){e.exports='<div class="ea-editor-toolbar">\n    <elfsight-apps-editor-toolbar-resolution></elfsight-apps-editor-toolbar-resolution>\n\n    <elfsight-apps-editor-toolbar-background></elfsight-apps-editor-toolbar-background>\n</div>'},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=["$sce","$timeout",function(e,t){return{template:r.default,scope:!0,replace:!0,link:function(e,t){},controller:["$scope","$element",function(n,i){n.values=[{value:"100%",code:e.trustAsHtml(o.default.content)},{value:"768px",code:e.trustAsHtml(s.default.content)},{value:"375px",code:e.trustAsHtml(a.default.content)}],n.select=function(e){n.ngModel=e,t(function(){i.removeClass("toolbar-item-active")}),document.querySelector(".ea-editor-preview-container").style.maxWidth=e.value},n.ngModel=n.values[0]}]}}];var r=i(n(50)),o=i(n(51)),s=i(n(52)),a=i(n(53))},function(e,t){e.exports='<div class="ea-editor-toolbar-item">\n    <div class="ea-editor-toolbar-item-trigger">\n        <div class="ea-editor-toolbar-item-icon">\n            <svg width="16" height="16" viewBox="0 0 16 16" ng-bind-html="ngModel.code"></svg>\n        </div>\n    </div>\n\n    <div class="ea-editor-toolbar-item-values">\n        <div class="ea-editor-toolbar-resolution-value ea-editor-toolbar-item-value" ng-repeat="value in values" ng-click="select(value)" ng-class="{\'toolbar-item-value-active\': value === ngModel}">\n            <div class="ea-editor-toolbar-resolution-value-icon ea-editor-toolbar-item-value-icon">\n                <svg width="16" height="16" viewBox="0 0 16 16" ng-bind-html="value.code"></svg>\n            </div>\n        </div>\n    </div>\n</div>'},function(e,t){e.exports={attributes:{width:"16",height:"16",viewBox:"0 0 16 16"},content:'<path d="M16,10v1a2,2,0,0,1-2,2H10v1h1a1,1,0,1,1,0,2H5a1,1,0,0,1,0-2H6V13H2a2,2,0,0,1-2-2V10H0V2A2,2,0,0,1,2,0H14a2,2,0,0,1,2,2v8h0ZM14,4h0V3a1,1,0,0,0-1-1H3A1,1,0,0,0,2,3V4H2V8H2V9a1,1,0,0,0,1,1H13a1,1,0,0,0,1-1V8h0V4Z"/>'}},function(e,t){e.exports={attributes:{width:"16",height:"16",viewBox:"0 0 16 16"},content:'<path d="M15,2V14a2,2,0,0,1-2,2H3a2,2,0,0,1-2-2V2A2,2,0,0,1,3,0H13A2,2,0,0,1,15,2ZM4,2A1,1,0,0,0,3,3v9a1,1,0,0,0,1,1h8a1,1,0,0,0,1-1V3a1,1,0,0,0-1-1H4Z"/>'}},function(e,t){e.exports={attributes:{width:"16",height:"16",viewBox:"0 0 16 16"},content:'<path d="M13,2V14a2,2,0,0,1-2,2H5a2,2,0,0,1-2-2V2A2,2,0,0,1,5,0h6A2,2,0,0,1,13,2ZM6,2A1,1,0,0,0,5,3v9a1,1,0,0,0,1,1h4a1,1,0,0,0,1-1V3a1,1,0,0,0-1-1H6Z"/>'}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=["$sce","$timeout",function(e,t){return{template:i.default,scope:!0,replace:!0,link:function(e,t){},controller:["$scope","$element","$rootScope",function(e,n,i){var r=angular.element(document.querySelector(".ea-editor-preview-overlay"));e.select=function(i){t(function(){n.removeClass("toolbar-item-active"),r.removeClass("ea-editor-preview-overlay-"+e.ngModel).addClass("ea-editor-preview-overlay-"+i),e.ngModel=i})},e.values=["white","black","white-chess","black-chess"],e.select(i.previewDefaultBgColor||"white-chess"),e.ngModel=e.values[3]}]}}];var i=function(e){return e&&e.__esModule?e:{default:e}}(n(55))},function(e,t){e.exports='<div class="ea-editor-toolbar-item">\n    <div class="ea-editor-toolbar-item-trigger">\n        <div class="ea-editor-toolbar-item-icon">\n            <svg width="16" height="16" viewBox="0 0 16 16">\n                <path d="M14.2,10.7c0,0-1.8,1.9-1.8,3.1c0,1,0.8,1.8,1.8,1.8s1.8-0.8,1.8-1.8C16,12.6,14.2,10.7,14.2,10.7z"/>\n                <path d="M4.1,0.4L2.8,1.7L5,3.8L0.4,8.4c-0.5,0.5-0.5,1.4,0,1.9l4.9,4.9c0.3,0.3,0.6,0.4,0.9,0.4c0.3,0,0.7-0.1,0.9-0.4l4.9-4.9\n                    c0.5-0.5,0.5-1.4,0-1.9L4.1,0.4z M2,9.3l4.3-4.3l4.3,4.3H2z"/>\n            </svg>\n        </div>\n    </div>\n\n    <div class="ea-editor-toolbar-item-values">\n        <div class="ea-editor-toolbar-background-value ea-editor-toolbar-item-value" ng-repeat="value in values" ng-click="select(value)" ng-class="{\'toolbar-item-value-active\': value === ngModel}">\n            <div class="ea-editor-toolbar-background-value-icon ea-editor-toolbar-item-value-icon">\n                <div class="ea-editor-toolbar-background-{{value}} ea-editor-toolbar-background-value-icon-color"></div>\n            </div>\n        </div>\n    </div>\n</div>'},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=["$injector",function(e){return new i.default(e)}];var i=function(e){return e&&e.__esModule?e:{default:e}}(n(57))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),r=function(e){return e&&e.__esModule?e:{default:e}}(n(31)),o=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.$rootScope=t.get("$rootScope"),this.$compile=t.get("$compile"),this.$sce=t.get("$sce"),this.$timeout=t.get("$timeout"),this.$q=t.get("$q")}return i(e,[{key:"init",value:function(e){var t=this,n=e.parent||{},i=e.widget||{},o=e.settings||{},s=e.preferences||{},a="function"==typeof e.onChange?e.onChange:null,l={};angular.forEach(o.tabs,function(e){l[e.id]=e,l[e.id].properties=[]}),angular.forEach(o.properties,function(e){e.tab in l&&l[e.tab].properties.push(e)});var c=t.$rootScope.$new();if(c.tabs=l,c.widget=i,c.showLoader=!0,this.$rootScope.previewDefaultBgColor=s.previewDefaultBgColor,s.fileUpload){var u=document.getElementById("dropboxjs"),h=document.getElementById("drivejs");(u=document.createElement("script")).src="https://www.dropbox.com/static/api/2/dropins.js",u.type="text/javascript",u.id="dropboxjs",u.async=!0,u.charset="utf-8",u.setAttribute("data-app-key","twna88dpnr8c17c"),(h=document.createElement("script")).src="https://apis.google.com/js/api.js?onload=loadPicker",h.type="text/javascript",h.id="drivejs",document.getElementsByTagName("head")[0].appendChild(u),document.getElementsByTagName("head")[0].appendChild(h)}if(c.widget.data||(c.widget.data={}),r.default.recursivelyGetAllProps(o.properties,c.widget.data,"subgroup"),c.previewUrl=t.$sce.trustAsResourceUrl(e.previewUrl),e.observerUrl){var d=document.createElement("script");d.src=e.observerUrl,d.defer="defer",d.onload=function(){window.eapps&&eapps.observer&&angular.isFunction(eapps.observer)&&eapps.observer(c,o.properties,t.$rootScope)},n[0].appendChild(d)}this.editor=t.$compile("<elfsight-apps-editor></elfsight-apps-editor>")(c),n.append(this.editor);var p=t.$compile("<elfsight-apps-editor-toolbar></elfsight-apps-editor-toolbar>")(c);if(this.editor.append(p),e.previewUrl){var f=this.editor[0].getElementsByClassName("ea-editor-preview-container");this.loadPreview(f,e.previewUrl,c).then(function(e){var n=window.frames.preview,i=void 0,r=JSON.parse(angular.toJson(c.widget.data));t.currentData=r,n.postMessage({action:"data:updated",data:r},"*"),c.showLoader=!1,c.$apply(),c.$watch("widget.data",function(e,r){t.$timeout.cancel(i);var o=JSON.parse(angular.toJson(c.widget.data));a&&a(o),i=t.$timeout(function(){n.postMessage({action:"data:updated",data:o},"*"),t.currentData=o},angular.isNumber(s.previewUpdateTimeout)?s.previewUpdateTimeout:600)},!0)})}c.expanded=!1,this.fit(c),this.watch(c)}},{key:"fit",value:function(e){this.editor[0].clientWidth>1024?e.adaptiveClass="large":this.editor[0].clientWidth<1024&&this.editor[0].clientWidth>480?e.adaptiveClass="medium":this.editor[0].clientWidth<480&&(e.adaptiveClass="small")}},{key:"watch",value:function(e){var t=this;e.$watch(function(){return t.editor[0].offsetWidth},function(){t.fit(e)}),window.addEventListener("resize",function(){e.$apply()})}},{key:"loadPreview",value:function(e,t){var n=document.createElement("iframe");return n.id="ea-editor-preview",n.className="ea-editor-preview",n.name="preview",n.src=t,e[0].appendChild(n),new Promise(function(e,t){n.addEventListener("load",function(){e(n)})})}},{key:"getData",value:function(){return void 0!==this.currentData?this.currentData:null}}]),e}();t.default=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=["$injector",function(e){return new i.default(e)}];var i=function(e){return e&&e.__esModule?e:{default:e}}(n(59))},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),i=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e);this.$timeout=t.get("$timeout"),this.$compile=t.get("$compile")}return n(e,[{key:"show",value:function(e){var t=document.getElementsByClassName("ea-editor-form")[0];angular.element(t).append(this.$compile("<elfsight-apps-sub></elfsight-apps-sub>")(e)),this.$timeout(function(){e.visible=!0})}},{key:"hide",value:function(e,t){var n=this;!0===e.visible&&n.$timeout(function(){e.visible=!1,n.$timeout(function(){e.$destroy(),t.remove()},300)})}}]),e}();t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=["$injector",function(e){return new i.default(e)}];var i=function(e){return e&&e.__esModule?e:{default:e}}(n(61))},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),i=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e);this.$timeout=t.get("$timeout"),this.$compile=t.get("$compile")}return n(e,[{key:"show",value:function(e){var t=document.getElementsByClassName("ea-editor-form")[0];angular.element(t).append(this.$compile("<elfsight-apps-visual></elfsight-apps-visual>")(e)),this.$timeout(function(){e.visible=!0})}},{key:"hide",value:function(e,t){var n=this;!0===e.visible&&n.$timeout(function(){e.visible=!1,n.$timeout(function(){t.remove()},300)})}}]),e}();t.default=i},function(e,t,n){var i=n(63);"string"==typeof i&&(i=[[e.id,i,""]]);n(77)(i,{});i.locals&&(e.exports=i.locals)},function(e,t,n){(e.exports=n(64)()).push([e.id,"/*!\n * angularjs-color-picker v3.4.8\n * https://github.com/ruhley/angular-color-picker/\n *\n * Copyright 2017 ruhley\n *\n * 2017-10-06 09:52:03\n *\n */.color-picker-wrapper{position:relative}.color-picker-wrapper .color-picker-input-wrapper{display:table;position:relative}.color-picker-wrapper .input-group{position:relative;border-collapse:separate}.color-picker-wrapper .input-group .color-picker-input,.color-picker-wrapper .input-group .input-group-addon{display:table-cell}.color-picker-wrapper .input-group .color-picker-input{position:relative;z-index:2;float:left;margin-bottom:0}.color-picker-wrapper .input-group .input-group-addon{padding:6px 12px;font-size:14px;font-weight:400;line-height:1;color:#555;text-align:center;background-color:#eee;border:1px solid #ccc}.color-picker-wrapper .input-group .input-group-addon:first-child{border-right-width:0}.color-picker-wrapper .input-group .input-group-addon:last-child{border-left-width:0}.color-picker-wrapper .input-group .color-picker-input-swatch{padding-left:12px}.color-picker-wrapper .color-picker-input-swatch{padding-left:36px}.color-picker-wrapper .color-picker-swatch{cursor:pointer;z-index:3}.color-picker-wrapper .color-picker-swatch:not(.input-group-addon){position:absolute;top:3px;width:28px;height:70%;box-sizing:border-box;border-radius:3px;vertical-align:middle;background-position:-80px 0;border:solid 1px #ccc;padding:0;margin:0;display:inline-block}.color-picker-wrapper .color-picker-swatch:not(.input-group-addon).color-picker-swatch-left{left:3px}.color-picker-wrapper .color-picker-swatch:not(.input-group-addon).color-picker-swatch-right{right:3px}.color-picker-wrapper .color-picker-panel{position:absolute;background:#fff;border:solid 1px #ccc;box-shadow:0 0 20px rgba(0,0,0,.5);z-index:99999;width:150px;table-layout:fixed;border:1px solid #fff;padding-right:1px;box-sizing:content-box}.color-picker-wrapper .color-picker-panel .color-picker-grid-wrapper{display:table;width:100%}.color-picker-wrapper .color-picker-panel .color-picker-grid-wrapper .color-picker-row{display:table-row}.color-picker-wrapper .color-picker-panel .color-picker-grid-wrapper .color-picker-row .color-picker-overlay{position:absolute;width:100%;height:150px;top:0;left:0;z-index:2}.color-picker-wrapper .color-picker-panel .color-picker-grid-wrapper .color-picker-row .color-picker-grid,.color-picker-wrapper .color-picker-panel .color-picker-grid-wrapper .color-picker-row .color-picker-hue,.color-picker-wrapper .color-picker-panel .color-picker-grid-wrapper .color-picker-row .color-picker-lightness,.color-picker-wrapper .color-picker-panel .color-picker-grid-wrapper .color-picker-row .color-picker-opacity,.color-picker-wrapper .color-picker-panel .color-picker-grid-wrapper .color-picker-row .color-picker-saturation{background-image:linear-gradient(45deg,grey 25%,transparent 25%),linear-gradient(-45deg,grey 25%,transparent 25%),linear-gradient(45deg,transparent 75%,grey 75%),linear-gradient(-45deg,transparent 75%,grey 75%);background-size:10px 10px;background-position:0 0,0 5px,5px -5px,-5px 0}.color-picker-wrapper .color-picker-panel .color-picker-grid-wrapper .color-picker-row .color-picker-hue,.color-picker-wrapper .color-picker-panel .color-picker-grid-wrapper .color-picker-row .color-picker-lightness,.color-picker-wrapper .color-picker-panel .color-picker-grid-wrapper .color-picker-row .color-picker-opacity,.color-picker-wrapper .color-picker-panel .color-picker-grid-wrapper .color-picker-row .color-picker-saturation{display:table-cell;position:relative;left:1px;width:20px;background-color:#fff;cursor:row-resize}.color-picker-wrapper .color-picker-panel .color-picker-grid-wrapper .color-picker-row .color-picker-slider{position:absolute;top:0;left:0;width:18px;height:2px;background:#fff;border:solid 1px #000;box-sizing:content-box;margin-top:-1px;z-index:3}.color-picker-wrapper .color-picker-panel .color-picker-grid-wrapper .color-picker-row .color-picker-grid{display:table-cell;position:relative;width:150px;height:150px;cursor:crosshair}.color-picker-wrapper .color-picker-panel .color-picker-grid-wrapper .color-picker-row .color-picker-grid .color-picker-grid-inner{width:150px;height:150px;z-index:9}.color-picker-wrapper .color-picker-panel .color-picker-grid-wrapper .color-picker-row .color-picker-grid .color-picker-overlay{background-image:url(data:image/png;base64, );pointer-events:none}.color-picker-wrapper .color-picker-panel .color-picker-grid-wrapper .color-picker-row .color-picker-grid .color-picker-picker{position:absolute;top:70px;left:70px;width:12px;height:12px;border:solid 1px #000;border-radius:10px;margin-top:-6px;margin-left:-6px;background:0 0;box-sizing:content-box;z-index:99}.color-picker-wrapper .color-picker-panel .color-picker-grid-wrapper .color-picker-row .color-picker-grid .color-picker-picker>div{position:absolute;top:0;left:0;width:8px;height:8px;border-radius:8px;border:solid 2px #fff;box-sizing:content-box}.color-picker-wrapper .color-picker-panel .color-picker-actions .color-picker-action{width:calc(33.3333% - 6px);margin:3px}.color-picker-wrapper .color-picker-panel.color-picker-show-inline{position:relative}.color-picker-wrapper .color-picker-panel.color-picker-show-hue.color-picker-show-saturation.color-picker-show-lightness.color-picker-show-alpha{width:230px}.color-picker-wrapper .color-picker-panel.color-picker-show-hue.color-picker-show-saturation.color-picker-show-lightness{width:210px}.color-picker-wrapper .color-picker-panel.color-picker-show-hue.color-picker-show-saturation.color-picker-show-alpha{width:210px}.color-picker-wrapper .color-picker-panel.color-picker-show-hue.color-picker-show-lightness.color-picker-show-alpha{width:210px}.color-picker-wrapper .color-picker-panel.color-picker-show-hue.color-picker-show-saturation{width:190px}.color-picker-wrapper .color-picker-panel.color-picker-show-hue.color-picker-show-lightness{width:190px}.color-picker-wrapper .color-picker-panel.color-picker-show-hue.color-picker-show-alpha{width:190px}.color-picker-wrapper .color-picker-panel.color-picker-show-saturation.color-picker-show-alpha{width:190px}.color-picker-wrapper .color-picker-panel.color-picker-show-saturation.color-picker-show-lightness{width:190px}.color-picker-wrapper .color-picker-panel.color-picker-show-saturation.color-picker-show-lightness.color-picker-show-alpha{width:210px}.color-picker-wrapper .color-picker-panel.color-picker-show-lightness.color-picker-show-alpha{width:190px}.color-picker-wrapper .color-picker-panel.color-picker-show-hue{width:170px}.color-picker-wrapper .color-picker-panel.color-picker-show-saturation{width:170px}.color-picker-wrapper .color-picker-panel.color-picker-show-lightness{width:170px}.color-picker-wrapper .color-picker-panel.color-picker-show-alpha{width:170px}.color-picker-wrapper .color-picker-panel.color-picker-panel-bottom{top:auto}.color-picker-wrapper .color-picker-panel.color-picker-panel-top{bottom:100%}.color-picker-wrapper .color-picker-panel.color-picker-panel-left{left:0}.color-picker-wrapper .color-picker-panel.color-picker-panel-right{right:0}.color-picker-wrapper .color-picker-panel.color-picker-panel-round .color-picker-grid-wrapper .color-picker-row .color-picker-grid .color-picker-overlay{background-image:url(data:image/png;base64, );border-radius:50%}.color-picker-wrapper .color-picker-panel.color-picker-panel-round .color-picker-grid-wrapper .color-picker-row .color-picker-grid .color-picker-grid-inner{background-color:#fff}.color-picker-wrapper .color-picker-hidden{display:none}.color-picker-wrapper.color-picker-disabled .color-picker-grid,.color-picker-wrapper.color-picker-disabled .color-picker-hue,.color-picker-wrapper.color-picker-disabled .color-picker-input,.color-picker-wrapper.color-picker-disabled .color-picker-opacity,.color-picker-wrapper.color-picker-disabled .color-picker-swatch{cursor:not-allowed!important}.color-picker-wrapper.color-picker-swatch-only .color-picker-input{padding-left:33px;padding-right:0;width:35px}.color-picker-wrapper.color-picker-swatch-only .input-group .input-group-addon{width:35px;height:100%;border-right:1px solid #ccc}.color-picker-wrapper.color-picker-swatch-only .input-group .input-group-addon:first-child{border-right-width:1px}.color-picker-wrapper.color-picker-swatch-only .input-group .input-group-addon:last-child{border-left-width:1px}.color-picker-wrapper.color-picker-swatch-only .input-group .color-picker-input{padding:0;width:1px;opacity:0;cursor:pointer}.color-picker-wrapper.color-picker-swatch-only .input-group .color-picker-input:focus{outline:0}.color-picker-wrapper.color-picker-closed .color-picker-panel{display:none}.color-picker-wrapper.color-picker-horizontal .color-picker-panel{width:150px!important}.color-picker-wrapper.color-picker-horizontal .color-picker-panel .color-picker-grid-wrapper .color-picker-row{display:block}.color-picker-wrapper.color-picker-horizontal .color-picker-panel .color-picker-grid-wrapper .color-picker-row .color-picker-grid{display:block}.color-picker-wrapper.color-picker-horizontal .color-picker-panel .color-picker-grid-wrapper .color-picker-row .color-picker-hue,.color-picker-wrapper.color-picker-horizontal .color-picker-panel .color-picker-grid-wrapper .color-picker-row .color-picker-lightness,.color-picker-wrapper.color-picker-horizontal .color-picker-panel .color-picker-grid-wrapper .color-picker-row .color-picker-opacity,.color-picker-wrapper.color-picker-horizontal .color-picker-panel .color-picker-grid-wrapper .color-picker-row .color-picker-saturation{cursor:col-resize;display:block;left:0;width:150px;height:20px}.color-picker-wrapper.color-picker-horizontal .color-picker-panel .color-picker-grid-wrapper .color-picker-row .color-picker-hue .color-picker-overlay,.color-picker-wrapper.color-picker-horizontal .color-picker-panel .color-picker-grid-wrapper .color-picker-row .color-picker-lightness .color-picker-overlay,.color-picker-wrapper.color-picker-horizontal .color-picker-panel .color-picker-grid-wrapper .color-picker-row .color-picker-opacity .color-picker-overlay,.color-picker-wrapper.color-picker-horizontal .color-picker-panel .color-picker-grid-wrapper .color-picker-row .color-picker-saturation .color-picker-overlay{height:20px}.color-picker-wrapper.color-picker-horizontal .color-picker-panel .color-picker-grid-wrapper .color-picker-row .color-picker-hue .color-picker-slider,.color-picker-wrapper.color-picker-horizontal .color-picker-panel .color-picker-grid-wrapper .color-picker-row .color-picker-lightness .color-picker-slider,.color-picker-wrapper.color-picker-horizontal .color-picker-panel .color-picker-grid-wrapper .color-picker-row .color-picker-opacity .color-picker-slider,.color-picker-wrapper.color-picker-horizontal .color-picker-panel .color-picker-grid-wrapper .color-picker-row .color-picker-saturation .color-picker-slider{width:2px;height:18px;margin-top:0}\niframe {\n  border: none;\n}\n.ea-editor {\n  position: relative;\n  display: flex;\n  flex-direction: row;\n  height: 100%;\n  min-height: 600px;\n  color: #fff;\n  font-family: 'Roboto', Arial, sans-serif;\n  -webkit-font-smoothing: antialiased;\n  overflow: hidden;\n  line-height: 1.555;\n  background: #38393a;\n  padding-top: 0;\n  transition: all 0.3s ease;\n}\n.ea-editor-small {\n  padding-top: 36px;\n  box-sizing: border-box;\n}\n.ea-editor-form {\n  position: relative;\n  width: 336px;\n  height: 100%;\n  flex-direction: column;\n  flex: 0 0 336px;\n  background: #38393a;\n  padding-top: 12px;\n  box-sizing: border-box;\n  transition: all 0.3s;\n  transform: translateX(-100%);\n}\n.ea-editor-large .ea-editor-form {\n  transform: translateX(0);\n  transition: none;\n}\n.ea-editor-small .ea-editor-form,\n.ea-editor-medium .ea-editor-form {\n  position: absolute;\n  left: 0;\n  z-index: 1;\n  visibility: hidden;\n  pointer-events: none;\n  width: 100%;\n}\n.ea-editor-medium .ea-editor-form {\n  width: 336px;\n}\n.ea-editor-expanded .ea-editor-form {\n  display: flex;\n  opacity: 1;\n  visibility: visible;\n  pointer-events: all;\n  left: 0;\n  transform: translateX(0);\n}\n.ea-editor-responsive-button {\n  width: 56px;\n  height: 56px;\n  top: 0;\n  display: inline-flex;\n  align-items: center;\n  background: #38393a;\n  z-index: 2;\n  position: absolute;\n  cursor: pointer;\n  transition: 0.3s all;\n  opacity: 0;\n  vertical-align: middle;\n  box-sizing: border-box;\n}\n.ea-editor-responsive-button-label {\n  display: flex;\n  align-items: center;\n  width: 100%;\n}\n.ea-editor-responsive-button-label-icon {\n  fill: #fff;\n}\n.ea-editor-responsive-button-label-text {\n  margin-left: 12px;\n}\n.ea-editor-responsive-button-arrow {\n  height: 12px;\n  width: 8px;\n  fill: #c2c6c9;\n  margin-left: auto;\n}\n.ea-editor-small .ea-editor-responsive-button {\n  top: 0;\n  height: 36px;\n  opacity: 1;\n  width: 100%;\n  padding: 0 16px;\n  transition: none;\n  border-bottom: 1px solid #303131;\n}\n.ea-editor-medium .ea-editor-responsive-button {\n  opacity: 1;\n  padding: 8px;\n  justify-content: center;\n}\n.ea-editor-large .ea-editor-responsive-button {\n  transition: none;\n  pointer-events: none;\n}\n.ea-editor-medium.ea-editor-expanded .ea-editor-responsive-button {\n  transform: translateX(335px);\n}\n.ea-editor-responsive-button-hint {\n  width: 80px;\n  height: 48px;\n  left: 68px;\n  position: absolute;\n  background: #38393a;\n  border-radius: 8px;\n  font-size: 13px;\n  box-sizing: border-box;\n  padding: 4px 16px;\n  display: flex;\n  justify-content: center;\n  animation: jump 0.5s linear alternate infinite;\n}\n.ea-editor-responsive-button-hint:before {\n  content: ' ';\n  width: 8px;\n  height: 8px;\n  background: #38393a;\n  position: absolute;\n  left: -4px;\n  top: 50%;\n  transform: translateY(-50%) rotateZ(-45deg);\n}\n.ea-editor-small .ea-editor-responsive-button-hint {\n  display: none;\n}\n.ea-editor-overlay {\n  position: absolute;\n  width: 100%;\n  height: 100%;\n  top: 0;\n  left: 0;\n  opacity: 0;\n  background: #000;\n  z-index: 1;\n  transition: 0.3s all ease;\n  pointer-events: none;\n}\n.ea-editor-medium.ea-editor-expanded .ea-editor-overlay {\n  opacity: 0.5;\n  pointer-events: all;\n}\n.ea-editor-property {\n  margin: 0 0 24px;\n}\n.ea-editor-property:last-child {\n  margin-bottom: 0;\n}\n.ea-editor-property-label {\n  display: inline-block;\n  color: #b2b4b7;\n  font-size: 10px;\n  font-weight: 500;\n  text-transform: uppercase;\n  padding: 4px 0;\n  margin-bottom: 8px;\n}\n.ea-editor-property-caption {\n  font-size: 11px;\n  line-height: 16px;\n  padding: 3px 0 3px 12px;\n  margin-bottom: 12px;\n  border-left: 2px solid #474848;\n  color: #abadaf;\n}\n.ea-editor-property-caption a {\n  color: #abadaf;\n  text-decoration: underline;\n}\n.ea-editor-property-caption a:hover {\n  color: #abadaf;\n}\n.ea-editor-property-hide {\n  display: none;\n}\n.ea-editor-hint {\n  display: flex;\n  position: absolute;\n  right: 24px;\n  bottom: 0;\n  left: 24px;\n  padding: 12px 16px;\n  border-radius: 2px;\n  font-size: 13px;\n  line-height: 18px;\n  background: #fff;\n  color: #17191a;\n  opacity: 0;\n  visibility: hidden;\n  transition: all 0.3s ease 0.4s;\n  z-index: 999999;\n}\n.ea-editor-hint-visible {\n  bottom: 24px;\n  opacity: 1;\n  visibility: visible;\n}\n.ea-editor-widget-name {\n  padding: 12px 24px;\n}\n.ea-editor-widget-name input {\n  box-sizing: border-box;\n  border: 1px solid transparent;\n  border-radius: 5px;\n  padding: 6px 10px;\n  width: 100%;\n  color: #17191a;\n  font-size: 19px;\n  text-align: center;\n  outline: none;\n  transition: all 0.2s ease;\n}\n.ea-editor-widget-name input:hover {\n  border-color: #f4f4f4;\n}\n.ea-editor-widget-name input:focus {\n  border-color: #a8d5ff;\n}\n.ea-editor-tabs {\n  display: flex;\n  flex-direction: column;\n  height: 100%;\n}\n.ea-editor-tabs-nav {\n  display: flex;\n  flex-direction: row;\n  padding: 0 24px;\n  min-height: 44px;\n  height: 44px;\n  justify-content: flex-start;\n  border-bottom: 1px solid #303131;\n  background: #38393a;\n}\n.ea-editor-tabs-nav-item {\n  position: relative;\n  padding: 16px 0;\n  margin-left: 20px;\n  font-size: 12px;\n  font-weight: 600;\n  text-transform: uppercase;\n  text-align: center;\n  cursor: pointer;\n  transition: all 0.2s ease;\n  outline: none;\n  color: #fff;\n}\n.ea-editor-tabs-nav-item:first-child {\n  margin-left: 0;\n}\n.ea-editor-tabs-nav-item::after {\n  content: '';\n  position: absolute;\n  display: block;\n  bottom: -1px;\n  right: 50%;\n  left: 50%;\n  height: 2px;\n  background: transparent;\n  transition: all 0.1s ease;\n}\n.ea-editor-tabs-nav-item-active {\n  color: #ff6161;\n}\n.ea-editor-tabs-nav-item-active::after {\n  background: linear-gradient(to right, #fa3274 0%, #fd3462 25%, #ffa863 100%);\n  right: 0;\n  left: 0;\n}\n.ea-editor-tabs-content {\n  display: flex;\n  position: relative;\n  flex-direction: column;\n  flex-grow: 1;\n  overflow: hidden;\n}\n.ea-editor-tabs-content::before {\n  content: '';\n  display: block;\n  position: absolute;\n  top: 0;\n  right: 0;\n  left: 0;\n  height: 10px;\n  background: linear-gradient(to bottom, #f6f6f6 0%, rgba(246,246,246,0) 100%);\n}\n.ea-editor-tabs-content-item {\n  display: none;\n  flex-grow: 1;\n  position: relative;\n  background: #38393a;\n  padding: 24px;\n  overflow: auto;\n  overflow-x: hidden;\n  overflow-y: auto;\n}\n.ea-editor-tabs-content-item-active {\n  display: block;\n}\n.ea-editor-sub {\n  display: flex;\n  flex-direction: column;\n  position: absolute;\n  top: 0;\n  left: 0;\n  width: 100%;\n  bottom: 0;\n  transition: all 0.5s cubic-bezier(0.2, 1, 0.3, 1);\n  transform: translate(-100%, 0);\n  background: #fff;\n  box-shadow: 0 0 20px rgba(51,74,96,0.16);\n  z-index: 2;\n  margin-top: -56px;\n  padding-top: 56px;\n}\n.ea-editor-sub-active {\n  transform: translate(0, 0);\n}\n.ea-editor-sub-header {\n  position: relative;\n  background: #38393a;\n  height: 56px;\n  line-height: 56px;\n  padding: 0 54px;\n  cursor: pointer;\n  outline: none;\n  border-bottom: 1px solid #303131;\n}\n.ea-editor-sub-header:hover .ea-editor-sub-back-button {\n  left: 20px;\n}\n.ea-editor-sub-back-button {\n  display: block;\n  position: absolute;\n  top: 50%;\n  left: 24px;\n  transform: translateY(-50%);\n  transition: all 0.15s ease;\n}\n.ea-editor-sub-back-button svg {\n  display: block;\n  width: 12px;\n  height: 12px;\n  fill: #fff;\n}\n.ea-editor-sub-title {\n  color: #fff;\n  font-size: 18px;\n  font-weight: 400;\n  white-space: nowrap;\n  overflow: hidden;\n  text-overflow: ellipsis;\n}\n.ea-editor-sub-content {\n  flex-grow: 1;\n  position: relative;\n  background: #38393a;\n  padding: 24px;\n  overflow: auto;\n  overflow-x: hidden;\n  overflow-y: auto;\n}\n.ea-editor-preview {\n  position: relative;\n  width: 100%;\n  height: 100%;\n  font-size: 12px;\n}\n.ea-editor-preview-container {\n  box-sizing: border-box;\n  position: relative;\n  margin: 0 auto;\n  width: 100%;\n  max-width: 100%;\n  height: 100%;\n  transition: 0.2s;\n}\n.ea-editor-preview-overlay {\n  position: absolute;\n  top: 0;\n  right: 0;\n  bottom: 0;\n  left: 0;\n  background: rgba(0,0,0,0);\n  transition: 0.2s;\n}\n.ea-editor-preview-loader {\n  box-sizing: border-box;\n  display: block;\n  position: absolute;\n  top: 50%;\n  left: 50%;\n  border-radius: 50%;\n  border-style: solid;\n  border-top-color: transparent;\n  animation: preview-loader 1s infinite linear;\n  width: 36px;\n  height: 36px;\n  margin: -16px 0 0 -16px;\n  border-width: 2px;\n  color: #b2b4b7;\n  opacity: 0;\n  visibility: hidden;\n}\n.ea-editor-preview-loader-show {\n  opacity: 1;\n  visibility: visible;\n}\n@-moz-keyframes preview-loader {\n  0% {\n    transform: rotate(0deg);\n  }\n  100% {\n    transform: rotate(360deg);\n  }\n}\n@-webkit-keyframes preview-loader {\n  0% {\n    transform: rotate(0deg);\n  }\n  100% {\n    transform: rotate(360deg);\n  }\n}\n@-o-keyframes preview-loader {\n  0% {\n    transform: rotate(0deg);\n  }\n  100% {\n    transform: rotate(360deg);\n  }\n}\n@keyframes preview-loader {\n  0% {\n    transform: rotate(0deg);\n  }\n  100% {\n    transform: rotate(360deg);\n  }\n}\n.ea-editor-property-control-text input {\n  box-sizing: border-box;\n  color: #fff;\n  font-size: 13px;\n  font-weight: 400;\n  background: #303131;\n  border-radius: 2px;\n  border: none;\n  width: 100%;\n  height: 32px;\n  outline: none;\n  line-height: 20px;\n  padding: 6px 16px;\n  transition: all 0.1s ease;\n}\n.ea-editor-property-control-text input:focus {\n  background-color: #2c2d2d;\n}\n.ea-editor-property-control-textarea textarea {\n  box-sizing: border-box;\n  color: #fff;\n  font-family: 'Roboto', Arial, sans-serif;\n  font-size: 13px;\n  font-weight: 400;\n  background: #303131;\n  border-radius: 2px;\n  width: 100%;\n  outline: none;\n  overflow: hidden !important;\n  padding: 10px 16px;\n  min-height: 74px;\n  resize: none;\n  border: none;\n  transition: all 0.1s ease;\n}\n.ea-editor-property-control-textarea textarea:focus {\n  background-color: #2c2d2d;\n}\n.ea-editor-property-control-number input {\n  box-sizing: border-box;\n  color: #fff;\n  font-size: 13px;\n  font-weight: 400;\n  background: #303131;\n  border-radius: 2px;\n  width: 100%;\n  height: 32px;\n  outline: none;\n  line-height: 20px;\n  padding: 6px 16px;\n  transition: all 0.1s ease;\n  border: none;\n}\n.ea-editor-property-control-number input:focus {\n  background: #2c2d2d;\n}\n.ea-editor-property-control-select {\n  position: relative;\n}\n.ea-editor-property-control-select-readonly input {\n  cursor: pointer;\n}\n.ea-editor-property-control-select input {\n  box-sizing: border-box;\n  color: #fff;\n  font-size: 13px;\n  font-weight: 400;\n  background: #303131;\n  border-radius: 3px;\n  width: 100%;\n  height: 32px;\n  outline: none;\n  line-height: 20px;\n  padding: 6px 16px;\n  transition: all 0.1s ease;\n  border: none;\n  -webkit-appearance: none;\n  -moz-appearance: none;\n  appearance: none;\n}\n.ea-editor-property-control-select input:focus {\n  background: #2c2d2d;\n}\n.ea-editor-property-control-select:after {\n  display: block;\n  content: '';\n  width: 7px;\n  height: 5px;\n  position: absolute;\n  right: 11px;\n  top: 50%;\n  transform: translateY(-50%);\n  background-image: url("+n(65)+");\n  background-position: center;\n  background-repeat: no-repeat;\n  background-size: 7px 5px;\n  pointer-events: none;\n}\n.ea-editor-property-control-select-options {\n  position: absolute;\n  background: #303131;\n  width: 100%;\n  z-index: 10;\n  border: 1px solid #2c2d2d;\n  box-sizing: border-box;\n  max-height: 200px;\n  overflow: auto;\n}\n.ea-editor-property-control-select-options-item {\n  padding: 6px 16px;\n  transition: 0.1s all ease;\n  cursor: pointer;\n  font-size: 13px;\n  font-weight: 400;\n  background: #303131;\n  line-height: 20px;\n  min-height: 20px;\n}\n.ea-editor-property-control-select-options-item:hover {\n  background: #2c2d2d;\n}\n.ea-editor-property-control-select-options-item-selected {\n  background: #474848;\n}\n.ea-editor-property-control-select-options-item-selected:hover {\n  background: #474848;\n}\n.ea-editor-property-control-select-inline-wrapper {\n  display: flex;\n  flex-direction: row;\n  box-sizing: border-box;\n  background: #303131;\n  border-radius: 2px;\n  width: 100%;\n  height: 32px;\n  outline: none;\n  transition: all 0.1s ease;\n}\n.ea-editor-property-control-select-inline-item {\n  display: block;\n  flex: 1;\n}\n.ea-editor-property-control-select-inline-item-label {\n  position: relative;\n  display: block;\n  color: #fff;\n  font-size: 13px;\n  font-weight: 400;\n  line-height: 20px;\n  padding: 6px 12px;\n  z-index: 1;\n  border-radius: 2px;\n  cursor: pointer;\n  text-align: center;\n  transition: all 0.1s ease;\n}\n.ea-editor-property-control-select-inline-item-label::after {\n  content: '';\n  display: block;\n  position: absolute;\n  top: 50%;\n  right: -0.5px;\n  height: 12px;\n  width: 1px;\n  margin-top: -6px;\n  background: #404141;\n}\n.ea-editor-property-control-select-inline-item:last-child .ea-editor-property-control-select-inline-item-label::after {\n  content: none;\n}\n.ea-editor-property-control-select-inline-item-radio {\n  position: absolute;\n  visibility: hidden;\n  opacity: 0;\n}\n.ea-editor-property-control-select-inline-item-radio:checked + .ea-editor-property-control-select-inline-item-label {\n  background: #474848;\n  color: #fff;\n}\n.ea-editor-property-control-select-inline-item-radio:checked + .ea-editor-property-control-select-inline-item-label::after {\n  display: none;\n}\n.ea-editor-select-visual-control {\n  width: 100%;\n  height: 136px;\n  overflow: hidden;\n  cursor: pointer;\n  background-color: #303131;\n  position: relative;\n  border-radius: 2px;\n  display: flex;\n  flex-direction: column;\n  justify-content: center;\n  align-items: center;\n  transition: all 0.1s ease;\n}\n.ea-editor-select-visual-control:hover .ea-editor-select-visual-control-trigger {\n  background-color: #474848;\n}\n.ea-editor-select-visual-control:hover .ea-editor-select-visual-control-trigger-arrow svg {\n  fill: #e8e8e8;\n}\n.ea-editor-select-visual-control-image-container {\n  height: 60px;\n  margin-top: 12px;\n  margin-left: -29px;\n}\n.ea-editor-select-visual-control-name {\n  color: #fff;\n  text-align: center;\n  font-size: 13px;\n  font-weight: 400;\n  overflow: hidden;\n  text-overflow: ellipsis;\n  border-radius: 2px;\n  margin-top: 20px;\n  margin-left: -29px;\n}\n.ea-editor-select-visual-control-trigger {\n  position: absolute;\n  height: 100%;\n  width: 29px;\n  right: 0;\n  top: 0;\n  background-color: #404141;\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  transition: all 0.2s ease;\n}\n.ea-editor-select-visual-control-trigger-arrow svg {\n  fill: #66686a;\n  display: block;\n  transition: all 0.2s ease;\n}\n.ea-editor-select-visual-group {\n  display: flex;\n  flex-direction: column;\n  position: absolute;\n  top: 0;\n  left: 0;\n  width: 100%;\n  bottom: 0;\n  transition: all 0.5s cubic-bezier(0.2, 1, 0.3, 1);\n  transform: translate(-100%, 0);\n  background: #fff;\n  box-shadow: 0 0 20px rgba(51,74,96,0.16);\n  z-index: 2;\n  margin-top: -56px;\n  padding-top: 56px;\n}\n.ea-editor-select-visual-group-active {\n  transform: translate(0, 0);\n}\n.ea-editor-select-visual-group-header {\n  position: relative;\n  background: #38393a;\n  height: 56px;\n  line-height: 56px;\n  padding: 0 54px;\n  cursor: pointer;\n  outline: none;\n  border-bottom: 1px solid #303131;\n}\n.ea-editor-select-visual-group-back-button {\n  display: block;\n  position: absolute;\n  top: 50%;\n  left: 24px;\n  transform: translateY(-50%);\n}\n.ea-editor-select-visual-group-back-button svg {\n  display: block;\n  width: 12px;\n  height: 12px;\n  fill: #fff;\n}\n.ea-editor-select-visual-group-title {\n  color: #fff;\n  font-size: 18px;\n  font-weight: 400;\n  white-space: nowrap;\n  overflow: hidden;\n  text-overflow: ellipsis;\n}\n.ea-editor-select-visual-group-content {\n  flex-grow: 1;\n  position: relative;\n  background: #38393a;\n  padding: 32px 24px;\n  overflow: auto;\n  overflow-x: hidden;\n  overflow-y: auto;\n}\n.ea-editor-select-visual-group-option {\n  width: 100%;\n  height: 136px;\n  display: flex;\n  justify-content: center;\n  align-items: center;\n  flex-direction: column;\n  overflow: hidden;\n  cursor: pointer;\n  background-color: #303131;\n  position: relative;\n  margin-bottom: 12px;\n  border-radius: 2px;\n  transition: background-color 0.2s ease;\n}\n.ea-editor-select-visual-group-option:hover {\n  background-color: #2c2d2d;\n}\n.ea-editor-select-visual-group-option-image-container {\n  height: 64px;\n  margin-top: 8px;\n  display: flex;\n  align-items: center;\n  justify-content: center;\n}\n.ea-editor-select-visual-group-option-selected {\n  background-color: #2c2d2d;\n}\n.ea-editor-select-visual-group-option-selected:before {\n  content: \"\";\n  position: absolute;\n  width: 12px;\n  height: 12px;\n  border-radius: 2px;\n  background-image: url("+n(68)+");\n  background-position: center;\n  background-repeat: no-repeat;\n  background-size: 12px;\n  top: 10px;\n  left: 10px;\n}\n.ea-editor-select-visual-group-option-title {\n  color: #fff;\n  margin-top: 20px;\n  font-size: 13px;\n  font-weight: 400;\n  overflow: hidden;\n  text-overflow: ellipsis;\n}\n.ea-editor-select-visual-group-option-radio {\n  width: 0;\n  height: 0;\n  opacity: 0;\n  visibility: hidden;\n}\n.ea-editor-property-control-tags-input {\n  box-sizing: border-box;\n  color: #fff;\n  font-size: 13px;\n  font-weight: 400;\n  background: #303131;\n  border-radius: 2px;\n  width: 100%;\n  height: 32px;\n  outline: none;\n  line-height: 20px;\n  padding: 6px 16px;\n  transition: all 0.1s ease;\n  border: none;\n}\n.ea-editor-property-control-tags-input:focus {\n  background-color: #2c2d2d;\n}\n.ea-editor-property-control-tags-wrapper {\n  display: flex;\n  flex-direction: row;\n  flex-wrap: wrap;\n  box-sizing: border-box;\n  width: 100%;\n}\n.ea-editor-property-control-tags-item {\n  position: relative;\n  box-sizing: border-box;\n  color: #fff;\n  font-size: 13px;\n  font-weight: 400;\n  border-radius: 2px;\n  border: 1px solid rgba(255,255,255,0.5);\n  height: 28px;\n  line-height: 28px;\n  padding: 0 28px 0 10px;\n  margin: 7px 7px 0 0;\n  max-width: 100%;\n  overflow: hidden;\n}\n.ea-editor-property-control-tags-item-label {\n  line-height: 26px;\n  max-width: 100%;\n  overflow: hidden;\n  text-overflow: ellipsis;\n  white-space: nowrap;\n}\n.ea-editor-property-control-tags-item-remove {\n  position: absolute;\n  top: 0;\n  right: 0;\n  width: 8px;\n  height: 8px;\n  cursor: pointer;\n  outline: none;\n  opacity: 0.7;\n  padding: 9px 10px;\n  transition: all 0.1s ease;\n}\n.ea-editor-property-control-tags-item-remove svg {\n  display: block;\n}\n.ea-editor-property-control-toggle-wrapper {\n  box-sizing: border-box;\n  display: inline-block;\n  position: relative;\n  overflow: hidden;\n  width: 56px;\n  height: 24px;\n  background: #303131;\n  line-height: 24px;\n  border-radius: 24px;\n  cursor: pointer;\n  transition: all 0.3s ease;\n}\n.ea-editor-property-control-toggle-wrapper:hover .ea-editor-property-control-toggle-inner {\n  background: #7a7b7c;\n}\n.ea-editor-property-control-toggle-wrapper::before,\n.ea-editor-property-control-toggle-wrapper::after {\n  display: block;\n  position: absolute;\n  top: 0;\n  height: 24px;\n  line-height: 24px;\n  color: #feffff;\n  text-transform: uppercase;\n  font-size: 10px;\n  font-weight: 500;\n  transition: all 0.3s ease;\n}\n.ea-editor-property-control-toggle-wrapper::before {\n  content: 'on';\n  left: -32px;\n  color: #feffff;\n}\n.ea-editor-property-control-toggle-wrapper::after {\n  content: 'off';\n  right: 9px;\n  color: #7e8184;\n}\n.ea-editor-property-control-toggle-inner {\n  display: block;\n  position: absolute;\n  overflow: hidden;\n  top: 3px;\n  left: 3px;\n  width: 18px;\n  height: 18px;\n  background: #646668;\n  border-radius: 50% 50%;\n  transition: all 0.3s ease;\n}\n.ea-editor-property-control-toggle-inner input {\n  display: none !important;\n}\n.ea-editor-property-control-toggle-on .ea-editor-property-control-toggle-wrapper {\n  background: #212121;\n}\n.ea-editor-property-control-toggle-on .ea-editor-property-control-toggle-wrapper:hover {\n  background: #212121;\n}\n.ea-editor-property-control-toggle-on .ea-editor-property-control-toggle-wrapper:hover .ea-editor-property-control-toggle-inner {\n  background: #fff;\n}\n.ea-editor-property-control-toggle-on .ea-editor-property-control-toggle-wrapper::before {\n  left: 10px;\n  opacity: 1;\n}\n.ea-editor-property-control-toggle-on .ea-editor-property-control-toggle-wrapper::after {\n  right: -40px;\n  opacity: 0;\n}\n.ea-editor-property-control-toggle-on .ea-editor-property-control-toggle-inner {\n  left: 35px;\n  background: #e5e7e8;\n}\n.ea-editor-property-control-checklist-item {\n  display: block;\n  margin: 0 0 6px;\n}\n.ea-editor-property-control-checklist-item:last-child {\n  margin-bottom: 0;\n}\n.ea-editor-property-control-checklist-item-label {\n  color: #fff;\n  font-size: 13px;\n  font-weight: 400;\n  margin-left: 12px;\n  padding-left: 11px;\n  cursor: pointer;\n  transition: all 0.1s ease;\n}\n.ea-editor-property-control-checklist-checkbox {\n  display: block;\n  cursor: pointer;\n  position: relative;\n}\n.ea-editor-property-control-checklist-checkbox:before {\n  content: \"\";\n  position: absolute;\n  background-color: #2c2c2d;\n  width: 14px;\n  height: 14px;\n  border-radius: 2px;\n  top: -12px;\n  transition: background-color 0.1s ease;\n}\n.ea-editor-property-control-checklist-checkbox-wrapper {\n  display: inline-block;\n}\n.ea-editor-property-control-checklist-checkbox-wrapper input {\n  display: none !important;\n}\n.ea-editor-property-control-checklist-checkbox-wrapper input:checked + .ea-editor-property-control-checklist-checkbox::before {\n  background-image: url("+n(68)+");\n  background-position: center;\n  background-repeat: no-repeat;\n  background-size: 12px;\n}\n.ea-editor-property-control-color .color-picker-wrapper .input-group {\n  display: inline-block;\n  position: relative;\n}\n.ea-editor-property-control-color .color-picker-wrapper .input-group:after {\n  display: block;\n  content: '';\n  width: 32px;\n  height: 32px;\n  position: absolute;\n  top: 0;\n  left: 0;\n  background: #2c2d2d;\n  border-radius: 2px 0 0 2px;\n  z-index: 1;\n}\n.ea-editor-property-control-color .color-picker-wrapper .input-group .input-group-addon {\n  box-sizing: border-box;\n  border-radius: 2px 0 0 2px;\n  width: 30px;\n  height: 30px;\n  transition: all 0.1s ease;\n  border: none;\n  margin: 1px;\n  float: left;\n  position: relative;\n  z-index: 2;\n  background: #38393a;\n}\n.ea-editor-property-control-color .color-picker-wrapper .input-group .color-picker-input-swatch {\n  box-sizing: border-box;\n  color: #fff;\n  font-size: 13px;\n  font-weight: 400;\n  background: #303131;\n  border-radius: 0 2px 2px 0;\n  width: 170px;\n  height: 32px;\n  outline: none;\n  line-height: 20px;\n  padding: 6px 16px;\n  transition: all 0.1s ease;\n  border: none;\n  margin: 0;\n}\n.ea-editor-property-control-color .color-picker-wrapper .input-group .color-picker-input-swatch:focus {\n  background-color: #2c2d2d;\n}\n.ea-editor-property-control-color .color-picker-wrapper .color-picker-panel .color-picker-actions {\n  padding: 8px;\n}\n.ea-editor-property-control-color .color-picker-wrapper .color-picker-panel .color-picker-actions .color-picker-action {\n  margin: 4px;\n  width: auto;\n  height: 28px;\n  font-size: 11px;\n  border-radius: 4px;\n  border: none;\n  background-color: #444;\n  color: #fff;\n  cursor: pointer;\n  padding: 0 16px;\n  font-weight: 600;\n}\n.ea-editor-property-control-subgroup {\n  position: relative;\n  display: flex;\n  flex-direction: row;\n  align-items: center;\n  box-sizing: border-box;\n  cursor: pointer;\n  background: #404141;\n  padding: 0 16px;\n  line-height: 32px;\n  height: 32px;\n  border-radius: 2px;\n  margin-bottom: -2px;\n  outline: none;\n  transition: all 0.1s ease;\n}\n.ea-editor-property-control-subgroup:hover {\n  background: #474848;\n}\n.ea-editor-property-control-subgroup:hover .ea-editor-property-control-subgroup-icon svg {\n  fill: #ebebeb;\n}\n.ea-editor-property-control-subgroup-name {\n  font-size: 13px;\n  font-weight: 400;\n  color: #fff;\n}\n.ea-editor-property-control-subgroup-icon {\n  position: absolute;\n  width: 12px;\n  height: 12px;\n  top: 50%;\n  right: 7px;\n  transform: translateY(-50%);\n}\n.ea-editor-property-control-subgroup-icon svg {\n  display: block;\n  fill: #5f6163;\n  transition: all 0.2s ease;\n}\n.ea-editor-property-control-divider {\n  border-bottom: 1px solid #303131;\n  margin: 32px 0;\n}\n.ea-editor-property-control-complex-item {\n  position: relative;\n  margin: 0 0 12px;\n  outline: none;\n}\n.ea-editor-property-control-complex-item:hover .ea-editor-property-control-complex-item-inner {\n  background: #474848;\n}\n.ea-editor-property-control-complex-item-inner {\n  position: relative;\n  display: flex;\n  flex-direction: row;\n  align-items: center;\n  box-sizing: border-box;\n  cursor: pointer;\n  background: #404141;\n  padding: 0 12px;\n  height: 36px;\n  border-radius: 2px;\n  outline: none;\n  transition: all 0.3s ease;\n}\n.ea-editor-property-control-complex-item-removing .ea-editor-property-control-complex-item-inner {\n  transform: translateX(-100%);\n  right: 24px;\n}\n.ea-editor-property-control-complex-item-reorder {\n  display: block;\n  width: 7px;\n  height: 14px;\n  padding: 11px 16px 11px 7px;\n  margin: 0 0 0 -12px;\n  cursor: move;\n  outline: none;\n}\n.ea-editor-property-control-complex-item-reorder svg {\n  display: block;\n  width: 7px;\n  height: 14px;\n  fill: rgba(88,89,91,0.8);\n  transition: all 0.2s ease;\n}\n.ea-editor-property-control-complex-item-name {\n  font-size: 13px;\n  font-weight: 400;\n  overflow: hidden;\n  text-overflow: ellipsis;\n  padding-right: 10px;\n  width: 100%;\n  white-space: nowrap;\n  color: #fff;\n  line-height: 1;\n}\n.ea-editor-property-control-complex-item-duplicate {\n  display: block;\n  width: 12px;\n  height: 12px;\n  padding: 13px 7px;\n  margin-left: auto;\n  outline: none;\n}\n.ea-editor-property-control-complex-item-duplicate:hover svg {\n  fill: #dadadb;\n}\n.ea-editor-property-control-complex-item-duplicate svg {\n  display: block;\n  width: 12px;\n  height: 12px;\n  fill: #646668;\n  transition: all 0.2s ease;\n}\n.ea-editor-property-control-complex-item-remove {\n  display: block;\n  width: 12px;\n  height: 12px;\n  padding: 13px 7px;\n  margin-right: -8px;\n  outline: none;\n}\n.ea-editor-property-control-complex-item-remove:hover svg {\n  fill: #dadadb;\n}\n.ea-editor-property-control-complex-item-remove svg {\n  display: block;\n  width: 12px;\n  height: 12px;\n  fill: #646668;\n  transition: all 0.2s ease;\n}\n.ea-editor-property-control-complex-item-remove-confirm {\n  position: absolute;\n  top: 0;\n  left: -24px;\n  right: -24px;\n  background: #303131;\n  display: flex;\n  flex-direction: row;\n  align-items: center;\n  line-height: 40px;\n  height: 40px;\n  transform: translateX(100%);\n  transition: all 0.3s ease;\n  width: 100%;\n  padding: 0 24px;\n  opacity: 0;\n  visibility: hidden;\n}\n.ea-editor-property-control-complex-item-removing .ea-editor-property-control-complex-item-remove-confirm {\n  transform: translateX(0);\n  opacity: 1;\n  visibility: visible;\n}\n.ea-editor-property-control-complex-item-remove-confirm-label {\n  color: #fff;\n  font-size: 11px;\n  font-weight: 400;\n}\n.ea-editor-property-control-complex-item-remove-confirm-actions {\n  display: flex;\n  flex-direction: row;\n  margin-left: auto;\n}\n.ea-editor-property-control-complex-item-remove-confirm-actions-yes,\n.ea-editor-property-control-complex-item-remove-confirm-actions-no {\n  box-sizing: border-box;\n  font-size: 10px;\n  font-weight: 500;\n  text-transform: uppercase;\n  border-radius: 3px;\n  cursor: pointer;\n  height: 20px;\n  line-height: 20px;\n  width: 40px;\n  text-align: center;\n  transition: all 0.2s ease;\n}\n.ea-editor-property-control-complex-item-remove-confirm-actions-yes {\n  color: #7e8184;\n}\n.ea-editor-property-control-complex-item-remove-confirm-actions-yes:hover {\n  color: #fff;\n}\n.ea-editor-property-control-complex-item-remove-confirm-actions-no {\n  color: #fff;\n  background: #404141;\n  margin-left: 6px;\n}\n.ea-editor-property-control-complex-item-remove-confirm-actions-no:hover {\n  background: #474848;\n}\n.ea-editor-property-control-complex-item-placeholder {\n  box-sizing: border-box;\n  border-radius: 3px;\n  border: 1px dashed #66686a;\n  height: 40px;\n  width: 288px;\n  margin: 0 0 12px;\n}\n.ea-editor-property-control-complex-add-new {\n  margin: 0;\n}\n.ea-editor-property-control-complex-add-new:hover svg {\n  fill: #dadadb;\n}\n.ea-editor-property-control-complex-add-new:hover .ea-editor-property-control-complex-add-new-label {\n  color: #dadadb;\n}\n.ea-editor-property-control-complex-add-new .ea-editor-property-control-complex-item-inner {\n  color: #7e8184;\n  justify-content: center;\n  align-items: center;\n  text-transform: uppercase;\n  font-size: 10px;\n  font-weight: 500;\n  outline: none;\n  transition: background 0.2s ease, color 0.2s ease, border 0.2s ease;\n}\n.ea-editor-property-control-complex-add-new-transparent {\n  margin-top: -12px;\n}\n.ea-editor-property-control-complex-add-new-transparent .ea-editor-property-control-complex-item-inner {\n  background: transparent;\n}\n.ea-editor-property-control-complex-add-new-transparent:hover .ea-editor-property-control-complex-item-inner {\n  background: transparent;\n}\n.ea-editor-property-control-complex-add-new svg {\n  display: block;\n  width: 8px;\n  height: 8px;\n  fill: #636567;\n  transition: all 0.2s ease;\n  margin-right: 6px;\n}\n.ea-editor-property-control-complex-add-new-label {\n  display: block;\n  transition: color 0.2s ease;\n}\n.ea-editor-property-control-file input {\n  box-sizing: border-box;\n  color: #fff;\n  font-size: 13px;\n  font-weight: 400;\n  background: #303131;\n  border-radius: 2px;\n  border: none;\n  width: 100%;\n  height: 32px;\n  outline: none;\n  line-height: 20px;\n  padding: 6px 16px;\n  transition: all 0.1s ease;\n}\n.ea-editor-property-control-file input:focus {\n  background-color: #2c2d2d;\n}\n.ea-editor-property-control-file-button {\n  margin-top: 12px;\n  text-transform: uppercase;\n  box-sizing: border-box;\n  color: #fff;\n  font-size: 13px;\n  font-weight: 400;\n  background: #404141;\n  border-radius: 2px;\n  border: none;\n  outline: none;\n  transition: all 0.1s ease;\n  cursor: pointer;\n  width: 40px;\n  height: 40px;\n}\n.ea-editor-property-control-file-button:hover {\n  background: #474848;\n}\n.ea-editor-toolbar {\n  position: absolute;\n  top: 80px;\n  right: 0;\n}\n@media only screen and (max-width: 480px) {\n  .ea-editor-toolbar {\n    display: none;\n  }\n}\n.ea-editor-toolbar-item {\n  position: relative;\n}\n.ea-editor-toolbar-item-trigger {\n  box-sizing: border-box;\n  padding: 3px 6px;\n  background: #38393a;\n  cursor: pointer;\n}\n.ea-editor-toolbar-item-trigger:first-child {\n  padding-top: 6px;\n}\n.ea-editor-toolbar-item-trigger:last-child {\n  padding-bottom: 6px;\n}\n.ea-editor-toolbar-item-trigger:hover .ea-editor-toolbar-item-icon svg {\n  fill: #fff;\n}\n.ea-editor-toolbar-item-icon {\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  width: 26px;\n  height: 26px;\n}\n.toolbar-item-active .ea-editor-toolbar-item-icon {\n  background: #2c2c2d;\n}\n.ea-editor-toolbar-item-icon svg {\n  width: 16px;\n  height: 16px;\n  fill: #66686a;\n  transition: 0.1s;\n}\n.toolbar-item-active .ea-editor-toolbar-item-icon svg {\n  fill: #fff;\n}\n.ea-editor-toolbar-item-values {\n  visibility: hidden;\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  position: absolute;\n  top: 0px;\n  right: 38px;\n  padding: 0 2px;\n  border-radius: 2px;\n  transition: 0.2s;\n  opacity: 0;\n  background: #38393a;\n}\n.toolbar-item-active .ea-editor-toolbar-item-values {\n  visibility: visible;\n  opacity: 1;\n  right: 42px;\n}\n.ea-editor-toolbar-item-value {\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  box-sizing: border-box;\n  padding: 4px 2px;\n  cursor: pointer;\n}\n.ea-editor-toolbar-item-value-icon {\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  width: 26px;\n  height: 26px;\n  border-radius: 2px;\n}\n.ea-editor-toolbar-resolution-value:hover .ea-editor-toolbar-resolution-value-icon svg {\n  fill: #fff;\n}\n.toolbar-item-value-active .ea-editor-toolbar-resolution-value-icon {\n  background: #2c2c2d;\n}\n.ea-editor-toolbar-resolution-value-icon svg {\n  width: 16px;\n  height: 16px;\n  fill: #66686a;\n  transition: 0.1s;\n}\n.toolbar-item-value-active .ea-editor-toolbar-resolution-value-icon svg {\n  fill: #fff;\n}\n.ea-editor-toolbar-background-value:hover.toolbar-item-value-active .ea-editor-toolbar-background-value-icon-color {\n  box-shadow: 0 0 0 2px #fc4264;\n}\n.ea-editor-toolbar-background-value:hover .ea-editor-toolbar-background-value-icon-color {\n  box-shadow: 0 0 0 2px #fff;\n}\n.ea-editor-toolbar-background-value-icon {\n  display: flex;\n  align-items: center;\n  justify-content: center;\n}\n.ea-editor-toolbar-background-value-icon-color {\n  box-sizing: border-box;\n  width: 18px;\n  height: 18px;\n  border-radius: 2px;\n  box-shadow: 0 0 0 1px #474848;\n}\n.toolbar-item-value-active .ea-editor-toolbar-background-value-icon-color {\n  box-shadow: 0 0 0 2px #fc4264;\n}\n.ea-editor-toolbar-background-white {\n  background: #fff;\n}\n.ea-editor-toolbar-background-black {\n  background: #252627;\n}\n.ea-editor-toolbar-background-white-chess {\n  background-size: 10px;\n  background-image: url("+n(71)+");\n}\n.ea-editor-toolbar-background-black-chess {\n  background-size: 10px;\n  background-image: url("+n(74)+");\n}\n.ea-editor-preview-overlay-white {\n  background: #fff;\n}\n.ea-editor-preview-overlay-black {\n  background: #252627;\n}\n.ea-editor-preview-overlay-white-chess {\n  background-image: url("+n(71)+");\n}\n.ea-editor-preview-overlay-black-chess {\n  background-image: url("+n(74)+");\n}\n@-moz-keyframes jump {\n  0% {\n    transform: translate3d(0, 0, 0);\n  }\n  40% {\n    transform: translate3d(10%, 0, 0);\n  }\n  100% {\n    transform: translate3d(30%, 0, 0);\n  }\n}\n@-webkit-keyframes jump {\n  0% {\n    transform: translate3d(0, 0, 0);\n  }\n  40% {\n    transform: translate3d(10%, 0, 0);\n  }\n  100% {\n    transform: translate3d(30%, 0, 0);\n  }\n}\n@-o-keyframes jump {\n  0% {\n    transform: translate3d(0, 0, 0);\n  }\n  40% {\n    transform: translate3d(10%, 0, 0);\n  }\n  100% {\n    transform: translate3d(30%, 0, 0);\n  }\n}\n@keyframes jump {\n  0% {\n    transform: translate3d(0, 0, 0);\n  }\n  40% {\n    transform: translate3d(10%, 0, 0);\n  }\n  100% {\n    transform: translate3d(30%, 0, 0);\n  }\n}\n",""])},function(e,t){e.exports=function(){var e=[];return e.toString=function(){for(var e=[],t=0;t<this.length;t++){var n=this[t];n[2]?e.push("@media "+n[2]+"{"+n[1]+"}"):e.push(n[1])}return e.join("")},e.i=function(t,n){"string"==typeof t&&(t=[[null,t,""]]);for(var i={},r=0;r<this.length;r++){var o=this[r][0];"number"==typeof o&&(i[o]=!0)}for(r=0;r<t.length;r++){var s=t[r];"number"==typeof s[0]&&i[s[0]]||(n&&!s[2]?s[2]=n:n&&(s[2]="("+s[2]+") and ("+n+")"),e.push(s))}},e}},function(e,t,n){n(66),e.exports=n(67)},function(e,t,n){e.exports=n.p+"assets/img/select-arrow-down.svg"},function(e,t){e.exports="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA3IDUiPgogICAgPHBhdGggaWQ9IlJvdW5kZWRfUmVjdGFuZ2xlXzIyX2NvcHlfMyIgc3R5bGU9Im9wYWNpdHk6MC44O2ZpbGw6IzY2Njg2QTsiIGQ9Ik0zLjksNC44CglDMy42LDUuMSwzLjIsNSwyLjksNC43TDAuMywxLjVDMCwxLjEtMC41LDAsMSwwTDYsMGMxLjUsMCwwLjksMS4xLDAuNiwxLjRMNC4xLDQuN0M0LDQuOCw0LDQuOCwzLjksNC44eiIvPgo8L3N2Zz4="},function(e,t,n){n(69),e.exports=n(70)},function(e,t,n){e.exports=n.p+"assets/img/check-mark-icon.svg"},function(e,t){e.exports="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPHN2ZyB2ZXJzaW9uPSIxLjEiIGlkPSJDYXBhXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IgoJIHZpZXdCb3g9IjAgMCAxMiAxMiIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgMTIgMTI7IiB4bWw6c3BhY2U9InByZXNlcnZlIj4KCTxnPgoJCTxwYXRoIHN0eWxlPSJmaWxsOiNmZmZmZmY7IiBkPSJNOS45LDMuMWMtMC4yLDAtMC4zLDAtMC40LDAuMkw1LjMsNy41TDMuNCw1LjZDMy4zLDUuNSwzLjEsNS40LDMsNS41Yy0wLjEsMC0wLjMsMC4xLTAuNCwwLjJDMi41LDUuNywyLjQsNS45LDIuNCw2CgkJCWMwLDAuMiwwLDAuMywwLjIsMC40bDIuMywyLjNDNSw4LjgsNS4xLDguOSw1LjMsOC45YzAuMSwwLDAuMy0wLjEsMC40LTAuMmw0LjYtNC42YzAuMS0wLjEsMC4yLTAuMywwLjItMC40CgkJCWMwLTAuMS0wLjEtMC4zLTAuMi0wLjRDMTAuMSwzLjIsMTAsMy4xLDkuOSwzLjF6Ii8+Cgk8L2c+Cjwvc3ZnPgo="},function(e,t,n){n(72),e.exports=n(73)},function(e,t,n){e.exports=n.p+"assets/img/bg-preview.png"},function(e,t){e.exports="data:image/png;base64,/9j/4AAQSkZJRgABAgAAZABkAAD/7AARRHVja3kAAQAEAAAAUAAA/+4AJkFkb2JlAGTAAAAAAQMAFQQDBgoNAAABpgAAAccAAAIDAAACMP/bAIQAAgICAgICAgICAgMCAgIDBAMCAgMEBQQEBAQEBQYFBQUFBQUGBgcHCAcHBgkJCgoJCQwMDAwMDAwMDAwMDAwMDAEDAwMFBAUJBgYJDQsJCw0PDg4ODg8PDAwMDAwPDwwMDAwMDA8MDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwM/8IAEQgAFAAUAwERAAIRAQMRAf/EAH8AAAMBAQAAAAAAAAAAAAAAAAIDBAEIAQEAAAAAAAAAAAAAAAAAAAAAEAACAwEAAAAAAAAAAAAAAAAAATARMRARAQAAAAAAAAAAAAAAAAAAADASAQAAAAAAAAAAAAAAAAAAADATAAEEAwEAAAAAAAAAAAAAAAEAEDAx8BGxYf/aAAwDAQACEQMRAAAB7kHhgCzCgnBP/9oACAEBAAEFAhYUjC3x6f/aAAgBAgABBQKH/9oACAEDAAEFAof/2gAIAQICBj8CH//aAAgBAwIGPwIf/9oACAEBAQY/Ah//2gAIAQEDAT8hVTeSJJaFL2a5v//aAAgBAgMBPyGH/9oACAEDAwE/IYf/2gAMAwEAAhEDEQAAEBBJBB//2gAIAQEDAT8QXV1sRKOD6CgsQDcXG//aAAgBAgMBPxCH/9oACAEDAwE/EIf/2Q=="},function(e,t,n){n(75),e.exports=n(76)},function(e,t,n){e.exports=n.p+"assets/img/bg-preview-black.png"},function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAIAAAAC64paAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACxJREFUeNpiVFfXYMAN/v3/j0eWiYECMKp5ZGhmIZCGGBlHA2xUMyWaAQIMAJSTBpxFdlboAAAAAElFTkSuQmCC"},function(e,t,n){function i(e,t){for(var n=0;n<e.length;n++){var i=e[n],r=u[i.id];if(r){r.refs++;for(var o=0;o<r.parts.length;o++)r.parts[o](i.parts[o]);for(;o<i.parts.length;o++)r.parts.push(l(i.parts[o],t))}else{var s=[];for(o=0;o<i.parts.length;o++)s.push(l(i.parts[o],t));u[i.id]={id:i.id,refs:1,parts:s}}}}function r(e){for(var t=[],n={},i=0;i<e.length;i++){var r=e[i],o=r[0],s={css:r[1],media:r[2],sourceMap:r[3]};n[o]?n[o].parts.push(s):t.push(n[o]={id:o,parts:[s]})}return t}function o(e,t){var n=p(),i=m[m.length-1];if("top"===e.insertAt)i?i.nextSibling?n.insertBefore(t,i.nextSibling):n.appendChild(t):n.insertBefore(t,n.firstChild),m.push(t);else{if("bottom"!==e.insertAt)throw new Error("Invalid value for parameter 'insertAt'. Must be 'top' or 'bottom'.");n.appendChild(t)}}function s(e){e.parentNode.removeChild(e);var t=m.indexOf(e);t>=0&&m.splice(t,1)}function a(e){var t=document.createElement("style");return t.type="text/css",o(e,t),t}function l(e,t){var n,i,r;if(t.singleton){var l=g++;n=f||(f=a(t)),i=c.bind(null,n,l,!1),r=c.bind(null,n,l,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=function(e){var t=document.createElement("link");return t.rel="stylesheet",o(e,t),t}(t),i=function(e,t){var n=t.css,i=t.sourceMap;i&&(n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(i))))+" */");var r=new Blob([n],{type:"text/css"}),o=e.href;e.href=URL.createObjectURL(r),o&&URL.revokeObjectURL(o)}.bind(null,n),r=function(){s(n),n.href&&URL.revokeObjectURL(n.href)}):(n=a(t),i=function(e,t){var n=t.css,i=t.media;i&&e.setAttribute("media",i);if(e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}.bind(null,n),r=function(){s(n)});return i(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;i(e=t)}else r()}}function c(e,t,n,i){var r=n?"":i.css;if(e.styleSheet)e.styleSheet.cssText=v(t,r);else{var o=document.createTextNode(r),s=e.childNodes;s[t]&&e.removeChild(s[t]),s.length?e.insertBefore(o,s[t]):e.appendChild(o)}}var u={},h=function(e){var t;return function(){return void 0===t&&(t=e.apply(this,arguments)),t}},d=h(function(){return/msie [6-9]\b/.test(self.navigator.userAgent.toLowerCase())}),p=h(function(){return document.head||document.getElementsByTagName("head")[0]}),f=null,g=0,m=[];e.exports=function(e,t){void 0===(t=t||{}).singleton&&(t.singleton=d()),void 0===t.insertAt&&(t.insertAt="bottom");var n=r(e);return i(n,t),function(e){for(var o=[],s=0;s<n.length;s++){var a=n[s];(l=u[a.id]).refs--,o.push(l)}if(e){i(r(e),t)}for(s=0;s<o.length;s++){var l;if(0===(l=o[s]).refs){for(var c=0;c<l.parts.length;c++)l.parts[c]();delete u[l.id]}}}};var v=function(){var e=[];return function(t,n){return e[t]=n,e.filter(Boolean).join("\n")}}()}]),function(e,t){"use strict";function n(){this.pages=[]}var i,r,o,s,a,l,c,u;n.prototype={constructor:n,add:function(t,n){if(!t||!n||!e.isFunction(n))return!1;this.pages[t]=n()||{}},get:function(e){return this.pages[e]||!1},show:function(t,n){var i,u=this,h=this.get(t);return!!h&&("init"in h&&e.isFunction(h.init)&&(i=h.init(n)),e.when(i).then(function(){l.hasClass("elfsight-admin-other-products-hidden-permanently")||l.toggleClass("elfsight-admin-other-products-hidden","widgets"!==t),r.removeClass("elfsight-admin-loading"),s.removeClass("active"),s.filter("[data-elfsight-admin-page="+t+"]").addClass("active"),c.length&&c.removeClass("elfsight-admin-page-active"),c=o.filter("[data-elfsight-admin-page-id="+t+"]"),a.css("min-height",c.outerHeight()),c.addClass("elfsight-admin-page-animation elfsight-admin-page-active"),setTimeout(function(){c.removeClass("elfsight-admin-page-animation"),"function"==typeof u.onPageChanged&&u.onPageChanged(t)},200)}),h)}};var h=new n;t.elfsightAdminPagesController=h,e(function(){i=e(".elfsight-admin"),r=e(".elfsight-admin-main"),o=e("[data-elfsight-admin-page-id]"),s=e("[data-elfsight-admin-page]"),a=e(".elfsight-admin-pages-container"),l=e(".elfsight-admin-other-products"),c=e(),u=r.attr("data-elfsight-admin-slug"),h.add("welcome",e.noop),h.add("widgets",function(){var t=[],i="true"===r.attr("data-elfsight-admin-widgets-clogged"),o=e(".elfsight-admin-page-widgets"),s=e(".elfsight-admin-page-widgets-list",o),a=e(".elfsight-admin-template-widgets-list-item",o),l=e(".elfsight-admin-template-widgets-list-empty",o);s.on("click",".elfsight-admin-page-widgets-list-item-actions-remove",function(t){var i=e(this),r=i.attr("data-widget-id");i.closest(".elfsight-admin-page-widgets-list-item").addClass("elfsight-admin-page-widgets-list-item-removed"),n("remove",{id:r},"post",!0),t.preventDefault()}),s.on("click",".elfsight-admin-page-widgets-list-item-actions-restore a",function(t){var i=e(this),r=i.attr("data-widget-id");i.closest(".elfsight-admin-page-widgets-list-item").removeClass("elfsight-admin-page-widgets-list-item-removed"),n("restore",{id:r},"post",!0),t.preventDefault()}),s.tablesorter({cssAsc:"elfsight-admin-page-widgets-list-sort-asc",cssDesc:"elfsight-admin-page-widgets-list-sort-desc",cssHeader:"elfsight-admin-page-widgets-list-sort",headers:{0:{},1:{},2:{},3:{sorter:!1}}});var c=function(){var n=e("tbody",s).empty();e.isArray(t)&&t.length?(e.each(t,function(t,i){var r=e(a.html()),o="["+u.split("-").join("_")+' id="'+i.id+'"]';r.find(".elfsight-admin-page-widgets-list-item-name a").attr("href","#/edit-widget/"+i.id+"/").text(i.name);var s=new Date(1e3*(i.time_updated||i.time_created));r.find(".elfsight-admin-page-widgets-list-item-date").text(function(e){e instanceof Date||(e=new Date(Date.parse(e)));return["January","February","March","April","May","June","July","August","September","October","November","December"][e.getMonth()]+" "+e.getDate()+", "+e.getFullYear()}(s)),r.find(".elfsight-admin-page-widgets-list-item-shortcode-hidden").text(o);var l=r.find(".elfsight-admin-page-widgets-list-item-shortcode-input").val(o),c=r.find(".elfsight-admin-page-widgets-list-item-shortcode-copy-trigger").attr("data-clipboard-text",o),h=new Clipboard(c.get(0));h.on("success",function(){c.addClass("elfsight-admin-page-widgets-list-item-shortcode-copy-trigger-copied").find("span").text("Copied"),setTimeout(function(){c.removeClass("elfsight-admin-page-widgets-list-item-shortcode-copy-trigger-copied").find("span").text("Copy")},5e3)}),h.on("error",function(){var e=r.find(".elfsight-admin-page-widgets-list-item-shortcode-copy-error").show();l.select(),setTimeout(function(){e.hide()},5e3)}),r.find(".elfsight-admin-page-widgets-list-item-shortcode-value").text(o),r.find(".elfsight-admin-page-widgets-list-item-actions-edit").attr("href","#/edit-widget/"+i.id+"/"),r.find(".elfsight-admin-page-widgets-list-item-actions-duplicate").attr("href","#/edit-widget/"+i.id+"/duplicate/"),r.find(".elfsight-admin-page-widgets-list-item-actions-remove, .elfsight-admin-page-widgets-list-item-actions-restore a").attr("data-widget-id",i.id),r.appendTo(n)}),s.trigger("update")):e(l.html()).appendTo(n)};return{init:function(r,o){return n("list").then(function(n){if(n.status){if(t=n.data,!(i||e.isArray(t)&&t.length))return h.show("welcome"),e.Deferred().reject(n).promise();c()}})}}}),h.add("edit-widget",function(){var t,i,r,o=e(".elfsight-admin-page-edit-widget"),s=e(".elfsight-admin-page-edit-widget-form-submit",o),a=e(".elfsight-admin-page-edit-widget-form-apply",o),l=e(".elfsight-admin-page-edit-widget-name-input",o),c="elfsight-admin-page-edit-widget-form-editor",u=c+"-clone",d=e("."+u,o).parent(),p=e("."+u,o),f=JSON.parse(p.attr("data-elfsight-admin-editor-settings")),g=JSON.parse(p.attr("data-elfsight-admin-editor-preferences")),m=JSON.parse(p.attr("data-elfsight-admin-editor-preview-url")),v=p.attr("data-elfsight-admin-editor-observer-url")||null;v&&(v=JSON.parse(v));var w=function(r){var o=l.val(),s={};i.getData()?s=i.getData():t&&(s=t.options);var a=t?"update":"add",c={name:o||"Untitled",options:encodeURIComponent(JSON.stringify(s))};t&&(c.id=t.id),n(a,c,"post").done(function(n){n.status&&(n.id&&(t={id:n.id}),e.isFunction(r)&&r())})};return s.on("click",function(){e("html, body").animate({scrollTop:0}),w(function(){hasher.setHash("widgets/")})}),a.on("click",function(){w()}),{init:function(s,a){var w=function(){l.val(t?t.name:""),r&&r.remove(),(r=p.clone().removeClass(u).addClass(c)).appendTo(d);angular.module("elfsightEditor",["elfsightAppsEditor"]).controller("AppController",["$elfsightAppsEditor","$scope","$rootScope","$timeout",function(n,o,s,a){i=n;var l={parent:r,previewUrl:m,observerUrl:v||void 0,settings:e.extend(!0,{},f),preferences:g};t&&(l.widget={data:t.options}),n.init(l)}]),r.attr("ng-controller","AppController as app"),angular.bootstrap(r,["elfsightEditor"])};if(s&&s.id)return n("list",{id:s.id}).then(function(n){if(n.status){if(!n.data.length)return h.show("error",{message:"There is no widget with id "+s.id+"."}),e.Deferred().reject(n).promise();t=n.data[0],w(),o.toggleClass("elfsight-admin-page-edit-widget-new",!!s.duplicate),s.duplicate&&(t=null)}},function(){t=null});t=null,w(),o.addClass("elfsight-admin-page-edit-widget-new")}}}),h.add("support",e.noop),h.add("preferences",function(){var t=e(".elfsight-admin-page-preferences-form"),n=t.attr("data-nonce"),i=function(t,i){var r={action:u.split("-").join("_")+"_update_preferences",nonce:n},o=i.find(".elfsight-admin-page-preferences-option-save");o.addClass("elfsight-admin-page-preferences-option-save-loading"),e.post(ajaxurl,e.extend(r,t),null,"json").done(function(e){var t=i.find(".elfsight-admin-page-preferences-option-save-success"),n=i.find(".elfsight-admin-page-preferences-option-save-error");o.removeClass("elfsight-admin-page-preferences-option-save-loading"),e.success?(n.text(""),t.addClass("elfsight-admin-page-preferences-option-save-success-visible"),setTimeout(function(){t.removeClass("elfsight-admin-page-preferences-option-save-success-visible")},2e3)):e.error&&n.text(e.error)})},r=function(e,t){var n=e.getSession().getScreenLength()*e.renderer.lineHeight+e.renderer.scrollBar.getWidth();t.height(n.toString()+"px"),e.resize()},o=ace.edit("elfsightPreferencesSnippetCSS");o.setOption("useWorker",!1),o.setTheme("ace/theme/monokai"),o.getSession().setMode("ace/mode/css"),o.commands.addCommand({name:"save",bindKey:{win:"Ctrl-S",mac:"Command-S"},exec:function(){var t=e(".elfsight-admin-page-preferences-option-css");i({preferences_custom_css:o.getSession().doc.getValue()},t)}}),r(o,e("#elfsightPreferencesSnippetCSS")),o.getSession().on("change",function(){r(o,e("#elfsightPreferencesSnippetCSS"))});var s=ace.edit("elfsightPreferencesSnippetJS");s.setOption("useWorker",!1),s.setTheme("ace/theme/monokai"),s.getSession().setMode("ace/mode/javascript"),s.commands.addCommand({name:"save",bindKey:{win:"Ctrl-S",mac:"Command-S"},exec:function(){var t=e(".elfsight-admin-page-preferences-option-js");i({preferences_custom_js:s.getSession().doc.getValue()},t)}}),r(s,e("#elfsightPreferencesSnippetJS")),s.getSession().on("change",function(){r(s,e("#elfsightPreferencesSnippetJS"))}),t.find(".elfsight-admin-page-preferences-option-save").click(function(t){t.preventDefault();var n=e(this),r=n.closest(".elfsight-admin-page-preferences-option"),a={};n.closest(".elfsight-admin-page-preferences-option-input-container").find('input[type="text"]').each(function(t,n){a[e(n).attr("name")]=e(n).val()}),r.is(".elfsight-admin-page-preferences-option-css")&&(a.preferences_custom_css=o.getSession().doc.getValue()),r.is(".elfsight-admin-page-preferences-option-js")&&(a.preferences_custom_js=s.getSession().doc.getValue()),i(a,r)}),t.find('[name="preferences_force_script_add"]').change(function(){var t=e(this),n=t.closest(".elfsight-admin-page-preferences-option");i({preferences_force_script_add:t.is(":checked")?"on":"off"},n)}),t.find('[name="preferences_access_role"]').change(function(){var t=e(this),n=t.closest(".elfsight-admin-page-preferences-option");i({access_role:t.val()},n)})}),h.add("activation",function(){var t=e(".elfsight-admin-page-activation-form"),n=e(".elfsight-admin-page-activation-form-purchase-code-input",t),r=e(".elfsight-admin-page-activation-form-activated-input",t),o=e(".elfsight-admin-page-activation-form-submit",t),s=e(".elfsight-admin-page-activation-form-message-success",t),a=e(".elfsight-admin-page-activation-form-message-error",t),l=e(".elfsight-admin-page-activation-form-message-fail",t),c=function(n,i){e.post(ajaxurl,{action:u.split("-").join("_")+"_update_activation_data",purchase_code:n,activated:i,nonce:t.attr("data-nonce")})};o.click(function(o){o.preventDefault(),o.stopPropagation();var h=t.attr("data-activation-url"),d=t.attr("data-activation-version"),p=n.val(),f=r.val();e.ajax({url:h,dataType:"jsonp",data:{action:"purchase_code",slug:u+"-cc",purchase_code:p,version:d}}).done(function(e){e.verification?(f=!!e.verification.valid,r.val(f),e.verification.valid?(i.removeClass("elfsight-admin-activation-invalid").addClass("elfsight-admin-activation-activated"),a.hide(),l.hide(),s.show()):(i.removeClass("elfsight-admin-activation-activated").toggleClass("elfsight-admin-activation-invalid",!!p),s.hide(),l.hide(),a.toggle(!!p))):f=!1,c(p,f)}).fail(function(){i.removeClass("elfsight-admin-activation-activated").addClass("elfsight-admin-activation-invalid"),r.val(!1),s.hide(),a.hide(),l.show(),c(p,!1)})})}),h.add("error",function(){var t=e(".elfsight-admin-page-error");return{init:function(n){n&&n.message&&e(".elfsight-admin-page-error-message",t).text(n.message)}}});var n=function(t,n,i,o){i="post"===i?"post":"get";var s=e.extend({},{action:u.split("-").join("_")+"_widgets_api",endpoint:t},n);return e.ajax({url:ajaxurl,data:s,dataType:"json",type:i,beforeSend:function(){o||r.addClass("elfsight-admin-loading")}}).always(function(){o||r.removeClass("elfsight-admin-loading")}).then(function(t){return t.status?t:(h.show("error",{message:"An error occurred during your request process. Please, try again."}),e.Deferred().reject(t).promise())},function(e){return h.show("error",{message:"An error occurred during your request process. Please, try again."}),e})};if(t.crossroads&&t.hasher){crossroads.addRoute("/add-widget/",function(){h.show("edit-widget")}),crossroads.addRoute("/edit-widget/{id}/",function(e){h.show("edit-widget",{id:e})}),crossroads.addRoute("/edit-widget/{id}/duplicate/",function(e){h.show("edit-widget",{id:e,duplicate:!0})}),crossroads.addRoute("/{page}/",function(e){e&&-1===e.indexOf("!")&&(h.show(e)||h.show("error",{message:"The requested page was not found."}))});var d=function(e,t){crossroads.parse(e)};hasher.initialized.add(d),hasher.changed.add(d),hasher.init();hasher.getHash()||hasher.setHash("widgets/")}})}(jQuery,window);