if(function(){myinterviewtrainer.createNS("dashboard.charts"),myinterviewtrainer.dashboard.charts.create_daily_score_graph=function(e){for(var t=Raphael("chart-div",$("#chart-div").width(),$("#chart-div").width()/2+40),i=t.linechart(15,15,$("#chart-div").width()-15,$("#chart-div").width()/2,[e.dates,e.dates,[e.dates[0]]],[e.scores,e.daily_targets,[0]],{axis:"0 0 1 1",symbol:["","",""],shade:!1,axisxstep:e.axisxstep||6,axisystep:e.axisystep||5,colors:["#FFBE4D","#7EB530","transparent"]}),n=i.axis[0].text.items,r=0,o=n.length;r<o;r++){var s=new Date(1e3*parseInt(n[r].attr("text")));n[r].attr("text",dateFormat(s,"ddd"))}for(var r=0,o=i.axis.length;r<o;r++){i.axis[r].attr("stroke","#999999");for(var n=i.axis[r].text.items,a=0,l=n.length;a<l;a++)n[a].attr("fill","#999999")}},myinterviewtrainer.dashboard.charts.create_daily_progress=function(e){var t=$("#daily-progress").parent().width();$("#daily-progress").parent().height(t);var i=t,n={stroke:"#ddd","stroke-width":e.stroakWidth,"stroke-opacity":.3},r=Raphael("daily-progress",i,i),o=function(e){var t=r;t.customAttributes.arc=function(e,t,i,n,r){var o,s=360/n*i,a=(90-s)*Math.PI/180,l=e+r*Math.cos(a),c=t-r*Math.sin(a);return o=n===i?[["M",e,t-r],["A",r,r,0,1,1,e-.01,t-r]]:[["M",e,t-r],["A",r,r,0,+(s>180),1,l,c]],{path:o}},t.path().attr({stroke:100===e?"#7eb530":"#ffbb45","stroke-width":7,arc:[i/2,i/2,0,100,i/2-5]}).animate({arc:[i/2,i/2,e,100,i/2-5]},1500,"bounce")};r.circle(i/2,i/2,i/2-5).attr(n),o(e.percent_target),$("#daily-progress").css({position:"absolute"})},myinterviewtrainer.dashboard.charts.create_profile_strength=function(e){$("#profile_strength_chart").parent().width();$("#profile_strength_chart").parent().height(e.height||100),$("#profile_strength_chart").children().remove();var t=e.canvas_height||72,i={stroke:"#ddd","stroke-width":e.stroakWidth||8,"stroke-opacity":e.stroakOpacity||.3},n=Raphael("profile_strength_chart",t,t),r=function(i){var r=n;r.customAttributes.arc=function(e,t,i,n,r){var o,s=360/n*i,a=(90-s)*Math.PI/180,l=e+r*Math.cos(a),c=t-r*Math.sin(a);return o=n===i?[["M",e,t-r],["A",r,r,0,1,1,e-.01,t-r]]:[["M",e,t-r],["A",r,r,0,+(s>180),1,l,c]],{path:o}};var o="#de5433";o=i<25?"#de5433":"#ffbb45",r.path().attr({stroke:100===i?"#7eb530":o,"stroke-width":e.stroakWidth||7,arc:[t/2,t/2,0,100,t/2-5]}).animate({arc:[t/2,t/2,i,100,t/2-5]},100,"linear")};n.circle(t/2,t/2,e.canvas_height/2-e.stroakWidth).attr(i),r(e.percent_target)}}(),function(){myinterviewtrainer.createNS("dashboard"),myinterviewtrainer.dashboard.init=function(){var e=this;$("#coin-store-btn").click(function(){return $("#dashboard-ladder-ct").load($(this).attr("href")),!1}),$(function(){e.load_right_panels()})},myinterviewtrainer.dashboard.load_right_panels=function(){$.ajax({url:"/dashboard-panels",data:{course_slug:window.location.href.split("courses/")[1].split("/")[0]},success:function(e){$("#right-panel-anchor").after(e.html)}})},myinterviewtrainer.dashboard.tour=new Tour({name:"dashboard",backdrop:!0,backdropPadding:15,storage:!1,onEnd:function(e){$.ajax({type:"POST",url:"/end-tour/",data:{tour:"dashboard_tour",ref:"slide_"+e._current}}),$("#collect_data").modal()},steps:[{element:!1,title:"Welcome!",content:"It's so good to have you onboard. Now before you start, we will take you through a teeny tiny site tour to help you understand the magic on this site better. <br/>",placement:"bottom",orphan:!0},{element:$(".topic-box.started, .topic-box.unlocked")[0],title:"Topics",content:"What we are going to learn has been broken down into topics where topics are arranged in increasing order of difficulty. ",placement:"bottom"},{element:$(".checpoint-problems")[1],title:"Jump Problems",content:"All Levels other than Level 1 are initially locked to let you approach topics in order of difficulty. However, if you solve 'Jump to Level X', then all levels <= X are unlocked ",placement:"bottom"},{element:$(".daily-prgs-panel")[0],title:"Streak and daily goals",content:"You set daily goals based on the time you can devote each day ( More details on the <a href='/pages/faq/' target='_blank'>FAQ page</a> ). We calculate streak as the continuous number of days when you hit your daily goal.",placement:$(window).width()<768?"top":"bottom"},{element:!1,title:"Get ready for your dream job!",content:"We also refer you to exciting companies. Head over to <a href='/referrals/'>Referrals</a> for more details.",placement:"bottom",orphan:!0}]})}(),/*! jQuery UI - v1.11.1+CommonJS - 2014-09-17
* http://jqueryui.com
* Includes: widget.js
* Copyright 2014 jQuery Foundation and other contributors; Licensed MIT */
function(e){"function"==typeof define&&define.amd?define(["jquery"],e):e("object"==typeof exports?require("jquery"):jQuery)}(function(e){/*!
 * jQuery UI Widget 1.11.1
 * http://jqueryui.com
 *
 * Copyright 2014 jQuery Foundation and other contributors
 * Released under the MIT license.
 * http://jquery.org/license
 *
 * http://api.jqueryui.com/jQuery.widget/
 */
var t=0,i=Array.prototype.slice;e.cleanData=function(t){return function(i){var n,r,o;for(o=0;null!=(r=i[o]);o++)try{n=e._data(r,"events"),n&&n.remove&&e(r).triggerHandler("remove")}catch(e){}t(i)}}(e.cleanData),e.widget=function(t,i,n){var r,o,s,a,l={},c=t.split(".")[0];return t=t.split(".")[1],r=c+"-"+t,n||(n=i,i=e.Widget),e.expr[":"][r.toLowerCase()]=function(t){return!!e.data(t,r)},e[c]=e[c]||{},o=e[c][t],s=e[c][t]=function(e,t){if(!this._createWidget)return new s(e,t);arguments.length&&this._createWidget(e,t)},e.extend(s,o,{version:n.version,_proto:e.extend({},n),_childConstructors:[]}),a=new i,a.options=e.widget.extend({},a.options),e.each(n,function(t,n){if(!e.isFunction(n))return void(l[t]=n);l[t]=function(){var e=function(){return i.prototype[t].apply(this,arguments)},r=function(e){return i.prototype[t].apply(this,e)};return function(){var t,i=this._super,o=this._superApply;return this._super=e,this._superApply=r,t=n.apply(this,arguments),this._super=i,this._superApply=o,t}}()}),s.prototype=e.widget.extend(a,{widgetEventPrefix:o?a.widgetEventPrefix||t:t},l,{constructor:s,namespace:c,widgetName:t,widgetFullName:r}),o?(e.each(o._childConstructors,function(t,i){var n=i.prototype;e.widget(n.namespace+"."+n.widgetName,s,i._proto)}),delete o._childConstructors):i._childConstructors.push(s),e.widget.bridge(t,s),s},e.widget.extend=function(t){for(var n,r,o=i.call(arguments,1),s=0,a=o.length;s<a;s++)for(n in o[s])r=o[s][n],o[s].hasOwnProperty(n)&&r!==undefined&&(e.isPlainObject(r)?t[n]=e.isPlainObject(t[n])?e.widget.extend({},t[n],r):e.widget.extend({},r):t[n]=r);return t},e.widget.bridge=function(t,n){var r=n.prototype.widgetFullName||t;e.fn[t]=function(o){var s="string"==typeof o,a=i.call(arguments,1),l=this;return o=!s&&a.length?e.widget.extend.apply(null,[o].concat(a)):o,s?this.each(function(){var i,n=e.data(this,r);return"instance"===o?(l=n,!1):n?e.isFunction(n[o])&&"_"!==o.charAt(0)?(i=n[o].apply(n,a),i!==n&&i!==undefined?(l=i&&i.jquery?l.pushStack(i.get()):i,!1):void 0):e.error("no such method '"+o+"' for "+t+" widget instance"):e.error("cannot call methods on "+t+" prior to initialization; attempted to call method '"+o+"'")}):this.each(function(){var t=e.data(this,r);t?(t.option(o||{}),t._init&&t._init()):e.data(this,r,new n(o,this))}),l}},e.Widget=function(){},e.Widget._childConstructors=[],e.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{disabled:!1,create:null},_createWidget:function(i,n){n=e(n||this.defaultElement||this)[0],this.element=e(n),this.uuid=t++,this.eventNamespace="."+this.widgetName+this.uuid,this.options=e.widget.extend({},this.options,this._getCreateOptions(),i),this.bindings=e(),this.hoverable=e(),this.focusable=e(),n!==this&&(e.data(n,this.widgetFullName,this),this._on(!0,this.element,{remove:function(e){e.target===n&&this.destroy()}}),this.document=e(n.style?n.ownerDocument:n.document||n),this.window=e(this.document[0].defaultView||this.document[0].parentWindow)),this._create(),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:e.noop,_getCreateEventData:e.noop,_create:e.noop,_init:e.noop,destroy:function(){this._destroy(),this.element.unbind(this.eventNamespace).removeData(this.widgetFullName).removeData(e.camelCase(this.widgetFullName)),this.widget().unbind(this.eventNamespace).removeAttr("aria-disabled").removeClass(this.widgetFullName+"-disabled ui-state-disabled"),this.bindings.unbind(this.eventNamespace),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")},_destroy:e.noop,widget:function(){return this.element},option:function(t,i){var n,r,o,s=t;if(0===arguments.length)return e.widget.extend({},this.options);if("string"==typeof t)if(s={},n=t.split("."),t=n.shift(),n.length){for(r=s[t]=e.widget.extend({},this.options[t]),o=0;o<n.length-1;o++)r[n[o]]=r[n[o]]||{},r=r[n[o]];if(t=n.pop(),1===arguments.length)return r[t]===undefined?null:r[t];r[t]=i}else{if(1===arguments.length)return this.options[t]===undefined?null:this.options[t];s[t]=i}return this._setOptions(s),this},_setOptions:function(e){var t;for(t in e)this._setOption(t,e[t]);return this},_setOption:function(e,t){return this.options[e]=t,"disabled"===e&&(this.widget().toggleClass(this.widgetFullName+"-disabled",!!t),t&&(this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus"))),this},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_on:function(t,i,n){var r,o=this;"boolean"!=typeof t&&(n=i,i=t,t=!1),n?(i=r=e(i),this.bindings=this.bindings.add(i)):(n=i,i=this.element,r=this.widget()),e.each(n,function(n,s){function a(){if(t||!0!==o.options.disabled&&!e(this).hasClass("ui-state-disabled"))return("string"==typeof s?o[s]:s).apply(o,arguments)}"string"!=typeof s&&(a.guid=s.guid=s.guid||a.guid||e.guid++);var l=n.match(/^([\w:-]*)\s*(.*)$/),c=l[1]+o.eventNamespace,u=l[2];u?r.delegate(u,c,a):i.bind(c,a)})},_off:function(e,t){t=(t||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,e.unbind(t).undelegate(t)},_delay:function(e,t){function i(){return("string"==typeof e?n[e]:e).apply(n,arguments)}var n=this;return setTimeout(i,t||0)},_hoverable:function(t){this.hoverable=this.hoverable.add(t),this._on(t,{mouseenter:function(t){e(t.currentTarget).addClass("ui-state-hover")},mouseleave:function(t){e(t.currentTarget).removeClass("ui-state-hover")}})},_focusable:function(t){this.focusable=this.focusable.add(t),this._on(t,{focusin:function(t){e(t.currentTarget).addClass("ui-state-focus")},focusout:function(t){e(t.currentTarget).removeClass("ui-state-focus")}})},_trigger:function(t,i,n){var r,o,s=this.options[t];if(n=n||{},i=e.Event(i),i.type=(t===this.widgetEventPrefix?t:this.widgetEventPrefix+t).toLowerCase(),i.target=this.element[0],o=i.originalEvent)for(r in o)r in i||(i[r]=o[r]);return this.element.trigger(i,n),!(e.isFunction(s)&&!1===s.apply(this.element[0],[i].concat(n))||i.isDefaultPrevented())}},e.each({show:"fadeIn",hide:"fadeOut"},function(t,i){e.Widget.prototype["_"+t]=function(n,r,o){"string"==typeof r&&(r={effect:r});var s,a=r?!0===r||"number"==typeof r?i:r.effect||i:t;r=r||{},"number"==typeof r&&(r={duration:r}),s=!e.isEmptyObject(r),r.complete=o,r.delay&&n.delay(r.delay),s&&e.effects&&e.effects.effect[a]?n[t](r):a!==t&&n[a]?n[a](r.duration,r.easing,o):n.queue(function(i){e(this)[t](),o&&o.call(n[0]),i()})}});e.widget}),/*
 * jQuery File Upload Plugin 5.42.3
 * https://github.com/blueimp/jQuery-File-Upload
 *
 * Copyright 2010, Sebastian Tschan
 * https://blueimp.net
 *
 * Licensed under the MIT license:
 * http://www.opensource.org/licenses/MIT
 */
function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery","jquery.ui.widget"],e):"object"==typeof exports?e(require("jquery"),require("./vendor/jquery.ui.widget")):e(window.jQuery)}(function(e){"use strict";function t(t){var i="dragover"===t;return function(n){n.dataTransfer=n.originalEvent&&n.originalEvent.dataTransfer;var r=n.dataTransfer;r&&-1!==e.inArray("Files",r.types)&&!1!==this._trigger(t,e.Event(t,{delegatedEvent:n}))&&(n.preventDefault(),i&&(r.dropEffect="copy"))}}e.support.fileInput=!(new RegExp("(Android (1\\.[0156]|2\\.[01]))|(Windows Phone (OS 7|8\\.0))|(XBLWP)|(ZuneWP)|(WPDesktop)|(w(eb)?OSBrowser)|(webOS)|(Kindle/(1\\.0|2\\.[05]|3\\.0))").test(window.navigator.userAgent)||e('<input type="file">').prop("disabled")),e.support.xhrFileUpload=!(!window.ProgressEvent||!window.FileReader),e.support.xhrFormDataFileUpload=!!window.FormData,e.support.blobSlice=window.Blob&&(Blob.prototype.slice||Blob.prototype.webkitSlice||Blob.prototype.mozSlice),e.widget("blueimp.fileupload",{options:{dropZone:e(document),pasteZone:undefined,fileInput:undefined,replaceFileInput:!0,paramName:undefined,singleFileUploads:!0,limitMultiFileUploads:undefined,limitMultiFileUploadSize:undefined,limitMultiFileUploadSizeOverhead:512,sequentialUploads:!1,limitConcurrentUploads:undefined,forceIframeTransport:!1,redirect:undefined,redirectParamName:undefined,postMessage:undefined,multipart:!0,maxChunkSize:undefined,uploadedBytes:undefined,recalculateProgress:!0,progressInterval:100,bitrateInterval:500,autoUpload:!0,messages:{uploadedBytes:"Uploaded bytes exceed file size"},i18n:function(t,i){return t=this.messages[t]||t.toString(),i&&e.each(i,function(e,i){t=t.replace("{"+e+"}",i)}),t},formData:function(e){return e.serializeArray()},add:function(t,i){if(t.isDefaultPrevented())return!1;(i.autoUpload||!1!==i.autoUpload&&e(this).fileupload("option","autoUpload"))&&i.process().done(function(){i.submit()})},processData:!1,contentType:!1,cache:!1,timeout:0},_specialOptions:["fileInput","dropZone","pasteZone","multipart","forceIframeTransport"],_blobSlice:e.support.blobSlice&&function(){return(this.slice||this.webkitSlice||this.mozSlice).apply(this,arguments)},_BitrateTimer:function(){this.timestamp=Date.now?Date.now():(new Date).getTime(),this.loaded=0,this.bitrate=0,this.getBitrate=function(e,t,i){var n=e-this.timestamp;return(!this.bitrate||!i||n>i)&&(this.bitrate=(t-this.loaded)*(1e3/n)*8,this.loaded=t,this.timestamp=e),this.bitrate}},_isXHRUpload:function(t){return!t.forceIframeTransport&&(!t.multipart&&e.support.xhrFileUpload||e.support.xhrFormDataFileUpload)},_getFormData:function(t){var i;return"function"===e.type(t.formData)?t.formData(t.form):e.isArray(t.formData)?t.formData:"object"===e.type(t.formData)?(i=[],e.each(t.formData,function(e,t){i.push({name:e,value:t})}),i):[]},_getTotal:function(t){var i=0;return e.each(t,function(e,t){i+=t.size||1}),i},_initProgressObject:function(t){var i={loaded:0,total:0,bitrate:0};t._progress?e.extend(t._progress,i):t._progress=i},_initResponseObject:function(e){var t;if(e._response)for(t in e._response)e._response.hasOwnProperty(t)&&delete e._response[t];else e._response={}},_onProgress:function(t,i){if(t.lengthComputable){var n,r=Date.now?Date.now():(new Date).getTime();if(i._time&&i.progressInterval&&r-i._time<i.progressInterval&&t.loaded!==t.total)return;i._time=r,n=Math.floor(t.loaded/t.total*(i.chunkSize||i._progress.total))+(i.uploadedBytes||0),this._progress.loaded+=n-i._progress.loaded,this._progress.bitrate=this._bitrateTimer.getBitrate(r,this._progress.loaded,i.bitrateInterval),i._progress.loaded=i.loaded=n,i._progress.bitrate=i.bitrate=i._bitrateTimer.getBitrate(r,n,i.bitrateInterval),this._trigger("progress",e.Event("progress",{delegatedEvent:t}),i),this._trigger("progressall",e.Event("progressall",{delegatedEvent:t}),this._progress)}},_initProgressListener:function(t){var i=this,n=t.xhr?t.xhr():e.ajaxSettings.xhr();n.upload&&(e(n.upload).bind("progress",function(e){var n=e.originalEvent;e.lengthComputable=n.lengthComputable,e.loaded=n.loaded,e.total=n.total,i._onProgress(e,t)}),t.xhr=function(){return n})},_isInstanceOf:function(e,t){return Object.prototype.toString.call(t)==="[object "+e+"]"},_initXHRData:function(t){var i,n=this,r=t.files[0],o=t.multipart||!e.support.xhrFileUpload,s="array"===e.type(t.paramName)?t.paramName[0]:t.paramName;t.headers=e.extend({},t.headers),t.contentRange&&(t.headers["Content-Range"]=t.contentRange),o&&!t.blob&&this._isInstanceOf("File",r)||(t.headers["Content-Disposition"]='attachment; filename="'+encodeURI(r.name)+'"'),o?e.support.xhrFormDataFileUpload&&(t.postMessage?(i=this._getFormData(t),t.blob?i.push({name:s,value:t.blob}):e.each(t.files,function(n,r){i.push({name:"array"===e.type(t.paramName)&&t.paramName[n]||s,value:r})})):(n._isInstanceOf("FormData",t.formData)?i=t.formData:(i=new FormData,e.each(this._getFormData(t),function(e,t){i.append(t.name,t.value)})),t.blob?i.append(s,t.blob,r.name):e.each(t.files,function(r,o){(n._isInstanceOf("File",o)||n._isInstanceOf("Blob",o))&&i.append("array"===e.type(t.paramName)&&t.paramName[r]||s,o,o.uploadName||o.name)})),t.data=i):(t.contentType=r.type||"application/octet-stream",t.data=t.blob||r),t.blob=null},_initIframeSettings:function(t){var i=e("<a></a>").prop("href",t.url).prop("host");t.dataType="iframe "+(t.dataType||""),t.formData=this._getFormData(t),t.redirect&&i&&i!==location.host&&t.formData.push({name:t.redirectParamName||"redirect",value:t.redirect})},_initDataSettings:function(e){this._isXHRUpload(e)?(this._chunkedUpload(e,!0)||(e.data||this._initXHRData(e),this._initProgressListener(e)),e.postMessage&&(e.dataType="postmessage "+(e.dataType||""))):this._initIframeSettings(e)},_getParamName:function(t){var i=e(t.fileInput),n=t.paramName;return n?e.isArray(n)||(n=[n]):(n=[],i.each(function(){for(var t=e(this),i=t.prop("name")||"files[]",r=(t.prop("files")||[1]).length;r;)n.push(i),r-=1}),n.length||(n=[i.prop("name")||"files[]"])),n},_initFormSettings:function(t){t.form&&t.form.length||(t.form=e(t.fileInput.prop("form")),t.form.length||(t.form=e(this.options.fileInput.prop("form")))),t.paramName=this._getParamName(t),t.url||(t.url=t.form.prop("action")||location.href),t.type=(t.type||"string"===e.type(t.form.prop("method"))&&t.form.prop("method")||"").toUpperCase(),"POST"!==t.type&&"PUT"!==t.type&&"PATCH"!==t.type&&(t.type="POST"),t.formAcceptCharset||(t.formAcceptCharset=t.form.attr("accept-charset"))},_getAJAXSettings:function(t){var i=e.extend({},this.options,t);return this._initFormSettings(i),this._initDataSettings(i),i},_getDeferredState:function(e){return e.state?e.state():e.isResolved()?"resolved":e.isRejected()?"rejected":"pending"},_enhancePromise:function(e){return e.success=e.done,e.error=e.fail,e.complete=e.always,e},_getXHRPromise:function(t,i,n){var r=e.Deferred(),o=r.promise();return i=i||this.options.context||o,!0===t?r.resolveWith(i,n):!1===t&&r.rejectWith(i,n),o.abort=r.promise,this._enhancePromise(o)},_addConvenienceMethods:function(t,i){var n=this,r=function(t){return e.Deferred().resolveWith(n,t).promise()};i.process=function(t,o){return(t||o)&&(i._processQueue=this._processQueue=(this._processQueue||r([this])).pipe(function(){return i.errorThrown?e.Deferred().rejectWith(n,[i]).promise():r(arguments)}).pipe(t,o)),this._processQueue||r([this])},i.submit=function(){return"pending"!==this.state()&&(i.jqXHR=this.jqXHR=!1!==n._trigger("submit",e.Event("submit",{delegatedEvent:t}),this)&&n._onSend(t,this)),this.jqXHR||n._getXHRPromise()},i.abort=function(){return this.jqXHR?this.jqXHR.abort():(this.errorThrown="abort",n._trigger("fail",null,this),n._getXHRPromise(!1))},i.state=function(){return this.jqXHR?n._getDeferredState(this.jqXHR):this._processQueue?n._getDeferredState(this._processQueue):void 0},i.processing=function(){return!this.jqXHR&&this._processQueue&&"pending"===n._getDeferredState(this._processQueue)},i.progress=function(){return this._progress},i.response=function(){return this._response}},_getUploadedBytes:function(e){var t=e.getResponseHeader("Range"),i=t&&t.split("-"),n=i&&i.length>1&&parseInt(i[1],10);return n&&n+1},_chunkedUpload:function(t,i){t.uploadedBytes=t.uploadedBytes||0;var n,r,o=this,s=t.files[0],a=s.size,l=t.uploadedBytes,c=t.maxChunkSize||a,u=this._blobSlice,d=e.Deferred(),h=d.promise();return!(!(this._isXHRUpload(t)&&u&&(l||c<a))||t.data)&&(!!i||(l>=a?(s.error=t.i18n("uploadedBytes"),this._getXHRPromise(!1,t.context,[null,"error",s.error])):(r=function(){var i=e.extend({},t),h=i._progress.loaded;i.blob=u.call(s,l,l+c,s.type),i.chunkSize=i.blob.size,i.contentRange="bytes "+l+"-"+(l+i.chunkSize-1)+"/"+a,o._initXHRData(i),o._initProgressListener(i),n=(!1!==o._trigger("chunksend",null,i)&&e.ajax(i)||o._getXHRPromise(!1,i.context)).done(function(n,s,c){l=o._getUploadedBytes(c)||l+i.chunkSize,h+i.chunkSize-i._progress.loaded&&o._onProgress(e.Event("progress",{lengthComputable:!0,loaded:l-i.uploadedBytes,total:l-i.uploadedBytes}),i),t.uploadedBytes=i.uploadedBytes=l,i.result=n,i.textStatus=s,i.jqXHR=c,o._trigger("chunkdone",null,i),o._trigger("chunkalways",null,i),l<a?r():d.resolveWith(i.context,[n,s,c])}).fail(function(e,t,n){i.jqXHR=e,i.textStatus=t,i.errorThrown=n,o._trigger("chunkfail",null,i),o._trigger("chunkalways",null,i),d.rejectWith(i.context,[e,t,n])})},this._enhancePromise(h),h.abort=function(){return n.abort()},r(),h)))},_beforeSend:function(e,t){0===this._active&&(this._trigger("start"),this._bitrateTimer=new this._BitrateTimer,this._progress.loaded=this._progress.total=0,this._progress.bitrate=0),this._initResponseObject(t),this._initProgressObject(t),t._progress.loaded=t.loaded=t.uploadedBytes||0,t._progress.total=t.total=this._getTotal(t.files)||1,t._progress.bitrate=t.bitrate=0,this._active+=1,this._progress.loaded+=t.loaded,this._progress.total+=t.total},_onDone:function(t,i,n,r){var o=r._progress.total,s=r._response;r._progress.loaded<o&&this._onProgress(e.Event("progress",{lengthComputable:!0,loaded:o,total:o}),r),s.result=r.result=t,s.textStatus=r.textStatus=i,s.jqXHR=r.jqXHR=n,this._trigger("done",null,r)},_onFail:function(e,t,i,n){var r=n._response;n.recalculateProgress&&(this._progress.loaded-=n._progress.loaded,this._progress.total-=n._progress.total),r.jqXHR=n.jqXHR=e,r.textStatus=n.textStatus=t,r.errorThrown=n.errorThrown=i,this._trigger("fail",null,n)},_onAlways:function(e,t,i,n){this._trigger("always",null,n)},_onSend:function(t,i){i.submit||this._addConvenienceMethods(t,i);var n,r,o,s,a=this,l=a._getAJAXSettings(i),c=function(){return a._sending+=1,l._bitrateTimer=new a._BitrateTimer,n=n||((r||!1===a._trigger("send",e.Event("send",{delegatedEvent:t}),l))&&a._getXHRPromise(!1,l.context,r)||a._chunkedUpload(l)||e.ajax(l)).done(function(e,t,i){a._onDone(e,t,i,l)}).fail(function(e,t,i){a._onFail(e,t,i,l)}).always(function(e,t,i){if(a._onAlways(e,t,i,l),a._sending-=1,a._active-=1,l.limitConcurrentUploads&&l.limitConcurrentUploads>a._sending)for(var n=a._slots.shift();n;){if("pending"===a._getDeferredState(n)){n.resolve();break}n=a._slots.shift()}0===a._active&&a._trigger("stop")})};return this._beforeSend(t,l),this.options.sequentialUploads||this.options.limitConcurrentUploads&&this.options.limitConcurrentUploads<=this._sending?(this.options.limitConcurrentUploads>1?(o=e.Deferred(),this._slots.push(o),s=o.pipe(c)):(this._sequence=this._sequence.pipe(c,c),s=this._sequence),s.abort=function(){return r=[undefined,"abort","abort"],n?n.abort():(o&&o.rejectWith(l.context,r),c())},this._enhancePromise(s)):c()},_onAdd:function(t,i){var n,r,o,s,a=this,l=!0,c=e.extend({},this.options,i),u=i.files,d=u.length,h=c.limitMultiFileUploads,p=c.limitMultiFileUploadSize,g=c.limitMultiFileUploadSizeOverhead,f=0,m=this._getParamName(c),v=0;if(!d)return!1;if(p&&u[0].size===undefined&&(p=undefined),(c.singleFileUploads||h||p)&&this._isXHRUpload(c))if(c.singleFileUploads||p||!h)if(!c.singleFileUploads&&p)for(o=[],n=[],s=0;s<d;s+=1)f+=u[s].size+g,(s+1===d||f+u[s+1].size+g>p||h&&s+1-v>=h)&&(o.push(u.slice(v,s+1)),r=m.slice(v,s+1),r.length||(r=m),n.push(r),v=s+1,f=0);else n=m;else for(o=[],n=[],s=0;s<d;s+=h)o.push(u.slice(s,s+h)),r=m.slice(s,s+h),r.length||(r=m),n.push(r);else o=[u],n=[m];return i.originalFiles=u,e.each(o||u,function(r,s){var c=e.extend({},i);return c.files=o?s:[s],c.paramName=n[r],a._initResponseObject(c),a._initProgressObject(c),a._addConvenienceMethods(t,c),l=a._trigger("add",e.Event("add",{delegatedEvent:t}),c)}),l},_replaceFileInput:function(t){var i=t.fileInput,n=i.clone(!0);t.fileInputClone=n,e("<form></form>").append(n)[0].reset(),i.after(n).detach(),e.cleanData(i.unbind("remove")),this.options.fileInput=this.options.fileInput.map(function(e,t){return t===i[0]?n[0]:t}),i[0]===this.element[0]&&(this.element=n)},_handleFileTreeEntry:function(t,i){var n,r=this,o=e.Deferred(),s=function(e){e&&!e.entry&&(e.entry=t),o.resolve([e])},a=function(e){r._handleFileTreeEntries(e,i+t.name+"/").done(function(e){o.resolve(e)}).fail(s)},l=function(){n.readEntries(function(e){e.length?(c=c.concat(e),l()):a(c)},s)},c=[];return i=i||"",t.isFile?t._file?(t._file.relativePath=i,o.resolve(t._file)):t.file(function(e){e.relativePath=i,o.resolve(e)},s):t.isDirectory?(n=t.createReader(),l()):o.resolve([]),o.promise()},_handleFileTreeEntries:function(t,i){var n=this;return e.when.apply(e,e.map(t,function(e){return n._handleFileTreeEntry(e,i)})).pipe(function(){return Array.prototype.concat.apply([],arguments)})},_getDroppedFiles:function(t){t=t||{};var i=t.items;return i&&i.length&&(i[0].webkitGetAsEntry||i[0].getAsEntry)?this._handleFileTreeEntries(e.map(i,function(e){var t;return e.webkitGetAsEntry?(t=e.webkitGetAsEntry(),t&&(t._file=e.getAsFile()),t):e.getAsEntry()})):e.Deferred().resolve(e.makeArray(t.files)).promise()},_getSingleFileInputFiles:function(t){t=e(t);var i,n,r=t.prop("webkitEntries")||t.prop("entries");if(r&&r.length)return this._handleFileTreeEntries(r);if(i=e.makeArray(t.prop("files")),i.length)i[0].name===undefined&&i[0].fileName&&e.each(i,function(e,t){t.name=t.fileName,t.size=t.fileSize});else{if(!(n=t.prop("value")))return e.Deferred().resolve([]).promise();i=[{name:n.replace(/^.*\\/,"")}]}return e.Deferred().resolve(i).promise()},_getFileInputFiles:function(t){return t instanceof e&&1!==t.length?e.when.apply(e,e.map(t,this._getSingleFileInputFiles)).pipe(function(){return Array.prototype.concat.apply([],arguments)}):this._getSingleFileInputFiles(t)},_onChange:function(t){var i=this,n={fileInput:e(t.target),form:e(t.target.form)};this._getFileInputFiles(n.fileInput).always(function(r){n.files=r,i.options.replaceFileInput&&i._replaceFileInput(n),!1!==i._trigger("change",e.Event("change",{delegatedEvent:t}),n)&&i._onAdd(t,n)})},_onPaste:function(t){var i=t.originalEvent&&t.originalEvent.clipboardData&&t.originalEvent.clipboardData.items,n={files:[]};i&&i.length&&(e.each(i,function(e,t){var i=t.getAsFile&&t.getAsFile();i&&n.files.push(i)}),!1!==this._trigger("paste",e.Event("paste",{delegatedEvent:t}),n)&&this._onAdd(t,n))},_onDrop:function(t){t.dataTransfer=t.originalEvent&&t.originalEvent.dataTransfer;var i=this,n=t.dataTransfer,r={};n&&n.files&&n.files.length&&(t.preventDefault(),this._getDroppedFiles(n).always(function(n){r.files=n,!1!==i._trigger("drop",e.Event("drop",{delegatedEvent:t}),r)&&i._onAdd(t,r)}))},_onDragOver:t("dragover"),_onDragEnter:t("dragenter"),_onDragLeave:t("dragleave"),_initEventHandlers:function(){this._isXHRUpload(this.options)&&(this._on(this.options.dropZone,{dragover:this._onDragOver,drop:this._onDrop,dragenter:this._onDragEnter,dragleave:this._onDragLeave}),this._on(this.options.pasteZone,{paste:this._onPaste})),e.support.fileInput&&this._on(this.options.fileInput,{change:this._onChange})},_destroyEventHandlers:function(){this._off(this.options.dropZone,"dragenter dragleave dragover drop"),this._off(this.options.pasteZone,"paste"),this._off(this.options.fileInput,"change")},_setOption:function(t,i){var n=-1!==e.inArray(t,this._specialOptions);n&&this._destroyEventHandlers(),this._super(t,i),n&&(this._initSpecialOptions(),this._initEventHandlers())},_initSpecialOptions:function(){var t=this.options;t.fileInput===undefined?t.fileInput=this.element.is('input[type="file"]')?this.element:this.element.find('input[type="file"]'):t.fileInput instanceof e||(t.fileInput=e(t.fileInput)),t.dropZone instanceof e||(t.dropZone=e(t.dropZone)),t.pasteZone instanceof e||(t.pasteZone=e(t.pasteZone))},_getRegExp:function(e){var t=e.split("/"),i=t.pop();return t.shift(),new RegExp(t.join("/"),i)},_isRegExpOption:function(t,i){return"url"!==t&&"string"===e.type(i)&&/^\/.*\/[igm]{0,3}$/.test(i)},_initDataAttributes:function(){var t=this,i=this.options,n=this.element.data();e.each(this.element[0].attributes,function(e,r){var o,s=r.name.toLowerCase();/^data-/.test(s)&&(s=s.slice(5).replace(/-[a-z]/g,function(e){return e.charAt(1).toUpperCase()}),o=n[s],t._isRegExpOption(s,o)&&(o=t._getRegExp(o)),i[s]=o)})},_create:function(){this._initDataAttributes(),this._initSpecialOptions(),this._slots=[],this._sequence=this._getXHRPromise(!0),this._sending=this._active=0,this._initProgressObject(this),this._initEventHandlers()},active:function(){return this._active},progress:function(){return this._progress},add:function(t){var i=this;t&&!this.options.disabled&&(t.fileInput&&!t.files?this._getFileInputFiles(t.fileInput).always(function(e){t.files=e,i._onAdd(null,t)}):(t.files=e.makeArray(t.files),this._onAdd(null,t)))},send:function(t){if(t&&!this.options.disabled){if(t.fileInput&&!t.files){var i,n,r=this,o=e.Deferred(),s=o.promise();return s.abort=function(){return n=!0,i?i.abort():(o.reject(null,"abort","abort"),s)},this._getFileInputFiles(t.fileInput).always(function(e){if(!n){if(!e.length)return void o.reject();t.files=e,i=r._onSend(null,t),i.then(function(e,t,i){o.resolve(e,t,i)},function(e,t,i){o.reject(e,t,i)})}}),this._enhancePromise(s)}if(t.files=e.makeArray(t.files),t.files.length)return this._onSend(null,t)}return this._getXHRPromise(!1,t&&t.context)}})}),/*
 * jQuery Iframe Transport Plugin 1.8.3
 * https://github.com/blueimp/jQuery-File-Upload
 *
 * Copyright 2011, Sebastian Tschan
 * https://blueimp.net
 *
 * Licensed under the MIT license:
 * http://www.opensource.org/licenses/MIT
 */
function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery"],e):e("object"==typeof exports?require("jquery"):window.jQuery)}(function(e){"use strict";var t=0;e.ajaxTransport("iframe",function(i){if(i.async){var n,r,o,s=i.initialIframeSrc||"javascript:false;";return{send:function(a,l){n=e('<form style="display:none;"></form>'),n.attr("accept-charset",i.formAcceptCharset),o=/\?/.test(i.url)?"&":"?","DELETE"===i.type?(i.url=i.url+o+"_method=DELETE",i.type="POST"):"PUT"===i.type?(i.url=i.url+o+"_method=PUT",i.type="POST"):"PATCH"===i.type&&(i.url=i.url+o+"_method=PATCH",i.type="POST"),t+=1,r=e('<iframe src="'+s+'" name="iframe-transport-'+t+'"></iframe>').bind("load",function(){var t,o=e.isArray(i.paramName)?i.paramName:[i.paramName];r.unbind("load").bind("load",function(){var t;try{if(t=r.contents(),!t.length||!t[0].firstChild)throw new Error}catch(e){t=undefined}l(200,"success",{iframe:t}),e('<iframe src="'+s+'"></iframe>').appendTo(n),window.setTimeout(function(){n.remove()},0)}),n.prop("target",r.prop("name")).prop("action",i.url).prop("method",i.type),i.formData&&e.each(i.formData,function(t,i){e('<input type="hidden"/>').prop("name",i.name).val(i.value).appendTo(n)}),i.fileInput&&i.fileInput.length&&"POST"===i.type&&(t=i.fileInput.clone(),i.fileInput.after(function(e){return t[e]}),i.paramName&&i.fileInput.each(function(t){e(this).prop("name",o[t]||i.paramName)}),n.append(i.fileInput).prop("enctype","multipart/form-data").prop("encoding","multipart/form-data"),i.fileInput.removeAttr("form")),n.submit(),t&&t.length&&i.fileInput.each(function(i,n){var r=e(t[i]);e(n).prop("name",r.prop("name")).attr("form",r.attr("form")),r.replaceWith(n)})}),n.append(r).appendTo(document.body)},abort:function(){r&&r.unbind("load").prop("src",s),n&&n.remove()}}}}),e.ajaxSetup({converters:{"iframe text":function(t){return t&&e(t[0].body).text()},"iframe json":function(t){return t&&e.parseJSON(e(t[0].body).text())},"iframe html":function(t){return t&&e(t[0].body).html()},"iframe xml":function(t){var i=t&&t[0];return i&&e.isXMLDoc(i)?i:e.parseXML(i.XMLDocument&&i.XMLDocument.xml||e(i.body).html())},"iframe script":function(t){return t&&e.globalEval(e(t[0].body).text())}}})}),myinterviewtrainer.createNS("profile"),myinterviewtrainer.profile.init=function(){$("#follow-btn").click(myinterviewtrainer.profile.toggle_follow),$(".image-upload img").click(function(){$("#fileupload").trigger("click")}),$("#fileupload").fileupload({dataType:"json",done:function(e,t){$("#user-avatar").attr("src",t.result.image_url)}})},myinterviewtrainer.profile.toggle_follow=function(){var e=$(this);$.loader({className:"blue-with-image-2",content:""}),$.ajax({url:$(this).data("following")?"/unfollow-user":"/follow-user",type:"post",data:{user_id:$(this).data("user-id")},success:function(){$.loader("close"),e.data("following",!e.data("following")),e.toggleClass("btn-danger").toggleClass("btn-success"),e.html(e.data("following")?"Unfollow":"Follow"),e.data("following")?$("#follower_count").html(Number($("#follower_count").html())+1):$("#follower_count").html(Number($("#follower_count").html())-1)}})},/* ========================================================================
 * bootstrap-switch - v3.3.2
 * http://www.bootstrap-switch.org
 * ========================================================================
 * Copyright 2012-2013 Mattia Larentis
 *
 * ========================================================================
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * ========================================================================
 */
function(){var e=[].slice;!function(t,i){"use strict";var n;n=function(){function e(e,i){null==i&&(i={}),this.$element=t(e),this.options=t.extend({},t.fn.bootstrapSwitch.defaults,{state:this.$element.is(":checked"),size:this.$element.data("size"),animate:this.$element.data("animate"),disabled:this.$element.is(":disabled"),readonly:this.$element.is("[readonly]"),indeterminate:this.$element.data("indeterminate"),inverse:this.$element.data("inverse"),radioAllOff:this.$element.data("radio-all-off"),onColor:this.$element.data("on-color"),offColor:this.$element.data("off-color"),onText:this.$element.data("on-text"),offText:this.$element.data("off-text"),labelText:this.$element.data("label-text"),handleWidth:this.$element.data("handle-width"),labelWidth:this.$element.data("label-width"),baseClass:this.$element.data("base-class"),wrapperClass:this.$element.data("wrapper-class")},i),this.prevOptions={},this.$wrapper=t("<div>",{"class":function(e){return function(){var t;return t=[""+e.options.baseClass].concat(e._getClasses(e.options.wrapperClass)),t.push(e.options.state?e.options.baseClass+"-on":e.options.baseClass+"-off"),null!=e.options.size&&t.push(e.options.baseClass+"-"+e.options.size),e.options.disabled&&t.push(e.options.baseClass+"-disabled"),e.options.readonly&&t.push(e.options.baseClass+"-readonly"),e.options.indeterminate&&t.push(e.options.baseClass+"-indeterminate"),e.options.inverse&&t.push(e.options.baseClass+"-inverse"),e.$element.attr("id")&&t.push(e.options.baseClass+"-id-"+e.$element.attr("id")),t.join(" ")}}(this)()}),this.$container=t("<div>",{"class":this.options.baseClass+"-container"}),this.$on=t("<span>",{html:this.options.onText,"class":this.options.baseClass+"-handle-on "+this.options.baseClass+"-"+this.options.onColor}),this.$off=t("<span>",{html:this.options.offText,"class":this.options.baseClass+"-handle-off "+this.options.baseClass+"-"+this.options.offColor}),this.$label=t("<span>",{html:this.options.labelText,"class":this.options.baseClass+"-label"}),this.$element.on("init.bootstrapSwitch",function(t){return function(){return t.options.onInit.apply(e,arguments)}}(this)),this.$element.on("switchChange.bootstrapSwitch",function(i){return function(){if(!1===i.options.onSwitchChange.apply(e,arguments))return i.$element.is(":radio")?t("[name='"+i.$element.attr("name")+"']").trigger("previousState.bootstrapSwitch",!0):i.$element.trigger("previousState.bootstrapSwitch",!0)}}(this)),this.$container=this.$element.wrap(this.$container).parent(),this.$wrapper=this.$container.wrap(this.$wrapper).parent(),this.$element.before(this.options.inverse?this.$off:this.$on).before(this.$label).before(this.options.inverse?this.$on:this.$off),this.options.indeterminate&&this.$element.prop("indeterminate",!0),this._init(),this._elementHandlers(),this._handleHandlers(),this._labelHandlers(),this._formHandler(),this._externalLabelHandler(),this.$element.trigger("init.bootstrapSwitch",this.options.state)}return e.prototype._constructor=e,e.prototype.setPrevOptions=function(){return this.prevOptions=t.extend(!0,{},this.options)},e.prototype.state=function(e,i){return void 0===e?this.options.state:this.options.disabled||this.options.readonly?this.$element:this.options.state&&!this.options.radioAllOff&&this.$element.is(":radio")?this.$element:(this.$element.is(":radio")?t("[name='"+this.$element.attr("name")+"']").trigger("setPreviousOptions.bootstrapSwitch"):this.$element.trigger("setPreviousOptions.bootstrapSwitch"),this.options.indeterminate&&this.indeterminate(!1),e=!!e,this.$element.prop("checked",e).trigger("change.bootstrapSwitch",i),this.$element)},e.prototype.toggleState=function(e){return this.options.disabled||this.options.readonly?this.$element:this.options.indeterminate?(this.indeterminate(!1),this.state(!0)):this.$element.prop("checked",!this.options.state).trigger("change.bootstrapSwitch",e)},e.prototype.size=function(e){return void 0===e?this.options.size:(null!=this.options.size&&this.$wrapper.removeClass(this.options.baseClass+"-"+this.options.size),e&&this.$wrapper.addClass(this.options.baseClass+"-"+e),this._width(),this._containerPosition(),this.options.size=e,this.$element)},e.prototype.animate=function(e){return void 0===e?this.options.animate:(e=!!e,e===this.options.animate?this.$element:this.toggleAnimate())},e.prototype.toggleAnimate=function(){return this.options.animate=!this.options.animate,this.$wrapper.toggleClass(this.options.baseClass+"-animate"),this.$element},e.prototype.disabled=function(e){return void 0===e?this.options.disabled:(e=!!e,e===this.options.disabled?this.$element:this.toggleDisabled())},e.prototype.toggleDisabled=function(){return this.options.disabled=!this.options.disabled,this.$element.prop("disabled",this.options.disabled),this.$wrapper.toggleClass(this.options.baseClass+"-disabled"),this.$element},e.prototype.readonly=function(e){return void 0===e?this.options.readonly:(e=!!e,e===this.options.readonly?this.$element:this.toggleReadonly())},e.prototype.toggleReadonly=function(){return this.options.readonly=!this.options.readonly,this.$element.prop("readonly",this.options.readonly),this.$wrapper.toggleClass(this.options.baseClass+"-readonly"),this.$element},e.prototype.indeterminate=function(e){return void 0===e?this.options.indeterminate:(e=!!e,e===this.options.indeterminate?this.$element:this.toggleIndeterminate())},e.prototype.toggleIndeterminate=function(){return this.options.indeterminate=!this.options.indeterminate,this.$element.prop("indeterminate",this.options.indeterminate),this.$wrapper.toggleClass(this.options.baseClass+"-indeterminate"),this._containerPosition(),this.$element},e.prototype.inverse=function(e){return void 0===e?this.options.inverse:(e=!!e,e===this.options.inverse?this.$element:this.toggleInverse())},e.prototype.toggleInverse=function(){var e,t;return this.$wrapper.toggleClass(this.options.baseClass+"-inverse"),t=this.$on.clone(!0),e=this.$off.clone(!0),this.$on.replaceWith(e),this.$off.replaceWith(t),this.$on=e,this.$off=t,this.options.inverse=!this.options.inverse,this.$element},e.prototype.onColor=function(e){var t;return t=this.options.onColor,void 0===e?t:(null!=t&&this.$on.removeClass(this.options.baseClass+"-"+t),this.$on.addClass(this.options.baseClass+"-"+e),this.options.onColor=e,this.$element)},e.prototype.offColor=function(e){var t;return t=this.options.offColor,void 0===e?t:(null!=t&&this.$off.removeClass(this.options.baseClass+"-"+t),this.$off.addClass(this.options.baseClass+"-"+e),this.options.offColor=e,this.$element)},e.prototype.onText=function(e){return void 0===e?this.options.onText:(this.$on.html(e),this._width(),this._containerPosition(),this.options.onText=e,this.$element)},e.prototype.offText=function(e){return void 0===e?this.options.offText:(this.$off.html(e),this._width(),this._containerPosition(),this.options.offText=e,this.$element)},e.prototype.labelText=function(e){return void 0===e?this.options.labelText:(this.$label.html(e),this._width(),this.options.labelText=e,this.$element)},e.prototype.handleWidth=function(e){return void 0===e?this.options.handleWidth:(this.options.handleWidth=e,this._width(),this._containerPosition(),this.$element)},e.prototype.labelWidth=function(e){return void 0===e?this.options.labelWidth:(this.options.labelWidth=e,this._width(),this._containerPosition(),this.$element)},e.prototype.baseClass=function(){return this.options.baseClass},e.prototype.wrapperClass=function(e){return void 0===e?this.options.wrapperClass:(e||(e=t.fn.bootstrapSwitch.defaults.wrapperClass),this.$wrapper.removeClass(this._getClasses(this.options.wrapperClass).join(" ")),this.$wrapper.addClass(this._getClasses(e).join(" ")),this.options.wrapperClass=e,this.$element)},e.prototype.radioAllOff=function(e){return void 0===e?this.options.radioAllOff:(e=!!e)===this.options.radioAllOff?this.$element:(this.options.radioAllOff=e,this.$element)},e.prototype.onInit=function(e){return void 0===e?this.options.onInit:(e||(e=t.fn.bootstrapSwitch.defaults.onInit),this.options.onInit=e,this.$element)},e.prototype.onSwitchChange=function(e){return void 0===e?this.options.onSwitchChange:(e||(e=t.fn.bootstrapSwitch.defaults.onSwitchChange),this.options.onSwitchChange=e,this.$element)},e.prototype.destroy=function(){var e;return e=this.$element.closest("form"),e.length&&e.off("reset.bootstrapSwitch").removeData("bootstrap-switch"),this.$container.children().not(this.$element).remove(),this.$element.unwrap().unwrap().off(".bootstrapSwitch").removeData("bootstrap-switch"),this.$element},e.prototype._width=function(){var e,t;return e=this.$on.add(this.$off),e.add(this.$label).css("width",""),t="auto"===this.options.handleWidth?Math.max(this.$on.width(),this.$off.width()):this.options.handleWidth,e.width(t),this.$label.width(function(e){return function(i,n){return"auto"!==e.options.labelWidth?e.options.labelWidth:n<t?t:n}}(this)),this._handleWidth=this.$on.outerWidth(),this._labelWidth=this.$label.outerWidth(),this.$container.width(2*this._handleWidth+this._labelWidth),this.$wrapper.width(this._handleWidth+this._labelWidth)},e.prototype._containerPosition=function(e,t){if(null==e&&(e=this.options.state),this.$container.css("margin-left",function(t){return function(){var i;return i=[0,"-"+t._handleWidth+"px"],t.options.indeterminate?"-"+t._handleWidth/2+"px":e?t.options.inverse?i[1]:i[0]:t.options.inverse?i[0]:i[1]}}(this)),t)return setTimeout(function(){return t()},50)},e.prototype._init=function(){var e,t;return e=function(e){return function(){return e.setPrevOptions(),e._width(),e._containerPosition(null,function(){if(e.options.animate)return e.$wrapper.addClass(e.options.baseClass+"-animate")})}}(this),this.$wrapper.is(":visible")?e():t=i.setInterval(function(n){return function(){if(n.$wrapper.is(":visible"))return e(),i.clearInterval(t)}}(this),50)},e.prototype._elementHandlers=function(){return this.$element.on({"setPreviousOptions.bootstrapSwitch":function(e){return function(){return e.setPrevOptions()}}(this),"previousState.bootstrapSwitch":function(e){return function(){return e.options=e.prevOptions,e.options.indeterminate&&e.$wrapper.addClass(e.options.baseClass+"-indeterminate"),e.$element.prop("checked",e.options.state).trigger("change.bootstrapSwitch",!0)}}(this),"change.bootstrapSwitch":function(e){return function(i,n){var r;if(i.preventDefault(),i.stopImmediatePropagation(),r=e.$element.is(":checked"),e._containerPosition(r),r!==e.options.state)return e.options.state=r,e.$wrapper.toggleClass(e.options.baseClass+"-off").toggleClass(e.options.baseClass+"-on"),n?void 0:(e.$element.is(":radio")&&t("[name='"+e.$element.attr("name")+"']").not(e.$element).prop("checked",!1).trigger("change.bootstrapSwitch",!0),e.$element.trigger("switchChange.bootstrapSwitch",[r]))}}(this),"focus.bootstrapSwitch":function(e){return function(t){return t.preventDefault(),e.$wrapper.addClass(e.options.baseClass+"-focused")}}(this),"blur.bootstrapSwitch":function(e){return function(t){return t.preventDefault(),e.$wrapper.removeClass(e.options.baseClass+"-focused")}}(this),"keydown.bootstrapSwitch":function(e){return function(t){if(t.which&&!e.options.disabled&&!e.options.readonly)switch(t.which){case 37:return t.preventDefault(),t.stopImmediatePropagation(),e.state(!1);case 39:return t.preventDefault(),t.stopImmediatePropagation(),e.state(!0)}}}(this)})},e.prototype._handleHandlers=function(){return this.$on.on("click.bootstrapSwitch",function(e){return function(t){return t.preventDefault(),t.stopPropagation(),e.state(!1),e.$element.trigger("focus.bootstrapSwitch")}}(this)),this.$off.on("click.bootstrapSwitch",function(e){return function(t){return t.preventDefault(),t.stopPropagation(),e.state(!0),e.$element.trigger("focus.bootstrapSwitch")}}(this))},e.prototype._labelHandlers=function(){return this.$label.on({click:function(e){return e.stopPropagation()},"mousedown.bootstrapSwitch touchstart.bootstrapSwitch":function(e){return function(t){if(!(e._dragStart||e.options.disabled||e.options.readonly))return t.preventDefault(),t.stopPropagation(),e._dragStart=(t.pageX||t.originalEvent.touches[0].pageX)-parseInt(e.$container.css("margin-left"),10),e.options.animate&&e.$wrapper.removeClass(e.options.baseClass+"-animate"),e.$element.trigger("focus.bootstrapSwitch")}}(this),"mousemove.bootstrapSwitch touchmove.bootstrapSwitch":function(e){return function(t){var i;if(null!=e._dragStart&&(t.preventDefault(),!((i=(t.pageX||t.originalEvent.touches[0].pageX)-e._dragStart)<-e._handleWidth||i>0)))return e._dragEnd=i,e.$container.css("margin-left",e._dragEnd+"px")}}(this),"mouseup.bootstrapSwitch touchend.bootstrapSwitch":function(e){return function(t){var i;if(e._dragStart)return t.preventDefault(),e.options.animate&&e.$wrapper.addClass(e.options.baseClass+"-animate"),e._dragEnd?(i=e._dragEnd>-e._handleWidth/2,e._dragEnd=!1,e.state(e.options.inverse?!i:i)):e.state(!e.options.state),e._dragStart=!1}}(this),"mouseleave.bootstrapSwitch":function(e){return function(){return e.$label.trigger("mouseup.bootstrapSwitch")}}(this)})},e.prototype._externalLabelHandler=function(){var e;return e=this.$element.closest("label"),e.on("click",function(t){return function(i){if(i.preventDefault(),i.stopImmediatePropagation(),i.target===e[0])return t.toggleState()}}(this))},e.prototype._formHandler=function(){var e;if(e=this.$element.closest("form"),!e.data("bootstrap-switch"))return e.on("reset.bootstrapSwitch",function(){return i.setTimeout(function(){return e.find("input").filter(function(){return t(this).data("bootstrap-switch")}).each(function(){return t(this).bootstrapSwitch("state",this.checked)})},1)}).data("bootstrap-switch",!0)},e.prototype._getClasses=function(e){var i,n,r,o;if(!t.isArray(e))return[this.options.baseClass+"-"+e];for(n=[],r=0,o=e.length;r<o;r++)i=e[r],n.push(this.options.baseClass+"-"+i);return n},e}(),t.fn.bootstrapSwitch=function(){var i,r,o;return r=arguments[0],i=2<=arguments.length?e.call(arguments,1):[],o=this,this.each(function(){var e,s;if(e=t(this),s=e.data("bootstrap-switch"),s||e.data("bootstrap-switch",s=new n(this,r)),"string"==typeof r)return o=s[r].apply(s,i)}),o},t.fn.bootstrapSwitch.Constructor=n,t.fn.bootstrapSwitch.defaults={state:!0,size:null,animate:!0,disabled:!1,readonly:!1,indeterminate:!1,inverse:!1,radioAllOff:!1,onColor:"primary",offColor:"default",onText:"ON",offText:"OFF",labelText:"&nbsp;",handleWidth:"auto",labelWidth:"auto",baseClass:"bootstrap-switch",wrapperClass:"wrapper",onInit:function(){},onSwitchChange:function(){}}}(window.jQuery,window)}.call(this),myinterviewtrainer.createNS("settings"),myinterviewtrainer.settings.init=function(){$("[name='fb_status']").bootstrapSwitch(),$("[name='university_sharing']").bootstrapSwitch(),$("[name='enable_prep_tracker']").bootstrapSwitch(),$("[name='public_sharing']").bootstrapSwitch();var e=$("#orgname");ib_select2(e,"/get-companies","Select Company");var t=$("#prev_intern_company");ib_select2(t,"/get-companies","Select Company");var i=$("#university");ib_select2(i,"/get-universities","Select University/College"),do_not_auto_upload||$("#resume").fileupload({dataType:"json",done:function(e,t){$("#progress").fadeOut(function(){$("#progress .progress-bar").css("width","0"),$(".upload_success").show().fadeIn(),t.result.is_pdf||$(".pdf_warning").show()})},progressall:function(e,t){var i=parseInt(t.loaded/t.total*100,10);$("#progress").show(),$("#progress .progress-bar").css("width",i+"%")}})},function(e,t){"use strict";function i(){return t}"function"==typeof define&&define.amd?define("tinysort",i):e.tinysort=t}(this,function(){"use strict";function e(e,o){function c(){0===arguments.length?y({}):n(arguments,function(e){y(i(e)?{selector:e}:e)}),f=D.length}function y(e){var t=!!e.selector,i=t&&":"===e.selector[0],n=r(e||{},v);D.push(r({hasSelector:t,hasAttr:!(n.attr===l||""===n.attr),hasData:n.data!==l,hasFilter:i,sortReturnNumber:"asc"===n.order?1:-1},n))}function w(){n(e,function(e,t){S?S!==e.parentNode&&(T=!1):S=e.parentNode;var i=D[0],n=i.hasFilter,r=i.selector,o=!r||n&&e.matchesSelector(r)||r&&e.querySelector(r),s=o?F:k,a={elm:e,pos:t,posn:s.length};$.push(a),s.push(a)}),x=F.slice(0)}function C(){F.sort(b)}function b(e,r){var o=0;for(0!==m&&(m=0);0===o&&f>m;){var l=D[m],c=l.ignoreDashes?p:h;if(n(g,function(e){var t=e.prepare;t&&t(l)}),l.sortFunction)o=l.sortFunction(e,r);else if("rand"==l.order)o=Math.random()<.5?1:-1;else{var u=a,v=t(e,l),y=t(r,l),w=""===v||v===s,C=""===y||y===s;if(v===y)o=0;else if(l.emptyEnd&&(w||C))o=w&&C?0:w?1:-1;else{if(!l.forceStrings){var b=i(v)?v&&v.match(c):a,A=i(y)?y&&y.match(c):a;if(b&&A){var x=v.substr(0,v.length-b[0].length),S=y.substr(0,y.length-A[0].length);x==S&&(u=!a,v=d(b[0]),y=d(A[0]))}}o=v===s||y===s?0:y>v?-1:v>y?1:0}}n(g,function(e){var t=e.sort;t&&(o=t(l,u,v,y,o))}),0===(o*=l.sortReturnNumber)&&m++}return 0===o&&(o=e.pos>r.pos?1:-1),o}function A(){var e=F.length===$.length;T&&e?M?F.forEach(function(e,t){e.elm.style.order=t}):(F.forEach(function(e){E.appendChild(e.elm)}),S.appendChild(E)):(F.forEach(function(e){var t=e.elm,i=u.createElement("div");e.ghost=i,t.parentNode.insertBefore(i,t)}),F.forEach(function(e,t){var i=x[t].ghost;i.parentNode.insertBefore(e.elm,i),i.parentNode.removeChild(i)}))}i(e)&&(e=u.querySelectorAll(e)),0===e.length&&console.warn("No elements to sort");var x,S,E=u.createDocumentFragment(),$=[],F=[],k=[],D=[],T=!0,M=e.length&&(o===s||!1!==o.useFlex)&&-1!==getComputedStyle(e[0].parentNode,null).display.indexOf("flex");return c.apply(l,Array.prototype.slice.call(arguments,1)),w(),C(),A(),F.map(function(e){return e.elm})}function t(e,t){var n,r=e.elm;return t.selector&&(t.hasFilter?r.matchesSelector(t.selector)||(r=l):r=r.querySelector(t.selector)),t.hasAttr?n=r.getAttribute(t.attr):t.useVal?n=r.value||r.getAttribute("value"):t.hasData?n=r.getAttribute("data-"+t.data):r&&(n=r.textContent),i(n)&&(t.cases||(n=n.toLowerCase()),n=n.replace(/\s+/g," ")),n}function i(e){return"string"==typeof e}function n(e,t){for(var i,n=e.length,r=n;r--;)i=n-r-1,t(e[i],i)}function r(e,t,i){for(var n in t)(i||e[n]===s)&&(e[n]=t[n]);return e}function o(e,t,i){g.push({prepare:e,sort:t,sortBy:i})}var s,a=!1,l=null,c=window,u=c.document,d=parseFloat,h=/(-?\d+\.?\d*)\s*$/g,p=/(\d+\.?\d*)\s*$/g,g=[],f=0,m=0,v={selector:l,order:"asc",attr:l,data:l,useVal:a,place:"start",returns:a,cases:a,forceStrings:a,ignoreDashes:a,sortFunction:l,useFlex:a,emptyEnd:a};return c.Element&&function(e){e.matchesSelector=e.matchesSelector||e.mozMatchesSelector||e.msMatchesSelector||e.oMatchesSelector||e.webkitMatchesSelector||function(e){for(var t=this,i=(t.parentNode||t.document).querySelectorAll(e),n=-1;i[++n]&&i[n]!=t;);return!!i[n]}}(Element.prototype),r(o,{loop:n}),r(e,{plugin:o,defaults:v})}()),function(e){function t(t){var i=t.data("bootstrap-sortable-context");return i===undefined&&(i={bsSort:[],lastSort:undefined},t.find('thead th[data-defaultsort!="disabled"]').each(function(){var t=e(this),n=t.attr("data-sortkey");i.bsSort[n]=t.attr("data-defaultsort"),i.bsSort[n]!==undefined&&(i.lastSort=n)}),t.data("bootstrap-sortable-context",i)),i}function i(e,t){tinysort(e,t)}function n(i,s){var a=parseFloat(i.attr("data-sortcolumn")),l=t(s),c=l.bsSort;if(i.attr("colspan")){var u=parseFloat(i.data("mainsort"))||0,d=parseFloat(i.data("sortkey").split("-").pop());if(s.find("thead tr").length-1>d)return void n(s.find('[data-sortkey="'+(a+u)+"-"+(d+1)+'"]'),s);a+=u}var h=i.attr("data-defaultsign")||r;if(s.find("th").each(function(){e(this).removeClass("up").removeClass("down").addClass("nosort")}),e.browser.mozilla){var p=s.find("div.mozilla");p!==undefined&&(p.find(".sign").remove(),p.parent().html(p.html())),i.wrapInner('<div class="mozilla"></div>'),i.children().eq(0).append('<span class="sign '+h+'"></span>')}else s.find("span.sign").remove(),i.append('<span class="sign '+h+'"></span>');var g=i.attr("data-sortkey"),f="desc"!==i.attr("data-firstsort")?"desc":"asc";l.lastSort=g,c[g]="asc"===(c[g]||f)?"desc":"asc","desc"===c[g]?(i.find("span.sign").addClass("up"),i.addClass("up").removeClass("down nosort")):i.addClass("down").removeClass("up nosort");var m=s.children("tbody").children("tr");0!=m.length&&o(m,{selector:"td:nth-child("+(a+1)+")",order:c[g],data:"value"}),s.find("td.sorted, th.sorted").removeClass("sorted"),m.find("td:eq("+a+")").addClass("sorted"),i.addClass("sorted")}var r,o,s=e(document);if(e.bootstrapSortable=function(s,a,l){var c="undefined"!=typeof moment;r=a||"arrow","default"==l&&(l=i),o=l||o||i,e("table.sortable").each(function(){var i=e(this);s=!0===s,i.find("span.sign").remove(),i.find("thead [colspan]").each(function(){for(var t=parseFloat(e(this).attr("colspan")),i=1;i<t;i++)e(this).after('<th class="colspan-compensate">')}),i.find("thead [rowspan]").each(function(){for(var t=e(this),i=parseFloat(t.attr("rowspan")),n=1;n<i;n++){var r=t.parent("tr"),o=r.next("tr"),s=r.children().index(t);o.children().eq(s).before('<th class="rowspan-compensate">')}}),i.find("thead tr").each(function(t){e(this).find("th").each(function(i){var n=e(this);n.addClass("nosort").removeClass("up down"),n.attr("data-sortcolumn",i),n.attr("data-sortkey",i+"-"+t)})}),i.find("thead .rowspan-compensate, .colspan-compensate").remove(),i.find("td").each(function(){var t=e(this);t.attr("data-dateformat")!==undefined&&c?t.attr("data-value",moment(t.text(),t.attr("data-dateformat")).format("YYYY/MM/DD/HH/mm/ss")):t.attr("data-value")===undefined&&t.attr("data-value",t.text())});var r=t(i),o=r.bsSort;i.find('thead th[data-defaultsort!="disabled"]').each(function(){var t=e(this),i=t.closest("table.sortable");t.data("sortTable",i);var a=t.attr("data-sortkey"),l=s?r.lastSort:-1;o[a]=s?o[a]:t.attr("data-defaultsort"),o[a]!==undefined&&s===(a===l)&&(o[a]="asc"===o[a]?"desc":"asc",n(t,i))}),i.trigger("sorted")})},s.on("click",'table.sortable thead th[data-defaultsort!="disabled"]',function(){var t=e(this),i=t.data("sortTable")||t.closest("table.sortable");i.trigger("before-sort"),n(t,i),i.trigger("sorted")}),!e.browser){e.browser={chrome:!1,mozilla:!1,opera:!1,msie:!1,safari:!1};var a=navigator.userAgent;e.each(e.browser,function(t){e.browser[t]=!!new RegExp(t,"i").test(a),e.browser.mozilla&&"mozilla"===t&&(e.browser.mozilla=!!new RegExp("firefox","i").test(a)),e.browser.chrome&&"safari"===t&&(e.browser.safari=!1)})}e(e.bootstrapSortable)}(jQuery),
//! moment.js
//! version : 2.3.1
//! authors : Tim Wood, Iskren Chernev, Moment.js contributors
//! license : MIT
//! momentjs.com
function(e){function t(e,t){return function(i){return l(e.call(this,i),t)}}function i(e,t){return function(i){return this.lang().ordinal(e.call(this,i),t)}}function n(){}function r(e){C(e),s(this,e)}function o(e){var t=g(e),i=t.year||0,n=t.month||0,r=t.week||0,o=t.day||0,s=t.hour||0,a=t.minute||0,l=t.second||0,c=t.millisecond||0;this._input=e,this._milliseconds=+c+1e3*l+6e4*a+36e5*s,this._days=+o+7*r,this._months=+n+12*i,this._data={},this._bubble()}function s(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i]);return t.hasOwnProperty("toString")&&(e.toString=t.toString),t.hasOwnProperty("valueOf")&&(e.valueOf=t.valueOf),e}function a(e){return 0>e?Math.ceil(e):Math.floor(e)}function l(e,t){for(var i=e+"";i.length<t;)i="0"+i;return i}function c(e,t,i,n){var r,o,s=t._milliseconds,a=t._days,l=t._months;s&&e._d.setTime(+e._d+s*i),(a||l)&&(r=e.minute(),o=e.hour()),a&&e.date(e.date()+a*i),l&&e.month(e.month()+l*i),s&&!n&&te.updateOffset(e),(a||l)&&(e.minute(r),e.hour(o))}function u(e){return"[object Array]"===Object.prototype.toString.call(e)}function d(e){return"[object Date]"===Object.prototype.toString.call(e)}function h(e,t,i){var n,r=Math.min(e.length,t.length),o=Math.abs(e.length-t.length),s=0;for(n=0;r>n;n++)(i&&e[n]!==t[n]||!i&&m(e[n])!==m(t[n]))&&s++;return s+o}function p(e){if(e){var t=e.toLowerCase().replace(/(.)s$/,"$1");e=Be[e]||Pe[t]||t}return e}function g(e){var t,i,n={};for(i in e)e.hasOwnProperty(i)&&(t=p(i))&&(n[t]=e[i]);return n}function f(t){var i,n;if(0===t.indexOf("week"))i=7,n="day";else{if(0!==t.indexOf("month"))return;i=12,n="month"}te[t]=function(r,o){var s,a,l=te.fn._lang[t],c=[];if("number"==typeof r&&(o=r,r=e),a=function(e){var t=te().utc().set(n,e);return l.call(te.fn._lang,t,r||"")},null!=o)return a(o);for(s=0;i>s;s++)c.push(a(s));return c}}function m(e){var t=+e,i=0;return 0!==t&&isFinite(t)&&(i=t>=0?Math.floor(t):Math.ceil(t)),i}function v(e,t){return new Date(Date.UTC(e,t+1,0)).getUTCDate()}function y(e){return w(e)?366:365}function w(e){return 0==e%4&&0!=e%100||0==e%400}function C(e){var t;e._a&&-2===e._pf.overflow&&(t=e._a[se]<0||e._a[se]>11?se:e._a[ae]<1||e._a[ae]>v(e._a[oe],e._a[se])?ae:e._a[le]<0||e._a[le]>23?le:e._a[ce]<0||e._a[ce]>59?ce:e._a[ue]<0||e._a[ue]>59?ue:e._a[de]<0||e._a[de]>999?de:-1,e._pf._overflowDayOfYear&&(oe>t||t>ae)&&(t=ae),e._pf.overflow=t)}function b(e){e._pf={empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1}}function A(e){return null==e._isValid&&(e._isValid=!isNaN(e._d.getTime())&&e._pf.overflow<0&&!e._pf.empty&&!e._pf.invalidMonth&&!e._pf.nullInput&&!e._pf.invalidFormat&&!e._pf.userInvalidated,e._strict&&(e._isValid=e._isValid&&0===e._pf.charsLeftOver&&0===e._pf.unusedTokens.length)),e._isValid}function x(e){return e?e.toLowerCase().replace("_","-"):e}function S(e,t){return t.abbr=e,he[e]||(he[e]=new n),he[e].set(t),he[e]}function E(e){delete he[e]}function $(e){var t,i,n,r,o=0,s=function(e){if(!he[e]&&pe)try{require("./lang/"+e)}catch(e){}return he[e]};if(!e)return te.fn._lang;if(!u(e)){if(i=s(e))return i;e=[e]}for(;o<e.length;){for(r=x(e[o]).split("-"),t=r.length,n=x(e[o+1]),n=n?n.split("-"):null;t>0;){if(i=s(r.slice(0,t).join("-")))return i;if(n&&n.length>=t&&h(r,n,!0)>=t-1)break;t--}o++}return te.fn._lang}function F(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function k(e){var t,i,n=e.match(ve);for(t=0,i=n.length;i>t;t++)n[t]=ze[n[t]]?ze[n[t]]:F(n[t]);return function(r){var o="";for(t=0;i>t;t++)o+=n[t]instanceof Function?n[t].call(r,e):n[t];return o}}function D(e,t){return e.isValid()?(t=T(t,e.lang()),Oe[t]||(Oe[t]=k(t)),Oe[t](e)):e.lang().invalidDate()}function T(e,t){function i(e){return t.longDateFormat(e)||e}var n=5;for(ye.lastIndex=0;n>=0&&ye.test(e);)e=e.replace(ye,i),ye.lastIndex=0,n-=1;return e}function M(e,t){switch(e){case"DDDD":return be;case"YYYY":case"GGGG":case"gggg":return Ae;case"YYYYY":case"GGGGG":case"ggggg":return xe;case"S":case"SS":case"SSS":case"DDD":return Ce;case"MMM":case"MMMM":case"dd":case"ddd":case"dddd":return Se;case"a":case"A":return $(t._l)._meridiemParse;case"X":return Fe;case"Z":case"ZZ":return Ee;case"T":return $e;case"MM":case"DD":case"YY":case"GG":case"gg":case"HH":case"hh":case"mm":case"ss":case"M":case"D":case"d":case"H":case"h":case"m":case"s":case"w":case"ww":case"W":case"WW":case"e":case"E":return we;default:return new RegExp(N(I(e.replace("\\","")),"i"))}}function L(e){var t=(Ee.exec(e)||[])[0],i=(t+"").match(Le)||["-",0,0],n=60*i[1]+m(i[2]);return"+"===i[0]?-n:n}function R(e,t,i){var n,r=i._a;switch(e){case"M":case"MM":null!=t&&(r[se]=m(t)-1);break;case"MMM":case"MMMM":n=$(i._l).monthsParse(t),null!=n?r[se]=n:i._pf.invalidMonth=t;break;case"D":case"DD":null!=t&&(r[ae]=m(t));break;case"DDD":case"DDDD":null!=t&&(i._dayOfYear=m(t));break;case"YY":r[oe]=m(t)+(m(t)>68?1900:2e3);break;case"YYYY":case"YYYYY":r[oe]=m(t);break;case"a":case"A":i._isPm=$(i._l).isPM(t);break;case"H":case"HH":case"h":case"hh":r[le]=m(t);break;case"m":case"mm":r[ce]=m(t);break;case"s":case"ss":r[ue]=m(t);break;case"S":case"SS":case"SSS":r[de]=m(1e3*("0."+t));break;case"X":i._d=new Date(1e3*parseFloat(t));break;case"Z":case"ZZ":i._useUTC=!0,i._tzm=L(t);break;case"w":case"ww":case"W":case"WW":case"d":case"dd":case"ddd":case"dddd":case"e":case"E":e=e.substr(0,1);case"gg":case"gggg":case"GG":case"GGGG":case"GGGGG":e=e.substr(0,2),t&&(i._w=i._w||{},i._w[e]=t)}}function _(e){var t,i,n,r,o,s,a,l,c,u,d=[];if(!e._d){for(n=P(e),e._w&&null==e._a[ae]&&null==e._a[se]&&(o=function(t){return t?t.length<3?parseInt(t,10)>68?"19"+t:"20"+t:t:null==e._a[oe]?te().weekYear():e._a[oe]},s=e._w,null!=s.GG||null!=s.W||null!=s.E?a=Y(o(s.GG),s.W||1,s.E,4,1):(l=$(e._l),c=null!=s.d?j(s.d,l):null!=s.e?parseInt(s.e,10)+l._week.dow:0,u=parseInt(s.w,10)||1,null!=s.d&&c<l._week.dow&&u++,a=Y(o(s.gg),u,c,l._week.doy,l._week.dow)),e._a[oe]=a.year,e._dayOfYear=a.dayOfYear),e._dayOfYear&&(r=null==e._a[oe]?n[oe]:e._a[oe],e._dayOfYear>y(r)&&(e._pf._overflowDayOfYear=!0),i=W(r,0,e._dayOfYear),e._a[se]=i.getUTCMonth(),e._a[ae]=i.getUTCDate()),t=0;3>t&&null==e._a[t];++t)e._a[t]=d[t]=n[t];for(;7>t;t++)e._a[t]=d[t]=null==e._a[t]?2===t?1:0:e._a[t];d[le]+=m((e._tzm||0)/60),d[ce]+=m((e._tzm||0)%60),e._d=(e._useUTC?W:V).apply(null,d)}}function B(e){var t;e._d||(t=g(e._i),e._a=[t.year,t.month,t.day,t.hour,t.minute,t.second,t.millisecond],_(e))}function P(e){var t=new Date;return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}function O(e){e._a=[],e._pf.empty=!0;var t,i,n,r,o,s=$(e._l),a=""+e._i,l=a.length,c=0;for(n=T(e._f,s).match(ve)||[],t=0;t<n.length;t++)r=n[t],i=(M(r,e).exec(a)||[])[0],i&&(o=a.substr(0,a.indexOf(i)),o.length>0&&e._pf.unusedInput.push(o),a=a.slice(a.indexOf(i)+i.length),c+=i.length),ze[r]?(i?e._pf.empty=!1:e._pf.unusedTokens.push(r),R(r,i,e)):e._strict&&!i&&e._pf.unusedTokens.push(r);e._pf.charsLeftOver=l-c,a.length>0&&e._pf.unusedInput.push(a),e._isPm&&e._a[le]<12&&(e._a[le]+=12),!1===e._isPm&&12===e._a[le]&&(e._a[le]=0),_(e),C(e)}function I(e){return e.replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(e,t,i,n,r){return t||i||n||r})}function N(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function z(e){var t,i,n,r,o;if(0===e._f.length)return e._pf.invalidFormat=!0,void(e._d=new Date(NaN));for(r=0;r<e._f.length;r++)o=0,t=s({},e),b(t),t._f=e._f[r],O(t),A(t)&&(o+=t._pf.charsLeftOver,o+=10*t._pf.unusedTokens.length,t._pf.score=o,(null==n||n>o)&&(n=o,i=t));s(e,i||t)}function H(e){var t,i=e._i,n=ke.exec(i);if(n){for(t=4;t>0;t--)if(n[t]){e._f=Te[t-1]+(n[6]||" ");break}for(t=0;4>t;t++)if(Me[t][1].exec(i)){e._f+=Me[t][0];break}Ee.exec(i)&&(e._f+=" Z"),O(e)}else e._d=new Date(i)}function G(t){var i=t._i,n=ge.exec(i);i===e?t._d=new Date:n?t._d=new Date(+n[1]):"string"==typeof i?H(t):u(i)?(t._a=i.slice(0),_(t)):d(i)?t._d=new Date(+i):"object"==typeof i?B(t):t._d=new Date(i)}function V(e,t,i,n,r,o,s){var a=new Date(e,t,i,n,r,o,s);return 1970>e&&a.setFullYear(e),a}function W(e){var t=new Date(Date.UTC.apply(null,arguments));return 1970>e&&t.setUTCFullYear(e),t}function j(e,t){if("string"==typeof e)if(isNaN(e)){if("number"!=typeof(e=t.weekdaysParse(e)))return null}else e=parseInt(e,10);return e}function U(e,t,i,n,r){return r.relativeTime(t||1,!!i,e,n)}function q(e,t,i){var n=re(Math.abs(e)/1e3),r=re(n/60),o=re(r/60),s=re(o/24),a=re(s/365),l=45>n&&["s",n]||1===r&&["m"]||45>r&&["mm",r]||1===o&&["h"]||22>o&&["hh",o]||1===s&&["d"]||25>=s&&["dd",s]||45>=s&&["M"]||345>s&&["MM",re(s/30)]||1===a&&["y"]||["yy",a];return l[2]=t,l[3]=e>0,l[4]=i,U.apply({},l)}function K(e,t,i){var n,r=i-t,o=i-e.day();return o>r&&(o-=7),r-7>o&&(o+=7),n=te(e).add("d",o),{week:Math.ceil(n.dayOfYear()/7),year:n.year()}}function Y(e,t,i,n,r){var o,s,a=new Date(Date.UTC(e,0)).getUTCDay();return i=null!=i?i:r,o=r-a+(a>n?7:0),s=7*(t-1)+(i-r)+o+1,{year:s>0?e:e-1,dayOfYear:s>0?s:y(e-1)+s}}function X(e){var t=e._i,i=e._f;return"undefined"==typeof e._pf&&b(e),null===t?te.invalid({nullInput:!0}):("string"==typeof t&&(e._i=t=$().preparse(t)),te.isMoment(t)?(e=s({},t),e._d=new Date(+t._d)):i?u(i)?z(e):O(e):G(e),new r(e))}function Z(e,t){te.fn[e]=te.fn[e+"s"]=function(e){var i=this._isUTC?"UTC":"";return null!=e?(this._d["set"+i+t](e),te.updateOffset(this),this):this._d["get"+i+t]()}}function J(e){te.duration.fn[e]=function(){return this._data[e]}}function Q(e,t){te.duration.fn["as"+e]=function(){return+this/t}}function ee(){"undefined"==typeof ender&&(this.moment=te)}for(var te,ie,ne="2.3.1",re=Math.round,oe=0,se=1,ae=2,le=3,ce=4,ue=5,de=6,he={},pe="undefined"!=typeof module&&module.exports,ge=/^\/?Date\((\-?\d+)/i,fe=/(\-)?(?:(\d*)\.)?(\d+)\:(\d+)(?:\:(\d+)\.?(\d{3})?)?/,me=/^(-)?P(?:(?:([0-9,.]*)Y)?(?:([0-9,.]*)M)?(?:([0-9,.]*)D)?(?:T(?:([0-9,.]*)H)?(?:([0-9,.]*)M)?(?:([0-9,.]*)S)?)?|([0-9,.]*)W)$/,ve=/(\[[^\[]*\])|(\\)?(Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|mm?|ss?|SS?S?|X|zz?|ZZ?|.)/g,ye=/(\[[^\[]*\])|(\\)?(LT|LL?L?L?|l{1,4})/g,we=/\d\d?/,Ce=/\d{1,3}/,be=/\d{3}/,Ae=/\d{1,4}/,xe=/[+\-]?\d{1,6}/,Se=/[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i,Ee=/Z|[\+\-]\d\d:?\d\d/i,$e=/T/i,Fe=/[\+\-]?\d+(\.\d{1,3})?/,ke=/^\s*\d{4}-(?:(\d\d-\d\d)|(W\d\d$)|(W\d\d-\d)|(\d\d\d))((T| )(\d\d(:\d\d(:\d\d(\.\d\d?\d?)?)?)?)?([\+\-]\d\d:?\d\d)?)?$/,De="YYYY-MM-DDTHH:mm:ssZ",Te=["YYYY-MM-DD","GGGG-[W]WW","GGGG-[W]WW-E","YYYY-DDD"],Me=[["HH:mm:ss.S",/(T| )\d\d:\d\d:\d\d\.\d{1,3}/],["HH:mm:ss",/(T| )\d\d:\d\d:\d\d/],["HH:mm",/(T| )\d\d:\d\d/],["HH",/(T| )\d\d/]],Le=/([\+\-]|\d\d)/gi,Re="Date|Hours|Minutes|Seconds|Milliseconds".split("|"),_e={Milliseconds:1,Seconds:1e3,Minutes:6e4,Hours:36e5,Days:864e5,Months:2592e6,Years:31536e6},Be={ms:"millisecond",s:"second",m:"minute",h:"hour",d:"day",D:"date",w:"week",W:"isoWeek",M:"month",y:"year",DDD:"dayOfYear",e:"weekday",E:"isoWeekday",gg:"weekYear",GG:"isoWeekYear"},Pe={dayofyear:"dayOfYear",isoweekday:"isoWeekday",isoweek:"isoWeek",weekyear:"weekYear",isoweekyear:"isoWeekYear"},Oe={},Ie="DDD w W M D d".split(" "),Ne="M D H h m s w W".split(" "),ze={M:function(){return this.month()+1},MMM:function(e){return this.lang().monthsShort(this,e)},MMMM:function(e){return this.lang().months(this,e)},D:function(){return this.date()},DDD:function(){return this.dayOfYear()},d:function(){return this.day()},dd:function(e){return this.lang().weekdaysMin(this,e)},ddd:function(e){return this.lang().weekdaysShort(this,e)},dddd:function(e){return this.lang().weekdays(this,e)},w:function(){return this.week()},W:function(){return this.isoWeek()},YY:function(){return l(this.year()%100,2)},YYYY:function(){return l(this.year(),4)},YYYYY:function(){return l(this.year(),5)},gg:function(){return l(this.weekYear()%100,2)},gggg:function(){return this.weekYear()},ggggg:function(){return l(this.weekYear(),5)},GG:function(){return l(this.isoWeekYear()%100,2)},GGGG:function(){return this.isoWeekYear()},GGGGG:function(){return l(this.isoWeekYear(),5)},e:function(){return this.weekday()},E:function(){return this.isoWeekday()},a:function(){return this.lang().meridiem(this.hours(),this.minutes(),!0)},A:function(){return this.lang().meridiem(this.hours(),this.minutes(),!1)},H:function(){return this.hours()},h:function(){return this.hours()%12||12},m:function(){return this.minutes()},s:function(){return this.seconds()},S:function(){return m(this.milliseconds()/100)},SS:function(){return l(m(this.milliseconds()/10),2)},SSS:function(){return l(this.milliseconds(),3)},Z:function(){var e=-this.zone(),t="+";return 0>e&&(e=-e,t="-"),t+l(m(e/60),2)+":"+l(m(e)%60,2)},ZZ:function(){var e=-this.zone(),t="+";return 0>e&&(e=-e,t="-"),t+l(m(10*e/6),4)},z:function(){return this.zoneAbbr()},zz:function(){return this.zoneName()},X:function(){return this.unix()}},He=["months","monthsShort","weekdays","weekdaysShort","weekdaysMin"];Ie.length;)ie=Ie.pop(),ze[ie+"o"]=i(ze[ie],ie);for(;Ne.length;)ie=Ne.pop(),ze[ie+ie]=t(ze[ie],2);for(ze.DDDD=t(ze.DDD,3),s(n.prototype,{set:function(e){var t,i;for(i in e)t=e[i],"function"==typeof t?this[i]=t:this["_"+i]=t},_months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),months:function(e){return this._months[e.month()]},_monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),monthsShort:function(e){return this._monthsShort[e.month()]},monthsParse:function(e){var t,i,n;for(this._monthsParse||(this._monthsParse=[]),t=0;12>t;t++)if(this._monthsParse[t]||(i=te.utc([2e3,t]),n="^"+this.months(i,"")+"|^"+this.monthsShort(i,""),this._monthsParse[t]=new RegExp(n.replace(".",""),"i")),this._monthsParse[t].test(e))return t},_weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdays:function(e){return this._weekdays[e.day()]},_weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysShort:function(e){return this._weekdaysShort[e.day()]},_weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),weekdaysMin:function(e){return this._weekdaysMin[e.day()]},weekdaysParse:function(e){var t,i,n;for(this._weekdaysParse||(this._weekdaysParse=[]),t=0;7>t;t++)if(this._weekdaysParse[t]||(i=te([2e3,1]).day(t),n="^"+this.weekdays(i,"")+"|^"+this.weekdaysShort(i,"")+"|^"+this.weekdaysMin(i,""),this._weekdaysParse[t]=new RegExp(n.replace(".",""),"i")),this._weekdaysParse[t].test(e))return t},_longDateFormat:{LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D YYYY",LLL:"MMMM D YYYY LT",LLLL:"dddd, MMMM D YYYY LT"},longDateFormat:function(e){var t=this._longDateFormat[e];return!t&&this._longDateFormat[e.toUpperCase()]&&(t=this._longDateFormat[e.toUpperCase()].replace(/MMMM|MM|DD|dddd/g,function(e){return e.slice(1)}),this._longDateFormat[e]=t),t},isPM:function(e){return"p"===(e+"").toLowerCase().charAt(0)},_meridiemParse:/[ap]\.?m?\.?/i,meridiem:function(e,t,i){return e>11?i?"pm":"PM":i?"am":"AM"},_calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},calendar:function(e,t){var i=this._calendar[e];return"function"==typeof i?i.apply(t):i},_relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},relativeTime:function(e,t,i,n){var r=this._relativeTime[i];return"function"==typeof r?r(e,t,i,n):r.replace(/%d/i,e)},pastFuture:function(e,t){var i=this._relativeTime[e>0?"future":"past"];return"function"==typeof i?i(t):i.replace(/%s/i,t)},ordinal:function(e){return this._ordinal.replace("%d",e)},_ordinal:"%d",preparse:function(e){return e},postformat:function(e){return e},week:function(e){return K(e,this._week.dow,this._week.doy).week},_week:{dow:0,doy:6},_invalidDate:"Invalid date",invalidDate:function(){return this._invalidDate}}),te=function(t,i,n,r){return"boolean"==typeof n&&(r=n,n=e),X({_i:t,_f:i,_l:n,_strict:r,_isUTC:!1})},te.utc=function(t,i,n,r){return"boolean"==typeof n&&(r=n,n=e),X({_useUTC:!0,_isUTC:!0,_l:n,_i:t,_f:i,_strict:r}).utc()},te.unix=function(e){return te(1e3*e)},te.duration=function(e,t){var i,n,r,s=te.isDuration(e),a="number"==typeof e,l=s?e._input:a?{}:e,c=null;return a?t?l[t]=e:l.milliseconds=e:(c=fe.exec(e))?(i="-"===c[1]?-1:1,l={y:0,d:m(c[ae])*i,h:m(c[le])*i,m:m(c[ce])*i,s:m(c[ue])*i,ms:m(c[de])*i}):(c=me.exec(e))&&(i="-"===c[1]?-1:1,r=function(e){var t=e&&parseFloat(e.replace(",","."));return(isNaN(t)?0:t)*i},l={y:r(c[2]),M:r(c[3]),d:r(c[4]),h:r(c[5]),m:r(c[6]),s:r(c[7]),w:r(c[8])}),n=new o(l),s&&e.hasOwnProperty("_lang")&&(n._lang=e._lang),n},te.version=ne,te.defaultFormat=De,te.updateOffset=function(){},te.lang=function(e,t){var i;return e?(t?S(x(e),t):null===t?(E(e),e="en"):he[e]||$(e),i=te.duration.fn._lang=te.fn._lang=$(e),i._abbr):te.fn._lang._abbr},te.langData=function(e){return e&&e._lang&&e._lang._abbr&&(e=e._lang._abbr),$(e)},te.isMoment=function(e){return e instanceof r},te.isDuration=function(e){return e instanceof o},ie=He.length-1;ie>=0;--ie)f(He[ie]);for(te.normalizeUnits=function(e){return p(e)},te.invalid=function(e){var t=te.utc(NaN);return null!=e?s(t._pf,e):t._pf.userInvalidated=!0,t},te.parseZone=function(e){return te(e).parseZone()},s(te.fn=r.prototype,{clone:function(){return te(this)},valueOf:function(){return+this._d+6e4*(this._offset||0)},unix:function(){return Math.floor(+this/1e3)},toString:function(){return this.clone().lang("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},toDate:function(){return this._offset?new Date(+this):this._d},toISOString:function(){return D(te(this).utc(),"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]")},toArray:function(){var e=this;return[e.year(),e.month(),e.date(),e.hours(),e.minutes(),e.seconds(),e.milliseconds()]},isValid:function(){return A(this)},isDSTShifted:function(){return!!this._a&&(this.isValid()&&h(this._a,(this._isUTC?te.utc(this._a):te(this._a)).toArray())>0)},parsingFlags:function(){return s({},this._pf)},invalidAt:function(){return this._pf.overflow},utc:function(){return this.zone(0)},local:function(){return this.zone(0),this._isUTC=!1,this},format:function(e){var t=D(this,e||te.defaultFormat);return this.lang().postformat(t)},add:function(e,t){var i;return i="string"==typeof e?te.duration(+t,e):te.duration(e,t),c(this,i,1),this},subtract:function(e,t){var i;return i="string"==typeof e?te.duration(+t,e):te.duration(e,t),c(this,i,-1),this},diff:function(e,t,i){var n,r,o=this._isUTC?te(e).zone(this._offset||0):te(e).local(),s=6e4*(this.zone()-o.zone());return t=p(t),"year"===t||"month"===t?(n=432e5*(this.daysInMonth()+o.daysInMonth()),r=12*(this.year()-o.year())+(this.month()-o.month()),r+=(this-te(this).startOf("month")-(o-te(o).startOf("month")))/n,r-=6e4*(this.zone()-te(this).startOf("month").zone()-(o.zone()-te(o).startOf("month").zone()))/n,"year"===t&&(r/=12)):(n=this-o,r="second"===t?n/1e3:"minute"===t?n/6e4:"hour"===t?n/36e5:"day"===t?(n-s)/864e5:"week"===t?(n-s)/6048e5:n),i?r:a(r)},from:function(e,t){return te.duration(this.diff(e)).lang(this.lang()._abbr).humanize(!t)},fromNow:function(e){return this.from(te(),e)},calendar:function(){var e=this.diff(te().zone(this.zone()).startOf("day"),"days",!0),t=-6>e?"sameElse":-1>e?"lastWeek":0>e?"lastDay":1>e?"sameDay":2>e?"nextDay":7>e?"nextWeek":"sameElse";return this.format(this.lang().calendar(t,this))},isLeapYear:function(){return w(this.year())},isDST:function(){return this.zone()<this.clone().month(0).zone()||this.zone()<this.clone().month(5).zone()},day:function(e){var t=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=e?(e=j(e,this.lang()),this.add({d:e-t})):t},month:function(e){var t,i=this._isUTC?"UTC":"";return null!=e?"string"==typeof e&&"number"!=typeof(e=this.lang().monthsParse(e))?this:(t=this.date(),this.date(1),this._d["set"+i+"Month"](e),this.date(Math.min(t,this.daysInMonth())),te.updateOffset(this),this):this._d["get"+i+"Month"]()},startOf:function(e){switch(e=p(e)){case"year":this.month(0);case"month":this.date(1);case"week":case"isoWeek":case"day":this.hours(0);case"hour":this.minutes(0);case"minute":this.seconds(0);case"second":this.milliseconds(0)}return"week"===e?this.weekday(0):"isoWeek"===e&&this.isoWeekday(1),this},endOf:function(e){return e=p(e),this.startOf(e).add("isoWeek"===e?"week":e,1).subtract("ms",1)},isAfter:function(e,t){return t=void 0!==t?t:"millisecond",+this.clone().startOf(t)>+te(e).startOf(t)},isBefore:function(e,t){return t=void 0!==t?t:"millisecond",+this.clone().startOf(t)<+te(e).startOf(t)},isSame:function(e,t){return t=void 0!==t?t:"millisecond",+this.clone().startOf(t)==+te(e).startOf(t)},min:function(e){return e=te.apply(null,arguments),this>e?this:e},max:function(e){return e=te.apply(null,arguments),e>this?this:e},zone:function(e){var t=this._offset||0;return null==e?this._isUTC?t:this._d.getTimezoneOffset():("string"==typeof e&&(e=L(e)),Math.abs(e)<16&&(e*=60),this._offset=e,this._isUTC=!0,t!==e&&c(this,te.duration(t-e,"m"),1,!0),this)},zoneAbbr:function(){return this._isUTC?"UTC":""},zoneName:function(){return this._isUTC?"Coordinated Universal Time":""},parseZone:function(){return"string"==typeof this._i&&this.zone(this._i),this},hasAlignedHourOffset:function(e){return e=e?te(e).zone():0,0==(this.zone()-e)%60},daysInMonth:function(){return v(this.year(),this.month())},dayOfYear:function(e){var t=re((te(this).startOf("day")-te(this).startOf("year"))/864e5)+1;return null==e?t:this.add("d",e-t)},weekYear:function(e){var t=K(this,this.lang()._week.dow,this.lang()._week.doy).year;return null==e?t:this.add("y",e-t)},isoWeekYear:function(e){var t=K(this,1,4).year;return null==e?t:this.add("y",e-t)},week:function(e){var t=this.lang().week(this);return null==e?t:this.add("d",7*(e-t))},isoWeek:function(e){var t=K(this,1,4).week;return null==e?t:this.add("d",7*(e-t))},weekday:function(e){var t=(this.day()+7-this.lang()._week.dow)%7;return null==e?t:this.add("d",e-t)},isoWeekday:function(e){return null==e?this.day()||7:this.day(this.day()%7?e:e-7)},get:function(e){return e=p(e),this[e]()},set:function(e,t){return e=p(e),"function"==typeof this[e]&&this[e](t),this},lang:function(t){return t===e?this._lang:(this._lang=$(t),this)}}),ie=0;ie<Re.length;ie++)Z(Re[ie].toLowerCase().replace(/s$/,""),Re[ie]);Z("year","FullYear"),te.fn.days=te.fn.day,te.fn.months=te.fn.month,te.fn.weeks=te.fn.week,te.fn.isoWeeks=te.fn.isoWeek,te.fn.toJSON=te.fn.toISOString,s(te.duration.fn=o.prototype,{_bubble:function(){var e,t,i,n,r=this._milliseconds,o=this._days,s=this._months,l=this._data;l.milliseconds=r%1e3,e=a(r/1e3),l.seconds=e%60,t=a(e/60),l.minutes=t%60,i=a(t/60),l.hours=i%24,o+=a(i/24),l.days=o%30,s+=a(o/30),l.months=s%12,n=a(s/12),l.years=n},weeks:function(){return a(this.days()/7)},valueOf:function(){return this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*m(this._months/12)},humanize:function(e){var t=+this,i=q(t,!e,this.lang());return e&&(i=this.lang().pastFuture(t,i)),this.lang().postformat(i)},add:function(e,t){var i=te.duration(e,t);return this._milliseconds+=i._milliseconds,this._days+=i._days,this._months+=i._months,this._bubble(),this},subtract:function(e,t){var i=te.duration(e,t);return this._milliseconds-=i._milliseconds,this._days-=i._days,this._months-=i._months,this._bubble(),this},get:function(e){return e=p(e),this[e.toLowerCase()+"s"]()},as:function(e){return e=p(e),this["as"+e.charAt(0).toUpperCase()+e.slice(1)+"s"]()},lang:te.fn.lang,toIsoString:function(){var e=Math.abs(this.years()),t=Math.abs(this.months()),i=Math.abs(this.days()),n=Math.abs(this.hours()),r=Math.abs(this.minutes()),o=Math.abs(this.seconds()+this.milliseconds()/1e3);return this.asSeconds()?(this.asSeconds()<0?"-":"")+"P"+(e?e+"Y":"")+(t?t+"M":"")+(i?i+"D":"")+(n||r||o?"T":"")+(n?n+"H":"")+(r?r+"M":"")+(o?o+"S":""):"P0D"}});for(ie in _e)_e.hasOwnProperty(ie)&&(Q(ie,_e[ie]),J(ie.toLowerCase()));Q("Weeks",6048e5),te.duration.fn.asMonths=function(){return(+this-31536e6*this.years())/2592e6+12*this.years()},te.lang("en",{ordinal:function(e){var t=e%10;return e+(1===m(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")}}),pe?(module.exports=te,ee()):"function"==typeof define&&define.amd?define("moment",function(e,t,i){return!0!==i.config().noGlobal&&ee(),te}):ee()}.call(this),$("#linkedin_contacts").fileupload({dataType:"json",done:function(e,t){$("#progress").fadeOut(function(){$("#progress .progress-bar").css("width","0"),t.result.success?($(".upload_success").show().fadeIn(),$("body").append(t.result.modal_html),$("#send-invite").modal("show")):$(".upload_fail").show().fadeIn()})},progressall:function(e,t){var i=parseInt(t.loaded/t.total*100,10);$("#progress").show(),$("#progress .progress-bar").css("width",i+"%")}}),/* ***** BEGIN LICENSE BLOCK *****
 * Distributed under the BSD license:
 *
 * Copyright (c) 2010, Ajax.org B.V.
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *     * Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above copyright
 *       notice, this list of conditions and the following disclaimer in the
 *       documentation and/or other materials provided with the distribution.
 *     * Neither the name of Ajax.org B.V. nor the
 *       names of its contributors may be used to endorse or promote products
 *       derived from this software without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
 * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 *
 * ***** END LICENSE BLOCK ***** */
function(){function e(e){var t=i;e&&(i[e]||(i[e]={}),t=i[e]),t.define&&t.define.packaged||(n.original=t.define,t.define=n,t.define.packaged=!0),t.require&&t.require.packaged||(o.original=t.require,t.require=o,t.require.packaged=!0)}var t="",i=function(){return this}();if(i||"undefined"==typeof window||(i=window),t||"undefined"==typeof requirejs){var n=function(e,t,i){if("string"!=typeof e)return void(n.original?n.original.apply(this,arguments):(console.error("dropping module because define wasn't a string."),console.trace()));2==arguments.length&&(i=t),n.modules[e]||(n.payloads[e]=i,n.modules[e]=null)};n.modules={},n.payloads={};var r=function(e,t,i){if("string"==typeof t){var n=a(e,t);if(n!=undefined)return i&&i(),n}else if("[object Array]"===Object.prototype.toString.call(t)){for(var r=[],s=0,l=t.length;s<l;++s){var c=a(e,t[s]);if(c==undefined&&o.original)return;r.push(c)}return i&&i.apply(null,r)||!0}},o=function(e,t){var i=r("",e,t);return i==undefined&&o.original?o.original.apply(this,arguments):i},s=function(e,t){if(-1!==t.indexOf("!")){var i=t.split("!");return s(e,i[0])+"!"+s(e,i[1])}if("."==t.charAt(0)){var n=e.split("/").slice(0,-1).join("/");for(t=n+"/"+t;-1!==t.indexOf(".")&&r!=t;){var r=t;t=t.replace(/\/\.\//,"/").replace(/[^\/]+\/\.\.\//,"")}}return t},a=function(e,t){t=s(e,t);var i=n.modules[t];if(!i){if("function"==typeof(i=n.payloads[t])){var o={},a={id:t,uri:"",exports:o,packaged:!0};o=i(function(e,i){return r(t,e,i)},o,a)||a.exports,n.modules[t]=o,delete n.payloads[t]}i=n.modules[t]=o||i}return i};e(t)}}(),define("ace/lib/regexp",["require","exports","module"],function(){"use strict";function e(e){return(e.global?"g":"")+(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.extended?"x":"")+(e.sticky?"y":"")}function t(e,t,i){if(Array.prototype.indexOf)return e.indexOf(t,i);for(var n=i||0;n<e.length;n++)if(e[n]===t)return n;return-1}var i={exec:RegExp.prototype.exec,test:RegExp.prototype.test,match:String.prototype.match,replace:String.prototype.replace,split:String.prototype.split},n=i.exec.call(/()??/,"")[1]===undefined,r=function(){var e=/^/g;return i.test.call(e,""),!e.lastIndex}();r&&n||(RegExp.prototype.exec=function(o){var s,a,l=i.exec.apply(this,arguments);if("string"==typeof o&&l){if(!n&&l.length>1&&t(l,"")>-1&&(a=RegExp(this.source,i.replace.call(e(this),"g","")),i.replace.call(o.slice(l.index),a,function(){for(var e=1;e<arguments.length-2;e++)arguments[e]===undefined&&(l[e]=undefined)})),this._xregexp&&this._xregexp.captureNames)for(var c=1;c<l.length;c++)(s=this._xregexp.captureNames[c-1])&&(l[s]=l[c]);!r&&this.global&&!l[0].length&&this.lastIndex>l.index&&this.lastIndex--}return l},r||(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}))}),define("ace/lib/es5-shim",["require","exports","module"],function(){function e(){}function t(e){try{return Object.defineProperty(e,"sentinel",{}),"sentinel"in e}catch(e){}}function i(e){return e=+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(t){var i=this;if("function"!=typeof i)throw new TypeError("Function.prototype.bind called on incompatible "+i);var n=d.call(arguments,1),r=function(){if(this instanceof r){var e=i.apply(this,n.concat(d.call(arguments)));return Object(e)===e?e:this}return i.apply(t,n.concat(d.call(arguments)))};return i.prototype&&(e.prototype=i.prototype,r.prototype=new e,e.prototype=null),r});var n,r,o,s,a,l=Function.prototype.call,c=Array.prototype,u=Object.prototype,d=c.slice,h=l.bind(u.toString),p=l.bind(u.hasOwnProperty);if((a=p(u,"__defineGetter__"))&&(n=l.bind(u.__defineGetter__),r=l.bind(u.__defineSetter__),o=l.bind(u.__lookupGetter__),s=l.bind(u.__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,i=[];if(i.splice.apply(i,e(20)),i.splice.apply(i,e(26)),t=i.length,i.splice(5,0,"XXX"),i.length,t+1==i.length)return!0}()){var g=Array.prototype.splice;Array.prototype.splice=function(e,t){return arguments.length?g.apply(this,[void 0===e?0:e,void 0===t?this.length-e:t].concat(d.call(arguments,2))):[]}}else Array.prototype.splice=function(e,t){var i=this.length;e>0?e>i&&(e=i):void 0==e?e=0:e<0&&(e=Math.max(i+e,0)),e+t<i||(t=i-e);var n=this.slice(e,e+t),r=d.call(arguments,2),o=r.length;if(e===i)o&&this.push.apply(this,r);else{var s=Math.min(t,i-e),a=e+s,l=a+o-s,c=i-a,u=i-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 n};Array.isArray||(Array.isArray=function(e){return"[object Array]"==h(e)});var f=Object("a"),m="a"!=f[0]||!(0 in f);if(Array.prototype.forEach||(Array.prototype.forEach=function(e){var t=k(this),i=m&&"[object String]"==h(this)?this.split(""):t,n=arguments[1],r=-1,o=i.length>>>0;if("[object Function]"!=h(e))throw new TypeError;for(;++r<o;)r in i&&e.call(n,i[r],r,t)}),Array.prototype.map||(Array.prototype.map=function(e){var t=k(this),i=m&&"[object String]"==h(this)?this.split(""):t,n=i.length>>>0,r=Array(n),o=arguments[1];if("[object Function]"!=h(e))throw new TypeError(e+" is not a function");for(var s=0;s<n;s++)s in i&&(r[s]=e.call(o,i[s],s,t));return r}),Array.prototype.filter||(Array.prototype.filter=function(e){var t,i=k(this),n=m&&"[object String]"==h(this)?this.split(""):i,r=n.length>>>0,o=[],s=arguments[1];if("[object Function]"!=h(e))throw new TypeError(e+" is not a function");for(var a=0;a<r;a++)a in n&&(t=n[a],e.call(s,t,a,i)&&o.push(t));return o}),Array.prototype.every||(Array.prototype.every=function(e){var t=k(this),i=m&&"[object String]"==h(this)?this.split(""):t,n=i.length>>>0,r=arguments[1];if("[object Function]"!=h(e))throw new TypeError(e+" is not a function");for(var o=0;o<n;o++)if(o in i&&!e.call(r,i[o],o,t))return!1;return!0}),Array.prototype.some||(Array.prototype.some=function(e){var t=k(this),i=m&&"[object String]"==h(this)?this.split(""):t,n=i.length>>>0,r=arguments[1];if("[object Function]"!=h(e))throw new TypeError(e+" is not a function");for(var o=0;o<n;o++)if(o in i&&e.call(r,i[o],o,t))return!0;return!1}),Array.prototype.reduce||(Array.prototype.reduce=function(e){var t=k(this),i=m&&"[object String]"==h(this)?this.split(""):t,n=i.length>>>0;if("[object Function]"!=h(e))throw new TypeError(e+" is not a function");if(!n&&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 i){r=i[o++];break}if(++o>=n)throw new TypeError("reduce of empty array with no initial value")}for(;o<n;o++)o in i&&(r=e.call(void 0,r,i[o],o,t));return r}),Array.prototype.reduceRight||(Array.prototype.reduceRight=function(e){var t=k(this),i=m&&"[object String]"==h(this)?this.split(""):t,n=i.length>>>0;if("[object Function]"!=h(e))throw new TypeError(e+" is not a function");if(!n&&1==arguments.length)throw new TypeError("reduceRight of empty array with no initial value");var r,o=n-1;if(arguments.length>=2)r=arguments[1];else for(;;){if(o in i){r=i[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,i[o],o,t))}while(o--);return r}),Array.prototype.indexOf&&-1==[0,1].indexOf(1,2)||(Array.prototype.indexOf=function(e){var t=m&&"[object String]"==h(this)?this.split(""):k(this),n=t.length>>>0;if(!n)return-1;var r=0;for(arguments.length>1&&(r=i(arguments[1])),r=r>=0?r:Math.max(0,n+r);r<n;r++)if(r in t&&t[r]===e)return r;return-1}),Array.prototype.lastIndexOf&&-1==[0,1].lastIndexOf(0,-3)||(Array.prototype.lastIndexOf=function(e){var t=m&&"[object String]"==h(this)?this.split(""):k(this),n=t.length>>>0;if(!n)return-1;var r=n-1;for(arguments.length>1&&(r=Math.min(r,i(arguments[1]))),r=r>=0?r:n-Math.abs(r);r>=0;r--)if(r in t&&e===t[r])return r;return-1}),Object.getPrototypeOf||(Object.getPrototypeOf=function(e){return e.__proto__||(e.constructor?e.constructor.prototype:u)}),!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(p(e,t)){var i,n,r;if(i={enumerable:!0,configurable:!0},a){var l=e.__proto__;e.__proto__=u;var n=o(e,t),r=s(e,t);if(e.__proto__=l,n||r)return n&&(i.get=n),r&&(i.set=r),i}return i.value=e[t],i}}}if(Object.getOwnPropertyNames||(Object.getOwnPropertyNames=function(e){return Object.keys(e)}),!Object.create){var v;v=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 i;if(null===e)i=v();else{if("object"!=typeof e)throw new TypeError("typeof prototype["+typeof e+"] != 'object'");var n=function(){};n.prototype=e,i=new n,i.__proto__=e}return void 0!==t&&Object.defineProperties(i,t),i}}if(Object.defineProperty){var y=t({}),w="undefined"==typeof document||t(document.createElement("div"));if(!y||!w)var C=Object.defineProperty}if(!Object.defineProperty||C){Object.defineProperty=function(e,t,i){if("object"!=typeof e&&"function"!=typeof e||null===e)throw new TypeError("Object.defineProperty called on non-object: "+e);if("object"!=typeof i&&"function"!=typeof i||null===i)throw new TypeError("Property description must be an object: "+i);if(C)try{return C.call(Object,e,t,i)}catch(e){}if(p(i,"value"))if(a&&(o(e,t)||s(e,t))){var l=e.__proto__;e.__proto__=u,delete e[t],e[t]=i.value,e.__proto__=l}else e[t]=i.value;else{if(!a)throw new TypeError("getters & setters can not be defined on this javascript engine");p(i,"get")&&n(e,t,i.get),p(i,"set")&&r(e,t,i.set)}return e}}Object.defineProperties||(Object.defineProperties=function(e,t){for(var i in t)p(t,i)&&Object.defineProperty(e,i,t[i]);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(){return!1}),Object.isFrozen||(Object.isFrozen=function(){return!1}),Object.isExtensible||(Object.isExtensible=function(e){if(Object(e)===e)throw new TypeError;for(var t="";p(e,t);)t+="?";e[t]=!0;var i=p(e,t);return delete e[t],i}),!Object.keys){var b=!0,A=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],x=A.length;for(var S in{toString:null})b=!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 i in e)p(e,i)&&t.push(i);if(b)for(var n=0,r=x;n<r;n++){var o=A[n];p(e,o)&&t.push(o)}return t}}Date.now||(Date.now=function(){return(new Date).getTime()});var E="\t\n\x0B\f\r \xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029\ufeff";if(!String.prototype.trim||E.trim()){E="["+E+"]";var $=new RegExp("^"+E+E+"*"),F=new RegExp(E+E+"*$");String.prototype.trim=function(){return String(this).replace($,"").replace(F,"")}}var k=function(e){if(null==e)throw new TypeError("can't convert "+e+" to object");return Object(e)}}),define("ace/lib/fixoldbrowsers",["require","exports","module","ace/lib/regexp","ace/lib/es5-shim"],function(e){"use strict";e("./regexp"),e("./es5-shim")}),define("ace/lib/dom",["require","exports","module"],function(e,t){"use strict";var i="http://www.w3.org/1999/xhtml";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||i,e):document.createElement(e)},t.hasCssClass=function(e,t){return-1!==(e.className||"").split(/\s+/g).indexOf(t)},t.addCssClass=function(e,i){t.hasCssClass(e,i)||(e.className+=" "+i)},t.removeCssClass=function(e,t){for(var i=e.className.split(/\s+/g);;){var n=i.indexOf(t);if(-1==n)break;i.splice(n,1)}e.className=i.join(" ")},t.toggleCssClass=function(e,t){for(var i=e.className.split(/\s+/g),n=!0;;){var r=i.indexOf(t);if(-1==r)break;n=!1,i.splice(r,1)}return n&&i.push(t),e.className=i.join(" "),n},t.setCssClass=function(e,i,n){n?t.addCssClass(e,i):t.removeCssClass(e,i)},t.hasCssString=function(e,t){var i,n=0;if(t=t||document,t.createStyleSheet&&(i=t.styleSheets)){for(;n<i.length;)if(i[n++].owningElement.id===e)return!0}else if(i=t.getElementsByTagName("style"))for(;n<i.length;)if(i[n++].id===e)return!0;return!1},t.importCssString=function(e,n,r){if(r=r||document,n&&t.hasCssString(n,r))return null;var o;r.createStyleSheet?(o=r.createStyleSheet(),o.cssText=e,n&&(o.owningElement.id=n)):(o=r.createElementNS?r.createElementNS(i,"style"):r.createElement("style"),o.appendChild(r.createTextNode(e)),n&&(o.id=n),t.getDocumentHead(r).appendChild(o))},t.importCssStylsheet=function(e,i){if(i.createStyleSheet)i.createStyleSheet(e);else{var n=t.createElement("link");n.rel="stylesheet",n.href=e,t.getDocumentHead(i).appendChild(n)}},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},"undefined"!=typeof document&&(window.pageYOffset!==undefined?(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.scrollbarWidth=function(e){var i=t.createElement("ace_inner");i.style.width="100%",i.style.minWidth="0px",i.style.height="200px",i.style.display="block";var n=t.createElement("ace_outer"),r=n.style;r.position="absolute",r.left="-10000px",r.overflow="hidden",r.width="200px",r.minWidth="0px",r.height="150px",r.display="block",n.appendChild(i);var o=e.documentElement;o.appendChild(n);var s=i.offsetWidth;r.overflow="scroll";var a=i.offsetWidth;return s==a&&(a=n.clientWidth),o.removeChild(n),s-a},t.setInnerHtml=function(e,t){var i=e.cloneNode(!1);return i.innerHTML=t,e.parentNode.replaceChild(i,e),i},"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})}),define("ace/lib/oop",["require","exports","module"],function(e,t){"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 i in t)e[i]=t[i];return e},t.implement=function(e,i){t.mixin(e,i)}}),define("ace/lib/keys",["require","exports","module","ace/lib/fixoldbrowsers","ace/lib/oop"],function(e,t){"use strict";e("./fixoldbrowsers");var i=e("./oop"),n=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:".",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"}};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,n),t.keyCodeToString=function(e){var t=n[e];return"string"!=typeof t&&(t=String.fromCharCode(e)),t.toLowerCase()}}),define("ace/lib/useragent",["require","exports","module"],function(e,t){"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(),n=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((n.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]):parseFloat((n.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((n.match(/rv\:(\d+)/)||[])[1],10)<4,t.isOpera=window.opera&&"[object Opera]"==Object.prototype.toString.call(window.opera),t.isWebKit=parseFloat(n.split("WebKit/")[1])||undefined,t.isChrome=parseFloat(n.split(" Chrome/")[1])||undefined,t.isAIR=n.indexOf("AdobeAIR")>=0,t.isIPad=n.indexOf("iPad")>=0,t.isTouchPad=n.indexOf("TouchPad")>=0,t.isChromeOS=n.indexOf(" CrOS ")>=0}}),define("ace/lib/event",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(e,t){"use strict";function i(e,t,i){var l=o(t);if(!r.isMac&&s){if((s[91]||s[92])&&(l|=8),s.altGr){if(3==(3&l))return;s.altGr=0}if(18===i||17===i){var c="location"in t?t.location:t.keyLocation;if(17===i&&1===c)1==s[i]&&(a=t.timeStamp);else if(18===i&&3===l&&2===c){var u=t.timestamp-a;u<50&&(s.altGr=!0)}}}if(i in n.MODIFIER_KEYS&&(i=-1),8&l&&(91===i||93===i)&&(i=-1),!l&&13===i){var c="location"in t?t.location:t.keyLocation;if(3===c&&(e(t,l,-i),t.defaultPrevented))return}if(r.isChromeOS&&8&l){if(e(t,l,i),t.defaultPrevented)return;l&=-9}return!!(l||i in n.FUNCTION_KEYS||i in n.PRINTABLE_KEYS)&&e(t,l,i)}var n=e("./keys"),r=e("./useragent");t.addListener=function(e,t,i){if(e.addEventListener)return e.addEventListener(t,i,!1);if(e.attachEvent){var n=function(){i.call(e,window.event)};i._wrapper=n,e.attachEvent("on"+t,n)}},t.removeListener=function(e,t,i){if(e.removeEventListener)return e.removeEventListener(t,i,!1);e.detachEvent&&e.detachEvent("on"+t,i._wrapper||i)},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||r.isMac&&e.ctrlKey&&!e.altKey&&!e.shiftKey?2:e.preventDefault?e.button:{1:0,2:2,4:1}[e.button]},t.capture=function(e,i,n){function r(e){i&&i(e),n&&n(e),t.removeListener(document,"mousemove",i,!0),t.removeListener(document,"mouseup",r,!0),t.removeListener(document,"dragstart",r,!0)}return t.addListener(document,"mousemove",i,!0),t.addListener(document,"mouseup",r,!0),t.addListener(document,"dragstart",r,!0),r},t.addMouseWheelListener=function(e,i){"onmousewheel"in e?t.addListener(e,"mousewheel",function(e){var t=8;e.wheelDeltaX!==undefined?(e.wheelX=-e.wheelDeltaX/t,e.wheelY=-e.wheelDeltaY/t):(e.wheelX=0,e.wheelY=-e.wheelDelta/t),i(e)}):"onwheel"in e?t.addListener(e,"wheel",function(e){var t=.35;switch(e.deltaMode){case e.DOM_DELTA_PIXEL:e.wheelX=e.deltaX*t||0,e.wheelY=e.deltaY*t||0;break;case e.DOM_DELTA_LINE:case e.DOM_DELTA_PAGE:e.wheelX=5*(e.deltaX||0),e.wheelY=5*(e.deltaY||0)}i(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)),i(e)})},t.addMultiMouseDownListener=function(e,i,n,o){var s,a,l,c=0,u={2:"dblclick",3:"tripleclick",4:"quadclick"};t.addListener(e,"mousedown",function(e){if(0!==t.getButton(e)?c=0:e.detail>1?++c>4&&(c=1):c=1,r.isIE){var d=Math.abs(e.clientX-s)>5||Math.abs(e.clientY-a)>5;l&&!d||(c=1),l&&clearTimeout(l),l=setTimeout(function(){l=null},i[c-1]||600),1==c&&(s=e.clientX,a=e.clientY)}if(e._clicks=c,n[o]("mousedown",e),c>4)c=0;else if(c>1)return n[o](u[c],e)}),r.isOldIE&&t.addListener(e,"dblclick",function(e){c=2,l&&clearTimeout(l),l=setTimeout(function(){l=null},i[c-1]||600),n[o]("mousedown",e),n[o](u[c],e)})};var o=!r.isMac||!r.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)};t.getModifierString=function(e){return n.KEY_MODS[o(e)]};var s=null,a=0;if(t.addCommandKeyListener=function(e,n){var o=t.addListener;if(r.isOldGecko||r.isOpera&&!("KeyboardEvent"in window)){var a=null;o(e,"keydown",function(e){a=e.keyCode}),o(e,"keypress",function(e){return i(n,e,a)})}else{var l=null;o(e,"keydown",function(e){s[e.keyCode]=(s[e.keyCode]||0)+1;var t=i(n,e,e.keyCode);return l=e.defaultPrevented,t}),o(e,"keypress",function(e){l&&(e.ctrlKey||e.altKey||e.shiftKey||e.metaKey)&&(t.stopEvent(e),l=null)}),o(e,"keyup",function(e){s[e.keyCode]=null}),s||(s=Object.create(null),o(window,"focus",function(){s=Object.create(null)}))}},window.postMessage&&!r.isOldIE){t.nextTick=function(e,i){i=i||window;var n="zero-timeout-message-"+1;t.addListener(i,"message",function r(o){o.data==n&&(t.stopPropagation(o),t.removeListener(i,"message",r),e())}),i.postMessage(n,"*")}}t.nextFrame=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)}}),define("ace/lib/lang",["require","exports","module"],function(e,t){"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 i="";t>0;)1&t&&(i+=e),(t>>=1)&&(e+=e);return i};var i=/^\s\s*/,n=/\s\s*$/;t.stringTrimLeft=function(e){return e.replace(i,"")},t.stringTrimRight=function(e){return e.replace(n,"")},t.copyObject=function(e){var t={};for(var i in e)t[i]=e[i];return t},t.copyArray=function(e){for(var t=[],i=0,n=e.length;i<n;i++)e[i]&&"object"==typeof e[i]?t[i]=this.copyObject(e[i]):t[i]=e[i];return t},t.deepCopy=function(e){if("object"!=typeof e||!e)return e;var i=e.constructor;if(i===RegExp)return e;var n=i();for(var r in e)"object"==typeof e[r]?n[r]=t.deepCopy(e[r]):n[r]=e[r];return n},t.arrayToMap=function(e){for(var t={},i=0;i<e.length;i++)t[e[i]]=1;return t},t.createMap=function(e){var t=Object.create(null);for(var i in e)t[i]=e[i];return t},t.arrayRemove=function(e,t){for(var i=0;i<=e.length;i++)t===e[i]&&e.splice(i,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 i=[];return e.replace(t,function(e){i.push({offset:arguments[arguments.length-2],length:e.length})}),i},t.deferredCall=function(e){var t=null,i=function(){t=null,e()},n=function(e){return n.cancel(),t=setTimeout(i,e||0),n};return n.schedule=n,n.call=function(){return this.cancel(),e(),n},n.cancel=function(){return clearTimeout(t),t=null,n},n.isPending=function(){return t},n},t.delayedCall=function(e,t){var i=null,n=function(){i=null,e()},r=function(e){null==i&&(i=setTimeout(n,e||t))};return r.delay=function(e){i&&clearTimeout(i),i=setTimeout(n,e||t)},r.schedule=r,r.call=function(){this.cancel(),e()},r.cancel=function(){i&&clearTimeout(i),i=null},r.isPending=function(){return i},r}}),define("ace/keyboard/textinput",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/lib/dom","ace/lib/lang"],function(e,t){"use strict";var i=e("../lib/event"),n=e("../lib/useragent"),r=e("../lib/dom"),o=e("../lib/lang"),s=n.isChrome<18,a=n.isIE,l=function(e,t){function l(e){if(!f){if(f=!0,F)t=0,i=e?0:d.value.length-1;else var t=e?2:1,i=2;try{d.setSelectionRange(t,i)}catch(e){}f=!1}}function c(){f||(d.value=h,n.isWebKit&&C.schedule())}function u(){clearTimeout(z),z=setTimeout(function(){m&&(d.style.cssText=m,m=""),null==t.renderer.$keepTextAreaAtCursor&&(t.renderer.$keepTextAreaAtCursor=!0,t.renderer.$moveTextAreaToCursor())},n.isOldIE?200:0)}var d=r.createElement("textarea");d.className="ace_text-input",n.isTouchPad&&d.setAttribute("x-palm-disable-auto-cap",!0),d.setAttribute("wrap","off"),d.setAttribute("autocorrect","off"),d.setAttribute("autocapitalize","off"),d.setAttribute("spellcheck",!1),d.style.opacity="0",n.isOldIE&&(d.style.top="-1000px"),e.insertBefore(d,e.firstChild);var h="\x01\x01",p=!1,g=!1,f=!1,m="",v=!0;try{var y=document.activeElement===d}catch(e){}i.addListener(d,"blur",function(e){t.onBlur(e),y=!1}),i.addListener(d,"focus",function(e){y=!0,t.onFocus(e),l()}),this.focus=function(){var e=d.style.top;d.style.position="fixed",d.style.top="-1000px",d.focus(),setTimeout(function(){d.style.position="","-1000px"==d.style.top&&(d.style.top=e)},0)},this.blur=function(){d.blur()},this.isFocused=function(){return y};var w=o.delayedCall(function(){y&&l(v)}),C=o.delayedCall(function(){f||(d.value=h,y&&l())});n.isWebKit||t.addEventListener("changeSelection",function(){t.selection.isEmpty()!=v&&(v=!v,w.schedule())}),c(),y&&t.onFocus();var b=function(e){return 0===e.selectionStart&&e.selectionEnd===e.value.length};if(!d.setSelectionRange&&d.createTextRange&&(d.setSelectionRange=function(e,t){var i=this.createTextRange();i.collapse(!0),i.moveStart("character",e),i.moveEnd("character",t),i.select()},b=function(e){try{var t=e.ownerDocument.selection.createRange()}catch(e){}return!(!t||t.parentElement()!=e)&&t.text==e.value}),n.isOldIE){var A=!1,x=function(e){if(!A){var t=d.value;if(!f&&t&&t!=h){if(e&&t==h[0])return S.schedule();D(t),A=!0,c(),A=!1}}},S=o.delayedCall(x);i.addListener(d,"propertychange",x);var E={13:1,27:1};i.addListener(d,"keyup",function(e){if(!f||d.value&&!E[e.keyCode]||setTimeout(I,0),(d.value.charCodeAt(0)||0)<129)return S.call();f?O():P()}),i.addListener(d,"keydown",function(){S.schedule(50)})}var $=function(){p?p=!1:b(d)?(t.selectAll(),l()):F&&l(t.selection.isEmpty())},F=null;this.setInputHandler=function(e){F=e},this.getInputHandler=function(){return F};var k=!1,D=function(e){F&&(e=F(e),F=null),g?(l(),e&&t.onPaste(e),g=!1):e==h.charAt(0)?k?t.execCommand("del",{source:"ace"}):t.execCommand("backspace",{source:"ace"}):(e.substring(0,2)==h?e=e.substr(2):e.charAt(0)==h.charAt(0)?e=e.substr(1):e.charAt(e.length-1)==h.charAt(0)&&(e=e.slice(0,-1)),e.charAt(e.length-1)==h.charAt(0)&&(e=e.slice(0,-1)),e&&t.onTextInput(e)),k&&(k=!1)},T=function(){if(!f){var e=d.value;D(e),c()}},M=function(e,t){var i=e.clipboardData||window.clipboardData;if(i&&!s){var n=a?"Text":"text/plain";return t?!1!==i.setData(n,t):i.getData(n)}},L=function(e,n){var r=t.getCopyText();if(!r)return i.preventDefault(e);M(e,r)?(n?t.onCut():t.onCopy(),i.preventDefault(e)):(p=!0,d.value=r,d.select(),setTimeout(function(){p=!1,c(),l(),n?t.onCut():t.onCopy()}))},R=function(e){L(e,!0)},_=function(e){L(e,!1)},B=function(e){var r=M(e);"string"==typeof r?(r&&t.onPaste(r),n.isIE&&setTimeout(l),i.preventDefault(e)):(d.value="",g=!0)};i.addCommandKeyListener(d,t.onCommandKey.bind(t)),i.addListener(d,"select",$),i.addListener(d,"input",T),i.addListener(d,"cut",R),i.addListener(d,"copy",_),i.addListener(d,"paste",B),"oncut"in d&&"oncopy"in d&&"onpaste"in d||i.addListener(e,"keydown",function(e){if((!n.isMac||e.metaKey)&&e.ctrlKey)switch(e.keyCode){case 67:_(e);break;case 86:B(e);break;case 88:R(e)}});var P=function(){f||!t.onCompositionStart||t.$readOnly||(f={},t.onCompositionStart(),setTimeout(O,0),t.on("mousedown",I),t.selection.isEmpty()||(t.insert(""),t.session.markUndoGroup(),t.selection.clearSelection()),t.session.markUndoGroup())},O=function(){if(f&&t.onCompositionUpdate&&!t.$readOnly){var e=d.value.replace(/\x01/g,"");if(f.lastValue!==e&&(t.onCompositionUpdate(e),f.lastValue&&t.undo(),f.lastValue=e,f.lastValue)){var i=t.selection.getRange();t.insert(f.lastValue),t.session.markUndoGroup(),f.range=t.selection.getRange(),t.selection.setRange(i),t.selection.clearSelection()}}},I=function(e){if(t.onCompositionEnd&&!t.$readOnly){var i=f;f=!1;var n=setTimeout(function(){n=null;var e=d.value.replace(/\x01/g,"");f||(e==i.lastValue?c():!i.lastValue&&e&&(c(),D(e)))});F=function(e){return n&&clearTimeout(n),(e=e.replace(/\x01/g,""))==i.lastValue?"":(i.lastValue&&n&&t.undo(),e)},t.onCompositionEnd(),t.removeListener("mousedown",I),"compositionend"==e.type&&i.range&&t.selection.setRange(i.range)}},N=o.delayedCall(O,50);i.addListener(d,"compositionstart",P),n.isGecko?i.addListener(d,"text",function(){N.schedule()}):(i.addListener(d,"keyup",function(){N.schedule()}),i.addListener(d,"keydown",function(){N.schedule()})),i.addListener(d,"compositionend",I),this.getElement=function(){return d},this.setReadOnly=function(e){d.readOnly=e},this.onContextMenu=function(e){k=!0,l(t.selection.isEmpty()),t._emit("nativecontextmenu",{target:t,domEvent:e}),this.moveToMouse(e,!0)},this.moveToMouse=function(e,o){if(o||!n.isOldIE){m||(m=d.style.cssText),d.style.cssText=(o?"z-index:100000;":"")+"height:"+d.style.height+";"+(n.isIE?"opacity:0.1;":"");var s=t.container.getBoundingClientRect(),a=r.computedStyle(t.container),l=s.top+(parseInt(a.borderTopWidth)||0),c=s.left+(parseInt(s.borderLeftWidth)||0),h=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,h)+"px"};p(e),"mousedown"==e.type&&(t.renderer.$keepTextAreaAtCursor&&(t.renderer.$keepTextAreaAtCursor=null),n.isWin&&!n.isOldIE&&i.capture(t.container,p,u))}},this.onContextMenuClose=u;var z,H=function(e){t.textInput.onContextMenu(e),u()};i.addListener(t.renderer.scroller,"contextmenu",H),i.addListener(d,"contextmenu",H)};t.TextInput=l}),define("ace/mouse/default_handlers",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],function(e,t){"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)),["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 n(e,t,i,n){return Math.sqrt(Math.pow(i-e,2)+Math.pow(n-t,2))}function r(e,t){if(e.start.row==e.end.row)var i=2*t.column-e.start.column-e.end.column;else if(e.start.row!=e.end.row-1||e.start.column||e.end.column)var i=2*t.row-e.start.row-e.end.row;else var i=t.column-4;return i<0?{cursor:e.start,anchor:e.end}:{cursor:e.end,anchor:e.start}}e("../lib/dom"),e("../lib/event"),e("../lib/useragent");(function(){this.onMouseDown=function(e){var t=e.inSelection(),i=e.getDocumentPosition();this.mousedownEvent=e;var n=this.editor;if(0!==e.getButton()){var r=n.getSelectionRange(),o=r.isEmpty();return n.$blockScrolling++,o&&n.selection.moveToPosition(i),n.$blockScrolling--,void n.textInput.onContextMenu(e.domEvent)}return this.mousedownEvent.time=Date.now(),!t||n.isFocused()||(n.focus(),!this.$focusTimout||this.$clickSelection||n.inMultiSelectMode)?(this.captureMouse(e),this.startSelect(i,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 i=this.editor;i.$blockScrolling++,this.mousedownEvent.getShiftKey()?i.selection.selectToPosition(e):t||i.selection.moveToPosition(e),t||this.select(),i.renderer.scroller.setCapture&&i.renderer.scroller.setCapture(),i.setStyle("ace_selecting"),this.setState("select"),i.$blockScrolling--},this.select=function(){var e,t=this.editor,i=t.renderer.screenToTextCoordinates(this.x,this.y);if(t.$blockScrolling++,this.$clickSelection){var n=this.$clickSelection.comparePoint(i);if(-1==n)e=this.$clickSelection.end;else if(1==n)e=this.$clickSelection.start;else{var o=r(this.$clickSelection,i);i=o.cursor,e=o.anchor}t.selection.setSelectionAnchor(e.row,e.column)}t.selection.selectToPosition(i),t.$blockScrolling--,t.renderer.scrollCursorIntoView()},this.extendSelectionBy=function(e){var t,i=this.editor,n=i.renderer.screenToTextCoordinates(this.x,this.y),o=i.selection[e](n.row,n.column);if(i.$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==n.row&&o.end.column==n.column||(n=o.start);else if(1==a&&s>=0)t=this.$clickSelection.start,o.start.row==n.row&&o.start.column==n.column||(n=o.end);else if(-1==s&&1==a)n=o.end,t=o.start;else{var l=r(this.$clickSelection,n);n=l.cursor,t=l.anchor}i.selection.setSelectionAnchor(t.row,t.column)}i.selection.selectToPosition(n),i.$blockScrolling--,i.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=n(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(),i=this.editor,n=i.session,r=n.getBracketRange(t);r?(r.isEmpty()&&(r.start.column--,r.end.column++),this.setState("select")):(r=i.selection.getWordRange(t.row,t.column),this.setState("selectByWords")),this.$clickSelection=r,this.select()},this.onTripleClick=function(e){var t=e.getDocumentPosition(),i=this.editor;this.setState("selectByLines");var n=i.getSelectionRange();n.isMultiLine()&&n.contains(t.row,t.column)?(this.$clickSelection=i.selection.getLineRange(n.start.row),this.$clickSelection.end=i.selection.getLineRange(n.end.row).end):this.$clickSelection=i.selection.getLineRange(t.row),this.select()},this.onQuadClick=function(){var e=this.editor;e.selectAll(),this.$clickSelection=e.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=e.domEvent.timeStamp,i=t-(this.$lastScrollTime||0),n=this.editor;return n.renderer.isScrollableBy(e.wheelX*e.speed,e.wheelY*e.speed)||i<200?(this.$lastScrollTime=t,n.renderer.scrollBy(e.wheelX*e.speed,e.wheelY*e.speed),e.stop()):void 0}}}).call(i.prototype),t.DefaultHandlers=i}),define("ace/tooltip",["require","exports","module","ace/lib/oop","ace/lib/dom"],function(e,t){"use strict";function i(e){this.isOpen=!1,this.$element=null,this.$parentNode=e}var n=(e("./lib/oop"),e("./lib/dom"));(function(){this.$init=function(){return this.$element=n.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){n.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){n.addCssClass(this.getElement(),e)},this.show=function(e,t,i){null!=e&&this.setText(e),null!=t&&null!=i&&this.setPosition(t,i),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}}).call(i.prototype),t.Tooltip=i}),define("ace/mouse/default_gutter_handler",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event","ace/tooltip"],function(e,t){"use strict";function i(e){function t(){var t=d.getDocumentPosition().row,n=l.$annotations[t];if(!n)return i();if(t==a.session.getLength()){var r=a.renderer.pixelToScreenCoordinates(0,d.y).row,s=d.$pos;if(r>a.session.documentToScreenRow(s.row,s.column))return i()}if(h!=n)if(h=n.text.join("<br/>"),c.setHtml(h),c.show(),a.on("mousewheel",i),e.$tooltipFollowsMouse)o(d);else{var u=l.$cells[a.session.documentToScreenRow(t,0)].element,p=u.getBoundingClientRect(),g=c.getElement().style;g.left=p.right+"px",g.top=p.bottom+"px"}}function i(){u&&(u=clearTimeout(u)),h&&(c.hide(),h=null,a.removeEventListener("mousewheel",i))}function o(e){c.setPosition(e.x,e.y)}var a=e.editor,l=a.renderer.$gutterLayer,c=new n(a.container);e.editor.setDefaultHandler("guttermousedown",function(t){if(a.isFocused()&&0==t.getButton()){if("foldWidgets"!=l.getRegion(t)){var i=t.getDocumentPosition().row,n=a.session.selection;if(t.getShiftKey())n.selectTo(i,0);else{if(2==t.domEvent.detail)return a.selectAll(),t.preventDefault();e.$clickSelection=a.selection.getLineRange(i)}return e.setState("selectByLines"),e.captureMouse(t),t.preventDefault()}}});var u,d,h;e.editor.setDefaultHandler("guttermousemove",function(n){var s=n.domEvent.target||n.domEvent.srcElement;if(r.hasCssClass(s,"ace_fold-widget"))return i();h&&e.$tooltipFollowsMouse&&o(n),d=n,u||(u=setTimeout(function(){u=null,d&&!e.isMousePressed?t():i()},50))}),s.addListener(a.renderer.$gutter,"mouseout",function(){d=null,h&&!u&&(u=setTimeout(function(){u=null,i()},50))}),a.on("changeSession",i)}function n(e){a.call(this,e)}var r=e("../lib/dom"),o=e("../lib/oop"),s=e("../lib/event"),a=e("../tooltip").Tooltip;o.inherits(n,a),function(){this.setPosition=function(e,t){var i=window.innerWidth||document.documentElement.clientWidth,n=window.innerHeight||document.documentElement.clientHeight,r=this.getWidth(),o=this.getHeight();e+=15,t+=15,e+r>i&&(e-=e+r-i),t+o>n&&(t-=20+o),a.prototype.setPosition.call(this,e,t)}}.call(n.prototype),t.GutterHandler=i}),define("ace/mouse/mouse_event",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(e,t){"use strict";var i=e("../lib/event"),n=e("../lib/useragent"),r=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,t=e.getSelectionRange();if(t.isEmpty())this.$inSelection=!1;else{var i=this.getDocumentPosition();this.$inSelection=t.contains(i.row,i.column)}return this.$inSelection},this.getButton=function(){return i.getButton(this.domEvent)},this.getShiftKey=function(){return this.domEvent.shiftKey},this.getAccelKey=n.isMac?function(){return this.domEvent.metaKey}:function(){return this.domEvent.ctrlKey}}).call(r.prototype)}),define("ace/mouse/dragdrop_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],function(e,t){"use strict";function i(e){function t(e,t){var i=Date.now(),r=!t||e.row!=t.row,o=!t||e.column!=t.column;if(!F||r||o)m.$blockScrolling+=1,m.moveCursorToPosition(e),m.$blockScrolling-=1,F=i,k={x:w,y:C};else{n(k.x,k.y,w,C)>c?F=null:i-F>=l&&(m.renderer.scrollCursorIntoView(),F=null)}}function i(e,t){var i=Date.now(),n=m.renderer.layerConfig.lineHeight,r=m.renderer.layerConfig.characterWidth,o=m.renderer.scroller.getBoundingClientRect(),s={x:{left:w-o.left,right:o.right-w},y:{top:C-o.top,bottom:o.bottom-C}},l=Math.min(s.x.left,s.x.right),c=Math.min(s.y.top,s.y.bottom),u={row:e.row,column:e.column};l/r<=2&&(u.column+=s.x.left<s.x.right?-3:2),c/n<=1&&(u.row+=s.y.top<s.y.bottom?-1:1);var d=e.row!=u.row,h=e.column!=u.column,p=!t||e.row!=t.row;d||h&&!p?$?i-$>=a&&m.renderer.scrollCursorIntoView(u):$=i:$=null}function u(){var e=x;x=m.renderer.screenToTextCoordinates(w,C),t(x,e),i(x,e)}function d(){A=m.selection.toOrientedRange(),y=m.session.addMarker(A,"ace_selection",m.getSelectionStyle()),m.clearSelection(),m.isFocused()&&m.renderer.$cursorLayer.setBlinking(!1),clearInterval(b),u(),b=setInterval(u,20),T=0,o.addListener(document,"mousemove",p)}function h(){clearInterval(b),m.session.removeMarker(y),y=null,m.$blockScrolling+=1,m.selection.fromOrientedRange(A),m.$blockScrolling-=1,m.isFocused()&&!E&&m.renderer.$cursorLayer.setBlinking(!m.getReadOnly()),A=null,x=null,T=0,$=null,F=null,o.removeListener(document,"mousemove",p)}function p(){null==M&&(M=setTimeout(function(){null!=M&&y&&h()},20))}function g(e){var t=e.types;return!t||Array.prototype.some.call(t,function(e){return"text/plain"==e||"Text"==e})}function f(e){var t=["copy","copymove","all","uninitialized"],i=["move","copymove","linkmove","all","uninitialized"],n=s.isMac?e.altKey:e.ctrlKey,r="uninitialized";try{r=e.dataTransfer.effectAllowed.toLowerCase()}catch(e){}var o="none";return n&&t.indexOf(r)>=0?o="copy":i.indexOf(r)>=0?o="move":t.indexOf(r)>=0&&(o="copy"),o}var m=e.editor,v=r.createElement("img");v.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",s.isOpera&&(v.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),m.addEventListener("mousedown",this.onMouseDown.bind(e));var y,w,C,b,A,x,S,E,$,F,k,D=m.container,T=0;this.onDragStart=function(e){if(this.cancelDrag||!D.draggable){var t=this;return setTimeout(function(){t.startSelect(),t.captureMouse(e)},0),e.preventDefault()}A=m.getSelectionRange();var i=e.dataTransfer;i.effectAllowed=m.getReadOnly()?"copy":"copyMove",s.isOpera&&(m.container.appendChild(v),v.scrollTop=0),i.setDragImage&&i.setDragImage(v,0,0),s.isOpera&&m.container.removeChild(v),i.clearData(),i.setData("Text",m.session.getTextRange()),E=!0,this.setState("drag")},this.onDragEnd=function(e){if(D.draggable=!1,E=!1,this.setState(null),!m.getReadOnly()){var t=e.dataTransfer.dropEffect;S||"move"!=t||m.session.remove(m.getSelectionRange()),m.renderer.$cursorLayer.setBlinking(!0)}this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle("")},this.onDragEnter=function(e){if(!m.getReadOnly()&&g(e.dataTransfer))return w=e.clientX,C=e.clientY,y||d(),T++,e.dataTransfer.dropEffect=S=f(e),o.preventDefault(e)},this.onDragOver=function(e){if(!m.getReadOnly()&&g(e.dataTransfer))return w=e.clientX,C=e.clientY,y||(d(),T++),null!==M&&(M=null),e.dataTransfer.dropEffect=S=f(e),o.preventDefault(e)},this.onDragLeave=function(e){if(--T<=0&&y)return h(),S=null,o.preventDefault(e)},this.onDrop=function(e){if(x){var t=e.dataTransfer;if(E)switch(S){case"move":A=A.contains(x.row,x.column)?{start:x,end:x}:m.moveText(A,x);break;case"copy":A=m.moveText(A,x,!0)}else{var i=t.getData("Text");A={start:x,end:m.session.insert(x,i)},m.focus(),S=null}return h(),o.preventDefault(e)}},o.addListener(D,"dragstart",this.onDragStart.bind(e)),o.addListener(D,"dragend",this.onDragEnd.bind(e)),o.addListener(D,"dragenter",this.onDragEnter.bind(e)),o.addListener(D,"dragover",this.onDragOver.bind(e)),o.addListener(D,"dragleave",this.onDragLeave.bind(e)),o.addListener(D,"drop",this.onDrop.bind(e));var M=null}function n(e,t,i,n){return Math.sqrt(Math.pow(i-e,2)+Math.pow(n-t,2))}var r=e("../lib/dom"),o=e("../lib/event"),s=e("../lib/useragent"),a=200,l=200,c=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(){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=s.isWin?"default":"move";e.renderer.setCursorStyle(t),this.setState("dragReady")},this.onMouseDrag=function(){var e=this.editor.container;if(s.isIE&&"dragReady"==this.state){var t=n(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);t>3&&e.dragDrop()}if("dragWait"===this.state){var t=n(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);t>0&&(e.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()))}},this.onMouseDown=function(e){if(this.$dragEnabled){this.mousedownEvent=e;var t=this.editor,i=e.inSelection(),n=e.getButton();if(1===(e.domEvent.detail||1)&&0===n&&i){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(s.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}),define("ace/lib/net",["require","exports","module","ace/lib/dom"],function(e,t){"use strict";var i=e("./dom");t.get=function(e,t){var i=new XMLHttpRequest;i.open("GET",e,!0),i.onreadystatechange=function(){4===i.readyState&&t(i.responseText)},i.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,i){!i&&r.readyState&&"loaded"!=r.readyState&&"complete"!=r.readyState||(r=r.onload=r.onreadystatechange=null,i||t())}},t.qualifyURL=function(e){var t=document.createElement("a");return t.href=e,t.href}}),define("ace/lib/event_emitter",["require","exports","module"],function(e,t){"use strict";var i={},n=function(){this.propagationStopped=!0},r=function(){this.defaultPrevented=!0};i._emit=i._dispatchEvent=function(e,t){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var i=this._eventRegistry[e]||[],o=this._defaultHandlers[e];if(i.length||o){"object"==typeof t&&t||(t={}),t.type||(t.type=e),t.stopPropagation||(t.stopPropagation=n),t.preventDefault||(t.preventDefault=r),i=i.slice();for(var s=0;s<i.length&&(i[s](t,this),!t.propagationStopped);s++);return o&&!t.defaultPrevented?o(t,this):void 0}},i._signal=function(e,t){var i=(this._eventRegistry||{})[e];if(i){i=i.slice();for(var n=0;n<i.length;n++)i[n](t,this)}},i.once=function(e,t){var i=this;t&&this.addEventListener(e,function n(){i.removeEventListener(e,n),t.apply(null,arguments)})},i.setDefaultHandler=function(e,t){var i=this._defaultHandlers;if(i||(i=this._defaultHandlers={_disabled_:{}}),i[e]){var n=i[e],r=i._disabled_[e];r||(i._disabled_[e]=r=[]),r.push(n);var o=r.indexOf(t);-1!=o&&r.splice(o,1)}i[e]=t},i.removeDefaultHandler=function(e,t){var i=this._defaultHandlers;if(i){var n=i._disabled_[e];if(i[e]==t){i[e];n&&this.setDefaultHandler(e,n.pop())}else if(n){var r=n.indexOf(t);-1!=r&&n.splice(r,1)}}},i.on=i.addEventListener=function(e,t,i){this._eventRegistry=this._eventRegistry||{};var n=this._eventRegistry[e];return n||(n=this._eventRegistry[e]=[]),-1==n.indexOf(t)&&n[i?"unshift":"push"](t),t},i.off=i.removeListener=i.removeEventListener=function(e,t){this._eventRegistry=this._eventRegistry||{};var i=this._eventRegistry[e];if(i){var n=i.indexOf(t);-1!==n&&i.splice(n,1)}},i.removeAllListeners=function(e){this._eventRegistry&&(this._eventRegistry[e]=[])},t.EventEmitter=i}),define("ace/lib/app_config",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(e,t){"no use strict";function i(){"undefined"!=typeof console&&console.warn&&console.warn.apply(console,arguments)}function n(e,t){var i=new Error(e);i.data=t,"object"==typeof console&&console.error&&console.error(i),setTimeout(function(){throw i})}var r=e("./oop"),o=e("./event_emitter").EventEmitter,s={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+'"')}},a=function(){this.$defaultOptions={}};(function(){r.implement(this,o),this.defineOptions=function(e,t,i){return e.$options||(this.$defaultOptions[t]=e.$options={}),Object.keys(i).forEach(function(t){var n=i[t];"string"==typeof n&&(n={forwardTo:n}),n.name||(n.name=t),e.$options[n.name]=n,"initialValue"in n&&(e["$"+n.name]=n.initialValue)}),r.implement(e,s),this},this.resetOptions=function(e){Object.keys(e.$options).forEach(function(t){var i=e.$options[t];"value"in i&&e.setOption(t,i.value)})},this.setDefaultValue=function(e,t,i){var n=this.$defaultOptions[e]||(this.$defaultOptions[e]={});n[t]&&(n.forwardTo?this.setDefaultValue(n.forwardTo,t,i):n[t].value=i)},this.setDefaultValues=function(e,t){Object.keys(t).forEach(function(i){this.setDefaultValue(e,i,t[i])},this)},this.warn=i,this.reportError=n}).call(a.prototype),t.AppConfig=a}),define("ace/config",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/lib/net","ace/lib/app_config"],function(e,t,i){"no use strict";function n(n){if(c.packaged=n||e.packaged||i.packaged||l.define&&define.packaged,!l.document)return"";for(var o={},s="",a=document.currentScript||document._currentScript,u=a&&a.ownerDocument||document,d=u.getElementsByTagName("script"),h=0;h<d.length;h++){var p=d[h],g=p.src||p.getAttribute("src");if(g){for(var f=p.attributes,m=0,v=f.length;m<v;m++){var y=f[m];0===y.name.indexOf("data-ace-")&&(o[r(y.name.replace(/^data-ace-/,""))]=y.value)}var w=g.match(/^(.*)\/ace(\-\w+)?\.js(\?|$)/);w&&(s=w[1])}}s&&(o.base=o.base||s,o.packaged=!0),o.basePath=o.base,o.workerPath=o.workerPath||o.base,o.modePath=o.modePath||o.base,o.themePath=o.themePath||o.base,delete o.base;for(var C in o)"undefined"!=typeof o[C]&&t.set(C,o[C])}function r(e){return e.replace(/-(.)/g,function(e,t){return t.toUpperCase()})}var o=e("./lib/lang"),s=(e("./lib/oop"),e("./lib/net")),a=e("./lib/app_config").AppConfig;i.exports=t=new a;var l=function(){return this}(),c={packaged:!1,workerPath:null,modePath:null,themePath:null,basePath:"",suffix:".js",$moduleUrls:{}};t.get=function(e){if(!c.hasOwnProperty(e))throw new Error("Unknown config key: "+e);return c[e]},t.set=function(e,t){if(!c.hasOwnProperty(e))throw new Error("Unknown config key: "+e);c[e]=t},t.all=function(){return o.copyObject(c)},t.moduleUrl=function(e,t){if(c.$moduleUrls[e])return c.$moduleUrls[e];var i=e.split("/");t=t||i[i.length-2]||"";var n="snippets"==t?"/":"-",r=i[i.length-1];if("worker"==t&&"-"==n){var o=new RegExp("^"+t+"[\\-_]|[\\-_]"+t+"$","g");r=r.replace(o,"")}(!r||r==t)&&i.length>1&&(r=i[i.length-2]);var s=c[t+"Path"];return null==s?s=c.basePath:"/"==n&&(t=n=""),s&&"/"!=s.slice(-1)&&(s+="/"),s+t+n+r+this.get("suffix")},t.setModuleUrl=function(e,t){return c.$moduleUrls[e]=t},t.$loading={},t.loadModule=function(i,n){var r,o;Array.isArray(i)&&(o=i[0],i=i[1]);try{r=e(i)}catch(e){}if(r&&!t.$loading[i])return n&&n(r);if(t.$loading[i]||(t.$loading[i]=[]),t.$loading[i].push(n),!(t.$loading[i].length>1)){var a=function(){e([i],function(e){t._emit("load.module",{name:i,module:e});var n=t.$loading[i];t.$loading[i]=null,n.forEach(function(t){t&&t(e)})})};if(!t.get("packaged"))return a();s.loadScript(t.moduleUrl(i,o),a)}},n(!0),t.init=n}),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){"use strict";var i=e("../lib/event"),n=e("../lib/useragent"),r=e("./default_handlers").DefaultHandlers,o=e("./default_gutter_handler").GutterHandler,s=e("./mouse_event").MouseEvent,a=e("./dragdrop_handler").DragdropHandler,l=e("../config"),c=function(e){var t=this;this.editor=e,new r(this),new o(this),new a(this);var s=function(){document.hasFocus&&document.hasFocus()||window.focus(),e.focus()},l=e.renderer.getMouseEventTarget();i.addListener(l,"click",this.onMouseEvent.bind(this,"click")),i.addListener(l,"mousemove",this.onMouseMove.bind(this,"mousemove")),i.addMultiMouseDownListener(l,[400,300,250],this,"onMouseEvent"),e.renderer.scrollBarV&&(i.addMultiMouseDownListener(e.renderer.scrollBarV.inner,[400,300,250],this,"onMouseEvent"),i.addMultiMouseDownListener(e.renderer.scrollBarH.inner,[400,300,250],this,"onMouseEvent"),n.isIE&&(i.addListener(e.renderer.scrollBarV.element,"mousedown",s),i.addListener(e.renderer.scrollBarH.element,"mousedown",s))),i.addMouseWheelListener(e.container,this.onMouseWheel.bind(this,"mousewheel"));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(l,"mousedown",s),i.addListener(c,"mousedown",function(t){return e.focus(),i.preventDefault(t)}),e.on("mousemove",function(i){if(!t.state&&!t.$dragDelay&&t.$dragEnabled){var n=e.renderer.screenToTextCoordinates(i.x,i.y),r=e.session.selection.getRange(),o=e.renderer;!r.isEmpty()&&r.insideStart(n.row,n.column)?o.setCursorStyle("default"):o.setCursorStyle("")}})};(function(){this.onMouseEvent=function(e,t){this.editor._emit(e,new s(t,this.editor))},this.onMouseMove=function(e,t){var i=this.editor._eventRegistry&&this.editor._eventRegistry.mousemove;i&&i.length&&this.editor._emit(e,new s(t,this.editor))},this.onMouseWheel=function(e,t){var i=new s(t,this.editor);i.speed=2*this.$scrollSpeed,i.wheelX=t.wheelX,i.wheelY=t.wheelY,this.editor._emit(e,i)},this.setState=function(e){this.state=e},this.captureMouse=function(e,t){this.x=e.x,this.y=e.y,this.isMousePressed=!0;var r=this.editor.renderer;r.$keepTextAreaAtCursor&&(r.$keepTextAreaAtCursor=null);var o=this,a=function(e){if(e){if(n.isWebKit&&!e.which&&o.releaseMouse)return o.releaseMouse();o.x=e.clientX,o.y=e.clientY,t&&t(e),o.mouseEvent=new s(e,o.editor),o.$mouseMoved=!0}},l=function(e){clearInterval(u),c(),o[o.state+"End"]&&o[o.state+"End"](e),o.state="",null==r.$keepTextAreaAtCursor&&(r.$keepTextAreaAtCursor=!0,r.$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(n.isOldIE&&"dblclick"==e.domEvent.type)return setTimeout(function(){l(e)});o.$onCaptureMouseMove=a,o.releaseMouse=i.capture(this.editor.container,a,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(c.prototype),l.defineOptions(c.prototype,"mouseHandler",{scrollSpeed:{initialValue:2},dragDelay:{initialValue:n.isMac?150:0},dragEnabled:{initialValue:!0},focusTimout:{initialValue:0},tooltipFollowsMouse:{initialValue:!0}}),t.MouseHandler=c}),define("ace/mouse/fold_handler",["require","exports","module"],function(e,t){"use strict";function i(e){e.on("click",function(t){var i=t.getDocumentPosition(),n=e.session,r=n.getFoldAt(i.row,i.column,1);r&&(t.getAccelKey()?n.removeFold(r):n.expandFold(r),t.stop())}),e.on("gutterclick",function(t){if("foldWidgets"==e.renderer.$gutterLayer.getRegion(t)){var i=t.getDocumentPosition().row,n=e.session;n.foldWidgets&&n.foldWidgets[i]&&e.session.onFoldWidgetClick(i,t),e.isFocused()||e.focus(),t.stop()}}),e.on("gutterdblclick",function(t){if("foldWidgets"==e.renderer.$gutterLayer.getRegion(t)){var i=t.getDocumentPosition().row,n=e.session,r=n.getParentFoldRangeData(i,!0),o=r.range||r.firstRange;if(o){i=o.start.row;var s=n.getFoldAt(i,n.getLine(i).length,1);s?n.removeFold(s):(n.addFold("...",o),e.renderer.scrollCursorIntoView({row:o.start.row,column:0}))}t.stop()}})}t.FoldHandler=i}),define("ace/keyboard/keybinding",["require","exports","module","ace/lib/keys","ace/lib/event"],function(e,t){"use strict";var i=e("../lib/keys"),n=e("../lib/event"),r=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 i=this.$handlers.indexOf(e);-1!=i&&this.$handlers.splice(i,1),t==undefined?this.$handlers.push(e):this.$handlers.splice(t,0,e),-1==i&&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(i){return i.getStatusText&&i.getStatusText(t,e)||""}).filter(Boolean).join(" ")},this.$callKeyboardHandlers=function(e,t,i,r){for(var o,s=!1,a=this.$editor.commands,l=this.$handlers.length;l--&&!((o=this.$handlers[l].handleKeyboard(this.$data,e,t,i,r))&&o.command&&(s="null"==o.command||a.exec(o.command,this.$editor,o.args,r),s&&r&&-1!=e&&1!=o.passEvent&&1!=o.command.passEvent&&n.stopEvent(r),s)););return 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)||this.$editor.commands.exec("insertstring",this.$editor,e)}}).call(r.prototype),t.KeyBinding=r}),define("ace/range",["require","exports","module"],function(e,t){"use strict";var i=function(e,t){return e.row-t.row||e.column-t.column},n=function(e,t,i,n){this.start={row:e,column:t},this.end={row:i,column:n}};(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,i=e.end,n=e.start;return t=this.compare(i.row,i.column),1==t?(t=this.compare(n.row,n.column),1==t?2:0==t?1:0):-1==t?-2:(t=this.compare(n.row,n.column),-1==t?-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 i={row:t+1,column:0};else if(this.end.row<e)var i={row:e,column:0};if(this.start.row>t)var r={row:t+1,column:0};else if(this.start.row<e)var r={row:e,column:0};return n.fromPoints(r||this.start,i||this.end)},this.extend=function(e,t){var i=this.compare(e,t);if(0==i)return this;if(-1==i)var r={row:e,column:t};else var o={row:e,column:t};return n.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 n.fromPoints(this.start,this.end)},this.collapseRows=function(){return 0==this.end.column?new n(this.start.row,0,Math.max(this.start.row,this.end.row-1),0):new n(this.start.row,0,this.end.row,0)},this.toScreenRange=function(e){var t=e.documentToScreenPosition(this.start),i=e.documentToScreenPosition(this.end);return new n(t.row,t.column,i.row,i.column)},this.moveBy=function(e,t){this.start.row+=e,this.start.column+=t,this.end.row+=e,this.end.column+=t}}).call(n.prototype),n.fromPoints=function(e,t){return new n(e.row,e.column,t.row,t.column)},n.comparePoints=i,n.comparePoints=function(e,t){return e.row-t.row||e.column-t.column},t.Range=n}),define("ace/selection",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/range"],function(e,t){"use strict";var i=e("./lib/oop"),n=e("./lib/lang"),r=e("./lib/event_emitter").EventEmitter,o=e("./range").Range,s=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,r),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)return void this.moveCursorTo(this.lead.row,this.lead.column+e);var t=this.getSelectionAnchor(),i=this.getSelectionLead(),n=this.isBackwards();n&&0===t.column||this.setSelectionAnchor(t.row,t.column+e),(n||0!==i.column)&&this.$moveSelection(function(){this.moveCursorTo(i.row,i.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()?o.fromPoints(t,t):this.isBackwards()?o.fromPoints(t,e):o.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 i=e||this.lead;e=i.row,t=i.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 i,n="number"==typeof e?e:this.lead.row,r=this.session.getFoldLine(n);return r?(n=r.start.row,i=r.end.row):i=n,!0===t?new o(n,0,i,this.session.getLine(i).length):new o(n,0,i+1,0)},this.selectLine=function(){this.setSelectionRange(this.getLineRange())},this.moveCursorUp=function(){this.moveCursorBy(-1,0)},this.moveCursorDown=function(){this.moveCursorBy(1,0)},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 i=this.session.getTabSize();this.session.isTabStop(t)&&this.doc.getLine(t.row).slice(t.column-i,t.column).split(" ").length-1==i?this.moveCursorBy(0,-i):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 i=this.session.getTabSize(),t=this.lead;this.session.isTabStop(t)&&this.doc.getLine(t.row).slice(t.column,t.column+i).split(" ").length-1==i?this.moveCursorBy(0,i):this.moveCursorBy(0,1)}},this.moveCursorLineStart=function(){var e=this.lead.row,t=this.lead.column,i=this.session.documentToScreenRow(e,t),n=this.session.screenToDocumentPosition(i,0),r=this.session.getDisplayLine(e,null,n.row,n.column),o=r.match(/^\s*/);o[0].length==t||this.session.$useEmacsStyleLineStart||(n.column+=o[0].length),this.moveCursorToPosition(n)},this.moveCursorLineEnd=function(){var e=this.lead,t=this.session.getDocumentLastRowColumnPosition(e.row,e.column);if(this.lead.column==t.column){var i=this.session.getLine(t.row);if(t.column==i.length){var n=i.search(/\s+$/);n>0&&(t.column=n)}}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,i=this.doc.getLine(e),n=i.substring(t);this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;var r=this.session.getFoldAt(e,t,1);return r?void this.moveCursorTo(r.end.row,r.end.column):(this.session.nonTokenRe.exec(n)&&(t+=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0,n=i.substring(t)),t>=i.length?(this.moveCursorTo(e,i.length),this.moveCursorRight(),void(e<this.doc.getLength()-1&&this.moveCursorWordRight())):(this.session.tokenRe.exec(n)&&(t+=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),void this.moveCursorTo(e,t)))},this.moveCursorLongWordLeft=function(){var e,t=this.lead.row,i=this.lead.column;if(e=this.session.getFoldAt(t,i,-1))return void this.moveCursorTo(e.start.row,e.start.column);var r=this.session.getFoldStringAt(t,i,-1);null==r&&(r=this.doc.getLine(t).substring(0,i));var o=n.stringReverse(r);if(this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0,this.session.nonTokenRe.exec(o)&&(i-=this.session.nonTokenRe.lastIndex,o=o.slice(this.session.nonTokenRe.lastIndex),this.session.nonTokenRe.lastIndex=0),i<=0)return this.moveCursorTo(t,0),this.moveCursorLeft(),void(t>0&&this.moveCursorWordLeft());this.session.tokenRe.exec(o)&&(i-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(t,i)},this.$shortWordEndIndex=function(e){var t,i=0,n=/\s/,r=this.session.tokenRe;if(r.lastIndex=0,this.session.tokenRe.exec(e))i=this.session.tokenRe.lastIndex;else{for(;(t=e[i])&&n.test(t);)i++;if(i<1)for(r.lastIndex=0;(t=e[i])&&!r.test(t);)if(r.lastIndex=0,i++,n.test(t)){if(i>2){i--;break}for(;(t=e[i])&&n.test(t);)i++;if(i>2)break}}return r.lastIndex=0,i},this.moveCursorShortWordRight=function(){var e=this.lead.row,t=this.lead.column,i=this.doc.getLine(e),n=i.substring(t),r=this.session.getFoldAt(e,t,1);if(r)return this.moveCursorTo(r.end.row,r.end.column);if(t==i.length){var o=this.doc.getLength();do{e++,n=this.doc.getLine(e)}while(e<o&&/^\s*$/.test(n));/^\s+/.test(n)||(n=""),t=0}var s=this.$shortWordEndIndex(n);this.moveCursorTo(e,t+s)},this.moveCursorShortWordLeft=function(){var e,t=this.lead.row,i=this.lead.column;if(e=this.session.getFoldAt(t,i,-1))return this.moveCursorTo(e.start.row,e.start.column);var r=this.session.getLine(t).substring(0,i);if(0===i){do{t--,r=this.doc.getLine(t)}while(t>0&&/^\s*$/.test(r));i=r.length,/\s+$/.test(r)||(r="")}var o=n.stringReverse(r),s=this.$shortWordEndIndex(o);return this.moveCursorTo(t,i-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 i=this.session.documentToScreenPosition(this.lead.row,this.lead.column);0===t&&(this.$desiredColumn?i.column=this.$desiredColumn:this.$desiredColumn=i.column);var n=this.session.screenToDocumentPosition(i.row+e,i.column);0!==e&&0===t&&n.row===this.lead.row&&n.column===this.lead.column&&this.session.lineWidgets&&this.session.lineWidgets[n.row]&&n.row++,this.moveCursorTo(n.row,n.column+t,0===t)},this.moveCursorToPosition=function(e){this.moveCursorTo(e.row,e.column)},this.moveCursorTo=function(e,t,i){var n=this.session.getFoldAt(e,t,1);n&&(e=n.start.row,t=n.start.column),this.$keepDesiredColumnOnChange=!0,this.lead.setPosition(e,t),this.$keepDesiredColumnOnChange=!1,i||(this.$desiredColumn=null)},this.moveCursorToScreen=function(e,t,i){var n=this.session.screenToDocumentPosition(e,t);this.moveCursorTo(n.row,n.column,i)},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.call(null,this);var i=this.getCursor();return o.fromPoints(t,i)}catch(e){return o.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{var e=this.getRange();e.isBackwards=this.isBackwards()}return e},this.fromJSON=function(e){if(e.start==undefined){if(this.rangeList){this.toSingleRange(e[0]);for(var t=e.length;t--;){var i=o.fromPoints(e[t].start,e[t].end);e.isBackwards&&(i.cursor=i.start),this.addRange(i,!0)}return}e=e[0]}this.rangeList&&this.toSingleRange(e),this.setSelectionRange(e,e.isBackwards)},this.isEqual=function(e){if((e.length||this.rangeCount)&&e.length!=this.rangeCount)return!1;if(!e.length||!this.ranges)return this.getRange().isEqual(e);for(var t=this.ranges.length;t--;)if(!this.ranges[t].isEqual(e[t]))return!1;return!0}}).call(s.prototype),t.Selection=s}),define("ace/tokenizer",["require","exports","module","ace/config"],function(e,t){"use strict";var i=e("./config"),n=2e3,r=function(e){this.states=e,this.regExps={},this.matchMappings={};for(var t in this.states){for(var i=this.states[t],n=[],r=0,o=this.matchMappings[t]={defaultToken:"text"},s="g",a=[],l=0;l<i.length;l++){var c=i[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,d=new RegExp("(?:("+u+")|(.))").exec("a").length-2;Array.isArray(c.token)?1==c.token.length||1==d?c.token=c.token[0]:d-1!=c.token.length?(this.reportError("number of classes and regexp groups doesn't match",{rule:c,groupCount:d-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=d>1?this.$applyToken:c.token),d>1&&(/\\\d/.test(c.regex)?u=c.regex.replace(/\\([0-9]+)/g,function(e,t){return"\\"+(parseInt(t,10)+r+1)}):(d=1,u=this.removeCapturingGroups(c.regex)),c.splitRegex||"string"==typeof c.token||a.push(c)),o[r]=l,r+=d,n.push(u),c.onMatch||(c.onMatch=null)}}n.length||(o[0]=0,n.push("$")),a.forEach(function(e){e.splitRegex=this.createSplitterRegexp(e.regex,s)},this),this.regExps[t]=new RegExp("("+n.join(")|(")+")|($)",s)}};(function(){this.$setMaxTokenCount=function(e){n=0|e},this.$applyToken=function(e){var t=this.splitRegex.exec(e).slice(1),i=this.token.apply(this,t);if("string"==typeof i)return[{type:i,value:e}];for(var n=[],r=0,o=i.length;r<o;r++)t[r]&&(n[n.length]={type:i[r],value:t[r]});return n},this.$arrayTokens=function(e){if(!e)return[];var t=this.splitRegex.exec(e);if(!t)return"text";for(var i=[],n=this.tokenArray,r=0,o=n.length;r<o;r++)t[r+1]&&(i[i.length]={type:n[r],value:t[r+1]});return i},this.removeCapturingGroups=function(e){return e.replace(/\[(?:\\.|[^\]])*?\]|\\.|\(\?[:=!]|(\()/g,function(e,t){return t?"(?:":e})},this.createSplitterRegexp=function(e,t){if(-1!=e.indexOf("(?=")){var i=0,n=!1,r={};e.replace(/(\\.)|(\((?:\?[=!])?)|(\))|([\[\]])/g,function(e,t,o,s,a,l){return n?n="]"!=a:a?n=!0:s?(i==r.stack&&(r.end=l+1,r.stack=-1),i--):o&&(i++,1!=o.length&&(r.stack=i,r.start=l)),e}),null!=r.end&&/^\)*$/.test(e.substr(r.end))&&(e=e.substring(0,r.start)+e.substr(r.end))}return new RegExp(e,(t||"").replace("g",""))},this.getLineTokens=function(e,t){if(t&&"string"!=typeof t){var i=t.slice(0);t=i[0],"#tmp"===t&&(i.shift(),t=i.shift())}else var i=[];var r=t||"start",o=this.states[r];o||(r="start",o=this.states[r]);var s=this.matchMappings[r],a=this.regExps[r];a.lastIndex=0;for(var l,c=[],u=0,d=0,h={type:null,value:""};l=a.exec(e);){var p=s.defaultToken,g=null,f=l[0],m=a.lastIndex;if(m-f.length>u){var v=e.substring(u,m-f.length);h.type==p?h.value+=v:(h.type&&c.push(h),h={type:p,value:v})}for(var y=0;y<l.length-2;y++)if(l[y+1]!==undefined){g=o[s[y]],p=g.onMatch?g.onMatch(f,r,i):g.token,g.next&&(r="string"==typeof g.next?g.next:g.next(r,i),o=this.states[r],o||(this.reportError("state doesn't exist",r),r="start",o=this.states[r]),s=this.matchMappings[r],u=m,a=this.regExps[r],a.lastIndex=m);break}if(f)if("string"==typeof p)g&&!1===g.merge||h.type!==p?(h.type&&c.push(h),h={type:p,value:f}):h.value+=f;else if(p){h.type&&c.push(h),h={type:null,value:""};for(var y=0;y<p.length;y++)c.push(p[y])}if(u==e.length)break;if(u=m,d++>n){for(d>2*e.length&&this.reportError("infinite loop with in ace tokenizer",{startState:t,line:e});u<e.length;)h.type&&c.push(h),h={value:e.substring(u,u+=2e3),type:"overflow"};r="start",i=[];break}}return h.type&&c.push(h),i.length>1&&i[0]!==r&&i.unshift("#tmp",r),{tokens:c,state:i.length?i:r}},this.reportError=i.reportError}).call(r.prototype),t.Tokenizer=r}),define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/lang"],function(e,t){"use strict";var i=e("../lib/lang"),n=function(){this.$rules={start:[{token:"empty_line",regex:"^$"},{defaultToken:"text"}]}};(function(){this.addRules=function(e,t){if(t)for(var i in e){for(var n=e[i],r=0;r<n.length;r++){var o=n[r];(o.next||o.onMatch)&&("string"!=typeof o.next?o.nextState&&0!==o.nextState.indexOf(t)&&(o.nextState=t+o.nextState):0!==o.next.indexOf(t)&&(o.next=t+o.next))}this.$rules[t+i]=n}else for(var i in e)this.$rules[i]=e[i]},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)for(var c=Array.prototype[o?"push":"unshift"],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 i(o){var s=r[o];s.processed=!0;for(var a=0;a<s.length;a++){var l=s[a];!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 c=l.next||l.push;if(c&&Array.isArray(c)){var u=l.stateName;u||(u=l.token,"string"!=typeof u&&(u=u[0]||""),r[u]&&(u+=n++)),r[u]=c,l.next=u,i(u)}else"pop"==c&&(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];if(l.include||"string"==typeof l)var h=l.include||l,p=r[h];else Array.isArray(l)&&(p=l);if(p){var g=[a,1].concat(p);l.noEscape&&(g=g.filter(function(e){return!e.next})),s.splice.apply(s,g),a--,p=null}l.keywordMap&&(l.token=this.createKeywordMapper(l.keywordMap,l.defaultToken||"text",l.caseInsensitive),delete l.defaultToken)}}var n=0,r=this.$rules;Object.keys(r).forEach(i,this)},this.createKeywordMapper=function(e,t,i,n){var r=Object.create(null);return Object.keys(e).forEach(function(t){var o=e[t];i&&(o=o.toLowerCase());for(var s=o.split(n||"|"),a=s.length;a--;)r[s[a]]=t}),Object.getPrototypeOf(r)&&(r.__proto__=null),this.$keywordList=Object.keys(r),e=null,i?function(e){return r[e.toLowerCase()]||t}:function(e){return r[e]||t}},this.getKeywords=function(){return this.$keywords}}).call(n.prototype),t.TextHighlightRules=n}),define("ace/mode/behaviour",["require","exports","module"],function(e,t){"use strict";var i=function(){this.$behaviours={}};(function(){this.add=function(e,t,i){switch(undefined){case this.$behaviours:this.$behaviours={};case this.$behaviours[e]:this.$behaviours[e]={}}this.$behaviours[e][t]=i},this.addBehaviours=function(e){for(var t in e)for(var i in e[t])this.add(t,i,e[t][i])},this.remove=function(e){this.$behaviours&&this.$behaviours[e]&&delete this.$behaviours[e]},this.inherit=function(e,t){if("function"==typeof e)var i=(new e).getBehaviours(t);else var i=e.getBehaviours(t);this.addBehaviours(i)},this.getBehaviours=function(e){if(e){for(var t={},i=0;i<e.length;i++)this.$behaviours[e[i]]&&(t[e[i]]=this.$behaviours[e[i]]);return t}return this.$behaviours}}).call(i.prototype),t.Behaviour=i}),define("ace/unicode",["require","exports","module"],function(e,t){"use strict";function i(e){var i=/\w{4}/g;for(var n in e)t.packages[n]=e[n].replace(i,"\\u$&")}t.packages={},i({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"})}),define("ace/token_iterator",["require","exports","module"],function(e,t){"use strict";var i=function(e,t,i){this.$session=e,this.$row=t,this.$rowTokens=e.getTokens(t);var n=e.getTokenAt(t,i);this.$tokenIndex=n?n.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,i=e[t].start;if(i!==undefined)return i;for(i=0;t>0;)t-=1,i+=e[t].value.length;return i}}).call(i.prototype),t.TokenIterator=i}),define("ace/mode/text",["require","exports","module","ace/tokenizer","ace/mode/text_highlight_rules","ace/mode/behaviour","ace/unicode","ace/lib/lang","ace/token_iterator","ace/range"],function(e,t){"use strict";var i=e("../tokenizer").Tokenizer,n=e("./text_highlight_rules").TextHighlightRules,r=e("./behaviour").Behaviour,o=e("../unicode"),s=e("../lib/lang"),a=e("../token_iterator").TokenIterator,l=e("../range").Range,c=function(){this.HighlightRules=n,this.$behaviour=new r};(function(){this.tokenRe=new RegExp("^["+o.packages.L+o.packages.Mn+o.packages.Mc+o.packages.Nd+o.packages.Pc+"\\$_]+","g"),this.nonTokenRe=new RegExp("^(?:[^"+o.packages.L+o.packages.Mn+o.packages.Mc+o.packages.Nd+o.packages.Pc+"\\$_]|\\s])+","g"),this.getTokenizer=function(){return this.$tokenizer||(this.$highlightRules=this.$highlightRules||new this.HighlightRules,this.$tokenizer=new i(this.$highlightRules.getRules())),this.$tokenizer},this.lineCommentStart="",this.blockComment="",this.toggleCommentLines=function(e,t,i,n){function r(e){for(var t=i;t<=n;t++)e(o.getLine(t),t)}var o=t.doc,a=!0,l=!0,c=Infinity,u=t.getTabSize(),d=!1;if(this.lineCommentStart){if(Array.isArray(this.lineCommentStart))var h=this.lineCommentStart.map(s.escapeRegExp).join("|"),p=this.lineCommentStart[0];else var h=s.escapeRegExp(this.lineCommentStart),p=this.lineCommentStart;h=new RegExp("^(\\s*)(?:"+h+") ?"),d=t.getUseSoftTabs();var g=function(e,t){var i=e.match(h);if(i){var n=i[1].length,r=i[0].length;y(e,n,r)||" "!=i[0][r-1]||r--,o.removeInLine(t,n,r)}},f=p+" ",m=function(e,t){a&&!/\S/.test(e)||(y(e,c,c)?o.insertInLine({row:t,column:c},f):o.insertInLine({row:t,column:c},p))},v=function(e){return h.test(e)},y=function(e,t,i){for(var n=0;t--&&" "==e.charAt(t);)n++;if(n%u!=0)return!1;for(var n=0;" "==e.charAt(i++);)n++;return u>2?n%u!=u-1:n%u==0}}else{if(!this.blockComment)return!1;var p=this.blockComment.start,w=this.blockComment.end,h=new RegExp("^(\\s*)(?:"+s.escapeRegExp(p)+")"),C=new RegExp("(?:"+s.escapeRegExp(w)+")\\s*$"),m=function(e,t){v(e,t)||a&&!/\S/.test(e)||(o.insertInLine({row:t,column:e.length},w),o.insertInLine({row:t,column:c},p))},g=function(e,t){var i;(i=e.match(C))&&o.removeInLine(t,e.length-i[0].length,e.length),(i=e.match(h))&&o.removeInLine(t,i[1].length,i[0].length)},v=function(e,i){if(h.test(e))return!0;for(var n=t.getTokens(i),r=0;r<n.length;r++)if("comment"===n[r].type)return!0}}var b=Infinity;r(function(e,t){var i=e.search(/\S/);-1!==i?(i<c&&(c=i),l&&!v(e,t)&&(l=!1)):b>e.length&&(b=e.length)}),c==Infinity&&(c=b,a=!1,l=!1),d&&c%u!=0&&(c=Math.floor(c/u)*u),r(l?g:m)},this.toggleBlockComment=function(e,t,i,n){var r=this.blockComment;if(r){!r.start&&r[0]&&(r=r[0]);var o,s,c=new a(t,n.row,n.column),u=c.getCurrentToken(),d=(t.selection,t.selection.toOrientedRange());if(u&&/comment/.test(u.type)){for(var h,p;u&&/comment/.test(u.type);){var g=u.value.indexOf(r.start);if(-1!=g){var f=c.getCurrentTokenRow(),m=c.getCurrentTokenColumn()+g;h=new l(f,m,f,m+r.start.length);break}u=c.stepBackward()}for(var c=new a(t,n.row,n.column),u=c.getCurrentToken();u&&/comment/.test(u.type);){var g=u.value.indexOf(r.end);if(-1!=g){var f=c.getCurrentTokenRow(),m=c.getCurrentTokenColumn()+g;p=new l(f,m,f,m+r.end.length);break}u=c.stepForward()}p&&t.remove(p),h&&(t.remove(h),o=h.start.row,s=-r.start.length)}else s=r.start.length,o=i.start.row,t.insert(i.end,r.end),t.insert(i.start,r.start);d.start.row==o&&(d.start.column+=s),d.end.row==o&&(d.end.column+=s),t.selection.fromOrientedRange(d)}},this.getNextLineIndent=function(e,t){return this.$getIndent(t)},this.checkOutdent=function(){return!1},this.autoOutdent=function(){},this.$getIndent=function(e){return e.match(/^\s*/)[0]},this.createWorker=function(){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]);for(var i=["toggleBlockComment","toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"],t=0;t<i.length;t++)!function(e){var n=i[t],r=e[n];e[i[t]]=function(){return this.$delegator(n,arguments,r)}}(this)},this.$delegator=function(e,t,i){var n=t[0];"string"!=typeof n&&(n=n[0]);for(var r=0;r<this.$embeds.length;r++)if(this.$modes[this.$embeds[r]]){var o=n.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=i.apply(this,t);return i?a:undefined},this.transformAction=function(e,t){if(this.$behaviour){var i=this.$behaviour.getBehaviours();for(var n in i)if(i[n][t]){var r=i[n][t].apply(this,arguments);if(r)return r}}},this.getKeywords=function(e){if(!this.completionKeywords){var t=this.$tokenizer.rules,i=[];for(var n in t)for(var r=t[n],o=0,s=r.length;o<s;o++)if("string"==typeof r[o].token)/keyword|support|storage/.test(r[o].token)&&i.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])){var n=r[o].regex.match(/\(.+?\)/g)[a];i.push(n.substr(1,n.length-2))}this.completionKeywords=i}return e?i.concat(this.$keywordList||[]):this.$keywordList},this.$createKeywordList=function(){return this.$highlightRules||this.getTokenizer(),this.$keywordList=this.$highlightRules.$keywordList||[]},this.getCompletions=function(){return(this.$keywordList||this.$createKeywordList()).map(function(e){return{name:e,value:e,score:0,meta:"keyword"}})},this.$id="ace/mode/text"}).call(c.prototype),t.Mode=c}),define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(e,t){"use strict";var i=e("./lib/oop"),n=e("./lib/event_emitter").EventEmitter,r=t.Anchor=function(e,t,i){this.$onChange=this.onChange.bind(this),this.attach(e),void 0===i?this.setPosition(t.row,t.column):this.setPosition(t,i)};(function(){i.implement(this,n),this.getPosition=function(){return this.$clipPositionToDocument(this.row,this.column)},this.getDocument=function(){return this.document},this.$insertRight=!1,this.onChange=function(e){var t=e.data,i=t.range;if((i.start.row!=i.end.row||i.start.row==this.row)&&!(i.start.row>this.row||i.start.row==this.row&&i.start.column>this.column)){var n=this.row,r=this.column,o=i.start,s=i.end;"insertText"===t.action?o.row===n&&o.column<=r?o.column===r&&this.$insertRight||(o.row===s.row?r+=s.column-o.column:(r-=o.column,n+=s.row-o.row)):o.row!==s.row&&o.row<n&&(n+=s.row-o.row):"insertLines"===t.action?o.row===n&&0===r&&this.$insertRight||o.row<=n&&(n+=s.row-o.row):"removeText"===t.action?o.row===n&&o.column<r?r=s.column>=r?o.column:Math.max(0,r-(s.column-o.column)):o.row!==s.row&&o.row<n?(s.row===n&&(r=Math.max(0,r-s.column)+o.column),n-=s.row-o.row):s.row===n&&(n-=s.row-o.row,r=Math.max(0,r-s.column)+o.column):"removeLines"==t.action&&o.row<=n&&(s.row<=n?n-=s.row-o.row:(n=o.row,r=0)),this.setPosition(n,r,!0)}},this.setPosition=function(e,t,i){var n;if(n=i?{row:e,column:t}:this.$clipPositionToDocument(e,t),this.row!=n.row||this.column!=n.column){var r={row:this.row,column:this.column};this.row=n.row,this.column=n.column,this._signal("change",{old:r,value:n})}},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 i={};return e>=this.document.getLength()?(i.row=Math.max(0,this.document.getLength()-1),i.column=this.document.getLine(i.row).length):e<0?(i.row=0,i.column=0):(i.row=e,i.column=Math.min(this.document.getLine(i.row).length,Math.max(0,t))),t<0&&(i.column=0),i}}).call(r.prototype)}),define("ace/document",["require","exports","module","ace/lib/oop","ace/lib/event_emitter","ace/range","ace/anchor"],function(e,t){"use strict";var i=e("./lib/oop"),n=e("./lib/event_emitter").EventEmitter,r=e("./range").Range,o=e("./anchor").Anchor,s=function(e){this.$lines=[],0===e.length?this.$lines=[""]:Array.isArray(e)?this._insertLines(0,e):this.insert({row:0,column:0},e)};(function(){i.implement(this,n),this.setValue=function(e){var t=this.getLength();this.remove(new r(0,0,t,this.getLine(t-1).length)),this.insert({row:0,column:0},e)},this.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},this.createAnchor=function(e,t){return new o(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){if(e.start.row==e.end.row)return this.getLine(e.start.row).substring(e.start.column,e.end.column);var t=this.getLines(e.start.row,e.end.row);t[0]=(t[0]||"").substring(e.start.column);var i=t.length-1;return e.end.row-e.start.row==i&&(t[i]=t[i].substring(0,e.end.column)),t.join(this.getNewLineCharacter())},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<0&&(e.row=0),e},this.insert=function(e,t){if(!t||0===t.length)return e;e=this.$clipPosition(e),this.getLength()<=1&&this.$detectNewLine(t);var i=this.$split(t),n=i.splice(0,1)[0],r=0==i.length?null:i.splice(i.length-1,1)[0];return e=this.insertInLine(e,n),null!==r&&(e=this.insertNewLine(e),e=this._insertLines(e.row,i),e=this.insertInLine(e,r||"")),e},this.insertLines=function(e,t){return e>=this.getLength()?this.insert({row:e,column:0},"\n"+t.join("\n")):this._insertLines(Math.max(e,0),t)},this._insertLines=function(e,t){if(0==t.length)return{row:e,column:0};for(;t.length>2e4;){var i=this._insertLines(e,t.slice(0,2e4));t=t.slice(2e4),e=i.row}var n=[e,0];n.push.apply(n,t),this.$lines.splice.apply(this.$lines,n);var o=new r(e,0,e+t.length,0),s={action:"insertLines",range:o,lines:t};return this._signal("change",{data:s}),o.end},this.insertNewLine=function(e){e=this.$clipPosition(e);var t=this.$lines[e.row]||"";this.$lines[e.row]=t.substring(0,e.column),this.$lines.splice(e.row+1,0,t.substring(e.column,t.length));var i={row:e.row+1,column:0},n={action:"insertText",range:r.fromPoints(e,i),text:this.getNewLineCharacter()};return this._signal("change",{data:n}),i},this.insertInLine=function(e,t){if(0==t.length)return e;var i=this.$lines[e.row]||"";this.$lines[e.row]=i.substring(0,e.column)+t+i.substring(e.column);var n={row:e.row,column:e.column+t.length},o={action:"insertText",range:r.fromPoints(e,n),text:t};return this._signal("change",{data:o}),n},this.remove=function(e){if(e instanceof r||(e=r.fromPoints(e.start,e.end)),e.start=this.$clipPosition(e.start),e.end=this.$clipPosition(e.end),e.isEmpty())return e.start;var t=e.start.row,i=e.end.row;if(e.isMultiLine()){var n=0==e.start.column?t:t+1,o=i-1;e.end.column>0&&this.removeInLine(i,0,e.end.column),o>=n&&this._removeLines(n,o),n!=t&&(this.removeInLine(t,e.start.column,this.getLine(t).length),this.removeNewLine(e.start.row))}else this.removeInLine(t,e.start.column,e.end.column);return e.start},this.removeInLine=function(e,t,i){if(t!=i){var n=new r(e,t,e,i),o=this.getLine(e),s=o.substring(t,i),a=o.substring(0,t)+o.substring(i,o.length);this.$lines.splice(e,1,a);var l={action:"removeText",range:n,text:s};return this._signal("change",{data:l}),n.start}},this.removeLines=function(e,t){return e<0||t>=this.getLength()?this.remove(new r(e,0,t+1,0)):this._removeLines(e,t)},this._removeLines=function(e,t){var i=new r(e,0,t+1,0),n=this.$lines.splice(e,t-e+1),o={action:"removeLines",range:i,nl:this.getNewLineCharacter(),lines:n};return this._signal("change",{data:o}),n},this.removeNewLine=function(e){var t=this.getLine(e),i=this.getLine(e+1),n=new r(e,t.length,e+1,0),o=t+i;this.$lines.splice(e,2,o);var s={action:"removeText",range:n,text:this.getNewLineCharacter()};this._signal("change",{data:s})},this.replace=function(e,t){if(e instanceof r||(e=r.fromPoints(e.start,e.end)),0==t.length&&e.isEmpty())return e.start;if(t==this.getTextRange(e))return e.end;if(this.remove(e),t)var i=this.insert(e.start,t);else i=e.start;return i},this.applyDeltas=function(e){for(var t=0;t<e.length;t++){var i=e[t],n=r.fromPoints(i.range.start,i.range.end);"insertLines"==i.action?this.insertLines(n.start.row,i.lines):"insertText"==i.action?this.insert(n.start,i.text):"removeLines"==i.action?this._removeLines(n.start.row,n.end.row-1):"removeText"==i.action&&this.remove(n)}},this.revertDeltas=function(e){for(var t=e.length-1;t>=0;t--){var i=e[t],n=r.fromPoints(i.range.start,i.range.end);"insertLines"==i.action?this._removeLines(n.start.row,n.end.row-1):"insertText"==i.action?this.remove(n):"removeLines"==i.action?this._insertLines(n.start.row,i.lines):"removeText"==i.action&&this.insert(n.start,i.text)}},this.indexToPosition=function(e,t){for(var i=this.$lines||this.getAllLines(),n=this.getNewLineCharacter().length,r=t||0,o=i.length;r<o;r++)if((e-=i[r].length+n)<0)return{row:r,column:e+i[r].length+n};return{row:o-1,column:i[o-1].length}},this.positionToIndex=function(e,t){for(var i=this.$lines||this.getAllLines(),n=this.getNewLineCharacter().length,r=0,o=Math.min(e.row,i.length),s=t||0;s<o;++s)r+=i[s].length+n;return r+e.column}}).call(s.prototype),t.Document=s}),define("ace/background_tokenizer",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(e,t){"use strict";var i=e("./lib/oop"),n=e("./lib/event_emitter").EventEmitter,r=function(e){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.tokenizer=e;var t=this;this.$worker=function(){if(t.running){for(var e=new Date,i=t.currentLine,n=-1,r=t.doc;t.lines[i];)i++;var o=i,s=r.getLength(),a=0;for(t.running=!1;i<s;){t.$tokenizeRow(i),n=i;do{i++}while(t.lines[i]);if(++a%5==0&&new Date-e>20){t.running=setTimeout(t.$worker,20);break}}t.currentLine=i,o<=n&&t.fireUpdateEvent(o,n)}}};(function(){i.implement(this,n),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 i={first:e,last:t};this._signal("update",{data:i})},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.range,i=t.start.row,n=t.end.row-i;if(0===n)this.lines[i]=null;else if("removeText"==e.action||"removeLines"==e.action)this.lines.splice(i,n+1,null),this.states.splice(i,n+1,null);else{var r=Array(n+1);r.unshift(i,1),this.lines.splice.apply(this.lines,r),this.states.splice.apply(this.states,r)}this.currentLine=Math.min(i,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),i=this.states[e-1],n=this.tokenizer.getLineTokens(t,i,e);return this.states[e]+""!=n.state+""?(this.states[e]=n.state,this.lines[e+1]=null,this.currentLine>e+1&&(this.currentLine=e+1)):this.currentLine==e&&(this.currentLine=e+1),this.lines[e]=n.tokens}}).call(r.prototype),t.BackgroundTokenizer=r}),define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],function(e,t){"use strict";var i=e("./lib/lang"),n=(e("./lib/oop"),e("./range").Range),r=function(e,t,i){this.setRegexp(e),this.clazz=t,this.type=i||"text"};(function(){this.MAX_RANGES=500,this.setRegexp=function(e){this.regExp+""!=e+""&&(this.regExp=e,this.cache=[])},this.update=function(e,t,r,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(r.getLine(l),this.regExp),c.length>this.MAX_RANGES&&(c=c.slice(0,this.MAX_RANGES)),c=c.map(function(e){return new n(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(r),this.clazz,o)}}}).call(r.prototype),t.SearchHighlight=r}),define("ace/edit_session/fold_line",["require","exports","module","ace/range"],function(e,t){"use strict";function i(e,t){this.foldData=e,Array.isArray(t)?this.folds=t:t=this.folds=[t];var i=t[t.length-1];this.range=new n(t[0].start.row,t[0].start.column,i.end.row,i.end.column),this.start=this.range.start,this.end=this.range.end,this.folds.forEach(function(e){e.setFoldLine(this)},this)}var n=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,i){var n,r,o,s=0,a=this.folds,l=!0;null==t&&(t=this.end.row,i=this.end.column);for(var c=0;c<a.length;c++){if(n=a[c],-1==(r=n.range.compareStart(t,i)))return void e(null,t,i,s,l);if(o=e(null,n.start.row,n.start.column,s,l),(o=!o&&e(n.placeholder,n.start.row,n.start.column,s))||0===r)return;l=!n.sameRow,s=n.end.column}e(null,t,i,s,l)},this.getNextFoldTo=function(e,t){for(var i,n,r=0;r<this.folds.length;r++){if(i=this.folds[r],-1==(n=i.range.compareEnd(e,t)))return{fold:i,kind:"after"};if(0===n)return{fold:i,kind:"inside"}}return null},this.addRemoveChars=function(e,t,i){var n,r,o=this.getNextFoldTo(e,t);if(o)if(n=o.fold,"inside"==o.kind&&n.start.column!=t&&n.start.row!=e)window.console&&window.console.log(e,t,n);else if(n.start.row==e){r=this.folds;var s=r.indexOf(n);for(0===s&&(this.start.column+=i),s;s<r.length;s++){if(n=r[s],n.start.column+=i,!n.sameRow)return;n.end.column+=i}this.end.column+=i}},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,o=o.splice(a,o.length-a);var c=new i(s,o);return s.splice(s.indexOf(this)+1,0,c),c},this.merge=function(e){for(var t=e.folds,i=0;i<t.length;i++)this.addFold(t[i]);var n=this.foldData;n.splice(n.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,i=0;i<this.folds.length;i++){var n=this.folds[i];if((e-=n.start.column-t)<0)return{row:n.start.row,column:n.start.column+e};if((e-=n.placeholder.length)<0)return n.start;t=n.end.column}return{row:this.end.row,column:this.end.column+e}}}).call(i.prototype),t.FoldLine=i}),define("ace/range_list",["require","exports","module","ace/range"],function(e,t){"use strict";var i=e("./range").Range,n=i.comparePoints,r=function(){this.ranges=[]};(function(){this.comparePoints=n,this.pointIndex=function(e,t,i){for(var r=this.ranges,o=i||0;o<r.length;o++){var s=r[o],a=n(e,s.end);if(!(a>0)){var l=n(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(),i=this.pointIndex(e.start,t);i<0&&(i=-i-1);var n=this.pointIndex(e.end,t,i);return n<0?n=-n-1:n++,this.ranges.splice(i,n-i,e)},this.addList=function(e){for(var t=[],i=e.length;i--;)t.push.call(t,this.add(e[i]));return t},this.substractPoint=function(e){var t=this.pointIndex(e);if(t>=0)return this.ranges.splice(t,1)},this.merge=function(){var e=[],t=this.ranges;t=t.sort(function(e,t){return n(e.start,t.start)});for(var i,r=t[0],o=1;o<t.length;o++){i=r,r=t[o];var s=n(i.end,r.start);s<0||(0!=s||i.isEmpty()||r.isEmpty())&&(n(i.end,r.end)<0&&(i.end.row=r.end.row,i.end.column=r.end.column),t.splice(o,1),e.push(r),r=i,o--)}return this.ranges=t,e},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 i=this.ranges;if(i[0].start.row>t||i[i.length-1].start.row<e)return[];var n=this.pointIndex({row:e,column:0});n<0&&(n=-n-1);var r=this.pointIndex({row:t,column:0},n);r<0&&(r=-r-1);for(var o=[],s=n;s<r;s++)o.push(i[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){var t=e.data.range;if("i"==e.data.action[0])var i=t.start,n=t.end;else var n=t.start,i=t.end
;for(var r=i.row,o=n.row,s=o-r,a=-i.column+n.column,l=this.ranges,c=0,u=l.length;c<u;c++){var d=l[c];if(!(d.end.row<r)){if(d.start.row>r)break;if(d.start.row==r&&d.start.column>=i.column&&(d.start.column==i.column&&this.$insertRight||(d.start.column+=a,d.start.row+=s)),d.end.row==r&&d.end.column>=i.column){if(d.end.column==i.column&&this.$insertRight)continue;d.end.column==i.column&&a>0&&c<u-1&&d.end.column>d.start.column&&d.end.column==l[c+1].start.column&&(d.end.column-=a),d.end.column+=a,d.end.row+=s}}}if(0!=s&&c<u)for(;c<u;c++){var d=l[c];d.start.row+=s,d.end.row+=s}}}).call(r.prototype),t.RangeList=r}),define("ace/edit_session/fold",["require","exports","module","ace/range","ace/range_list","ace/lib/oop"],function(e,t){"use strict";function i(e,t){e.row-=t.row,0==e.row&&(e.column-=t.column)}function n(e,t){i(e.start,t),i(e.end,t)}function r(e,t){0==e.row&&(e.column+=t.column),e.row+=t.row}function o(e,t){r(e.start,t),r(e.end,t)}var s=(e("../range").Range,e("../range_list").RangeList),a=e("../lib/oop"),l=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=[]};a.inherits(l,s),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 l(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);n(e,this.start);for(var t=e.start.row,i=e.start.column,r=0,o=-1;r<this.subFolds.length&&1==(o=this.subFolds[r].range.compare(t,i));r++);var s=this.subFolds[r];if(0==o)return s.addSubFold(e);for(var t=e.range.end.row,i=e.range.end.column,a=r,o=-1;a<this.subFolds.length&&1==(o=this.subFolds[a].range.compare(t,i));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 o(e,this.start)}}.call(l.prototype)}),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){"use strict";function i(){this.getFoldAt=function(e,t,i){var n=this.getFoldLine(e);if(!n)return null;for(var r=n.folds,o=0;o<r.length;o++){var s=r[o];if(s.range.contains(e,t)){if(1==i&&s.range.isEnd(e,t))continue;if(-1==i&&s.range.isStart(e,t))continue;return s}}},this.getFoldsInRange=function(e){var t=e.start,i=e.end,n=this.$foldData,r=[];t.column+=1,i.column-=1;for(var o=0;o<n.length;o++){var s=n[o].range.compareRange(e);if(2!=s){if(-2==s)break;for(var a=n[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,i.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 var t=this.getFoldsInRange(e);return t},this.getAllFolds=function(){for(var e=[],t=this.$foldData,i=0;i<t.length;i++)for(var n=0;n<t[i].folds.length;n++)e.push(t[i].folds[n]);return e},this.getFoldStringAt=function(e,t,i,n){if(!(n=n||this.getFoldLine(e)))return null;for(var r,o,s={end:{column:0}},a=0;a<n.folds.length;a++){o=n.folds[a];var l=o.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==i?r.substring(0,t-s.end.column):1==i?r.substring(t-s.end.column):r},this.getFoldLine=function(e,t){var i=this.$foldData,n=0;for(t&&(n=i.indexOf(t)),-1==n&&(n=0),n;n<i.length;n++){var r=i[n];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 i=this.$foldData,n=0;for(t&&(n=i.indexOf(t)),-1==n&&(n=0),n;n<i.length;n++){var r=i[n];if(r.end.row>=e)return r}return null},this.getFoldedRowCount=function(e,t){for(var i=this.$foldData,n=t-e+1,r=0;r<i.length;r++){var o=i[r],s=o.end.row,a=o.start.row;if(s>=t){a<t&&(a>=e?n-=t-a:n=0);break}s>=e&&(n-=a>=e?s-a:s-e+1)}return n},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 i,n=this.$foldData,s=!1;e instanceof o?i=e:(i=new o(t,e),i.collapseChildren=t.collapseChildren),this.$clipRangeToDocument(i.range);var a=i.start.row,l=i.start.column,c=i.end.row,u=i.end.column;if(!(a<c||a==c&&l<=u-2))throw new Error("The range has to be at least 2 characters width");var d=this.getFoldAt(a,l,1),h=this.getFoldAt(c,u,-1);if(d&&h==d)return d.addSubFold(i);d&&!d.range.isStart(a,l)&&this.removeFold(d),h&&!h.range.isEnd(c,u)&&this.removeFold(h);var p=this.getFoldsInRange(i.range);p.length>0&&(this.removeFolds(p),p.forEach(function(e){i.addSubFold(e)}));for(var g=0;g<n.length;g++){var f=n[g];if(c==f.start.row){f.addFold(i),s=!0;break}if(a==f.end.row){if(f.addFold(i),s=!0,!i.sameRow){var m=n[g+1];if(m&&m.start.row==c){f.merge(m);break}}break}if(c<=f.start.row)break}return s||(f=this.$addFoldLine(new r(this.$foldData,i))),this.$useWrapMode?this.$updateWrapData(f.start.row,f.start.row):this.$updateRowLengthCache(f.start.row,f.start.row),this.$modified=!0,this._emit("changeFold",{data:i,action:"add"}),i},this.addFolds=function(e){e.forEach(function(e){this.addFold(e)},this)},this.removeFold=function(e){var t=e.foldLine,i=t.start.row,n=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,o.shift(),s.start.row=o[0].start.row,s.start.column=o[0].start.column}this.$updating||(this.$useWrapMode?this.$updateWrapData(i,n):this.$updateRowLengthCache(i,n)),this.$modified=!0,this._emit("changeFold",{data:e,action:"remove"})},this.removeFolds=function(e){for(var t=[],i=0;i<e.length;i++)t.push(e[i]);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 i,r;if(null==e?(i=new n(0,0,this.getLength(),0),t=!0):i="number"==typeof e?new n(e,0,e,this.getLine(e).length):"row"in e?n.fromPoints(e,e):e,r=this.getFoldsInRangeList(i),t)this.removeFolds(r);else for(var o=r;o.length;)this.expandFolds(o),o=this.getFoldsInRangeList(i);if(r.length)return r},this.isRowFolded=function(e,t){return!!this.getFoldLine(e,t)},this.getRowFoldEnd=function(e,t){var i=this.getFoldLine(e,t);return i?i.end.row:e},this.getRowFoldStart=function(e,t){var i=this.getFoldLine(e,t);return i?i.start.row:e},this.getFoldDisplayLine=function(e,t,i,n,r){null==n&&(n=e.start.row),null==r&&(r=0),null==t&&(t=e.end.row),null==i&&(i=this.getLine(t).length);var o=this.doc,s="";return e.walk(function(e,t,i,a){if(!(t<n)){if(t==n){if(i<r)return;a=Math.max(r,a)}s+=null!=e?e:o.getLine(t).substring(a,i)}},t,i),s},this.getDisplayLine=function(e,t,i,n){var r=this.getFoldLine(e);if(r)return this.getFoldDisplayLine(r,e,t,i,n);var o;return o=this.doc.getLine(e),o.substring(n||0,t||o.length)},this.$cloneFoldData=function(){var e=[];return e=this.$foldData.map(function(t){var i=t.folds.map(function(e){return e.clone()});return new r(e,i)})},this.toggleFold=function(e){var t,i,n=this.selection,r=n.getRange();if(r.isEmpty()){var o=r.start;if(t=this.getFoldAt(o.row,o.column))return void this.expandFold(t);(i=this.findMatchingBracket(o))?1==r.comparePoint(i)?r.end=i:(r.start=i,r.start.column++,r.end.column--):(i=this.findMatchingBracket({row:o.row,column:o.column+1}))?(1==r.comparePoint(i)?r.end=i:r.start=i,r.start.column++):r=this.getCommentFoldRange(o.row,o.column)||r}else{var s=this.getFoldsInRange(r);if(e&&s.length)return void this.expandFolds(s);1==s.length&&(t=s[0])}if(t||(t=this.getFoldAt(r.start.row,r.start.column)),t&&t.range.toString()==r.toString())return void this.expandFold(t);var a="...";if(!r.isMultiLine()){if(a=this.getTextRange(r),a.length<4)return;a=a.trim().substring(0,2)+".."}this.addFold(a,r)},this.getCommentFoldRange=function(e,t,i){var r=new s(this,e,t),o=r.getCurrentToken();if(o&&/^comment|string/.test(o.type)){var a=new n,l=new RegExp(o.type.replace(/\..*/,"\\."));if(1!=i){do{o=r.stepBackward()}while(o&&l.test(o.type));r.stepForward()}if(a.start.row=r.getCurrentTokenRow(),a.start.column=r.getCurrentTokenColumn()+2,r=new s(this,e,t),-1!=i){do{o=r.stepForward()}while(o&&l.test(o.type));o=r.stepBackward()}else o=r.getCurrentToken();return a.end.row=r.getCurrentTokenRow(),a.end.column=r.getCurrentTokenColumn()+o.value.length-2,a}},this.foldAll=function(e,t,i){i==undefined&&(i=1e5);var n=this.foldWidgets;if(n){t=t||this.getLength(),e=e||0;for(var r=e;r<t;r++)if(null==n[r]&&(n[r]=this.getFoldWidget(r)),"start"==n[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=i)}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){if(this.$foldMode!=e){if(this.$foldMode=e,this.off("change",this.$updateFoldWidgets),this.off("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets),this._emit("changeAnnotation"),!e||"manual"==this.$foldStyle)return void(this.foldWidgets=null);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.getParentFoldRangeData=function(e,t){var i=this.foldWidgets;if(!i||t&&i[e])return{};for(var n,r=e-1;r>=0;){var o=i[r];if(null==o&&(o=i[r]=this.getFoldWidget(r)),"start"==o){var s=this.getFoldWidgetRange(r);if(n||(n=s),s&&s.end.row>=e)break}r--}return{range:-1!==r&&s,firstRange:n}},this.onFoldWidgetClick=function(e,t){t=t.domEvent;var i={children:t.shiftKey,all:t.ctrlKey||t.metaKey,siblings:t.altKey};if(!this.$toggleFoldWidget(e,i)){var n=t.target||t.srcElement;n&&/ace_fold-widget/.test(n.className)&&(n.className+=" ace_invalid")}},this.$toggleFoldWidget=function(e,t){if(this.getFoldWidget){var i=this.getFoldWidget(e),n=this.getLine(e),r="end"===i?-1:1,o=this.getFoldAt(e,-1===r?0:n.length,r);if(o)return void(t.children||t.all?this.removeFold(o):this.expandFold(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 void this.removeFold(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(){var e=this.selection.getCursor().row;e=this.getRowFoldStart(e);var t=this.$toggleFoldWidget(e,{});if(!t){var i=this.getParentFoldRangeData(e,!0);if(t=i.range||i.firstRange){e=t.start.row;var n=this.getFoldAt(e,this.getLine(e).length,1);n?this.removeFold(n):this.addFold("...",t)}}},this.updateFoldWidgets=function(e){var t=e.data,i=t.range,n=i.start.row,r=i.end.row-n;if(0===r)this.foldWidgets[n]=null;else if("removeText"==t.action||"removeLines"==t.action)this.foldWidgets.splice(n,r+1,null);else{var o=Array(r+1);o.unshift(n,1),this.foldWidgets.splice.apply(this.foldWidgets,o)}},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)}}var n=e("../range").Range,r=e("./fold_line").FoldLine,o=e("./fold").Fold,s=e("../token_iterator").TokenIterator;t.Folding=i}),define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"],function(e,t){"use strict";function i(){this.findMatchingBracket=function(e,t){if(0==e.column)return null;var i=t||this.getLine(e.row).charAt(e.column-1);if(""==i)return null;var n=i.match(/([\(\[\{])|([\)\]\}])/);return n?n[1]?this.$findClosingBracket(n[1],e):this.$findOpeningBracket(n[2],e):null},this.getBracketRange=function(e){var t,i=this.getLine(e.row),n=!0,o=i.charAt(e.column-1),s=o&&o.match(/([\(\[\{])|([\)\]\}])/);if(s||(o=i.charAt(e.column),e={row:e.row,column:e.column+1},s=o&&o.match(/([\(\[\{])|([\)\]\}])/),n=!1),!s)return null;if(s[1]){var a=this.$findClosingBracket(s[1],e);if(!a)return null;t=r.fromPoints(e,a),n||(t.end.column++,t.start.column--),t.cursor=t.end}else{var a=this.$findOpeningBracket(s[2],e);if(!a)return null;t=r.fromPoints(a,e),n||(t.start.column++,t.end.column--),t.cursor=t.start}return t},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{"},this.$findOpeningBracket=function(e,t,i){var r=this.$brackets[e],o=1,s=new n(this,t.row,t.column),a=s.getCurrentToken();if(a||(a=s.stepForward()),a){i||(i=new RegExp("(\\.?"+a.type.replace(".","\\.").replace("rparen",".paren").replace(/\b(?:end|start|begin)\b/,"")+")+"));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&&!i.test(a.type));if(null==a)break;c=a.value,l=c.length-1}return null}},this.$findClosingBracket=function(e,t,i){var r=this.$brackets[e],o=1,s=new n(this,t.row,t.column),a=s.getCurrentToken();if(a||(a=s.stepForward()),a){i||(i=new RegExp("(\\.?"+a.type.replace(".","\\.").replace("lparen",".paren").replace(/\b(?:end|start|begin)\b/,"")+")+"));for(var l=t.column-s.getCurrentTokenColumn();;){for(var c=a.value,u=c.length;l<u;){var d=c.charAt(l);if(d==r){if(0==(o-=1))return{row:s.getCurrentTokenRow(),column:l+s.getCurrentTokenColumn()}}else d==e&&(o+=1);l+=1}do{a=s.stepForward()}while(a&&!i.test(a.type));if(null==a)break;l=0}return null}}}var n=e("../token_iterator").TokenIterator,r=e("../range").Range;t.BracketMatch=i}),define("ace/edit_session",["require","exports","module","ace/lib/oop","ace/lib/lang","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){"use strict";var i=e("./lib/oop"),n=e("./lib/lang"),r=e("./config"),o=e("./lib/event_emitter").EventEmitter,s=e("./selection").Selection,a=e("./mode/text").Mode,l=e("./range").Range,c=e("./document").Document,u=e("./background_tokenizer").BackgroundTokenizer,d=e("./search_highlight").SearchHighlight,h=function(e,t){this.$breakpoints=[],this.$decorations=[],this.$frontMarkers={},this.$backMarkers={},this.$markerId=1,this.$undoSelect=!0,this.$foldData=[],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 c(e)),this.setDocument(e),this.selection=new s(this),r.resetOptions(this),this.setMode(t),r._signal("session",this)};(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,o),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,i=this.$getRowCacheIndex(this.$docRowCache,e)+1;t>i&&(this.$docRowCache.splice(i,t),this.$screenRowCache.splice(i,t))},this.$getRowCacheIndex=function(e,t){for(var i=0,n=e.length-1;i<=n;){var r=i+n>>1,o=e[r];if(t>o)i=r+1;else{if(!(t<o))return r;n=r-1}}return i-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){var t=e.data;this.$modified=!0,this.$resetRowCache(t.range.start.row);var i=this.$updateInternalDataOnChange(e);this.$fromUndo||!this.$undoManager||t.ignore||(this.$deltasDoc.push(t),i&&0!=i.length&&this.$deltasFold.push({action:"removeFolds",folds:i}),this.$informUndoManager.schedule()),this.bgTokenizer&&this.bgTokenizer.$updateOnChange(t),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 i,n=this.bgTokenizer.getTokens(e),r=0;if(null==t)o=n.length-1,r=this.getLine(e).length;else for(var o=0;o<n.length&&!((r+=n[o].value.length)>=t);o++);return(i=n[o])?(i.index=o,i.start=r-i.value.length,i):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=n.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()?n.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.$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){t===undefined&&(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,i,n){var r=this.$markerId++,o={range:e,type:i||"line",renderer:"function"==typeof i?i:null,clazz:t,inFront:!!n,id:r};return n?(this.$frontMarkers[r]=o,this._signal("changeFrontMarker")):(this.$backMarkers[r]=o,this._signal("changeBackMarker")),r},this.addDynamicMarker=function(e,t){if(e.update){var i=this.$markerId++;return e.id=i,e.inFront=!!t,t?(this.$frontMarkers[i]=e,this._signal("changeFrontMarker")):(this.$backMarkers[i]=e,this._signal("changeBackMarker")),e}},this.removeMarker=function(e){var t=this.$frontMarkers[e]||this.$backMarkers[e];if(t){var i=t.inFront?this.$frontMarkers:this.$backMarkers;t&&(delete i[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 d(null,"ace_selected-word","text");this.$searchHighlight=this.addDynamicMarker(t)}this.$searchHighlight.setRegexp(e)},this.highlightLines=function(e,t,i,n){"number"!=typeof t&&(i=t,t=e),i||(i="ace_step");var r=new l(e,0,t,Infinity);return r.id=this.addMarker(r,i,"fullLine",n),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 i=this.getLine(e),n=!1;if(t>0&&(n=!!i.charAt(t-1).match(this.tokenRe)),n||(n=!!i.charAt(t).match(this.tokenRe)),n)var r=this.tokenRe;else if(/^\s+$/.test(i.slice(t-1,t+1)))var r=/\s/;else var r=this.nonTokenRe;var o=t;if(o>0){do{o--}while(o>=0&&i.charAt(o).match(r));o++}for(var s=t;s<i.length&&i.charAt(s).match(r);)s++;return new l(e,o,e,s)},this.getAWordRange=function(e,t){for(var i=this.getWordRange(e,t),n=this.getLine(i.end.row);n.charAt(i.end.column).match(/[ \t]/);)i.end.column+=1;return i},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 i=e,n=i.path}else n=e||"ace/mode/text";if(this.$modes["ace/mode/text"]||(this.$modes["ace/mode/text"]=new a),this.$modes[n]&&!i)return this.$onChangeMode(this.$modes[n]),void(t&&t());this.$modeId=n,r.loadModule(["mode",n],function(e){if(this.$modeId!==n)return t&&t();this.$modes[n]&&!i?this.$onChangeMode(this.$modes[n]):e&&e.Mode&&(e=new e.Mode(i),i||(this.$modes[n]=e,e.$id=n),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 i=e.getTokenizer();if(i.addEventListener!==undefined){var n=this.onReloadTokenizer.bind(this);i.addEventListener("update",n)}if(this.bgTokenizer)this.bgTokenizer.setTokenizer(i);else{this.bgTokenizer=new u(i);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){r.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(),i=this.$rowLengthCache,n=0,r=0,o=this.$foldData[r],s=o?o.start.row:Infinity,a=t.length,l=0;l<a;l++){if(l>s){if((l=o.end.row+1)>=a)break;o=this.$foldData[r++],s=o?o.start.row:Infinity}null==i[l]&&(i[l]=this.$getStringScreenWidth(t[l])[0]),i[l]>n&&(n=i[l])}this.screenWidth=n}},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.undoChanges=function(e,t){if(e.length){this.$fromUndo=!0;for(var i=null,n=e.length-1;-1!=n;n--){var r=e[n];"doc"==r.group?(this.doc.revertDeltas(r.deltas),i=this.$getUndoSelection(r.deltas,!0,i)):r.deltas.forEach(function(e){this.addFolds(e.folds)},this)}return this.$fromUndo=!1,i&&this.$undoSelect&&!t&&this.selection.setSelectionRange(i),i}},this.redoChanges=function(e,t){if(e.length){this.$fromUndo=!0;for(var i=null,n=0;n<e.length;n++){var r=e[n];"doc"==r.group&&(this.doc.applyDeltas(r.deltas),i=this.$getUndoSelection(r.deltas,!1,i))}return this.$fromUndo=!1,i&&this.$undoSelect&&!t&&this.selection.setSelectionRange(i),i}},this.setUndoSelect=function(e){this.$undoSelect=e},this.$getUndoSelection=function(e,t,i){function n(e){var i="insertText"===e.action||"insertLines"===e.action;return t?!i:i}var r,o,s=e[0];n(s)?r=l.fromPoints(s.range.start,s.range.end):r=l.fromPoints(s.range.start,s.range.start);for(var a=1;a<e.length;a++)s=e[a],n(s)?(o=s.range.start,-1==r.compare(o.row,o.column)&&r.setStart(s.range.start),o=s.range.end,1==r.compare(o.row,o.column)&&r.setEnd(s.range.end),!0):(o=s.range.start,-1==r.compare(o.row,o.column)&&(r=l.fromPoints(s.range.start,s.range.start)),!1);if(null!=i){0===l.comparePoints(i.start,r.start)&&(i.start.column+=r.end.column-r.start.column,i.end.column+=r.end.column-r.start.column);var c=i.compareRange(r);1==c?r.setStart(i.start):-1==c&&r.setEnd(i.end)}return r},this.replace=function(e,t){return this.doc.replace(e,t)},this.moveText=function(e,t,i){var n=this.getTextRange(e),r=this.getFoldsInRange(e),o=l.fromPoints(t,t);if(!i){this.remove(e);var s=e.start.row-e.end.row,a=s?-e.end.column:e.start.column-e.end.column;a&&(o.start.row==e.end.row&&o.start.column>e.end.column&&(o.start.column+=a),o.end.row==e.end.row&&o.end.column>e.end.column&&(o.end.column+=a)),s&&o.start.row>=e.end.row&&(o.start.row+=s,o.end.row+=s)}if(o.end=this.insert(o.start,n),r.length){var c=e.start,u=o.start,s=u.row-c.row,a=u.column-c.column;this.addFolds(r.map(function(e){return e=e.clone(),e.start.row==c.row&&(e.start.column+=a),e.end.row==c.row&&(e.end.column+=a),e.start.row+=s,e.end.row+=s,e}))}return o},this.indentRows=function(e,t,i){i=i.replace(/\t/g,this.getTabString());for(var n=e;n<=t;n++)this.insert({row:n,column:0},i)},this.outdentRows=function(e){for(var t=e.collapseRows(),i=new l(0,0,0,0),n=this.getTabSize(),r=t.start.row;r<=t.end.row;++r){var o=this.getLine(r);i.start.row=r,i.end.row=r;for(var s=0;s<n&&" "==o.charAt(s);++s);s<n&&"\t"==o.charAt(s)?(i.start.column=s,i.end.column=s+1):(i.start.column=0,i.end.column=s),this.remove(i)}},this.$moveLines=function(e,t,i){if(e=this.getRowFoldStart(e),t=this.getRowFoldEnd(t),i<0){var n=this.getRowFoldStart(e+i);if(n<0)return 0;var r=n-e}else if(i>0){var n=this.getRowFoldEnd(t+i);if(n>this.doc.getLength()-1)return 0;var r=n-t}else{e=this.$clipRowToDocument(e),t=this.$clipRowToDocument(t);var r=t-e+1}var o=new l(e,0,t,Number.MAX_VALUE),s=this.getFoldsInRange(o).map(function(e){return e=e.clone(),e.start.row+=r,e.end.row+=r,e}),a=0==i?this.doc.getLines(e,t):this.doc.removeLines(e,t);return this.doc.insertLines(e+r,a),s.length&&this.addFolds(s),r},this.moveLinesUp=function(e,t){return this.$moveLines(e,t,-1)},this.moveLinesDown=function(e,t){return this.$moveLines(e,t,1)},this.duplicateLines=function(e,t){return this.$moveLines(e,t,0)},this.$clipRowToDocument=function(e){return Math.max(0,Math.min(e,this.doc.getLength()-1))},this.$clipColumnToRow=function(e,t){return t<0?0:Math.min(this.doc.getLine(e).length,t)},this.$clipPositionToDocument=function(e,t){if(t=Math.max(0,t),e<0)e=0,t=0;else{var i=this.doc.getLength();e>=i?(e=i-1,t=this.doc.getLine(i-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.$useWrapMode&&this._signal("changeWrapMode"))},this.adjustWrapLimit=function(e,t){var i=this.$wrapLimitRange;i.max<0&&(i={min:t,max:t});var n=this.$constrainWrapLimit(e,i.min,i.max);return n!=this.$wrapLimit&&n>1&&(this.$wrapLimit=n,this.$modified=!0,this.$useWrapMode&&(this.$updateWrapData(0,this.getLength()-1),this.$resetRowCache(0),this._signal("changeWrapLimit")),!0)},this.$constrainWrapLimit=function(e,t,i){return t&&(e=Math.max(t,e)),i&&(e=Math.min(i,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,i=this.$useWrapMode,n=e.data.action,r=e.data.range.start.row,o=e.data.range.end.row,s=e.data.range.start,a=e.data.range.end,l=null;if(-1!=n.indexOf("Lines")?(o="insertLines"==n?r+e.data.lines.length:r,t=e.data.lines?e.data.lines.length:o-r):t=o-r,this.$updating=!0,0!=t)if(-1!=n.indexOf("remove")){this[i?"$wrapData":"$rowLengthCache"].splice(r,t);var c=this.$foldData;l=this.getFoldsInRange(e.data.range),this.removeFolds(l);var u=this.getFoldLine(a.row),d=0;if(u){u.addRemoveChars(a.row,a.column,s.column-a.column),u.shiftRow(-t);var h=this.getFoldLine(r);h&&h!==u&&(h.merge(u),u=h),d=c.indexOf(u)+1}for(d;d<c.length;d++){var u=c[d]
;u.start.row>=a.row&&u.shiftRow(-t)}o=r}else{var p=Array(t);p.unshift(r,0);var g=i?this.$wrapData:this.$rowLengthCache;g.splice.apply(g,p);var c=this.$foldData,u=this.getFoldLine(r),d=0;if(u){var f=u.range.compareInside(s.row,s.column);0==f?(u=u.split(s.row,s.column))&&(u.shiftRow(t),u.addRemoveChars(o,0,a.column-s.column)):-1==f&&(u.addRemoveChars(r,0,a.column-s.column),u.shiftRow(t)),d=c.indexOf(u)+1}for(d;d<c.length;d++){var u=c[d];u.start.row>=r&&u.shiftRow(t)}}else{t=Math.abs(e.data.range.start.column-e.data.range.end.column),-1!=n.indexOf("remove")&&(l=this.getFoldsInRange(e.data.range),this.removeFolds(l),t=-t);var u=this.getFoldLine(r);u&&u.addRemoveChars(r,s.column,t)}return i&&this.$wrapData.length!=this.doc.getLength()&&console.error("doc.getLength() and $wrapData.length have to be the same!"),this.$updating=!1,i?this.$updateWrapData(r,o):this.$updateRowLengthCache(r,o),l},this.$updateRowLengthCache=function(e,t){this.$rowLengthCache[e]=null,this.$rowLengthCache[t]=null},this.$updateWrapData=function(e,t){var i,n,r=this.doc.getAllLines(),o=this.getTabSize(),s=this.$wrapData,a=this.$wrapLimit,l=e;for(t=Math.min(t,r.length-1);l<=t;)n=this.getFoldLine(l,n),n?(i=[],n.walk(function(e,t,n,o){var s;if(null!=e){s=this.$getDisplayTokens(e,i.length),s[0]=c;for(var a=1;a<s.length;a++)s[a]=h}else s=this.$getDisplayTokens(r[t].substring(o,n),i.length);i=i.concat(s)}.bind(this),n.end.row,r[n.end.row].length+1),s[n.start.row]=this.$computeWrapSplits(i,a,o),l=n.end.row+1):(i=this.$getDisplayTokens(r[l]),s[l]=this.$computeWrapSplits(i,a,o),l++)};var t=1,s=2,c=3,h=4,p=9,g=10;this.$computeWrapSplits=function(e,t){function i(t){var i=e.slice(o,t),r=i.length;i.join("").replace(/12/g,function(){r-=1}).replace(/2/g,function(){r-=1}),a+=r,n.push(a),o=t}if(0==e.length)return[];for(var n=[],r=e.length,o=0,a=0,l=this.$wrapAsCode;r-o>t;){var u=o+t;if(e[u-1]>=g&&e[u]>=g)i(u);else if(e[u]!=c&&e[u]!=h){for(var d=Math.max(u-(l?10:t-(t>>2)),o-1);u>d&&e[u]<c;)u--;if(l){for(;u>d&&e[u]<c;)u--;for(;u>d&&e[u]==p;)u--}else for(;u>d&&e[u]<g;)u--;u>d?i(++u):(u=o+t,e[u]==s&&u--,i(u))}else{for(u;u!=o-1&&e[u]!=c;u--);if(u>o){i(u);continue}for(u=o+t;u<e.length&&e[u]==h;u++);if(u==e.length)break;i(u)}}return n},this.$getDisplayTokens=function(i,n){var r,o=[];n=n||0;for(var a=0;a<i.length;a++){var l=i.charCodeAt(a);if(9==l){r=this.getScreenTabSize(o.length+n),o.push(11);for(var c=1;c<r;c++)o.push(12)}else 32==l?o.push(g):l>39&&l<48||l>57&&l<64?o.push(p):l>=4352&&e(l)?o.push(t,s):o.push(t)}return o},this.$getStringScreenWidth=function(t,i,n){if(0==i)return[0,0];null==i&&(i=Infinity),n=n||0;var r,o;for(o=0;o<t.length&&(r=t.charCodeAt(o),9==r?n+=this.getScreenTabSize(n):r>=4352&&e(r)?n+=2:n+=1,!(n>i));o++);return[n,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.getScreenLastRowColumn=function(e){var t=this.screenToDocumentPosition(e,Number.MAX_VALUE);return this.documentToScreenColumn(t.row,t.column)},this.getDocumentLastRowColumn=function(e,t){var i=this.documentToScreenRow(e,t);return this.getScreenLastRowColumn(i)},this.getDocumentLastRowColumnPosition=function(e,t){var i=this.documentToScreenRow(e,t);return this.screenToDocumentPosition(i,Number.MAX_VALUE/10)},this.getRowSplitData=function(e){return this.$useWrapMode?this.$wrapData[e]:undefined},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){if(e<0)return{row:0,column:0};var i,n,r=0,o=0,s=0,a=0,l=this.$screenRowCache,c=this.$getRowCacheIndex(l,e),u=l.length;if(u&&c>=0)var s=l[c],r=this.$docRowCache[c],d=e>l[u-1];else var d=!u;for(var h=this.getLength()-1,p=this.getNextFoldLine(r),g=p?p.start.row:Infinity;s<=e&&(a=this.getRowLength(r),!(s+a>e||r>=h));)s+=a,++r>g&&(r=p.end.row+1,p=this.getNextFoldLine(r,p),g=p?p.start.row:Infinity),d&&(this.$docRowCache.push(r),this.$screenRowCache.push(s));if(p&&p.start.row<=r)i=this.getFoldDisplayLine(p),r=p.start.row;else{if(s+a<=e||r>h)return{row:h,column:this.getLine(h).length};i=this.getLine(r),p=null}if(this.$useWrapMode){var f=this.$wrapData[r];if(f){var m=Math.floor(e-s);n=f[m],m>0&&f.length&&(o=f[m-1]||f[f.length-1],i=i.substring(o))}}return o+=this.$getStringScreenWidth(i,t)[1],this.$useWrapMode&&o>=n&&(o=n-1),p?p.idxToPosition(o):{row:r,column:o}},this.documentToScreenPosition=function(e,t){if(void 0===t)var i=this.$clipPositionToDocument(e.row,e.column);else i=this.$clipPositionToDocument(e,t);e=i.row,t=i.column;var n=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)var a=l[c],n=this.$screenRowCache[c],d=e>l[u-1];else var d=!u;for(var h=this.getNextFoldLine(a),p=h?h.start.row:Infinity;a<e;){if(a>=p){if((s=h.end.row+1)>e)break;h=this.getNextFoldLine(s,h),p=h?h.start.row:Infinity}else s=a+1;n+=this.getRowLength(a),a=s,d&&(this.$docRowCache.push(a),this.$screenRowCache.push(n))}var g="";if(h&&a>=p?(g=this.getFoldDisplayLine(h,e,t),r=h.start.row):(g=this.getLine(e).substring(0,t),r=e),this.$useWrapMode){var f=this.$wrapData[r];if(f){for(var m=0;g.length>=f[m];)n++,m++;g=g.substring(f[m-1]||0,g.length)}}return{row:n,column:this.$getStringScreenWidth(g)[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 i=this.$wrapData.length,n=0,r=0,t=this.$foldData[r++],o=t?t.start.row:Infinity;n<i;){var s=this.$wrapData[n];e+=s?s.length+1:1,++n>o&&(n=t.end.row+1,t=this.$foldData[r++],o=t?t.start.row:Infinity)}else{e=this.getLength();for(var a=this.$foldData,r=0;r<a.length;r++)t=a[r],e-=t.end.row-t.start.row}return this.lineWidgets&&(e+=this.$getWidgetScreenLength()),e},this.$setFontMetrics=function(){},this.destroy=function(){this.bgTokenizer&&(this.bgTokenizer.setDocument(null),this.bgTokenizer=null),this.$stopWorker()}}).call(h.prototype),e("./edit_session/folding").Folding.call(h.prototype),e("./edit_session/bracket_match").BracketMatch.call(h.prototype),r.defineOptions(h.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"},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},overwrite:{set:function(){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=h}),define("ace/search",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],function(e,t){"use strict";var i=e("./lib/lang"),n=e("./lib/oop"),r=e("./range").Range,o=function(){this.$options={}};(function(){this.set=function(e){return n.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,i=this.$matchIterator(e,t);if(!i)return!1;var n=null;return i.forEach(function(e,i,o){if(e.start)n=e;else{var s=e.offset+(o||0);if(n=new r(i,s,i,s+e.length),!e.length&&t.start&&t.start.start&&0!=t.skipCurrent&&n.isEqual(t.start))return n=null,!1}return!0}),n},this.findAll=function(e){var t=this.$options;if(!t.needle)return[];this.$assembleRegExp(t);var n=t.range,o=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=o.length-c;e:for(var d=a.offset||0;d<=u;d++){for(var h=0;h<c;h++)if(-1==o[d+h].search(a[h]))continue e;var p=o[d],g=o[d+c-1],f=p.length-p.match(a[0])[0].length,m=g.match(a[c-1])[0].length;l&&l.end.row===d&&l.end.column>f||(s.push(l=new r(d,f,d+c-1,m)),c>2&&(d=d+c-2))}}else for(var v=0;v<o.length;v++)for(var y=i.getMatchOffsets(o[v],a),h=0;h<y.length;h++){var w=y[h];s.push(new r(v,w.offset,v,w.offset+w.length))}if(n){for(var C=n.start.column,b=n.start.column,v=0,h=s.length-1;v<h&&s[v].start.column<C&&s[v].start.row==n.start.row;)v++;for(;v<h&&s[h].end.column>b&&s[h].end.row==n.end.row;)h--;for(s=s.slice(v,h+1),v=0,h=s.length;v<h;v++)s[v].start.row+=n.start.row,s[v].end.row+=n.start.row}return s},this.replace=function(e,t){var i=this.$options,n=this.$assembleRegExp(i);if(i.$isMultiLine)return t;if(n){var r=n.exec(e);if(!r||r[0].length!=e.length)return null;if(t=e.replace(n,t),i.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.$matchIterator=function(e,t){var n=this.$assembleRegExp(t);if(!n)return!1;var o;if(t.$isMultiLine)var s=n.length,a=function(t,i,a){var l=t.search(n[0]);if(-1!=l){for(var c=1;c<s;c++)if(t=e.getLine(i+c),-1==t.search(n[c]))return;var u=t.match(n[s-1])[0].length,d=new r(i,l,i+s-1,u);return 1==n.offset?(d.start.row--,d.start.column=Number.MAX_VALUE):a&&(d.start.column+=a),!!o(d)||void 0}};else if(t.backwards)var a=function(e,t,r){for(var s=i.getMatchOffsets(e,n),a=s.length-1;a>=0;a--)if(o(s[a],t,r))return!0};else var a=function(e,t,r){for(var s=i.getMatchOffsets(e,n),a=0;a<s.length;a++)if(o(s[a],t,r))return!0};var l=this.$lineIterator(e,t);return{forEach:function(e){o=e,l.forEach(a)}}},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="\\b"+n+"\\b");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 i=e.replace(/\r\n|\r|\n/g,"$\n^").split("\n"),n=[],r=0;r<i.length;r++)try{n.push(new RegExp(i[r],t))}catch(e){return!1}return""==i[0]?(n.shift(),n.offset=1):n.offset=0,n},this.$lineIterator=function(e,t){var i=1==t.backwards,n=0!=t.skipCurrent,r=t.range,o=t.start;o||(o=r?r[i?"end":"start"]:e.selection.getRange()),o.start&&(o=o[n!=i?"end":"start"]);var s=r?r.start.row:0,a=r?r.end.row:e.getLength()-1;return{forEach:i?function(i){var n=o.row;if(!i(e.getLine(n).substring(0,o.column),n)){for(n--;n>=s;n--)if(i(e.getLine(n),n))return;if(0!=t.wrap)for(n=a,s=o.row;n>=s;n--)if(i(e.getLine(n),n))return}}:function(i){var n=o.row;if(!i(e.getLine(n).substr(o.column),n,o.column)){for(n+=1;n<=a;n++)if(i(e.getLine(n),n))return;if(0!=t.wrap)for(n=s,a=o.row;n<=a;n++)if(i(e.getLine(n),n))return}}}}}).call(o.prototype),t.Search=o}),define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(e,t){"use strict";function i(e,t){this.platform=t||(o.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={},this.addCommands(e),this.$singleCommand=!0}function n(e,t){i.call(this,e,t),this.$singleCommand=!1}var r=e("../lib/keys"),o=e("../lib/useragent"),s=r.KEY_MODS;n.prototype=i.prototype,function(){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 i=e&&("string"==typeof e?e:e.name);e=this.commands[i],t||delete this.commands[i];var n=this.commandKeyBinding;for(var r in n){var o=n[r];if(o==e)delete n[r];else if(Array.isArray(o)){var s=o.indexOf(e);-1!=s&&(o.splice(s,1),1==o.length&&(n[r]=o[0]))}}},this.bindKey=function(e,t,i){if("object"==typeof e&&(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 n="";if(-1!=e.indexOf(" ")){var r=e.split(/\s+/);e=r.pop(),r.forEach(function(e){var t=this.parseKeys(e),i=s[t.hashId]+t.key;n+=(n?" ":"")+i,this._addCommandToBinding(n,"chainKeys")},this),n+=" "}var o=this.parseKeys(e),a=s[o.hashId]+o.key;this._addCommandToBinding(n+a,t,i)},this)},this._addCommandToBinding=function(e,t,i){var n,r=this.commandKeyBinding;t?!r[e]||this.$singleCommand?r[e]=t:(Array.isArray(r[e])?-1!=(n=r[e].indexOf(t))&&r[e].splice(n,1):r[e]=[r[e]],i||t.isDefault?r[e].unshift(t):r[e].push(t)):delete r[e]},this.addCommands=function(e){e&&Object.keys(e).forEach(function(t){var i=e[t];if(i){if("string"==typeof i)return this.bindKey(i,t);"function"==typeof i&&(i={exec:i}),"object"==typeof i&&(i.name||(i.name=t),this.addCommand(i))}},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}),i=t.pop(),n=r[i];if(r.FUNCTION_KEYS[n])i=r.FUNCTION_KEYS[n].toLowerCase();else{if(!t.length)return{key:i,hashId:-1};if(1==t.length&&"shift"==t[0])return{key:i.toUpperCase(),hashId:-1}}for(var o=0,s=t.length;s--;){var a=r.KEY_MODS[t[s]];if(null==a)return"undefined"!=typeof console&&console.error("invalid modifier "+t[s]+" in "+e),!1;o|=a}return{key:i,hashId:o}},this.findKeyCommand=function(e,t){var i=s[e]+t;return this.commandKeyBinding[i]},this.handleKeyboard=function(e,t,i,n){var r=s[t]+i,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&&n>0&&(e.$keyChain=""),{command:o}):(e.$keyChain=e.$keyChain||r,{command:"null"})}}.call(i.prototype),t.HashHandler=i,t.MultiHashHandler=n}),define("ace/commands/command_manager",["require","exports","module","ace/lib/oop","ace/keyboard/hash_handler","ace/lib/event_emitter"],function(e,t){"use strict";var i=e("../lib/oop"),n=e("../keyboard/hash_handler").MultiHashHandler,r=e("../lib/event_emitter").EventEmitter,o=function(e,t){n.call(this,t,e),this.byName=this.commands,this.setDefaultHandler("exec",function(e){return e.command.exec(e.editor,e.args||{})})};i.inherits(o,n),function(){i.implement(this,r),this.exec=function(e,t,i){if(Array.isArray(e)){for(var n=e.length;n--;)if(this.exec(e[n],t,i))return!0;return!1}if("string"==typeof e&&(e=this.commands[e]),!e)return!1;if(t&&t.$readOnly&&!e.readOnly)return!1;var r={editor:t,command:e,args:i};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(o.prototype),t.CommandManager=o}),define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"],function(e,t){"use strict";function i(e,t){return{win:e,mac:t}}var n=e("../lib/lang"),r=e("../config"),o=e("../range").Range;t.commands=[{name:"showSettingsMenu",bindKey:i("Ctrl-,","Command-,"),exec:function(e){r.loadModule("ace/ext/settings_menu",function(t){t.init(e),e.showSettingsMenu()})},readOnly:!0},{name:"goToNextError",bindKey:i("Alt-E","Ctrl-E"),exec:function(e){r.loadModule("ace/ext/error_marker",function(t){t.showErrorMarker(e,1)})},scrollIntoView:"animate",readOnly:!0},{name:"goToPreviousError",bindKey:i("Alt-Shift-E","Ctrl-Shift-E"),exec:function(e){r.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){r.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-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"),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-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"),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"),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"),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"),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:"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:"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){r.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"),exec:function(e){e.removeToLineEnd()},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(n.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("Ctrl-T","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(),i=t?e.selection.getSelectionLead():e.selection.getSelectionAnchor(),r=t?e.selection.getSelectionAnchor():e.selection.getSelectionLead(),s=e.session.doc.getLine(i.row).length,a=e.session.doc.getTextRange(e.selection.getRange()),l=a.replace(/\n\s*/," ").length,c=e.session.doc.getLine(i.row),u=i.row+1;u<=r.row+1;u++){var d=n.stringTrimLeft(n.stringTrimRight(e.session.doc.getLine(u)));0!==d.length&&(d=" "+d),c+=d}r.row+1<e.session.doc.getLength()-1&&(c+=e.session.doc.getNewLineCharacter()),e.clearSelection(),e.session.doc.replace(new o(i.row,0,r.row+2,0),c),l>0?(e.selection.moveCursorTo(i.row,i.column),e.selection.selectTo(i.row,i.column+l)):(s=e.session.doc.getLine(i.row).length>s?s+1:s,e.selection.moveCursorTo(i.row,s))},multiSelectAction:"forEach",readOnly:!0},{name:"invertSelection",bindKey:i(null,null),exec:function(e){var t=e.session.doc.getLength()-1,i=e.session.doc.getLine(t).length,n=e.selection.rangeList.ranges,r=[];n.length<1&&(n=[e.selection.getRange()]);for(var s=0;s<n.length;s++)s==n.length-1&&(n[s].end.row===t&&n[s].end.column===i||r.push(new o(n[s].end.row,n[s].end.column,t,i))),0===s?0===n[s].start.row&&0===n[s].start.column||r.push(new o(0,0,n[s].start.row,n[s].start.column)):r.push(new o(n[s-1].end.row,n[s-1].end.column,n[s].start.row,n[s].start.column));e.exitMultiSelectMode(),e.clearSelection();for(var s=0;s<r.length;s++)e.selection.addRange(r[s],!1)},readOnly:!0,scrollIntoView:"none"}]}),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){"use strict";e("./lib/fixoldbrowsers");var i=e("./lib/oop"),n=e("./lib/dom"),r=e("./lib/lang"),o=e("./lib/useragent"),s=e("./keyboard/textinput").TextInput,a=e("./mouse/mouse_handler").MouseHandler,l=e("./mouse/fold_handler").FoldHandler,c=e("./keyboard/keybinding").KeyBinding,u=e("./edit_session").EditSession,d=e("./search").Search,h=e("./range").Range,p=e("./lib/event_emitter").EventEmitter,g=e("./commands/command_manager").CommandManager,f=e("./commands/default_commands").commands,m=e("./config"),v=e("./token_iterator").TokenIterator,y=function(e,t){var i=e.getContainerElement();this.container=i,this.renderer=e,this.commands=new g(o.isMac?"mac":"win",f),this.textInput=new s(e.getTextAreaContainer(),this),
this.renderer.textarea=this.textInput.getElement(),this.keyBinding=new c(this),this.$mouseHandler=new a(this),new l(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=r.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 u("")),m.resetOptions(this),m._signal("editor",this)};(function(){i.implement(this,p),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=r.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&&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;if(t.name&&this.$blockScrolling&&this.$blockScrolling--,t&&t.scrollIntoView){switch(t.scrollIntoView){case"center":this.renderer.scrollCursorIntoView(null,.5);break;case"animate":case"cursor":this.renderer.scrollCursorIntoView();break;case"selectionPart":var i=this.selection.getRange(),n=this.renderer.layerConfig;(i.start.row>=n.lastRow||i.end.row<=n.firstRow)&&this.renderer.scrollSelectionIntoView(this.selection.anchor,this.selection.lead)}"animate"==t.scrollIntoView&&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,i=this.$mergeableCommands,n=t.command&&e.command.name==t.command.name;if("insertstring"==e.command.name){var r=e.args;this.mergeNextCommand===undefined&&(this.mergeNextCommand=!0),n=n&&this.mergeNextCommand&&(!/\s/.test(r)||/\s/.test(t.args)),this.mergeNextCommand=!0}else n=n&&-1!==i.indexOf(e.command.name);"always"!=this.$mergeUndoDeltas&&Date.now()-this.sequenceStartTime>2e3&&(n=!1),n?this.session.mergeUndoDeltas=!0:-1!==i.indexOf(e.command.name)&&(this.sequenceStartTime=Date.now())}},this.setKeyboardHandler=function(e,t){if(e&&"string"==typeof e){this.$keybindingId=e;var i=this;m.loadModule(["keybinding",e],function(n){i.$keybindingId==e&&i.keyBinding.setKeyboardHandler(n&&n.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){var t=this.session;if(t){this.session.removeEventListener("change",this.$onDocumentChange),this.session.removeEventListener("changeMode",this.$onChangeMode),this.session.removeEventListener("tokenizerUpdate",this.$onTokenizerUpdate),this.session.removeEventListener("changeTabSize",this.$onChangeTabSize),this.session.removeEventListener("changeWrapLimit",this.$onChangeWrapLimit),this.session.removeEventListener("changeWrapMode",this.$onChangeWrapMode),this.session.removeEventListener("onChangeFold",this.$onChangeFold),this.session.removeEventListener("changeFrontMarker",this.$onChangeFrontMarker),this.session.removeEventListener("changeBackMarker",this.$onChangeBackMarker),this.session.removeEventListener("changeBreakpoint",this.$onChangeBreakpoint),this.session.removeEventListener("changeAnnotation",this.$onChangeAnnotation),this.session.removeEventListener("changeOverwrite",this.$onCursorChange),this.session.removeEventListener("changeScrollTop",this.$onScrollTopChange),this.session.removeEventListener("changeScrollLeft",this.$onScrollLeftChange);var i=this.session.getSelection();i.removeEventListener("changeCursor",this.$onCursorChange),i.removeEventListener("changeSelection",this.$onSelectionChange)}this.session=e,e?(this.$onDocumentChange=this.onDocumentChange.bind(this),e.addEventListener("change",this.$onDocumentChange),this.renderer.setSession(e),this.$onChangeMode=this.onChangeMode.bind(this),e.addEventListener("changeMode",this.$onChangeMode),this.$onTokenizerUpdate=this.onTokenizerUpdate.bind(this),e.addEventListener("tokenizerUpdate",this.$onTokenizerUpdate),this.$onChangeTabSize=this.renderer.onChangeTabSize.bind(this.renderer),e.addEventListener("changeTabSize",this.$onChangeTabSize),this.$onChangeWrapLimit=this.onChangeWrapLimit.bind(this),e.addEventListener("changeWrapLimit",this.$onChangeWrapLimit),this.$onChangeWrapMode=this.onChangeWrapMode.bind(this),e.addEventListener("changeWrapMode",this.$onChangeWrapMode),this.$onChangeFold=this.onChangeFold.bind(this),e.addEventListener("changeFold",this.$onChangeFold),this.$onChangeFrontMarker=this.onChangeFrontMarker.bind(this),this.session.addEventListener("changeFrontMarker",this.$onChangeFrontMarker),this.$onChangeBackMarker=this.onChangeBackMarker.bind(this),this.session.addEventListener("changeBackMarker",this.$onChangeBackMarker),this.$onChangeBreakpoint=this.onChangeBreakpoint.bind(this),this.session.addEventListener("changeBreakpoint",this.$onChangeBreakpoint),this.$onChangeAnnotation=this.onChangeAnnotation.bind(this),this.session.addEventListener("changeAnnotation",this.$onChangeAnnotation),this.$onCursorChange=this.onCursorChange.bind(this),this.session.addEventListener("changeOverwrite",this.$onCursorChange),this.$onScrollTopChange=this.onScrollTopChange.bind(this),this.session.addEventListener("changeScrollTop",this.$onScrollTopChange),this.$onScrollLeftChange=this.onScrollLeftChange.bind(this),this.session.addEventListener("changeScrollLeft",this.$onScrollLeftChange),this.selection=e.getSelection(),this.selection.addEventListener("changeCursor",this.$onCursorChange),this.$onSelectionChange=this.onSelectionChange.bind(this),this.selection.addEventListener("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}),t&&t._signal("changeEditor",{oldEditor:this}),e&&e._signal("changeEditor",{editor:this})}},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")||n.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 i=t.findMatchingBracket(e.getCursorPosition());if(i)var n=new h(i.row,i.column,i.row,i.column+1);else if(t.$mode.getMatching)var n=t.$mode.getMatching(e.session);n&&(t.$bracketHighlight=t.addMarker(n,"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 i=e.getCursorPosition(),n=new v(e.session,i.row,i.column),r=n.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=n.stepForward())){var o=r.value,s=0,a=n.stepBackward();if("<"==a.value){do{a=r,(r=n.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=n.stepBackward(),r&&r.value===o&&-1!==r.type.indexOf("tag-name")&&("<"===a.value?s++:"</"===a.value&&s--)}while(a&&s<=0);n.stepForward()}if(!r)return t.removeMarker(t.$tagHighlight),void(t.$tagHighlight=null);var l=n.getCurrentTokenRow(),c=n.getCurrentTokenColumn(),u=new h(l,c,l,c+r.value.length);t.$tagHighlight&&0!==u.compareRange(t.$backMarkers[t.$tagHighlight].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,i=e.data,n=i.range;t=n.start.row==n.end.row&&"insertLines"!=i.action&&"removeLines"!=i.action?n.end.row:Infinity,this.renderer.updateLines(n.start.row,t,this.session.$useWrapMode),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||(m.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 i=new h(e.row,e.column,e.row,Infinity);i.id=t.addMarker(i,"ace_active-line","screenLine"),t.$highlightLineMarker=i}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(){var e=this.session;if(e.$selectionMarker&&e.removeMarker(e.$selectionMarker),e.$selectionMarker=null,this.selection.isEmpty())this.$updateHighlightActiveLine();else{var t=this.selection.getRange(),i=this.getSelectionStyle();e.$selectionMarker=e.addMarker(t,"ace_selection",i)}var n=this.$highlightSelectedWord&&this.$getSelectionHighLightRegexp();this.session.highlight(n),this._signal("changeSelection")},this.$getSelectionHighLightRegexp=function(){var e=this.session,t=this.getSelectionRange();if(!t.isEmpty()&&!t.isMultiLine()){var i=t.start.column-1,n=t.end.column+1,r=e.getLine(t.start.row),o=r.length,s=r.substring(Math.max(i,0),Math.min(n,o));if(!(i>=0&&/^[\w\d]/.test(s)||n<=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){if(!this.$readOnly){var t={text:e};if(this._signal("paste",t),e=t.text,!this.inMultiSelectMode||this.inVirtualSelectionMode)this.insert(e);else{var i=e.split(/\r\n|\r|\n/),n=this.selection.rangeList.ranges;if(i.length>n.length||i.length<2||!i[1])return this.commands.exec("insertstring",this,e);for(var r=n.length;r--;){var o=n[r];o.isEmpty()||this.session.remove(o),this.session.insert(o.start,i[r])}}this.renderer.scrollCursorIntoView()}},this.execCommand=function(e,t){return this.commands.exec(e,this,t)},this.insert=function(e,t){var i=this.session,n=i.getMode(),r=this.getCursorPosition();if(this.getBehavioursEnabled()&&!t){var o=n.transformAction(i.getState(r.row),"insertion",this,i,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()){var s=new h.fromPoints(r,r);s.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=i.getLine(r.row);if(r.column>a.search(/\S|$/)){var l=a.substr(r.column).search(/\S|$/);i.doc.removeInLine(r.row,r.column,r.column+l)}}this.clearSelection();var c=r.column,u=i.getState(r.row),a=i.getLine(r.row),d=n.checkOutdent(u,a,e);i.insert(r,e);if(o&&o.selection&&(2==o.selection.length?this.selection.setSelectionRange(new h(r.row,c+o.selection[0],r.row,c+o.selection[1])):this.selection.setSelectionRange(new h(r.row+o.selection[0],o.selection[1],r.row+o.selection[2],o.selection[3]))),i.getDocument().isNewLine(e)){var p=n.getNextLineIndent(u,a.slice(0,r.column),i.getTabString());i.insert({row:r.row+1,column:0},p)}d&&n.autoOutdent(u,i,r.row)},this.onTextInput=function(e){this.keyBinding.onTextInput(e)},this.onCommandKey=function(e,t,i){this.keyBinding.onCommandKey(e,t,i)},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 i=this.session,n=i.getState(t.start.row),r=i.getMode().transformAction(n,"deletion",this,i,t);if(0===t.end.column){var o=i.getTextRange(t);if("\n"==o[o.length-1]){var s=i.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 i,n,r=this.session.getLine(e.row);t<r.length?(i=r.charAt(t)+r.charAt(t-1),n=new h(e.row,t-1,e.row,t+1)):(i=r.charAt(t-1)+r.charAt(t-2),n=new h(e.row,t-2,e.row,t)),this.session.replace(n,i)}}},this.toLowerCase=function(){var e=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var t=this.getSelectionRange(),i=this.session.getTextRange(t);this.session.replace(t,i.toLowerCase()),this.selection.setSelectionRange(e)},this.toUpperCase=function(){var e=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var t=this.getSelectionRange(),i=this.session.getTextRange(t);this.session.replace(t,i.toUpperCase()),this.selection.setSelectionRange(e)},this.indent=function(){var e=this.session,t=this.getSelectionRange();if(t.start.row<t.end.row){var i=this.$getSelectedRows();return void e.indentRows(i.first,i.last,"\t")}if(t.start.column<t.end.column){var n=e.getTextRange(t);if(!/^\s+$/.test(n)){var i=this.$getSelectedRows();return void e.indentRows(i.first,i.last,"\t")}}var o=e.getLine(t.start.row),s=t.start,a=e.getTabSize(),l=e.documentToScreenColumn(s.row,s.column);if(this.session.getUseSoftTabs())var c=a-l%a,u=r.stringRepeat(" ",c);else{for(var c=l%a;" "==o[t.start.column]&&c;)t.start.column--,c--;this.selection.setSelectionRange(t),u="\t"}return this.insert(u)},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(){var e=this.$getSelectedRows(),t=this.session,i=[];for(r=e.first;r<=e.last;r++)i.push(t.getLine(r));i.sort(function(e,t){return e.toLowerCase()<t.toLowerCase()?-1:e.toLowerCase()>t.toLowerCase()?1:0});for(var n=new h(0,0,0,0),r=e.first;r<=e.last;r++){var o=t.getLine(r);n.start.row=r,n.end.row=r,n.end.column=o.length,t.replace(n,i[r-e.first])}},this.toggleCommentLines=function(){var e=this.session.getState(this.getCursorPosition().row),t=this.$getSelectedRows();this.session.getMode().toggleCommentLines(e,this.session,t.first,t.last)},this.toggleBlockComment=function(){var e=this.getCursorPosition(),t=this.session.getState(e.row),i=this.getSelectionRange();this.session.getMode().toggleBlockComment(t,this.session,i,e)},this.getNumberAt=function(e,t){var i=/[\-]?[0-9]+(?:\.[0-9]+)?/g;i.lastIndex=0;for(var n=this.session.getLine(e);i.lastIndex<t;){var r=i.exec(n);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,i=this.selection.getCursor().column,n=new h(t,i-1,t,i),r=this.session.getTextRange(n);if(!isNaN(parseFloat(r))&&isFinite(r)){var o=this.getNumberAt(t,i);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&&i<s?e*=Math.pow(10,o.end-i-1):e*=Math.pow(10,o.end-i),l+=e,l/=Math.pow(10,a);var c=l.toFixed(a),u=new h(t,o.start,t,o.end);this.session.replace(u,c),this.moveCursorTo(t,Math.max(o.start+1,i+c.length-o.value.length))}}},this.removeLines=function(){var e,t=this.$getSelectedRows();e=0===t.first||t.last+1<this.session.getLength()?new h(t.first,0,t.last+1,0):new h(t.first-1,this.session.getLine(t.first-1).length,t.last,this.session.getLine(t.last).length),this.session.remove(e),this.clearSelection()},this.duplicateSelection=function(){var e=this.selection,t=this.session,i=e.getRange(),n=e.isBackwards();if(i.isEmpty()){var r=i.start.row;t.duplicateLines(r,r)}else{var o=n?i.start:i.end,s=t.insert(o,t.getTextRange(i),!1);i.start=o,i.end=s,e.setSelectionRange(i,n)}},this.moveLinesDown=function(){this.$moveLines(1,!1)},this.moveLinesUp=function(){this.$moveLines(-1,!1)},this.moveText=function(e,t,i){return this.session.moveText(e,t,i)},this.copyLinesUp=function(){this.$moveLines(-1,!0)},this.copyLinesDown=function(){this.$moveLines(1,!0)},this.$moveLines=function(e,t){var i,n,r=this.selection;if(!r.inMultiSelectMode||this.inVirtualSelectionMode){var o=r.toOrientedRange();i=this.$getSelectedRows(o),n=this.session.$moveLines(i.first,i.last,t?0:e),t&&-1==e&&(n=0),o.moveBy(n,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 d=u;s[u].moveBy(a,0),i=this.$getSelectedRows(s[u]);for(var h=i.first,p=i.last;++u<c;){l&&s[u].moveBy(l,0);var g=this.$getSelectedRows(s[u]);if(t&&g.first!=p)break;if(!t&&g.first>p+1)break;p=g.last}for(u--,a=this.session.$moveLines(h,p,t?0:e),t&&-1==e&&(d=u+1);d<=u;)s[d].moveBy(a,0),d++;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(){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 i=this.renderer,n=this.renderer.layerConfig,r=e*Math.floor(n.height/n.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=i.scrollTop;i.scrollBy(0,r*n.lineHeight),null!=t&&i.scrollCursorIntoView(null,.5),i.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,i,n){this.renderer.scrollToLine(e,t,i,n)},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 i=this.getCursorPosition(),n=new v(this.session,i.row,i.column),r=n.getCurrentToken(),o=r||n.stepForward();if(o){var s,a,l=!1,c={},u=i.column-o.start,d={")":"(","(":"(","]":"[","[":"[","{":"{","}":"{"};do{if(o.value.match(/[{}()\[\]]/g)){for(;u<o.value.length&&!l;u++)if(d[o.value[u]])switch(a=d[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=n.stepForward(),u=0)}while(o&&!l);if(s){var p,g;if("bracket"===s)(p=this.session.getBracketRange(i))||(p=new h(n.getCurrentTokenRow(),n.getCurrentTokenColumn()+u-1,n.getCurrentTokenRow(),n.getCurrentTokenColumn()+u-1),g=p.start,(t||g.row===i.row&&Math.abs(g.column-i.column)<2)&&(p=this.session.getBracketRange(g)));else if("tag"===s){if(!o||-1===o.type.indexOf("tag-name"))return;var f=o.value;if(p=new h(n.getCurrentTokenRow(),n.getCurrentTokenColumn()-2,n.getCurrentTokenRow(),n.getCurrentTokenColumn()-2),0===p.compare(i.row,i.column)){l=!1;do{o=r,(r=n.stepBackward())&&(-1!==r.type.indexOf("tag-close")&&p.setEnd(n.getCurrentTokenRow(),n.getCurrentTokenColumn()+1),o.value===f&&-1!==o.type.indexOf("tag-name")&&("<"===r.value?c[f]++:"</"===r.value&&c[f]--,0===c[f]&&(l=!0)))}while(r&&!l)}o&&o.type.indexOf("tag-name")&&(g=p.start,g.row==i.row&&Math.abs(g.column-i.column)<2&&(g=p.end))}g=p&&p.cursor||g,g&&(e?p&&t?this.selection.setRange(p):p&&p.isEqual(this.getSelectionRange())?this.clearSelection():this.selection.selectTo(g.row,g.column):this.selection.moveTo(g.row,g.column))}}},this.gotoLine=function(e,t,i){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,i)},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 i=this.$search.find(this.session),n=0;return i?(this.$tryReplace(i,e)&&(n=1),null!==i&&(this.selection.setSelectionRange(i),this.renderer.scrollSelectionIntoView(i.start,i.end)),n):n},this.replaceAll=function(e,t){t&&this.$search.set(t);var i=this.$search.findAll(this.session),n=0;if(!i.length)return n;this.$blockScrolling+=1;var r=this.getSelectionRange();this.selection.moveTo(0,0);for(var o=i.length-1;o>=0;--o)this.$tryReplace(i[o],e)&&n++;return this.selection.setSelectionRange(r),this.$blockScrolling-=1,n},this.$tryReplace=function(e,t){var i=this.session.getTextRange(e);return t=this.$search.replace(i,t),null!==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,e||(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 i=this.renderer.scrollTop;this.renderer.scrollSelectionIntoView(e.start,e.end,.5),!1!==t&&this.renderer.animateScrolling(i)},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,i=this,n=!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(){n=!0}),s=this.renderer.on("beforeRender",function(){n&&(t=i.renderer.container.getBoundingClientRect())}),a=this.renderer.on("afterRender",function(){if(n&&t&&(i.isFocused()||i.searchBox&&i.searchBox.isFocused())){var e=i.renderer,o=e.$cursorLayer.$pixelPos,s=e.layerConfig,a=o.top-s.offset;n=o.top>=0&&a+t.top<0||!(o.top<s.height&&o.top+t.top+s.lineHeight>window.innerHeight)&&null,null!=n&&(r.style.top=a+"px",r.style.left=o.left+"px",r.style.height=s.lineHeight+"px",r.scrollIntoView(n)),n=t=null}});this.setAutoScrollEditorIntoView=function(e){e||(delete this.setAutoScrollEditorIntoView,this.removeEventListener("changeSelection",o),this.renderer.removeEventListener("afterRender",a),this.renderer.removeEventListener("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,n.setCssClass(t.element,"ace_slim-cursors",/slim/.test(e)))}}).call(y.prototype),m.defineOptions(y.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(){this.$onSelectionChange()},initialValue:!0},readOnly:{set:function(){this.$resetCursorStyle()},initialValue:!1},cursorStyle:{set:function(){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)}},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",foldStyle:"session",mode:"session"}),t.Editor=y}),define("ace/undomanager",["require","exports","module"],function(e,t){"use strict";var i=function(){this.reset()};(function(){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(),i=null;return t&&(i=this.$doc.undoChanges(t,e),this.$redoStack.push(t),this.dirtyCounter--),i},this.redo=function(e){var t=this.$redoStack.pop(),i=null;return t&&(i=this.$doc.redoChanges(t,e),this.$undoStack.push(t),this.dirtyCounter++),i},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}}).call(i.prototype),t.UndoManager=i}),define("ace/layer/gutter",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter"],function(e,t){"use strict";var i=e("../lib/dom"),n=e("../lib/oop"),r=e("../lib/lang"),o=e("../lib/event_emitter").EventEmitter,s=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(){n.implement(this,o),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 i=e[t],n=i.row,o=this.$annotations[n];o||(o=this.$annotations[n]={text:[]});var s=i.text;s=s?r.escapeHTML(s):i.html||"",-1===o.text.indexOf(s)&&o.text.push(s);var a=i.type;"error"==a?o.className=" ace_error":"warning"==a&&" ace_error"!=o.className?o.className=" ace_warning":"info"!=a||o.className||(o.className=" ace_info")}},this.$updateAnnotations=function(e){if(this.$annotations.length){var t=e.data,i=t.range,n=i.start.row,r=i.end.row-n;if(0===r);else if("removeText"==t.action||"removeLines"==t.action)this.$annotations.splice(n,r+1,null);else{var o=new Array(r+1);o.unshift(n,1),this.$annotations.splice.apply(this.$annotations,o)}}},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:Infinity,a=this.$showFoldWidgets&&t.foldWidgets,l=t.$breakpoints,c=t.$decorations,u=t.$firstLineNumber,d=0,h=t.gutterRenderer||this.$renderer,p=null,g=-1,f=n;;){if(f>s&&(f=o.end.row+1,o=t.getNextFoldLine(f,o),s=o?o.start.row:Infinity),f>r){for(;this.$cells.length>g+1;)p=this.$cells.pop(),this.element.removeChild(p.element);break}p=this.$cells[++g],p||(p={element:null,textNode:null,foldWidget:null},p.element=i.createElement("div"),p.textNode=document.createTextNode(""),p.element.appendChild(p.textNode),this.element.appendChild(p.element),this.$cells[g]=p);var m="ace_gutter-cell ";l[f]&&(m+=l[f]),c[f]&&(m+=c[f]),this.$annotations[f]&&(m+=this.$annotations[f].className),p.element.className!=m&&(p.element.className=m);var v=t.getRowLength(f)*e.lineHeight+"px";if(v!=p.element.style.height&&(p.element.style.height=v),a){var y=a[f];null==y&&(y=a[f]=t.getFoldWidget(f))}if(y){p.foldWidget||(p.foldWidget=i.createElement("span"),p.element.appendChild(p.foldWidget));var m="ace_fold-widget ace_"+y;"start"==y&&f==s&&f<o.end.row?m+=" ace_closed":m+=" ace_open",p.foldWidget.className!=m&&(p.foldWidget.className=m);var v=e.lineHeight+"px";p.foldWidget.style.height!=v&&(p.foldWidget.style.height=v)}else p.foldWidget&&(p.element.removeChild(p.foldWidget),p.foldWidget=null);var w=d=h?h.getText(t,f):f+u;w!=p.textNode.data&&(p.textNode.data=w),f++}this.element.style.height=e.minHeight+"px",(this.$fixedWidth||t.$useWrapMode)&&(d=t.getLength()+u);var C=h?h.getWidth(t,d,e):d.toString().length*e.characterWidth,b=this.$padding||this.$computePadding();(C+=b.left+b.right)===this.gutterWidth||isNaN(C)||(this.gutterWidth=C,this.element.style.width=Math.ceil(this.gutterWidth)+"px",this._emit("changeGutterWidth",C))},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(),i=this.element.getBoundingClientRect();return e.x<t.left+i.left?"markers":this.$showFoldWidgets&&e.x>i.right-t.right?"foldWidgets":void 0}}).call(s.prototype),t.Gutter=s}),define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"],function(e,t){"use strict";var i=e("../range").Range,n=e("../lib/dom"),r=function(e){this.element=n.createElement("div"),this.element.className="ace_layer ace_marker-layer",e.appendChild(this.element)};(function(){this.$padding=0,this.setPadding=function(e){this.$padding=e},this.setSession=function(e){this.session=e},this.setMarkers=function(e){this.markers=e},this.update=function(e){var e=e||this.config;if(e){this.config=e;var t=[];for(var i in this.markers){var n=this.markers[i];if(n.range){var r=n.range.clipRows(e.firstRow,e.lastRow);if(!r.isEmpty())if(r=r.toScreenRange(this.session),n.renderer){var o=this.$getTop(r.start.row,e),s=this.$padding+r.start.column*e.characterWidth;n.renderer(t,r,s,o,e)}else"fullLine"==n.type?this.drawFullLineMarker(t,r,n.clazz,e):"screenLine"==n.type?this.drawScreenLineMarker(t,r,n.clazz,e):r.isMultiLine()?"text"==n.type?this.drawTextMarker(t,r,n.clazz,e):this.drawMultiLineMarker(t,r,n.clazz,e):this.drawSingleLineMarker(t,r,n.clazz+" ace_start",e)}else n.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(e,t,n,r,o){var s=t.start.row,a=new i(s,t.start.column,s,this.session.getScreenLastRowColumn(s));for(this.drawSingleLineMarker(e,a,n+" ace_start",r,1,o),s=t.end.row,a=new i(s,0,s,t.end.column),this.drawSingleLineMarker(e,a,n,r,0,o),s=t.start.row+1;s<t.end.row;s++)a.start.row=s,a.end.row=s,a.end.column=this.session.getScreenLastRowColumn(s),this.drawSingleLineMarker(e,a,n,r,1,o)},this.drawMultiLineMarker=function(e,t,i,n,r){var o=this.$padding,s=n.lineHeight,a=this.$getTop(t.start.row,n),l=o+t.start.column*n.characterWidth;r=r||"",e.push("<div class='",i," ace_start' style='","height:",s,"px;","right:0;","top:",a,"px;","left:",l,"px;",r,"'></div>"),a=this.$getTop(t.end.row,n);var c=t.end.column*n.characterWidth;e.push("<div class='",i,"' style='","height:",s,"px;","width:",c,"px;","top:",a,"px;","left:",o,"px;",r,"'></div>"),(s=(t.end.row-t.start.row-1)*n.lineHeight)<0||(a=this.$getTop(t.start.row+1,n),e.push("<div class='",i,"' style='","height:",s,"px;","right:0;","top:",a,"px;","left:",o,"px;",r,"'></div>"))},this.drawSingleLineMarker=function(e,t,i,n,r,o){var s=n.lineHeight,a=(t.end.column+(r||0)-t.start.column)*n.characterWidth,l=this.$getTop(t.start.row,n),c=this.$padding+t.start.column*n.characterWidth;e.push("<div class='",i,"' style='","height:",s,"px;","width:",a,"px;","top:",l,"px;","left:",c,"px;",o||"","'></div>")},this.drawFullLineMarker=function(e,t,i,n,r){var o=this.$getTop(t.start.row,n),s=n.lineHeight;t.start.row!=t.end.row&&(s+=this.$getTop(t.end.row,n)-o),e.push("<div class='",i,"' style='","height:",s,"px;","top:",o,"px;","left:0;right:0;",r||"","'></div>")},this.drawScreenLineMarker=function(e,t,i,n,r){var o=this.$getTop(t.start.row,n),s=n.lineHeight;e.push("<div class='",i,"' style='","height:",s,"px;","top:",o,"px;","left:0;right:0;",r||"","'></div>")}}).call(r.prototype),t.Marker=r}),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){"use strict";var i=e("../lib/oop"),n=e("../lib/dom"),r=e("../lib/lang"),o=(e("../lib/useragent"),e("../lib/event_emitter").EventEmitter),s=function(e){this.element=n.createElement("div"),this.element.className="ace_layer ace_text-layer",e.appendChild(this.element),this.$updateEolChar=this.$updateEolChar.bind(this)};(function(){i.implement(this,o),this.EOF_CHAR="\xb6",this.EOL_CHAR_LF="\xac",this.EOL_CHAR_CRLF="\xa4",this.EOL_CHAR=this.EOL_CHAR_LF,this.TAB_CHAR="\u2192",this.SPACE_CHAR="\xb7",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],i=1;i<e+1;i++)this.showInvisibles?t.push("<span class='ace_invisible ace_invisible_tab'>"+this.TAB_CHAR+r.stringRepeat("\xa0",i-1)+"</span>"):t.push(r.stringRepeat("\xa0",i));if(this.displayIndentGuides){this.$indentGuideRe=/\s\S| \t|\t |\s$/;var n="ace_indent-guide",o="",s="";if(this.showInvisibles){n+=" ace_invisible",o=" ace_invisible_space",s=" ace_invisible_tab";var a=r.stringRepeat(this.SPACE_CHAR,this.tabSize),l=this.TAB_CHAR+r.stringRepeat("\xa0",this.tabSize-1)}else var a=r.stringRepeat("\xa0",this.tabSize),l=a;this.$tabStrings[" "]="<span class='"+n+o+"'>"+a+"</span>",this.$tabStrings["\t"]="<span class='"+n+s+"'>"+l+"</span>"}},this.updateLines=function(e,t,i){this.config.lastRow==e.lastRow&&this.config.firstRow==e.firstRow||this.scrollLines(e),this.config=e;for(var n=Math.max(t,e.firstRow),r=Math.min(i,e.lastRow),o=this.element.childNodes,s=0,a=e.firstRow;a<n;a++){var l=this.session.getFoldLine(a);if(l){if(l.containsRow(n)){n=l.start.row;break}a=l.end.row}s++}for(var a=n,l=this.session.getNextFoldLine(a),c=l?l.start.row:Infinity;;){if(a>c&&(a=l.end.row+1,l=this.session.getNextFoldLine(a,l),c=l?l.start.row:Infinity),a>r)break;var u=o[s++];if(u){var d=[];this.$renderLine(d,a,!this.$useLineGroups(),a==c&&l),u.style.height=e.lineHeight*this.session.getRowLength(a)+"px",u.innerHTML=d.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 i=this.element;if(t.firstRow<e.firstRow)for(var n=this.session.getFoldedRowCount(t.firstRow,e.firstRow-1);n>0;n--)i.removeChild(i.firstChild);if(t.lastRow>e.lastRow)for(var n=this.session.getFoldedRowCount(e.lastRow+1,t.lastRow);n>0;n--)i.removeChild(i.lastChild);if(e.firstRow<t.firstRow){var r=this.$renderLinesFragment(e,e.firstRow,t.firstRow-1);i.firstChild?i.insertBefore(r,i.firstChild):i.appendChild(r)}if(e.lastRow>t.lastRow){var r=this.$renderLinesFragment(e,t.lastRow+1,e.lastRow);i.appendChild(r)}},this.$renderLinesFragment=function(e,t,i){for(var r=this.element.ownerDocument.createDocumentFragment(),o=t,s=this.session.getNextFoldLine(o),a=s?s.start.row:Infinity;;){if(o>a&&(o=s.end.row+1,s=this.session.getNextFoldLine(o,s),a=s?s.start.row:Infinity),o>i)break;var l=n.createElement("div"),c=[];if(this.$renderLine(c,o,!1,o==a&&s),l.innerHTML=c.join(""),this.$useLineGroups())l.className="ace_line_group",r.appendChild(l),l.style.height=e.lineHeight*this.session.getRowLength(o)+"px";else for(;l.firstChild;)r.appendChild(l.firstChild);o++}return r},this.update=function(e){this.config=e;for(var t=[],i=e.firstRow,n=e.lastRow,r=i,o=this.session.getNextFoldLine(r),s=o?o.start.row:Infinity;;){if(r>s&&(r=o.end.row+1,o=this.session.getNextFoldLine(r,o),s=o?o.start.row:Infinity),r>n)break;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,i,n){var o=this,s=/\t|&|<|( +)|([\x00-\x1f\x80-\xa0\xad\u1680\u180E\u2000-\u200f\u2028\u2029\u202F\u205F\u3000\uFEFF])|[\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]/g,a=function(e,i,n,s){if(i)return o.showInvisibles?"<span class='ace_invisible ace_invisible_space'>"+r.stringRepeat(o.SPACE_CHAR,e.length)+"</span>":r.stringRepeat("\xa0",e.length);if("&"==e)return"&#38;";if("<"==e)return"&#60;";if("\t"==e){var a=o.session.getScreenTabSize(t+s);return t+=a-1,o.$tabStrings[a]}if("\u3000"==e){var l=o.showInvisibles?"ace_cjk ace_invisible ace_invisible_space":"ace_cjk",c=o.showInvisibles?o.SPACE_CHAR:"";return t+=1,"<span class='"+l+"' style='width:"+2*o.config.characterWidth+"px'>"+c+"</span>"}return n?"<span class='ace_invisible ace_invisible_space ace_invalid'>"+o.SPACE_CHAR+"</span>":(t+=1,"<span class='ace_cjk' style='width:"+2*o.config.characterWidth+"px'>"+e+"</span>")},l=n.replace(s,a);if(this.$textToken[i.type])e.push(l);else{var c="ace_"+i.type.replace(/\./g," ace_"),u="";"fold"==i.type&&(u=" style='width:"+i.value.length*this.config.characterWidth+"px;' "),e.push("<span class='",c,"'",u,">",l,"</span>")}return t+n.length},this.renderIndentGuide=function(e,t,i){var n=t.search(this.$indentGuideRe);return n<=0||n>=i?t:" "==t[0]?(n-=n%this.tabSize,e.push(r.stringRepeat(this.$tabStrings[" "],n/this.tabSize)),t.substr(n)):"\t"==t[0]?(e.push(r.stringRepeat(this.$tabStrings["\t"],n)),t.substr(n)):t},this.$renderWrappedLine=function(e,t,i,n){for(var r=0,o=0,s=i[0],a=0,l=0;l<t.length;l++){var c=t[l],u=c.value;if(0==l&&this.displayIndentGuides){if(r=u.length,!(u=this.renderIndentGuide(e,u,s)))continue;r-=u.length}if(r+u.length<s)a=this.$renderToken(e,a,c,u),r+=u.length;else{for(;r+u.length>=s;)a=this.$renderToken(e,a,c,u.substring(0,s-r)),u=u.substring(s-r),r=s,n||e.push("</div>","<div class='ace_line' style='height:",this.config.lineHeight,"px'>"),o++,a=0,s=i[o]||Number.MAX_VALUE;0!=u.length&&(r+=u.length,a=this.$renderToken(e,a,c,u))}}},this.$renderSimpleLine=function(e,t){var i=0,n=t[0],r=n.value;this.displayIndentGuides&&(r=this.renderIndentGuide(e,r)),r&&(i=this.$renderToken(e,i,n,r));for(var o=1;o<t.length;o++)n=t[o],r=n.value,i=this.$renderToken(e,i,n,r)},this.$renderLine=function(e,t,i,n){if(n||0==n||(n=this.session.getFoldLine(t)),n)var r=this.$getFoldLineTokens(t,n);else var r=this.session.getTokens(t);if(i||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,i):this.$renderSimpleLine(e,r)}this.showInvisibles&&(n&&(t=n.end.row),e.push("<span class='ace_invisible ace_invisible_eol'>",t==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,"</span>")),i||e.push("</div>")},this.$getFoldLineTokens=function(e,t){function i(e,t,i){for(var n=0,o=0;o+e[n].value.length<t;)if(o+=e[n].value.length,++n==e.length)return;if(o!=t){var s=e[n].value.substring(t-o);s.length>i-t&&(s=s.substring(0,i-t)),r.push({type:e[n].type,value:s}),o=t+s.length,n+=1}for(;o<i&&n<e.length;){var s=e[n].value;s.length+o>i?r.push({type:e[n].type,value:s.substring(0,i-o)}):r.push(e[n]),o+=s.length,n+=1}}var n=this.session,r=[],o=n.getTokens(e);return t.walk(function(e,t,s,a,l){null!=e?r.push({type:"fold",value:e}):(l&&(o=n.getTokens(t)),o.length&&i(o,a,s))},t.end.row,this.session.getLine(t.end.row).length),r},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(s.prototype),t.Text=s}),define("ace/layer/cursor",["require","exports","module","ace/lib/dom"],function(e,t){"use strict";var i,n=e("../lib/dom"),r=function(e){this.element=n.createElement("div"),this.element.className="ace_layer ace_cursor-layer",e.appendChild(this.element),i===undefined&&(i="opacity"in this.element),this.isVisible=!1,this.isBlinking=!0,this.blinkInterval=1e3,this.smoothBlinking=!1,this.cursors=[],this.cursor=this.addCursor(),n.addCssClass(this.element,"ace_hidden-cursors"),this.$updateCursors=this.$updateVisibility.bind(this)};(function(){this.$updateVisibility=function(e){for(var t=this.cursors,i=t.length;i--;)t[i].style.visibility=e?"":"hidden"},this.$updateOpacity=function(e){for(var t=this.cursors,i=t.length;i--;)t[i].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,n.setCssClass(this.element,"ace_smooth-blinking",e),this.$updateCursors(!0),this.$updateCursors=(e?this.$updateOpacity:this.$updateVisibility).bind(this),this.restartTimer())},this.addCursor=function(){var e=n.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,n.addCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},this.showCursor=function(){this.isVisible=!0,n.removeCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},this.restartTimer=function(){var e=this.$updateCursors;if(clearInterval(this.intervalId),clearTimeout(this.timeoutId),this.smoothBlinking&&n.removeCssClass(this.element,"ace_smooth-blinking"),e(!0),this.isBlinking&&this.blinkInterval&&this.isVisible){this.smoothBlinking&&setTimeout(function(){n.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 i=this.session.documentToScreenPosition(e);return{left:this.$padding+i.column*this.config.characterWidth,top:(i.row-(t?this.config.firstRowScreen:0))*this.config.lineHeight}},this.update=function(e){this.config=e;var t=this.session.$selectionMarkers,i=0,n=0;t!==undefined&&0!==t.length||(t=[{cursor:null}]);for(var i=0,r=t.length;i<r;i++){var o=this.getPixelPosition(t[i].cursor,!0);if(!((o.top>e.height+e.offset||o.top<0)&&i>1)){var s=(this.cursors[n++]||this.addCursor()).style;this.drawCursor?this.drawCursor(s,o,e,t[i],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>n;)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?n.addCssClass(this.element,"ace_overwrite-cursors"):n.removeCssClass(this.element,"ace_overwrite-cursors"))},this.destroy=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId)}}).call(r.prototype),t.Cursor=r}),define("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(e,t){"use strict";var i=e("./lib/oop"),n=e("./lib/dom"),r=e("./lib/event"),o=e("./lib/event_emitter").EventEmitter,s=function(e){this.element=n.createElement("div"),this.element.className="ace_scrollbar ace_scrollbar"+this.classSuffix,this.inner=n.createElement("div"),this.inner.className="ace_scrollbar-inner",this.element.appendChild(this.inner),e.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,r.addListener(this.element,"scroll",this.onScroll.bind(this)),r.addListener(this.element,"mousedown",r.preventDefault)};(function(){i.implement(this,o),this.setVisible=function(e){this.element.style.display=e?"":"none",this.isVisible=e}}).call(s.prototype);var a=function(e,t){s.call(this,e),this.scrollTop=0,t.$scrollbarWidth=this.width=n.scrollbarWidth(e.ownerDocument),this.inner.style.width=this.element.style.width=(this.width||15)+5+"px"};i.inherits(a,s),function(){this.classSuffix="-v",this.onScroll=function(){this.skipEvent||(this.scrollTop=this.element.scrollTop,this._emit("scroll",{data:this.scrollTop})),this.skipEvent=!1},this.getWidth=function(){return this.isVisible?this.width:0},this.setHeight=function(e){this.element.style.height=e+"px"},this.setInnerHeight=function(e){this.inner.style.height=e+"px"},this.setScrollHeight=function(e){this.inner.style.height=e+"px"},this.setScrollTop=function(e){this.scrollTop!=e&&(this.skipEvent=!0,this.scrollTop=this.element.scrollTop=e)}}.call(a.prototype);var l=function(e,t){s.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(l,s),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(l.prototype),t.ScrollBar=a,t.ScrollBarV=a,t.ScrollBarH=l,t.VScrollBar=a,t.HScrollBar=l}),define("ace/renderloop",["require","exports","module","ace/lib/event"],function(e,t){"use strict";var i=e("./lib/event"),n=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(n.prototype),t.RenderLoop=n}),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){var i=e("../lib/oop"),n=e("../lib/dom"),r=e("../lib/lang"),o=e("../lib/useragent"),s=e("../lib/event_emitter").EventEmitter,a=0,l=t.FontMetrics=function(e){this.el=n.createElement("div"),this.$setMeasureNodeStyles(this.el.style,!0),this.$main=n.createElement("div"),this.$setMeasureNodeStyles(this.$main.style),this.$measureNode=n.createElement("div"),this.$setMeasureNodeStyles(this.$measureNode.style),this.el.appendChild(this.$main),this.el.appendChild(this.$measureNode),e.appendChild(this.el),a||this.$testFractionalRect(),this.$measureNode.innerHTML=r.stringRepeat("X",a),this.$characterSize={width:0,height:0},this.checkForSizeChanges()};(function(){i.implement(this,s),this.$characterSize={width:0,height:0},this.$testFractionalRect=function(){var e=n.createElement("div");this.$setMeasureNodeStyles(e.style),e.style.width="0.2px",document.documentElement.appendChild(e);var t=e.getBoundingClientRect().width;a=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",o.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&&this.$pollSizeChangesTimer},this.$measureSizes=function(){if(50===a){var e=null;try{e=this.$measureNode.getBoundingClientRect()}catch(t){e={width:0,height:0}}var t={height:e.height,width:e.width/a}}else var t={height:this.$measureNode.clientHeight,width:this.$measureNode.clientWidth/a};return 0===t.width||0===t.height?null:t},this.$measureCharWidth=function(e){return this.$main.innerHTML=r.stringRepeat(e,a),this.$main.getBoundingClientRect().width/a},this.getCharacterWidth=function(e){var t=this.charSizes[e];return t===undefined&&(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(l.prototype)}),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){"use strict";var i=e("./lib/oop"),n=e("./lib/dom"),r=e("./config"),o=e("./lib/useragent"),s=e("./layer/gutter").Gutter,a=e("./layer/marker").Marker,l=e("./layer/text").Text,c=e("./layer/cursor").Cursor,u=e("./scrollbar").HScrollBar,d=e("./scrollbar").VScrollBar,h=e("./renderloop").RenderLoop,p=e("./layer/font_metrics").FontMetrics,g=e("./lib/event_emitter").EventEmitter
;n.importCssString('.ace_editor {position: relative;overflow: hidden;font: 12px/normal \'Monaco\', \'Menlo\', \'Ubuntu Mono\', \'Consolas\', \'source-code-pro\', monospace;direction: ltr;}.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;}.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}.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_editor.ace_multiselect .ace_cursor {border-left-width: 1px;}.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_editor");var f=function(e,t){var i=this;this.container=e||n.createElement("div"),this.$keepTextAreaAtCursor=!o.isOldIE,n.addCssClass(this.container,"ace_editor"),this.setTheme(t),this.$gutter=n.createElement("div"),this.$gutter.className="ace_gutter",this.container.appendChild(this.$gutter),this.scroller=n.createElement("div"),this.scroller.className="ace_scroller",this.container.appendChild(this.scroller),this.content=n.createElement("div"),this.content.className="ace_content",this.scroller.appendChild(this.content),this.$gutterLayer=new s(this.$gutter),this.$gutterLayer.on("changeGutterWidth",this.onGutterResize.bind(this)),this.$markerBack=new a(this.content);var g=this.$textLayer=new l(this.content);this.canvas=g.element,this.$markerFront=new a(this.content),this.$cursorLayer=new c(this.content),this.$horizScroll=!1,this.$vScroll=!1,this.scrollBar=this.scrollBarV=new d(this.container,this),this.scrollBarH=new u(this.container,this),this.scrollBarV.addEventListener("scroll",function(e){i.$scrollAnimation||i.session.setScrollTop(e.data-i.scrollMargin.top)}),this.scrollBarH.addEventListener("scroll",function(e){i.$scrollAnimation||i.session.setScrollLeft(e.data-i.scrollMargin.left)}),this.scrollTop=0,this.scrollLeft=0,this.cursorPos={row:0,column:0},this.$fontMetrics=new p(this.container,500),this.$textLayer.$setFontMetrics(this.$fontMetrics),this.$textLayer.addEventListener("changeCharacterSize",function(e){i.updateCharacterSize(),i.onResize(!0,i.gutterWidth,i.$size.width,i.$size.height),i._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 h(this.$renderChanges.bind(this),this.container.ownerDocument.defaultView),this.$loop.schedule(this.CHANGE_FULL),this.updateCharacterSize(),this.setPadding(4),r.resetOptions(this),r._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.onChangeNewLineMode=this.onChangeNewLineMode.bind(this),this.onChangeNewLineMode(),this.session.doc.on("changeNewLineMode",this.onChangeNewLineMode))},this.updateLines=function(e,t,i){if(t===undefined&&(t=Infinity),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(!i)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.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,i,n){if(!(this.resizing>2)){this.resizing>0?this.resizing++:this.resizing=e?1:0;var r=this.container;n||(n=r.clientHeight||r.scrollHeight),i||(i=r.clientWidth||r.scrollWidth);var o=this.$updateCachedSize(e,t,i,n);if(!this.$size.scrollerHeight||!i&&!n)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,i,n){n-=this.$extraHeight||0;var r=0,o=this.$size,s={width:o.width,height:o.height,scrollerHeight:o.scrollerHeight,scrollerWidth:o.scrollerWidth};return n&&(e||o.height!=n)&&(o.height=n,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),i&&(e||o.width!=i)&&(r|=this.CHANGE_SIZE,o.width=i,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,i-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=!i||!n,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.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 i=this.session.selection.getCursor();i.column=0,e=this.$cursorLayer.getPixelPosition(i,!0),t*=this.session.getRowLength(i.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=n.createElement("div");e.className="ace_layer ace_print-margin-layer",this.$printMarginEl=n.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.content},this.getTextAreaContainer=function(){return this.container},this.$moveTextAreaToCursor=function(){if(this.$keepTextAreaAtCursor){var e=this.layerConfig,t=this.$cursorLayer.$pixelPos.top,i=this.$cursorLayer.$pixelPos.left;t-=e.offset;var n=this.textarea.style,r=this.lineHeight;if(t<0||t>e.height-r)return void(n.top=n.left="0");var o=this.characterWidth;if(this.$composition){var s=this.textarea.value.replace(/^\x01+/,"");o*=this.session.$getStringScreenWidth(s)[0]+2,r+=2}i-=this.scrollLeft,i>this.$size.scrollerWidth-o&&(i=this.$size.scrollerWidth-o),i+=this.gutterWidth,n.height=r+"px",n.width=o+"px",n.left=Math.min(i,this.$size.scrollerWidth-o)+"px",n.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=Math.floor((this.layerConfig.height+this.layerConfig.offset)/this.layerConfig.lineHeight);return this.layerConfig.firstRow-1+e},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,i,n){var r=this.scrollMargin;r.top=0|e,r.bottom=0|t,r.right=0|n,r.left=0|i,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)return void(this.$changes|=e);if(this.$size.$dirty)return this.$changes|=e,this.onResize(!0);this.lineHeight||this.$textLayer.checkForSizeChanges(),this._signal("beforeRender");var i=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(),i.firstRow!=this.layerConfig.firstRow&&i.firstRowScreen==this.layerConfig.firstRowScreen){var n=this.scrollTop+(i.firstRow-this.layerConfig.firstRow)*this.lineHeight;n>0&&(this.scrollTop=n,e|=this.CHANGE_SCROLL,e|=this.$computeLayerConfig())}i=this.layerConfig,this.$updateScrollBarV(),e&this.CHANGE_H_SCROLL&&this.$updateScrollBarH(),this.$gutterLayer.element.style.marginTop=-i.offset+"px",this.content.style.marginTop=-i.offset+"px",this.content.style.width=i.width+2*this.$padding+"px",this.content.style.height=i.minHeight+"px"}return 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?(this.$textLayer.update(i),this.$showGutter&&this.$gutterLayer.update(i),this.$markerBack.update(i),this.$markerFront.update(i),this.$cursorLayer.update(i),this.$moveTextAreaToCursor(),this.$highlightGutterLine&&this.$updateGutterLineHighlight(),void this._signal("afterRender")):e&this.CHANGE_SCROLL?(e&this.CHANGE_TEXT||e&this.CHANGE_LINES?this.$textLayer.update(i):this.$textLayer.scrollLines(i),this.$showGutter&&this.$gutterLayer.update(i),this.$markerBack.update(i),this.$markerFront.update(i),this.$cursorLayer.update(i),this.$highlightGutterLine&&this.$updateGutterLineHighlight(),this.$moveTextAreaToCursor(),void this._signal("afterRender")):(e&this.CHANGE_TEXT?(this.$textLayer.update(i),this.$showGutter&&this.$gutterLayer.update(i)):e&this.CHANGE_LINES?(this.$updateLines()||e&this.CHANGE_GUTTER&&this.$showGutter)&&this.$gutterLayer.update(i):(e&this.CHANGE_TEXT||e&this.CHANGE_GUTTER)&&this.$showGutter&&this.$gutterLayer.update(i),e&this.CHANGE_CURSOR&&(this.$cursorLayer.update(i),this.$moveTextAreaToCursor(),this.$highlightGutterLine&&this.$updateGutterLineHighlight()),e&(this.CHANGE_MARKER|this.CHANGE_MARKER_FRONT)&&this.$markerFront.update(i),e&(this.CHANGE_MARKER|this.CHANGE_MARKER_BACK)&&this.$markerBack.update(i),void this._signal("afterRender"))},this.$autosize=function(){var e=this.session.getScreenLength()*this.lineHeight,t=this.$maxLines*this.lineHeight,i=Math.max((this.$minLines||1)*this.lineHeight,Math.min(t,e))+this.scrollMargin.v+(this.$extraHeight||0),n=e>t;if(i!=this.desiredHeight||this.$size.height!=this.desiredHeight||n!=this.$vScroll){n!=this.$vScroll&&(this.$vScroll=n,this.scrollBarV.setVisible(n));var r=this.container.clientWidth;this.container.style.height=i+"px",this.$updateCachedSize(!0,this.$gutterWidth,r,i),this.desiredHeight=i,this._signal("autosize")}},this.$computeLayerConfig=function(){this.$maxLines&&this.lineHeight>1&&this.$autosize();var e=this.session,t=this.$size,i=t.height<=2*this.lineHeight,n=this.session.getScreenLength(),r=n*this.lineHeight,o=this.scrollTop%this.lineHeight,s=t.scrollerHeight+this.lineHeight,a=this.$getLongestLine(),l=!i&&(this.$hScrollBarAlwaysVisible||t.scrollerWidth-a-2*this.$padding<0),c=this.$horizScroll!==l;c&&(this.$horizScroll=l,this.scrollBarH.setVisible(l));var u=!this.$maxLines&&this.$scrollPastEnd?(t.scrollerHeight-this.lineHeight)*this.$scrollPastEnd:0;r+=u,this.session.setScrollTop(Math.max(-this.scrollMargin.top,Math.min(this.scrollTop,r-t.scrollerHeight+this.scrollMargin.bottom))),this.session.setScrollLeft(Math.max(-this.scrollMargin.left,Math.min(this.scrollLeft,a+2*this.$padding-t.scrollerWidth+this.scrollMargin.right)));var d=!i&&(this.$vScrollBarAlwaysVisible||t.scrollerHeight-r+u<0||this.scrollTop),h=this.$vScroll!==d;h&&(this.$vScroll=d,this.scrollBarV.setVisible(d));var p,g,f=Math.ceil(s/this.lineHeight)-1,m=Math.max(0,Math.round((this.scrollTop-o)/this.lineHeight)),v=m+f,y=this.lineHeight;m=e.screenToDocumentRow(m,0);var w=e.getFoldLine(m);w&&(m=w.start.row),p=e.documentToScreenRow(m,0),g=e.getRowLength(m)*y,v=Math.min(e.screenToDocumentRow(v,0),e.getLength()-1),s=t.scrollerHeight+e.getRowLength(v)*y+g,o=this.scrollTop-p*y;var C=0;return this.layerConfig.width!=a&&(C=this.CHANGE_H_SCROLL),(c||h)&&(C=this.$updateCachedSize(!0,this.gutterWidth,t.width,t.height),this._signal("scrollbarVisibilityChanged"),h&&(a=this.$getLongestLine())),this.layerConfig={width:a,padding:this.$padding,firstRow:m,firstRowScreen:p,lastRow:v,lineHeight:y,characterWidth:this.characterWidth,minHeight:s,maxHeight:r,offset:o,gutterOffset:Math.max(0,Math.ceil((o+t.height-t.scrollerHeight)/y)),height:this.$size.scrollerHeight},C},this.$updateLines=function(){var e=this.$changedLines.firstRow,t=this.$changedLines.lastRow;this.$changedLines=null;var i=this.layerConfig;if(!(e>i.lastRow+1||t<i.firstRow))return t===Infinity?(this.$showGutter&&this.$gutterLayer.update(i),void this.$textLayer.update(i)):(this.$textLayer.updateLines(i,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(){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,i){this.scrollCursorIntoView(e,i),this.scrollCursorIntoView(t,i)},this.scrollCursorIntoView=function(e,t,i){if(0!==this.$size.scrollerHeight){var n=this.$cursorLayer.getPixelPosition(e),r=n.left,o=n.top,s=i&&i.top||0,a=i&&i.bottom||0,l=this.$scrollAnimation?this.session.getScrollTop():this.scrollTop;l+s>o?(t&&(o-=t*this.$size.scrollerHeight),0===o&&(o=-this.scrollMargin.top),this.session.setScrollTop(o)):l+this.$size.scrollerHeight-a<o+this.lineHeight&&(t&&(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 i=this.$cursorLayer.getPixelPosition(e),n=this.$size.scrollerHeight-this.lineHeight,r=i.top-n*(t||0);return this.session.setScrollTop(r),r},this.STEPS=8,this.$calcSteps=function(e,t){var i=0,n=this.STEPS,r=[],o=function(e,t,i){return i*(Math.pow(e-1,3)+1)+t};for(i=0;i<n;++i)r.push(o(i/this.STEPS,e,t-e));return r},this.scrollToLine=function(e,t,i,n){var r=this.$cursorLayer.getPixelPosition({row:e,column:0}),o=r.top;t&&(o-=this.$size.scrollerHeight/2);var s=this.scrollTop;this.session.setScrollTop(o),!1!==i&&this.animateScrolling(s,n)},this.animateScrolling=function(e,t){var i=this.scrollTop;if(this.$animatedScroll){var n=this;if(e!=i){if(this.$scrollAnimation){var r=this.$scrollAnimation.steps;if(r.length&&(e=r[0])==i)return}var o=n.$calcSteps(e,i);this.$scrollAnimation={from:e,to:i,steps:o},clearInterval(this.$timer),n.session.setScrollTop(o.shift()),n.session.$scrollTop=i,this.$timer=setInterval(function(){o.length?(n.session.setScrollTop(o.shift()),n.session.$scrollTop=i):null!=i?(n.session.$scrollTop=-1,n.session.setScrollTop(i),i=null):(n.$timer=clearInterval(n.$timer),n.$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 i=this.scroller.getBoundingClientRect(),n=(e+this.scrollLeft-i.left-this.$padding)/this.characterWidth,r=Math.floor((t+this.scrollTop-i.top)/this.lineHeight),o=Math.round(n);return{row:r,column:o,side:n-o>0?1:-1}},this.screenToTextCoordinates=function(e,t){var i=this.scroller.getBoundingClientRect(),n=Math.round((e+this.scrollLeft-i.left-this.$padding)/this.characterWidth),r=(t+this.scrollTop-i.top)/this.lineHeight;return this.session.screenToDocumentPosition(r,Math.max(n,0))},this.textToScreenCoordinates=function(e,t){var i=this.scroller.getBoundingClientRect(),n=this.session.documentToScreenPosition(e,t),r=this.$padding+Math.round(n.column*this.characterWidth),o=n.row*this.lineHeight;return{pageX:i.left+r-this.scrollLeft,pageY:i.top+o-this.scrollTop}},this.visualizeFocus=function(){n.addCssClass(this.container,"ace_focus")},
this.visualizeBlur=function(){n.removeCssClass(this.container,"ace_focus")},this.showComposition=function(){this.$composition||(this.$composition={keepTextAreaAtCursor:this.$keepTextAreaAtCursor,cssText:this.textarea.style.cssText}),this.$keepTextAreaAtCursor=!0,n.addCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText="",this.$moveTextAreaToCursor()},this.setCompositionText=function(){this.$moveTextAreaToCursor()},this.hideComposition=function(){this.$composition&&(n.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 i(i){if(o.$themeId!=e)return t&&t();if(i.cssClass){n.importCssString(i.cssText,i.cssClass,o.container.ownerDocument),o.theme&&n.removeCssClass(o.container,o.theme.cssClass);var r="padding"in i?i.padding:"padding"in(o.theme||{})?4:o.$padding;o.$padding&&r!=o.$padding&&o.setPadding(r),o.$theme=i.cssClass,o.theme=i,n.addCssClass(o.container,i.cssClass),n.setCssClass(o.container,"ace_dark",i.isDark),o.$size&&(o.$size.width=0,o.$updateSizeAsync()),o._dispatchEvent("themeLoaded",{theme:i}),t&&t()}}var o=this;if(this.$themeId=e,o._dispatchEvent("themeChange",{theme:e}),e&&"string"!=typeof e)i(e);else{var s=e||this.$options.theme.initialValue;r.loadModule(["theme",s],i)}},this.getTheme=function(){return this.$themeId},this.setStyle=function(e,t){n.setCssClass(this.container,e,!1!==t)},this.unsetStyle=function(e){n.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(f.prototype),r.defineOptions(f.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){n.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=n.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(){this.$hScrollBarAlwaysVisible&&this.$horizScroll||this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},vScrollBarAlwaysVisible:{set:function(){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(){this.updateFull()}},minLines:{set:function(){this.updateFull()}},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=f}),define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/net","ace/lib/event_emitter","ace/config"],function(e,t){"use strict";var i=e("../lib/oop"),n=e("../lib/net"),r=e("../lib/event_emitter").EventEmitter,o=e("../config"),s=function(t,i,n,r){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),o.get("packaged")||!e.toUrl)r=r||o.moduleUrl(i,"worker");else{var s=this.$normalizePath;r=r||s(e.toUrl("ace/worker/worker.js",null,"_"));var a={};t.forEach(function(t){a[t]=s(e.toUrl(t,null,"_").replace(/(\.js)?(\?.*)?$/,""))})}try{this.$worker=new Worker(r)}catch(e){if(!(e instanceof window.DOMException))throw e;var l=this.$workerBlob(r),c=window.URL||window.webkitURL,u=c.createObjectURL(l);this.$worker=new Worker(u),c.revokeObjectURL(u)}this.$worker.postMessage({init:!0,tlns:a,module:i,classname:n}),this.callbackId=1,this.callbacks={},this.$worker.onmessage=this.onMessage};(function(){i.implement(this,r),this.onMessage=function(e){var t=e.data;switch(t.type){case"event":this._signal(t.name,{data:t.data});break;case"call":var i=this.callbacks[t.id];i&&(i(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 n.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,i){if(i){var n=this.callbackId++;this.callbacks[n]=i,t.push(n)}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.push(e.data):(this.deltaQueue=[e.data],setTimeout(this.$sendDeltaQueue,0))},this.$sendDeltaQueue=function(){var e=this.deltaQueue;e&&(this.deltaQueue=null,e.length>20&&e.length>this.$doc.getLength()>>1?this.call("setValue",[this.$doc.getValue()]):this.emit("change",{data:e}))},this.$workerBlob=function(e){var t="importScripts('"+n.qualifyURL(e)+"');";try{return new Blob([t],{type:"application/javascript"})}catch(e){var i=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder,r=new i;return r.append(t),r.getBlob("application/javascript")}}}).call(s.prototype);var a=function(e,t,i){this.$sendDeltaQueue=this.$sendDeltaQueue.bind(this),this.changeListener=this.changeListener.bind(this),this.callbackId=1,this.callbacks={},this.messageBuffer=[];var n=null,s=!1,a=Object.create(r),l=this;this.$worker={},this.$worker.terminate=function(){},this.$worker.postMessage=function(e){l.messageBuffer.push(e),n&&(s?setTimeout(c):c())},this.setEmitSync=function(e){s=e};var c=function(){var e=l.messageBuffer.shift();e.command?n[e.command].apply(n,e.args):e.event&&a._signal(e.event,e.data)};a.postMessage=function(e){l.onMessage({data:e})},a.callback=function(e,t){this.postMessage({type:"call",id:t,data:e})},a.emit=function(e,t){this.postMessage({type:"event",name:e,data:t})},o.loadModule(["worker",t],function(e){for(n=new e[i](a);l.messageBuffer.length;)c()})};a.prototype=s.prototype,t.UIWorkerClient=a,t.WorkerClient=s}),define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"],function(e,t){"use strict";var i=e("./range").Range,n=e("./lib/event_emitter").EventEmitter,r=e("./lib/oop"),o=function(e,t,i,n,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=n,this.$onCursorChange=function(){setTimeout(function(){s.onCursorChange()})},this.$pos=i;var a=e.getUndoManager().$undoStack||e.getUndoManager().$undostack||{length:-1};this.$undoStackDepth=a.length,this.setup(),e.selection.on("changeCursor",this.$onCursorChange)};(function(){r.implement(this,n),this.setup=function(){var e=this,t=this.doc,n=this.session,r=this.$pos;this.selectionBefore=n.selection.toJSON(),n.selection.inMultiSelectMode&&n.selection.toSingleRange(),this.pos=t.createAnchor(r.row,r.column),this.markerId=n.addMarker(new i(r.row,r.column,r.row,r.column+this.length),this.mainClass,null,!1),this.pos.on("change",function(t){n.removeMarker(e.markerId),e.markerId=n.addMarker(new i(t.value.row,t.value.column,t.value.row,t.value.column+e.length),e.mainClass,null,!1)}),this.others=[],this.$others.forEach(function(i){var n=t.createAnchor(i.row,i.column);e.others.push(n)}),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),n.on("change",function(r){e.removeMarker(n.markerId),n.markerId=e.addMarker(new i(r.value.row,r.value.column,r.value.row,r.value.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){var t=e.data,n=t.range;if(n.start.row===n.end.row&&n.start.row===this.pos.row&&!this.$updating){this.$updating=!0;var r="insertText"===t.action?n.end.column-n.start.column:n.start.column-n.end.column;if(n.start.column>=this.pos.column&&n.start.column<=this.pos.column+this.length+1){var o=n.start.column-this.pos.column;if(this.length+=r,!this.session.$fromUndo){if("insertText"===t.action)for(var s=this.others.length-1;s>=0;s--){var a=this.others[s],l={row:a.row,column:a.column+o};a.row===n.start.row&&n.start.column<a.column&&(l.column+=r),this.doc.insert(l,t.text)}else if("removeText"===t.action)for(var s=this.others.length-1;s>=0;s--){var a=this.others[s],l={row:a.row,column:a.column+o};a.row===n.start.row&&n.start.column<a.column&&(l.column+=r),this.doc.remove(new i(l.row,l.column,l.row,l.column-r))}n.start.column===this.pos.column&&"insertText"===t.action?setTimeout(function(){this.pos.setPosition(this.pos.row,this.pos.column-r);for(var e=0;e<this.others.length;e++){var t=this.others[e],i={row:t.row,column:t.column-r};t.row===n.start.row&&n.start.column<t.column&&(i.column+=r),t.setPosition(i.row,i.column)}}.bind(this),0):n.start.column===this.pos.column&&"removeText"===t.action&&setTimeout(function(){for(var e=0;e<this.others.length;e++){var t=this.others[e];t.row===n.start.row&&n.start.column<t.column&&t.setPosition(t.row,t.column-r)}}.bind(this),0)}this.pos._emit("change",{value:this.pos});for(var s=0;s<this.others.length;s++)this.others[s]._emit("change",{value:this.others[s]})}this.$updating=!1}},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.markerId),this.hideOtherMarkers(),this.doc.removeEventListener("change",this.$onUpdate),this.session.selection.removeEventListener("changeCursor",this.$onCursorChange),this.pos.detach();for(var e=0;e<this.others.length;e++)this.others[e].detach();this.session.setUndoSelect(!0),this.session=null},this.cancel=function(){if(-1===this.$undoStackDepth)throw Error("Canceling placeholders only supported with undo manager attached to session.");for(var e=this.session.getUndoManager(),t=(e.$undoStack||e.$undostack).length-this.$undoStackDepth,i=0;i<t;i++)e.undo(!0);this.selectionBefore&&this.session.selection.fromJSON(this.selectionBefore)}}).call(o.prototype),t.PlaceHolder=o}),define("ace/mouse/multi_select_handler",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(e,t){function i(e,t){return e.row==t.row&&e.column==t.column}function n(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)return void e.editor.textInput.onContextMenu(e.domEvent);if(!a&&!n&&!l)return void(0===c&&e.editor.inMultiSelectMode&&e.editor.exitMultiSelectMode());if(0===c){var u,d=e.editor,h=d.selection,p=d.inMultiSelectMode,g=e.getDocumentPosition(),f=h.getCursor(),m=e.inSelection()||h.isEmpty()&&i(g,f),v=e.x,y=e.y,w=function(e){v=e.clientX,y=e.clientY},C=d.session,b=d.renderer.pixelToScreenCoordinates(v,y),A=b;if(d.$mouseHandler.$enableJumpToDef)a&&n||l&&n?u="add":n&&(u="block");else if(l&&!n){if(u="add",!p&&s)return}else n&&(u="block");if(u&&o.isMac&&t.ctrlKey&&d.$mouseHandler.cancelContextMenu(),"add"==u){if(!p&&m)return;if(!p){var x=h.toOrientedRange();d.addSelectionMarker(x)}var S=h.rangeList.rangeAtPoint(g);d.$blockScrolling++,d.inVirtualSelectionMode=!0,s&&(S=null,x=h.ranges[0],d.removeSelectionMarker(x)),d.once("mouseup",function(){var e=h.toOrientedRange();S&&e.isEmpty()&&i(S.cursor,e.cursor)?h.substractPoint(e.cursor):(s?h.substractPoint(x.cursor):x&&(d.removeSelectionMarker(x),h.addRange(x)),h.addRange(e)),d.$blockScrolling--,d.inVirtualSelectionMode=!1})}else if("block"==u){e.stop(),d.inVirtualSelectionMode=!0;var E,$=[],F=function(){var e=d.renderer.pixelToScreenCoordinates(v,y),t=C.screenToDocumentPosition(e.row,e.column);i(A,e)&&i(t,h.lead)||(A=e,d.$blockScrolling++,d.selection.moveToPosition(t),d.renderer.scrollCursorIntoView(),d.removeSelectionMarkers($),$=h.rectangularRangeBlock(A,b),d.$mouseHandler.$clickSelection&&1==$.length&&$[0].isEmpty()&&($[0]=d.$mouseHandler.$clickSelection.clone()),$.forEach(d.addSelectionMarker,d),d.updateSelectionMarkers(),d.$blockScrolling--)};d.$blockScrolling++,p&&!l?h.toSingleRange():!p&&l&&(E=h.toOrientedRange(),d.addSelectionMarker(E)),s?b=C.documentToScreenPosition(h.lead):h.moveToPosition(g),d.$blockScrolling--,A={row:-1,column:-1};var k=function(){clearInterval(T),d.removeSelectionMarkers($),$.length||($=[h.toOrientedRange()]),d.$blockScrolling++,E&&(d.removeSelectionMarker(E),h.toSingleRange(E));for(var e=0;e<$.length;e++)h.addRange($[e]);d.inVirtualSelectionMode=!1,d.$mouseHandler.$clickSelection=null,d.$blockScrolling--},D=F;r.capture(d.container,w,k);var T=setInterval(function(){D()},20);return e.preventDefault()}}}var r=e("../lib/event"),o=e("../lib/useragent");t.onMouseDown=n}),define("ace/commands/multi_select_commands",["require","exports","module","ace/keyboard/hash_handler"],function(e,t){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)}),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){function i(e,t,i){return g.$options.wrap=!0,g.$options.needle=t,g.$options.backwards=-1==i,g.find(e)}function n(e,t){return e.row==t.row&&e.column==t.column}function r(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",c),e.commands.addCommands(h.defaultCommands),o(e))}function o(e){function t(){n&&(e.renderer.setMouseCursor(""),n=!1)}var i=e.textInput.getElement(),n=!1;u.addListener(i,"keydown",function(i){18!=i.keyCode||i.ctrlKey||i.shiftKey||i.metaKey?n&&t():n||(e.renderer.setMouseCursor("crosshair"),n=!0)}),u.addListener(i,"keyup",t),u.addListener(i,"blur",t)}var s=e("./range_list").RangeList,a=e("./range").Range,l=e("./selection").Selection,c=e("./mouse/multi_select_handler").onMouseDown,u=e("./lib/event"),d=e("./lib/lang"),h=e("./commands/multi_select_commands");t.commands=h.defaultCommands.concat(h.multiSelectCommands);var p=e("./search").Search,g=new p,f=e("./edit_session").EditSession;(function(){this.getSelectionMarkers=function(){return this.$selectionMarkers}}).call(f.prototype),function(){this.ranges=null,this.rangeList=null,this.addRange=function(e,t){if(e){if(!this.inMultiSelectMode&&0===this.rangeCount){var i=this.toOrientedRange();if(this.rangeList.add(i),this.rangeList.add(e),2!=this.rangeList.ranges.length)return this.rangeList.removeAll(),t||this.fromOrientedRange(e);this.rangeList.removeAll(),this.rangeList.add(i),this.$onAddRange(i)}e.cursor||(e.cursor=e.end);var n=this.rangeList.add(e);return this.$onAddRange(e),n.length&&this.$onRemoveRange(n),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 i=e.length;i--;){var n=this.ranges.indexOf(e[i]);this.ranges.splice(n,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 s,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],i=a.fromPoints(e[0].start,t.end);this.toSingleRange(),this.setSelectionRange(i,t.cursor==t.start)}else{var i=this.getRange(),n=this.isBackwards(),r=i.start.row,o=i.end.row;if(r==o){if(n)var s=i.end,l=i.start;else var s=i.start,l=i.end;return this.addRange(a.fromPoints(l,l)),void this.addRange(a.fromPoints(s,s))}var c=[],u=this.getLineRange(r,!0);u.start.column=i.start.column,c.push(u);for(var d=r+1;d<o;d++)c.push(this.getLineRange(d,!0));u=this.getLineRange(o,!0),u.end.column=i.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],i=a.fromPoints(e[0].start,t.end);this.toSingleRange(),this.setSelectionRange(i,t.cursor==t.start)}else{var n=this.session.documentToScreenPosition(this.selectionLead),r=this.session.documentToScreenPosition(this.selectionAnchor);this.rectangularRangeBlock(n,r).forEach(this.addRange,this)}},this.rectangularRangeBlock=function(e,t,i){var r=[],o=e.column<t.column;if(o)var s=e.column,l=t.column;else var s=t.column,l=e.column;var c=e.row<t.row;if(c)var u=e.row,d=t.row;else var u=t.row,d=e.row;s<0&&(s=0),u<0&&(u=0),u==d&&(i=!0);for(var h=u;h<=d;h++){var p=a.fromPoints(this.session.screenToDocumentPosition(h,s),this.session.screenToDocumentPosition(h,l));if(p.isEmpty()){if(g&&n(p.end,g))break;var g=p.end}p.cursor=o?p.start:p.end,r.push(p)}if(c&&r.reverse(),!i){for(var f=r.length-1;r[f].isEmpty()&&f>0;)f--;if(f>0)for(var m=0;r[m].isEmpty();)m++;for(var v=f;v>=m;v--)r[v].isEmpty()&&r.splice(v,1)}return r}}.call(l.prototype);var m=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,i=e.length;i--;){var n=e[i];if(n.marker){this.session.removeMarker(n.marker);var r=t.indexOf(n);-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(){this.inMultiSelectMode||(this.inMultiSelectMode=!0,this.setStyle("ace_multiselect"),this.keyBinding.addKeyboardHandler(h.keyboardHandler),this.commands.setDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers())},this.$onSingleSelect=function(){this.session.multiSelect.inVirtualMode||(this.inMultiSelectMode=!1,this.unsetStyle("ace_multiselect"),this.keyBinding.removeKeyboardHandler(h.keyboardHandler),this.commands.removeDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers(),this._emit("changeSelection"))},this.$onMultiSelectExec=function(e){var t=e.command,i=e.editor;if(i.multiSelect){if(t.multiSelectAction)"forEach"==t.multiSelectAction?n=i.forEachSelection(t,e.args):"forEachLine"==t.multiSelectAction?n=i.forEachSelection(t,e.args,!0):"single"==t.multiSelectAction?(i.exitMultiSelectMode(),n=t.exec(i,e.args||{})):n=t.multiSelectAction(i,e.args||{});else{var n=t.exec(i,e.args||{});i.multiSelect.addRange(i.multiSelect.toOrientedRange()),i.multiSelect.mergeOverlappingRanges()}return n}},this.forEachSelection=function(e,t,i){if(!this.inVirtualSelectionMode){var n,r=i&&i.keepOrder,o=1==i||i&&i.$byLines,s=this.session,a=this.selection,c=a.rangeList,u=(r?a:c).ranges;if(!u.length)return e.exec?e.exec(this,t||{}):e(this,t||{});var d=a._eventRegistry;a._eventRegistry={};var h=new l(s);this.inVirtualSelectionMode=!0;for(var p=u.length;p--;){if(o)for(;p>0&&u[p].start.row==u[p-1].end.row;)p--;h.fromOrientedRange(u[p]),h.index=p,this.selection=s.selection=h;var g=e.exec?e.exec(this,t||{}):e(this,t||{});n||g===undefined||(n=g),h.toOrientedRange(u[p])}h.detach(),this.selection=s.selection=a,this.inVirtualSelectionMode=!1,a._eventRegistry=d,a.mergeOverlappingRanges();var f=this.renderer.$scrollAnimation;return this.onCursorChange(),this.onSelectionChange(),f&&f.from==f.to&&this.renderer.animateScrolling(f.from),n}},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,i=[],n=0;n<t.length;n++)i.push(this.session.getTextRange(t[n]));var r=this.session.getDocument().getNewLineCharacter();e=i.join(r),e.length==(i.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 i=this.multiSelect.ranges[0];if(this.multiSelect.isEmpty()&&t==this.multiSelect.anchor)return;var n=t==this.multiSelect.anchor?i.cursor==i.start?i.end:i.start:i.cursor;n.row==t.row&&this.session.$clipPositionToDocument(n.row,n.column).column==t.column||this.multiSelect.toSingleRange(this.multiSelect.toOrientedRange())}},this.findAll=function(e,t,i){if(t=t||{},t.needle=e||t.needle,t.needle==undefined){var n=this.selection.isEmpty()?this.selection.getWordRange():this.selection.getRange();t.needle=this.session.getTextRange(n)}this.$search.set(t);var r=this.$search.findAll(this.session);if(!r.length)return 0;this.$blockScrolling+=1;var o=this.multiSelect;i||o.toSingleRange(r[0]);for(var s=r.length;s--;)o.addRange(r[s],!0);return n&&o.rangeList.rangeAtPoint(n.start)&&o.addRange(n,!0),this.$blockScrolling-=1,r.length},this.selectMoreLines=function(e,t){var i=this.selection.toOrientedRange(),n=i.cursor==i.end,r=this.session.documentToScreenPosition(i.cursor);this.selection.$desiredColumn&&(r.column=this.selection.$desiredColumn);var o=this.session.screenToDocumentPosition(r.row+e,r.column);if(i.isEmpty())var s=o;else var l=this.session.documentToScreenPosition(n?i.end:i.start),s=this.session.screenToDocumentPosition(l.row+e,l.column);if(n){var c=a.fromPoints(o,s);c.cursor=c.start}else{var c=a.fromPoints(s,o);c.cursor=c.end}if(c.desiredColumn=r.column,this.selection.inMultiSelectMode){if(t)var u=i.cursor}else this.selection.addRange(i);this.selection.addRange(c),u&&this.selection.substractPoint(u)},this.transposeSelections=function(e){for(var t=this.session,i=t.multiSelect,n=i.ranges,r=n.length;r--;){var o=n[r];if(o.isEmpty()){var s=t.getWordRange(o.start.row,o.start.column);o.start.row=s.start.row,o.start.column=s.start.column,o.end.row=s.end.row,o.end.column=s.end.column}}i.mergeOverlappingRanges();for(var a=[],r=n.length;r--;){var o=n[r];a.unshift(t.getTextRange(o))}e<0?a.unshift(a.pop()):a.push(a.shift());for(var r=n.length;r--;){var o=n[r],s=o.clone();t.replace(o,a[r]),o.start.row=s.start.row,o.start.column=s.start.column}},this.selectMore=function(e,t,n){var r=this.session,o=r.multiSelect,s=o.toOrientedRange();if(!s.isEmpty()||(s=r.getWordRange(s.start.row,s.start.column),s.cursor=-1==e?s.start:s.end,this.multiSelect.addRange(s),!n)){var a=r.getTextRange(s),l=i(r,a,e);l&&(l.cursor=-1==e?l.start:l.end,this.$blockScrolling+=1,this.session.unfold(l),this.multiSelect.addRange(l),this.$blockScrolling-=1,this.renderer.scrollCursorIntoView(null,.5)),t&&this.multiSelect.substractPoint(s.cursor)}},this.alignCursors=function(){var e=this.session,t=e.multiSelect,i=t.ranges,n=-1,r=i.filter(function(e){if(e.cursor.row==n)return!0;n=e.cursor.row});if(i.length&&r.length!=i.length-1){r.forEach(function(e){t.substractPoint(e.cursor)});var o=0,s=Infinity,l=i.map(function(t){var i=t.cursor,n=e.getLine(i.row),r=n.substr(i.column).search(/\S/g);return-1==r&&(r=0),i.column>o&&(o=i.column),r<s&&(s=r),r});i.forEach(function(t,i){var n=t.cursor,r=o-n.column,c=l[i]-s;r>c?e.insert(n,d.stringRepeat(" ",r-c)):e.remove(new a(n.row,n.column,n.row,n.column-r+c)),t.start.column=t.end.column=o,t.start.row=t.end.row=n.row,t.cursor=t.end}),t.fromOrientedRange(i[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers()}else{var c=this.selection.getRange(),u=c.start.row,h=c.end.row,p=u==h;if(p){var g,f=this.session.getLength();do{g=this.session.getLine(h)}while(/[=:]/.test(g)&&++h<f);do{g=this.session.getLine(u)}while(/[=:]/.test(g)&&--u>0);u<0&&(u=0),h>=f&&(h=f-1)}var m=this.session.doc.removeLines(u,h);m=this.$reAlignText(m,p),this.session.doc.insert({row:u,column:0},m.join("\n")+"\n"),p||(c.start.column=0,c.end.column=m[m.length-1].length),this.selection.setRange(c)}},this.$reAlignText=function(e,t){function i(e){return d.stringRepeat(" ",e)}function n(e){return e[2]?i(s)+e[2]+i(a-e[2].length+l)+e[4].replace(/^([=:])\s+/,"$1 "):e[0]}function r(e){return e[2]?i(s+a-e[2].length)+e[2]+i(l," ")+e[4].replace(/^([=:])\s+/,"$1 "):e[0]}function o(e){return e[2]?i(s)+e[2]+i(l)+e[4].replace(/^([=:])\s+/,"$1 "):e[0]}var s,a,l,c=!0,u=!0;return e.map(function(e){var t=e.match(/(\s*)(.*?)(\s*)([=:].*)/);return t?null==s?(s=t[1].length,a=t[2].length,l=t[3].length,t):(s+a+l!=t[1].length+t[2].length+t[3].length&&(u=!1),s!=t[1].length&&(c=!1),s>t[1].length&&(s=t[1].length),a<t[2].length&&(a=t[2].length),l>t[3].length&&(l=t[3].length),t):[e]}).map(t?n:c?u?r:n:o)}}).call(m.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 i=e.oldSession;i&&(i.multiSelect.off("addRange",this.$onAddRange),i.multiSelect.off("removeRange",this.$onRemoveRange),i.multiSelect.off("multiSelect",this.$onMultiSelect),i.multiSelect.off("singleSelect",this.$onSingleSelect),i.multiSelect.lead.off("change",this.$checkMultiselectChange),i.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=r,e("./config").defineOptions(m.prototype,"editor",{enableMultiselect:{set:function(e){r(this),e?(this.on("changeSession",this.$multiselectOnSessionChange),this.on("mousedown",c)):(this.off("changeSession",this.$multiselectOnSessionChange),this.off("mousedown",c))},value:!0}})}),define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(e,t){"use strict";var i=e("../../range").Range,n=t.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(e,t,i){var n=e.getLine(i);return this.foldingStartMarker.test(n)?"start":"markbeginend"==t&&this.foldingStopMarker&&this.foldingStopMarker.test(n)?"end":""},this.getFoldWidgetRange=function(){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 d=e.getLine(t).search(r);if(-1!=d){if(d<=s)break;u=t}}if(u>c){var h=e.getLine(u).length;return new i(c,a,u,h)}}},
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){var o={row:n,column:r},s=e.$findOpeningBracket(t,o);if(s)return s.column++,o.column--,i.fromPoints(s,o)}}).call(n.prototype)}),define("ace/theme/textmate",["require","exports","module","ace/lib/dom"],function(e,t){"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;border-radius: 2px;}.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)}),define("ace/line_widgets",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/range"],function(e,t){"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("changeEditor",this.$onChangeEditor)}var n=(e("./lib/oop"),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&&(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(){var e=this.editor;if(e){this.editor=null,e.widgetManager=null,e.renderer.off("beforeRender",this.measureWidgets),e.renderer.off("afterRender",this.renderWidgets);var t=this.session.lineWidgets;t&&t.forEach(function(e){e&&e.el&&e.el.parentNode&&(e._inDocument=!1,e.el.parentNode.removeChild(e.el))})}},this.updateOnChange=function(e){var t=this.session.lineWidgets;if(t){var i=e.data,n=i.range,r=n.start.row,o=n.end.row-r;if(0===o);else if("removeText"==i.action||"removeLines"==i.action){var s=t.splice(r+1,o);s.forEach(function(e){e&&this.removeLineWidget(e)},this),this.$updateRows()}else{var a=new Array(o);a.unshift(r,0),t.splice.apply(t,a),this.$updateRows()}}},this.$updateRows=function(){var e=this.session.lineWidgets;if(e){var t=!0;e.forEach(function(e,i){e&&(t=!1,e.row=i)}),t&&(this.session.lineWidgets=null)}},this.addLineWidget=function(e){this.session.lineWidgets||(this.session.lineWidgets=new Array(this.session.getLength())),this.session.lineWidgets[e.row]=e;var t=this.editor.renderer;return e.html&&!e.el&&(e.el=n.createElement("div"),e.el.innerHTML=e.html),e.el&&(n.addCssClass(e.el,"ace_lineWidgetContainer"),e.el.style.position="absolute",e.el.style.zIndex=5,t.container.appendChild(e.el),e._inDocument=!0),e.coverGutter||(e.el.style.zIndex=3),e.pixelHeight||(e.pixelHeight=e.el.offsetHeight),null==e.rowCount&&(e.rowCount=e.pixelHeight/t.layerConfig.lineHeight),this.session._emit("changeFold",{data:{start:{row:e.row}}}),this.$updateRows(),this.renderWidgets(null,t),e},this.removeLineWidget=function(e){if(e._inDocument=!1,e.el&&e.el.parentNode&&e.el.parentNode.removeChild(e.el),e.editor&&e.editor.destroy)try{e.editor.destroy()}catch(e){}this.session.lineWidgets&&(this.session.lineWidgets[e.row]=undefined),this.session._emit("changeFold",{data:{start:{row:e.row}}}),this.$updateRows()},this.onWidgetChanged=function(e){this.session._changedWidgets.push(e),this.editor&&this.editor.renderer.updateFull()},this.measureWidgets=function(e,t){var i=this.session._changedWidgets,n=t.layerConfig;if(i&&i.length){for(var r=Infinity,o=0;o<i.length;o++){var s=i[o];s._inDocument||(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/n.characterWidth));var a=s.h/n.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!=Infinity&&(this.session._emit("changeFold",{data:{start:{row:r}}}),this.session.lineWidgetWidth=null),this.session._changedWidgets=[]}},this.renderWidgets=function(e,t){var i=t.layerConfig,n=this.session.lineWidgets;if(n){for(var r=Math.min(this.firstRow,i.firstRow),o=Math.max(this.lastRow,i.lastRow,n.length);r>0&&!n[r];)r--;this.firstRow=i.firstRow,this.lastRow=i.lastRow,t.$cursorLayer.config=i;for(var s=r;s<=o;s++){var a=n[s];if(a&&a.el){a._inDocument||(a._inDocument=!0,t.container.appendChild(a.el));var l=t.$cursorLayer.getPixelPosition({row:s,column:0},!0).top;a.coverLine||(l+=i.lineHeight*this.session.getRowLineCount(a.row)),a.el.style.top=l-i.offset+"px";var c=a.coverGutter?0:t.gutterWidth;a.fixedWidth||(c-=t.scrollLeft),a.el.style.left=c+"px",a.fixedWidth?a.el.style.right=t.scrollBar.getWidth()+"px":a.el.style.right=""}}}}}).call(i.prototype),t.LineWidgets=i}),define("ace/ext/error_marker",["require","exports","module","ace/line_widgets","ace/lib/dom","ace/range"],function(e,t){"use strict";function i(e,t,i){for(var n=0,r=e.length-1;n<=r;){var o=n+r>>1,s=i(t,e[o]);if(s>0)n=o+1;else{if(!(s<0))return o;r=o-1}}return-(n+1)}function n(e,t,n){var r=e.getAnnotations().sort(s.comparePoints);if(r.length){var o=i(r,{row:t,column:-1},s.comparePoints);o<0&&(o=-o-1),o>=r.length?o=n>0?0:r.length-1:0===o&&n<0&&(o=r.length-1);var a=r[o];if(a&&n){if(a.row===t){do{a=r[o+=n]}while(a&&a.row===t);if(!a)return r.slice()}var l=[];t=a.row;do{l[n<0?"unshift":"push"](a),a=r[o+=n]}while(a&&a.row==t);return l.length&&l}}}var r=e("../line_widgets").LineWidgets,o=e("../lib/dom"),s=e("../range").Range;t.showErrorMarker=function(e,t){var i=e.session;i.widgetManager||(i.widgetManager=new r(i),i.widgetManager.attach(e));var s=e.getCursorPosition(),a=s.row,l=i.lineWidgets&&i.lineWidgets[a];l?l.destroy():a-=t;var c,u=n(i,a,t);if(u){var d=u[0];s.column=(d.pos&&"number"!=typeof d.column?d.pos.sc:d.column)||0,s.row=d.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 h={row:s.row,fixedWidth:!0,coverGutter:!0,el:o.createElement("div")},p=h.el.appendChild(o.createElement("div")),g=h.el.appendChild(o.createElement("div"));g.className="error_widget_arrow "+c.className;var f=e.renderer.$cursorLayer.getPixelPosition(s).left;g.style.left=f+e.renderer.gutterWidth-5+"px",h.el.className="error_widget_wrapper",p.className="error_widget "+c.className,p.innerHTML=c.text.join("<br>"),p.appendChild(o.createElement("div"));var m=function(e,t,i){if(0===t&&("esc"===i||"return"===i))return h.destroy(),{command:"null"}};h.destroy=function(){e.$mouseHandler.isMousePressed||(e.keyBinding.removeKeyboardHandler(m),i.widgetManager.removeLineWidget(h),e.off("changeSelection",h.destroy),e.off("changeSession",h.destroy),e.off("mouseup",h.destroy),e.off("change",h.destroy))},e.keyBinding.addKeyboardHandler(m),e.on("changeSelection",h.destroy),e.on("changeSession",h.destroy),e.on("mouseup",h.destroy),e.on("change",h.destroy),e.session.widgetManager.addLineWidget(h),h.el.onmousedown=e.focus.bind(e),e.renderer.scrollCursorIntoView(null,.5,{bottom:h.el.offsetHeight})},o.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;    }","")}),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){"use strict";e("./lib/fixoldbrowsers");var i=e("./lib/dom"),n=e("./lib/event"),r=e("./editor").Editor,o=e("./edit_session").EditSession,s=e("./undomanager").UndoManager,a=e("./virtual_renderer").VirtualRenderer;e("./worker/worker_client"),e("./keyboard/hash_handler"),e("./placeholder"),e("./multi_select"),e("./mode/folding/fold_mode"),e("./theme/textmate"),e("./ext/error_marker"),t.config=e("./config"),t.require=e,t.edit=function(e){if("string"==typeof e){var o=e;if(!(e=document.getElementById(o)))throw new Error("ace.edit can't find div #"+o)}if(e&&e.env&&e.env.editor instanceof r)return e.env.editor;var s="";if(e&&/input|textarea/i.test(e.tagName)){var l=e;s=l.value,e=i.createElement("pre"),l.parentNode.replaceChild(e,l)}else s=i.getInnerText(e),e.innerHTML="";var c=t.createEditSession(s),u=new r(new a(e));u.setSession(c);var d={document:c,editor:u,onResize:u.resize.bind(u,null)};return l&&(d.textarea=l),n.addListener(window,"resize",d.onResize),u.on("destroy",function(){n.removeListener(window,"resize",d.onResize),d.editor.container.env=null}),u.container.env=u.env=d,u},t.createEditSession=function(e,t){var i=new o(e,t);return i.setUndoManager(new s),i},t.EditSession=o,t.UndoManager=s}),function(){window.require(["ace/ace"],function(e){e&&e.config.init(!0),window.ace||(window.ace=e);for(var t in e)e.hasOwnProperty(t)&&(window.ace[t]=e[t])})}(),define("ace/snippets",["require","exports","module","ace/lib/oop","ace/lib/event_emitter","ace/lib/lang","ace/range","ace/anchor","ace/keyboard/hash_handler","ace/tokenizer","ace/lib/dom","ace/editor"],function(e,t){"use strict";var i=e("./lib/oop"),n=e("./lib/event_emitter").EventEmitter,r=e("./lib/lang"),o=e("./range").Range,s=e("./anchor").Anchor,a=e("./keyboard/hash_handler").HashHandler,l=e("./tokenizer").Tokenizer,c=o.comparePoints,u=function(){this.snippetMap={},this.snippetNameMap={}};(function(){i.implement(this,n),this.getTokenizer=function(){function e(e,t,i){return e=e.substr(1),/^\d+$/.test(e)&&!i.inFormatString?[{tabstopId:parseInt(e,10)}]:[{text:e}]}function t(e){return"(?:[^\\\\"+e+"]|\\\\.)"}return u.$tokenizer=new l({start:[{regex:/:/,onMatch:function(e,t,i){return i.length&&i[0].expectIf?(i[0].expectIf=!1,i[0].elseBranch=i[0],[i[0]]):":"}},{regex:/\\./,onMatch:function(e,t,i){var n=e[1];return"}"==n&&i.length?e=n:-1!="`$\\".indexOf(n)?e=n:i.inFormatString&&("n"==n?e="\n":"t"==n?e="\n":-1!="ulULE".indexOf(n)&&(e={changeCase:n,local:n>"a"})),[e]}},{regex:/}/,onMatch:function(e,t,i){return[i.length?i.shift():e]}},{regex:/\$(?:\d+|\w+)/,onMatch:e},{regex:/\$\{[\dA-Z_a-z]+/,onMatch:function(t,i,n){var r=e(t.substr(1),i,n);return n.unshift(r[0]),r},next:"snippetVar"},{regex:/\n/,token:"newline",merge:!1}],snippetVar:[{regex:"\\|"+t("\\|")+"*\\|",onMatch:function(e,t,i){i[0].choices=e.slice(1,-1).split(",")},next:"start"},{regex:"/("+t("/")+"+)/(?:("+t("/")+"*)/)(\\w*):?",onMatch:function(e,t,i){var n=i[0];return n.fmtString=e,e=this.splitRegex.exec(e),n.guard=e[1],n.fmt=e[2],n.flag=e[3],""},next:"start"},{regex:"`"+t("`")+"*`",onMatch:function(e,t,i){return i[0].code=e.splice(1,-1),""},next:"start"},{regex:"\\?",onMatch:function(e,t,i){i[0]&&(i[0].expectIf=!0)},next:"start"},{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"start"}],formatString:[{regex:"/("+t("/")+"+)/",token:"regex"},{regex:"",onMatch:function(e,t,i){i.inFormatString=!0},next:"start"}]}),u.prototype.getTokenizer=function(){return u.$tokenizer},u.$tokenizer},this.tokenizeTmSnippet=function(e,t){return this.getTokenizer().getLineTokens(e,t).tokens.map(function(e){return e.value||e})},this.$getDefaultValue=function(e,t){if(/^[A-Z]\d+$/.test(t)){var i=t.substr(1);return(this.variables[t[0]+"__"]||{})[i]}if(/^\d+$/.test(t))return(this.variables.__||{})[t];if(t=t.replace(/^TM_/,""),e){var n=e.session;switch(t){case"CURRENT_WORD":var r=n.getWordRange();case"SELECTION":case"SELECTED_TEXT":return n.getTextRange(r);case"CURRENT_LINE":return n.getLine(e.getCursorPosition().row);case"PREV_LINE":return n.getLine(e.getCursorPosition().row-1);case"LINE_INDEX":return e.getCursorPosition().column;case"LINE_NUMBER":return e.getCursorPosition().row+1;case"SOFT_TABS":return n.getUseSoftTabs()?"YES":"NO";case"TAB_SIZE":return n.getTabSize();case"FILENAME":case"FILEPATH":return"";case"FULLNAME":return"Ace"}}},this.variables={},this.getVariableValue=function(e,t){return this.variables.hasOwnProperty(t)?this.variables[t](e,t)||"":this.$getDefaultValue(e,t)||""},this.tmStrFormat=function(e,t,i){var n=t.flag||"",r=t.guard;r=new RegExp(r,n.replace(/[^gi]/,""));var o=this.tokenizeTmSnippet(t.fmt,"formatString"),s=this,a=e.replace(r,function(){s.variables.__=arguments;for(var e=s.resolveVariables(o,i),t="E",n=0;n<e.length;n++){var r=e[n];if("object"==typeof r)if(e[n]="",r.changeCase&&r.local){var a=e[n+1];a&&"string"==typeof a&&("u"==r.changeCase?e[n]=a[0].toUpperCase():e[n]=a[0].toLowerCase(),e[n+1]=a.substr(1))}else r.changeCase&&(t=r.changeCase);else"U"==t?e[n]=r.toUpperCase():"L"==t&&(e[n]=r.toLowerCase())}return e.join("")});return this.variables.__=null,a},this.resolveVariables=function(e,t){function i(t){var i=e.indexOf(t,r+1);-1!=i&&(r=i)}for(var n=[],r=0;r<e.length;r++){var o=e[r];if("string"==typeof o)n.push(o);else{if("object"!=typeof o)continue;if(o.skip)i(o);else{if(o.processed<r)continue;if(o.text){var s=this.getVariableValue(t,o.text);s&&o.fmtString&&(s=this.tmStrFormat(s,o)),o.processed=r,null==o.expectIf?s&&(n.push(s),i(o)):s?o.skip=o.elseBranch:i(o)}else null!=o.tabstopId?n.push(o):null!=o.changeCase&&n.push(o)}}}return n},this.insertSnippetForSelection=function(e,t){function i(e){for(var t=[],i=0;i<e.length;i++){var n=e[i];if("object"==typeof n){if(c[n.tabstopId])continue;n=t[e.lastIndexOf(n,i-1)]||{tabstopId:n.tabstopId}}t[i]=n}return t}var n=e.getCursorPosition(),r=e.session.getLine(n.row),o=e.session.getTabString(),s=r.match(/^\s*/)[0];n.column<s.length&&(s=s.slice(0,n.column));var a=this.tokenizeTmSnippet(t);a=this.resolveVariables(a,e),a=a.map(function(e){return"\n"==e?e+s:"string"==typeof e?e.replace(/\t/g,o):e});var l=[];a.forEach(function(e,t){if("object"==typeof e){var i=e.tabstopId,n=l[i];if(n||(n=l[i]=[],n.index=i,n.value=""),-1===n.indexOf(e)){n.push(e);var r=a.indexOf(e,t+1);if(-1!==r){var o=a.slice(t+1,r);o.some(function(e){return"object"==typeof e})&&!n.value?n.value=o:!o.length||n.value&&"string"==typeof n.value||(n.value=o.join(""))}}}}),l.forEach(function(e){e.length=0});for(var c={},u=0;u<a.length;u++){var h=a[u];if("object"==typeof h){var p=h.tabstopId,g=a.indexOf(h,u+1);if(c[p])c[p]===h&&(c[p]=null);else{var f=l[p],m="string"==typeof f.value?[f.value]:i(f.value);m.unshift(u+1,Math.max(0,g-u)),m.push(h),c[p]=h,a.splice.apply(a,m),-1===f.indexOf(h)&&f.push(h)}}}var v=0,y=0,w="";a.forEach(function(e){"string"==typeof e?("\n"===e[0]?(y=e.length-1,v++):y+=e.length,w+=e):e.start?e.end={row:v,column:y}:e.start={row:v,column:y}});var C=e.getSelectionRange(),b=e.session.replace(C,w),A=new d(e),x=e.inVirtualSelectionMode&&e.selection.index;A.addTabstops(l,C.start,b,x)},this.insertSnippet=function(e,t){var i=this;if(e.inVirtualSelectionMode)return i.insertSnippetForSelection(e,t);e.forEachSelection(function(){i.insertSnippetForSelection(e,t)},null,{keepOrder:!0}),e.tabstopManager&&e.tabstopManager.tabNext()},this.$getScope=function(e){var t=e.session.$mode.$id||"";if("html"===(t=t.split("/").pop())||"php"===t){"php"!==t||e.session.$mode.inlinePhp||(t="html");var i=e.getCursorPosition(),n=e.session.getState(i.row);"object"==typeof n&&(n=n[0]),n.substring&&("js-"==n.substring(0,3)?t="javascript":"css-"==n.substring(0,4)?t="css":"php-"==n.substring(0,4)&&(t="php"))}return t},this.getActiveScopes=function(e){var t=this.$getScope(e),i=[t],n=this.snippetMap;return n[t]&&n[t].includeScopes&&i.push.apply(i,n[t].includeScopes),i.push("_"),i},this.expandWithTab=function(e,t){var i=this,n=e.forEachSelection(function(){return i.expandSnippetForSelection(e,t)},null,{keepOrder:!0});return n&&e.tabstopManager&&e.tabstopManager.tabNext(),n},this.expandSnippetForSelection=function(e,t){var i,n=e.getCursorPosition(),r=e.session.getLine(n.row),o=r.substring(0,n.column),s=r.substr(n.column),a=this.snippetMap;return this.getActiveScopes(e).some(function(e){var t=a[e];return t&&(i=this.findMatchingSnippet(t,o,s)),!!i},this),!!i&&(!(!t||!t.dryRun)||(e.session.doc.removeInLine(n.row,n.column-i.replaceBefore.length,n.column+i.replaceAfter.length),this.variables.M__=i.matchBefore,this.variables.T__=i.matchAfter,this.insertSnippetForSelection(e,i.content),this.variables.M__=this.variables.T__=null,!0))},this.findMatchingSnippet=function(e,t,i){for(var n=e.length;n--;){var r=e[n];if((!r.startRe||r.startRe.test(t))&&((!r.endRe||r.endRe.test(i))&&(r.startRe||r.endRe)))return r.matchBefore=r.startRe?r.startRe.exec(t):[""],r.matchAfter=r.endRe?r.endRe.exec(i):[""],r.replaceBefore=r.triggerRe?r.triggerRe.exec(t)[0]:"",r.replaceAfter=r.endTriggerRe?r.endTriggerRe.exec(i)[0]:"",r}},this.snippetMap={},this.snippetNameMap={},this.register=function(e,t){function i(e){return e&&!/^\^?\(.*\)\$?$|^\\b$/.test(e)&&(e="(?:"+e+")"),e||""}function n(e,t,n){return e=i(e),t=i(t),n?(e=t+e)&&"$"!=e[e.length-1]&&(e+="$"):(e+=t)&&"^"!=e[0]&&(e="^"+e),new RegExp(e)}function o(e){e.scope||(e.scope=t||"_"),t=e.scope,s[t]||(s[t]=[],a[t]={});var i=a[t];if(e.name){var o=i[e.name];o&&l.unregister(o),i[e.name]=e}s[t].push(e),e.tabTrigger&&!e.trigger&&(!e.guard&&/^\w/.test(e.tabTrigger)&&(e.guard="\\b"),e.trigger=r.escapeRegExp(e.tabTrigger)),e.startRe=n(e.trigger,e.guard,!0),e.triggerRe=new RegExp(e.trigger,"",!0),e.endRe=n(e.endTrigger,e.endGuard,!0),e.endTriggerRe=new RegExp(e.endTrigger,"",!0)}var s=this.snippetMap,a=this.snippetNameMap,l=this;e||(e=[]),e&&e.content?o(e):Array.isArray(e)&&e.forEach(o),this._signal("registerSnippets",{scope:t})},this.unregister=function(e,t){function i(e){var i=r[e.scope||t];if(i&&i[e.name]){delete i[e.name];var o=n[e.scope||t],s=o&&o.indexOf(e);s>=0&&o.splice(s,1)}}var n=this.snippetMap,r=this.snippetNameMap;e.content?i(e):Array.isArray(e)&&e.forEach(i)},this.parseSnippetFile=function(e){e=e.replace(/\r/g,"");for(var t,i=[],n={},r=/^#.*|^({[\s\S]*})\s*$|^(\S+) (.*)$|^((?:\n*\t.*)+)/gm;t=r.exec(e);){if(t[1])try{n=JSON.parse(t[1]),i.push(n)}catch(e){}if(t[4])n.content=t[4].replace(/^\t/gm,""),i.push(n),n={};else{var o=t[2],s=t[3];if("regex"==o){var a=/\/((?:[^\/\\]|\\.)*)|$/g;n.guard=a.exec(s)[1],n.trigger=a.exec(s)[1],n.endTrigger=a.exec(s)[1],n.endGuard=a.exec(s)[1]}else"snippet"==o?(n.tabTrigger=s.match(/^\S*/)[0],n.name||(n.name=s)):n[o]=s}}return i},this.getSnippetByName=function(e,t){var i,n=this.snippetNameMap;return this.getActiveScopes(t).some(function(t){var r=n[t];return r&&(i=r[e]),!!i},this),i}}).call(u.prototype);var d=function(e){if(e.tabstopManager)return e.tabstopManager;e.tabstopManager=this,this.$onChange=this.onChange.bind(this),this.$onChangeSelection=r.delayedCall(this.onChangeSelection.bind(this)).schedule,this.$onChangeSession=this.onChangeSession.bind(this),this.$onAfterExec=this.onAfterExec.bind(this),this.attach(e)};(function(){this.attach=function(e){this.index=0,this.ranges=[],this.tabstops=[],this.$openTabstops=null,this.selectedTabstop=null,this.editor=e,this.editor.on("change",this.$onChange),this.editor.on("changeSelection",this.$onChangeSelection),this.editor.on("changeSession",this.$onChangeSession),this.editor.commands.on("afterExec",this.$onAfterExec),this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler)},this.detach=function(){this.tabstops.forEach(this.removeTabstopMarkers,this),this.ranges=null,this.tabstops=null,this.selectedTabstop=null,this.editor.removeListener("change",this.$onChange),this.editor.removeListener("changeSelection",this.$onChangeSelection),this.editor.removeListener("changeSession",this.$onChangeSession),this.editor.commands.removeListener("afterExec",this.$onAfterExec),this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler),this.editor.tabstopManager=null,this.editor=null},this.onChange=function(e){var t=e.data.range,i="r"==e.data.action[0],n=t.start,r=t.end,o=n.row,s=r.row,a=s-o,l=r.column-n.column;if(i&&(a=-a,l=-l),!this.$inChange&&i){var u=this.selectedTabstop;if(u&&!u.some(function(e){return c(e.start,n)<=0&&c(e.end,r)>=0}))return this.detach()}for(var d=this.ranges,h=0;h<d.length;h++){var p=d[h];p.end.row<n.row||(i&&c(n,p.start)<0&&c(r,p.end)>0?(this.removeRange(p),h--):(p.start.row==o&&p.start.column>n.column&&(p.start.column+=l),p.end.row==o&&p.end.column>=n.column&&(p.end.column+=l),p.start.row>=o&&(p.start.row+=a),p.end.row>=o&&(p.end.row+=a),c(p.start,p.end)>0&&this.removeRange(p)))}d.length||this.detach()},this.updateLinkedFields=function(){var e=this.selectedTabstop;if(e&&e.hasLinkedRanges){this.$inChange=!0;for(var i=this.editor.session,n=i.getTextRange(e.firstNonLinked),r=e.length;r--;){var o=e[r];if(o.linked){var s=t.snippetManager.tmStrFormat(n,o.original);i.replace(o,s)}}this.$inChange=!1}},this.onAfterExec=function(e){e.command&&!e.command.readOnly&&this.updateLinkedFields()},this.onChangeSelection=function(){if(this.editor){for(var e=this.editor.selection.lead,t=this.editor.selection.anchor,i=this.editor.selection.isEmpty(),n=this.ranges.length;n--;)if(!this.ranges[n].linked){var r=this.ranges[n].contains(e.row,e.column),o=i||this.ranges[n].contains(t.row,t.column);if(r&&o)return}this.detach()}},this.onChangeSession=function(){this.detach()},this.tabNext=function(e){var t=this.tabstops.length,i=this.index+(e||1);i=Math.min(Math.max(i,1),t),i==t&&(i=0),this.selectTabstop(i),0===i&&this.detach()},this.selectTabstop=function(e){this.$openTabstops=null;var t=this.tabstops[this.index];if(t&&this.addTabstopMarkers(t),this.index=e,(t=this.tabstops[this.index])&&t.length){if(this.selectedTabstop=t,this.editor.inVirtualSelectionMode)this.editor.selection.setRange(t.firstNonLinked);else{var i=this.editor.multiSelect;i.toSingleRange(t.firstNonLinked.clone());for(var n=t.length;n--;)t.hasLinkedRanges&&t[n].linked||i.addRange(t[n].clone(),!0);i.ranges[0]&&i.addRange(i.ranges[0].clone())}this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler)}},this.addTabstops=function(e,t,i){if(this.$openTabstops||(this.$openTabstops=[]),!e[0]){var n=o.fromPoints(i,i);g(n.start,t),g(n.end,t),e[0]=[n],e[0].index=0}var r=this.index,s=[r+1,0],a=this.ranges;e.forEach(function(e,i){for(var n=this.$openTabstops[i]||e,r=e.length;r--;){var l=e[r],c=o.fromPoints(l.start,l.end||l.start);p(c.start,t),p(c.end,t),c.original=l,c.tabstop=n,a.push(c),n!=e?n.unshift(c):n[r]=c,l.fmtString?(c.linked=!0,n.hasLinkedRanges=!0):n.firstNonLinked||(n.firstNonLinked=c)}n.firstNonLinked||(n.hasLinkedRanges=!1),n===e&&(s.push(n),this.$openTabstops[i]=n),this.addTabstopMarkers(n)},this),s.length>2&&(this.tabstops.length&&s.push(s.splice(2,1)[0]),this.tabstops.splice.apply(this.tabstops,s))},this.addTabstopMarkers=function(e){var t=this.editor.session;e.forEach(function(e){e.markerId||(e.markerId=t.addMarker(e,"ace_snippet-marker","text"))})},this.removeTabstopMarkers=function(e){var t=this.editor.session;e.forEach(function(e){t.removeMarker(e.markerId),e.markerId=null})},this.removeRange=function(e){var t=e.tabstop.indexOf(e);e.tabstop.splice(t,1),t=this.ranges.indexOf(e),this.ranges.splice(t,1),this.editor.session.removeMarker(e.markerId),e.tabstop.length||(t=this.tabstops.indexOf(e.tabstop),-1!=t&&this.tabstops.splice(t,1),this.tabstops.length||this.detach())},this.keyboardHandler=new a,this.keyboardHandler.bindKeys({Tab:function(e){t.snippetManager&&t.snippetManager.expandWithTab(e)||e.tabstopManager.tabNext(1)},"Shift-Tab":function(e){e.tabstopManager.tabNext(-1)},Esc:function(e){e.tabstopManager.detach()},Return:function(){return!1}})}).call(d.prototype);var h={};h.onChange=s.prototype.onChange,h.setPosition=function(e,t){this.pos.row=e,this.pos.column=t},h.update=function(e,t,i){this.$insertRight=i,this.pos=e,this.onChange(t)};var p=function(e,t){0==e.row&&(e.column+=t.column),e.row+=t.row},g=function(e,t){e.row==t.row&&(e.column-=t.column),e.row-=t.row};e("./lib/dom").importCssString(".ace_snippet-marker {    -moz-box-sizing: border-box;    box-sizing: border-box;    background: rgba(194, 193, 208, 0.09);    border: 1px dotted rgba(211, 208, 235, 0.62);    position: absolute;}"),t.snippetManager=new u;var f=e("./editor").Editor;(function(){this.insertSnippet=function(e,i){return t.snippetManager.insertSnippet(this,e,i)},this.expandSnippet=function(e){return t.snippetManager.expandWithTab(this,e)}}).call(f.prototype)}),define("ace/autocomplete/popup",["require","exports","module","ace/edit_session","ace/virtual_renderer","ace/editor","ace/range","ace/lib/event","ace/lib/lang","ace/lib/dom"],function(e,t){"use strict";var i=(e("../edit_session").EditSession,e("../virtual_renderer").VirtualRenderer),n=e("../editor").Editor,r=e("../range").Range,o=e("../lib/event"),s=e("../lib/lang"),a=e("../lib/dom"),l=function(e){var t=new i(e);t.$maxLines=4;var r=new n(t);return r.setHighlightActiveLine(!1),r.setShowPrintMargin(!1),r.renderer.setShowGutter(!1),r.renderer.setHighlightGutterLine(!1),r.$mouseHandler.$focusWaitTimout=0,r.$highlightTagPending=!0,r},c=function(e){var t=a.createElement("div"),i=new l(t);e&&e.appendChild(t),t.style.display="none",i.renderer.content.style.cursor="default",i.renderer.setStyle("ace_autocomplete"),i.setOption("displayIndentGuides",!1),i.setOption("dragDelay",150);var n=function(){};i.focus=n,i.$isFocused=!0,i.renderer.$cursorLayer.restartTimer=n,i.renderer.$cursorLayer.element.style.opacity=0,i.renderer.$maxLines=8,i.renderer.$keepTextAreaAtCursor=!1,i.setHighlightActiveLine(!1),i.session.highlight(""),i.session.$searchHighlight.clazz="ace_highlight-marker",i.on("mousedown",function(e){var t=e.getDocumentPosition();i.selection.moveToPosition(t),d.start.row=d.end.row=t.row,e.stop()});var c,u=new r(-1,0,-1,Infinity),d=new r(-1,0,-1,Infinity);d.id=i.session.addMarker(d,"ace_active-line","fullLine"),i.setSelectOnHover=function(e){e?u.id&&(i.session.removeMarker(u.id),u.id=null):u.id=i.session.addMarker(u,"ace_line-hover","fullLine")},i.setSelectOnHover(!1),i.on("mousemove",function(e){if(!c)return void(c=e);if(c.x!=e.x||c.y!=e.y){c=e,c.scrollTop=i.renderer.scrollTop;var t=c.getDocumentPosition().row;u.start.row!=t&&(u.id||i.setRow(t),p(t))}}),i.renderer.on("beforeRender",function(){if(c&&-1!=u.start.row){c.$pos=null;var e=c.getDocumentPosition().row;u.id||i.setRow(e),p(e,!0)}}),i.renderer.on("afterRender",function(){var e=i.getRow(),t=i.renderer.$textLayer,n=t.element.childNodes[e-t.config.firstRow];n!=t.selectedNode&&(t.selectedNode&&a.removeCssClass(t.selectedNode,"ace_selected"),t.selectedNode=n,n&&a.addCssClass(n,"ace_selected"))});var h=function(){p(-1)},p=function(e,t){e!==u.start.row&&(u.start.row=u.end.row=e,t||i.session._emit("changeBackMarker"),i._emit("changeHoverMarker"))};i.getHoveredRow=function(){return u.start.row},o.addListener(i.container,"mouseout",h),i.on("hide",h),i.on("changeSelection",h),i.session.doc.getLength=function(){return i.data.length},i.session.doc.getLine=function(e){var t=i.data[e];return"string"==typeof t?t:t&&t.value||""};var g=i.session.bgTokenizer;return g.$tokenizeRow=function(e){var t=i.data[e],n=[];if(!t)return n;"string"==typeof t&&(t={value:t}),t.caption||(t.caption=t.value||t.name);for(var r,o,s=-1,a=0;a<t.caption.length;a++)o=t.caption[a],r=t.matchMask&1<<a?1:0,s!==r?(n.push({type:t.className||(r?"completion-highlight":""),value:o}),s=r):n[n.length-1].value+=o;if(t.meta){var l=i.renderer.$size.scrollerWidth/i.renderer.layerConfig.characterWidth,c=t.meta;c.length+t.caption.length>l-2&&(c=c.substr(0,l-t.caption.length-3)+"\u2026"),n.push({type:"rightAlignedText",value:c})}return n},g.$updateOnChange=n,g.start=n,i.session.$computeWidth=function(){return this.screenWidth=0},i.$blockScrolling=Infinity,i.isOpen=!1,i.isTopdown=!1,i.data=[],i.setData=function(e){i.data=e||[],i.setValue(s.stringRepeat("\n",e.length),-1),i.setRow(0)},i.getData=function(e){return i.data[e]},i.getRow=function(){return d.start.row},i.setRow=function(e){e=Math.max(-1,Math.min(this.data.length,e)),d.start.row!=e&&(i.selection.clearSelection(),d.start.row=d.end.row=e||0,i.session._emit("changeBackMarker"),i.moveCursorTo(e||0,0),i.isOpen&&i._signal("select"))},i.on("changeSelection",function(){i.isOpen&&i.setRow(i.selection.lead.row),i.renderer.scrollCursorIntoView()}),i.hide=function(){this.container.style.display="none",this._signal("hide"),i.isOpen=!1},i.show=function(e,t,n){var r=this.container,o=window.innerHeight,s=window.innerWidth,a=this.renderer,l=a.$maxLines*t*1.4,u=e.top+this.$borderSize;u+l>o-t&&!n?(r.style.top="",r.style.bottom=o-u+"px",i.isTopdown=!1):(u+=t,r.style.top=u+"px",r.style.bottom="",i.isTopdown=!0),r.style.display="",this.renderer.$textLayer.checkForSizeChanges();var d=e.left;d+r.offsetWidth>s&&(d=s-r.offsetWidth),r.style.left=d+"px",this._signal("show"),c=null,i.isOpen=!0},i.getTextLeftOffset=function(){return this.$borderSize+this.renderer.$padding+this.$imageSize},i.$imageSize=0,i.$borderSize=1,i}
;a.importCssString(".ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line {    background-color: #CAD6FA;    z-index: 1;}.ace_editor.ace_autocomplete .ace_line-hover {    border: 1px solid #abbffe;    margin-top: -1px;    background: rgba(233,233,253,0.4);}.ace_editor.ace_autocomplete .ace_line-hover {    position: absolute;    z-index: 2;}.ace_editor.ace_autocomplete .ace_scroller {   background: none;   border: none;   box-shadow: none;}.ace_rightAlignedText {    color: gray;    display: inline-block;    position: absolute;    right: 4px;    text-align: right;    z-index: -1;}.ace_editor.ace_autocomplete .ace_completion-highlight{    color: #000;    text-shadow: 0 0 0.01em;}.ace_editor.ace_autocomplete {    width: 280px;    z-index: 200000;    background: #fbfbfb;    color: #444;    border: 1px lightgray solid;    position: fixed;    box-shadow: 2px 3px 5px rgba(0,0,0,.2);    line-height: 1.4;}"),t.AcePopup=c}),define("ace/autocomplete/util",["require","exports","module"],function(e,t){"use strict";t.parForEach=function(e,t,i){var n=0,r=e.length;0===r&&i();for(var o=0;o<r;o++)t(e[o],function(e,t){++n===r&&i(e,t)})};var i=/[a-zA-Z_0-9\$\-\u00A2-\uFFFF]/;t.retrievePrecedingIdentifier=function(e,t,n){n=n||i;for(var r=[],o=t-1;o>=0&&n.test(e[o]);o--)r.push(e[o]);return r.reverse().join("")},t.retrieveFollowingIdentifier=function(e,t,n){n=n||i;for(var r=[],o=t;o<e.length&&n.test(e[o]);o++)r.push(e[o]);return r}}),define("ace/autocomplete",["require","exports","module","ace/keyboard/hash_handler","ace/autocomplete/popup","ace/autocomplete/util","ace/lib/event","ace/lib/lang","ace/lib/dom","ace/snippets"],function(e,t){"use strict";var i=e("./keyboard/hash_handler").HashHandler,n=e("./autocomplete/popup").AcePopup,r=e("./autocomplete/util"),o=(e("./lib/event"),e("./lib/lang")),s=e("./lib/dom"),a=e("./snippets").snippetManager,l=function(){this.autoInsert=!1,this.autoSelect=!0,this.exactMatch=!1,this.gatherCompletionsId=0,this.keyboardHandler=new i,this.keyboardHandler.bindKeys(this.commands),this.blurListener=this.blurListener.bind(this),this.changeListener=this.changeListener.bind(this),this.mousedownListener=this.mousedownListener.bind(this),this.mousewheelListener=this.mousewheelListener.bind(this),this.changeTimer=o.delayedCall(function(){this.updateCompletions(!0)}.bind(this)),this.tooltipTimer=o.delayedCall(this.updateDocTooltip.bind(this),50)};(function(){this.$init=function(){return this.popup=new n(document.body||document.documentElement),this.popup.on("click",function(e){this.insertMatch(),e.stop()}.bind(this)),this.popup.focus=this.editor.focus.bind(this.editor),this.popup.on("show",this.tooltipTimer.bind(null,null)),this.popup.on("select",this.tooltipTimer.bind(null,null)),this.popup.on("changeHoverMarker",this.tooltipTimer.bind(null,null)),this.popup},this.getPopup=function(){return this.popup||this.$init()},this.openPopup=function(e,t,i){this.popup||this.$init(),this.popup.setData(this.completions.filtered),e.keyBinding.addKeyboardHandler(this.keyboardHandler);var n=e.renderer;if(this.popup.setRow(this.autoSelect?0:-1),i)i&&!t&&this.detach();else{this.popup.setTheme(e.getTheme()),this.popup.setFontSize(e.getFontSize());var r=n.layerConfig.lineHeight,o=n.$cursorLayer.getPixelPosition(this.base,!0);o.left-=this.popup.getTextLeftOffset();var s=e.container.getBoundingClientRect();o.top+=s.top-n.layerConfig.offset,o.left+=s.left-e.renderer.scrollLeft,o.left+=n.$gutterLayer.gutterWidth,this.popup.show(o,r)}},this.detach=function(){this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler),this.editor.off("changeSelection",this.changeListener),this.editor.off("blur",this.blurListener),this.editor.off("mousedown",this.mousedownListener),this.editor.off("mousewheel",this.mousewheelListener),this.changeTimer.cancel(),this.hideDocTooltip(),this.gatherCompletionsId+=1,this.popup&&this.popup.isOpen&&this.popup.hide(),this.base&&this.base.detach(),this.activated=!1,this.completions=this.base=null},this.changeListener=function(){var e=this.editor.selection.lead;(e.row!=this.base.row||e.column<this.base.column)&&this.detach(),this.activated?this.changeTimer.schedule():this.detach()},this.blurListener=function(e){var t=document.activeElement,i=this.editor.textInput.getElement();t!=i&&t.parentNode!=this.popup.container&&t!=this.tooltipNode&&e.relatedTarget!=this.tooltipNode&&e.relatedTarget!=i&&this.detach()},this.mousedownListener=function(){this.detach()},this.mousewheelListener=function(){this.detach()},this.goTo=function(e){var t=this.popup.getRow(),i=this.popup.session.getLength()-1;switch(e){case"up":t=t<=0?i:t-1;break;case"down":t=t>=i?-1:t+1;break;case"start":t=0;break;case"end":t=i}this.popup.setRow(t)},this.insertMatch=function(e){if(e||(e=this.popup.getData(this.popup.getRow())),!e)return!1;if(e.completer&&e.completer.insertMatch)e.completer.insertMatch(this.editor,e);else{if(this.completions.filterText)for(var t,i=this.editor.selection.getAllRanges(),n=0;t=i[n];n++)t.start.column-=this.completions.filterText.length,this.editor.session.remove(t);e.snippet?a.insertSnippet(this.editor,e.snippet):this.editor.execCommand("insertstring",e.value||e)}this.detach()},this.commands={Up:function(e){e.completer.goTo("up")},Down:function(e){e.completer.goTo("down")},"Ctrl-Up|Ctrl-Home":function(e){e.completer.goTo("start")},"Ctrl-Down|Ctrl-End":function(e){e.completer.goTo("end")},Esc:function(e){e.completer.detach()},Space:function(e){e.completer.detach(),e.insert(" ")},Return:function(e){return e.completer.insertMatch()},"Shift-Return":function(e){e.completer.insertMatch(!0)},Tab:function(e){var t=e.completer.insertMatch();if(t||e.tabstopManager)return t;e.completer.goTo("down")},PageUp:function(e){e.completer.popup.gotoPageUp()},PageDown:function(e){e.completer.popup.gotoPageDown()}},this.gatherCompletions=function(e,t){var i=e.getSession(),n=e.getCursorPosition(),o=i.getLine(n.row),s=r.retrievePrecedingIdentifier(o,n.column);this.base=i.doc.createAnchor(n.row,n.column-s.length),this.base.$insertRight=!0;var a=[],l=e.completers.length;return e.completers.forEach(function(o){o.getCompletions(e,i,n,s,function(n,o){n||(a=a.concat(o));var s=e.getCursorPosition(),c=i.getLine(s.row);t(null,{prefix:r.retrievePrecedingIdentifier(c,s.column,o[0]&&o[0].identifierRegex),matches:a,finished:0==--l})})}),!0},this.showPopup=function(e){this.editor&&this.detach(),this.activated=!0,this.editor=e,e.completer!=this&&(e.completer&&e.completer.detach(),e.completer=this),e.on("changeSelection",this.changeListener),e.on("blur",this.blurListener),e.on("mousedown",this.mousedownListener),e.on("mousewheel",this.mousewheelListener),this.updateCompletions()},this.updateCompletions=function(e){if(e&&this.base&&this.completions){var t=this.editor.getCursorPosition(),i=this.editor.session.getTextRange({start:this.base,end:t});if(i==this.completions.filterText)return;return this.completions.setFilter(i),this.completions.filtered.length?1!=this.completions.filtered.length||this.completions.filtered[0].value!=i||this.completions.filtered[0].snippet?void this.openPopup(this.editor,i,e):this.detach():this.detach()}var n=this.gatherCompletionsId;this.gatherCompletions(this.editor,function(t,i){var r=function(){if(i.finished)return this.detach()}.bind(this),o=i.prefix,s=i&&i.matches;if(!s||!s.length)return r();if(0===o.indexOf(i.prefix)&&n==this.gatherCompletionsId){this.completions=new c(s),this.exactMatch&&(this.completions.exactMatch=!0),this.completions.setFilter(o);var a=this.completions.filtered;return a.length&&(1!=a.length||a[0].value!=o||a[0].snippet)?this.autoInsert&&1==a.length&&i.finished?this.insertMatch(a[0]):void this.openPopup(this.editor,o,e):r()}}.bind(this))},this.cancelContextMenu=function(){this.editor.$mouseHandler.cancelContextMenu()},this.updateDocTooltip=function(){var e=this.popup,t=e.data,i=t&&(t[e.getHoveredRow()]||t[e.getRow()]),n=null;return i&&this.editor&&this.popup.isOpen?(this.editor.completers.some(function(e){return e.getDocTooltip&&(n=e.getDocTooltip(i)),n}),n||(n=i),"string"==typeof n&&(n={docText:n}),n&&(n.docHTML||n.docText)?void this.showDocTooltip(n):this.hideDocTooltip()):this.hideDocTooltip()},this.showDocTooltip=function(e){this.tooltipNode||(this.tooltipNode=s.createElement("div"),this.tooltipNode.className="ace_tooltip ace_doc-tooltip",this.tooltipNode.style.margin=0,this.tooltipNode.style.pointerEvents="auto",this.tooltipNode.tabIndex=-1,this.tooltipNode.onblur=this.blurListener.bind(this));var t=this.tooltipNode;e.docHTML?t.innerHTML=e.docHTML:e.docText&&(t.textContent=e.docText),t.parentNode||document.body.appendChild(t);var i=this.popup,n=i.container.getBoundingClientRect();t.style.top=i.container.style.top,t.style.bottom=i.container.style.bottom,window.innerWidth-n.right<320?(t.style.right=window.innerWidth-n.left+"px",t.style.left=""):(t.style.left=n.right+1+"px",t.style.right=""),t.style.display="block"},this.hideDocTooltip=function(){if(this.tooltipTimer.cancel(),this.tooltipNode){var e=this.tooltipNode;this.editor.isFocused()||document.activeElement!=e||this.editor.focus(),this.tooltipNode=null,e.parentNode&&e.parentNode.removeChild(e)}}}).call(l.prototype),l.startCommand={name:"startAutocomplete",exec:function(e){e.completer||(e.completer=new l),e.completer.autoInsert=!1,e.completer.autoSelect=!0,e.completer.showPopup(e),e.completer.cancelContextMenu()},bindKey:"Ctrl-Space|Ctrl-Shift-Space|Alt-Space"};var c=function(e,t){this.all=e,this.filtered=e,this.filterText=t||"",this.exactMatch=!1};(function(){this.setFilter=function(e){if(e.length>this.filterText&&0===e.lastIndexOf(this.filterText,0))var t=this.filtered;else var t=this.all;this.filterText=e,t=this.filterCompletions(t,this.filterText),t=t.sort(function(e,t){return t.exactMatch-e.exactMatch||t.score-e.score});var i=null;t=t.filter(function(e){var t=e.snippet||e.caption||e.value;return t!==i&&(i=t,!0)}),this.filtered=t},this.filterCompletions=function(e,t){var i=[],n=t.toUpperCase(),r=t.toLowerCase();e:for(var o,s=0;o=e[s];s++){var a=o.value||o.caption||o.snippet;if(a){var l,c,u=-1,d=0,h=0;if(this.exactMatch){if(t!==a.substr(0,t.length))continue e}else for(var p=0;p<t.length;p++){var g=a.indexOf(r[p],u+1),f=a.indexOf(n[p],u+1);if((l=g>=0&&(f<0||g<f)?g:f)<0)continue e;c=l-u-1,c>0&&(-1===u&&(h+=10),h+=c),d|=1<<l,u=l}o.matchMask=d,o.exactMatch=h?0:1,o.score=(o.score||0)-h,i.push(o)}}return i}}).call(c.prototype),t.Autocomplete=l,t.FilteredList=c}),define("ace/autocomplete/text_completer",["require","exports","module","ace/range"],function(e,t){function i(e,t){return e.getTextRange(r.fromPoints({row:0,column:0},t)).split(o).length-1}function n(e,t){var n=i(e,t),r=e.getValue().split(o),s=Object.create(null),a=r[n];return r.forEach(function(e,t){if(e&&e!==a){var i=Math.abs(n-t),o=r.length-i;s[e]?s[e]=Math.max(o,s[e]):s[e]=o}}),s}var r=e("../range").Range,o=/[^a-zA-Z_0-9\$\-\u00C0-\u1FFF\u2C00-\uD7FF\w]+/;t.getCompletions=function(e,t,i,r,o){var s=n(t,i,r);o(null,Object.keys(s).map(function(e){return{caption:e,value:e,score:s[e],meta:"local"}}))}}),define("ace/ext/language_tools",["require","exports","module","ace/snippets","ace/autocomplete","ace/config","ace/lib/lang","ace/autocomplete/util","ace/autocomplete/text_completer","ace/editor","ace/config"],function(e,t){"use strict";function i(e){var t,i=e.getCursorPosition(),n=e.session.getLine(i.row);return e.completers.forEach(function(e){e.identifierRegexps&&e.identifierRegexps.forEach(function(e){!t&&e&&(t=a.retrievePrecedingIdentifier(n,i.column,e))})}),t||a.retrievePrecedingIdentifier(n,i.column)}var n=e("../snippets").snippetManager,r=e("../autocomplete").Autocomplete,o=e("../config"),s=e("../lib/lang"),a=e("../autocomplete/util"),l=e("../autocomplete/text_completer"),c={getCompletions:function(e,t,i,n,r){if(t.$mode.completer)return t.$mode.completer.getCompletions(e,t,i,n,r);var o=e.session.getState(i.row);r(null,t.$mode.getCompletions(o,t,i,n))}},u={getCompletions:function(e,t,i,r,o){var s=n.snippetMap,a=[];n.getActiveScopes(e).forEach(function(e){for(var t=s[e]||[],i=t.length;i--;){var n=t[i],r=n.name||n.tabTrigger;r&&a.push({caption:r,snippet:n.content,meta:n.tabTrigger&&!n.name?n.tabTrigger+"\u21e5 ":"snippet",type:"snippet"})}},this),o(null,a)},getDocTooltip:function(e){"snippet"!=e.type||e.docHTML||(e.docHTML=["<b>",s.escapeHTML(e.caption),"</b>","<hr></hr>",s.escapeHTML(e.snippet)].join(""))}},d=[u,l,c];t.setCompleters=function(e){d=e||[]},t.addCompleter=function(e){d.push(e)},t.textCompleter=l,t.keyWordCompleter=c,t.snippetCompleter=u;var h={name:"expandSnippet",exec:function(e){return n.expandWithTab(e)},bindKey:"Tab"},p=function(e,t){g(t.session.$mode)},g=function(e){var t=e.$id;n.files||(n.files={}),f(t),e.modes&&e.modes.forEach(g)},f=function(e){if(e&&!n.files[e]){var t=e.replace("mode","snippets");n.files[e]={},o.loadModule(t,function(t){t&&(n.files[e]=t,!t.snippets&&t.snippetText&&(t.snippets=n.parseSnippetFile(t.snippetText)),n.register(t.snippets||[],t.scope),t.includeScopes&&(n.snippetMap[t.scope].includeScopes=t.includeScopes,t.includeScopes.forEach(function(e){f("ace/mode/"+e)})))})}},m=function(e){var t=e.editor,n=(e.args,t.completer&&t.completer.activated);if("backspace"===e.command.name)n&&!i(t)&&t.completer.detach();else if("insertstring"===e.command.name){var o=i(t);o&&!n&&(t.completer||(t.completer=new r),t.completer.autoInsert=!1,t.completer.showPopup(t))}},v=e("../editor").Editor;e("../config").defineOptions(v.prototype,"editor",{enableBasicAutocompletion:{set:function(e){e?(this.completers||(this.completers=Array.isArray(e)?e:d),this.commands.addCommand(r.startCommand)):this.commands.removeCommand(r.startCommand)},value:!1},enableLiveAutocompletion:{set:function(e){e?(this.completers||(this.completers=Array.isArray(e)?e:d),this.commands.on("afterExec",m)):this.commands.removeListener("afterExec",m)},value:!1},enableSnippets:{set:function(e){e?(this.commands.addCommand(h),this.on("changeMode",p),p(null,this)):(this.commands.removeCommand(h),this.off("changeMode",p))},value:!1}})}),function(){window.require(["ace/ext/language_tools"],function(){})}(),define("ace/theme/monokai",["require","exports","module","ace/lib/dom"],function(e,t){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;border-radius: 2px}.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)}),define("ace/theme/chrome",["require","exports","module","ace/lib/dom"],function(e,t){t.isDark=!1,t.cssClass="ace-chrome",t.cssText=".ace-chrome .ace_gutter {  background: #ebebeb;  color: #333;  overflow : hidden;}.ace-chrome .ace_print-margin {  width: 1px;  background: #e8e8e8;}.ace-chrome {  background-color: #FFFFFF;  color: black;}.ace-chrome .ace_cursor {  color: black;}.ace-chrome .ace_invisible {  color: rgb(191, 191, 191);}.ace-chrome .ace_constant.ace_buildin {  color: rgb(88, 72, 246);}.ace-chrome .ace_constant.ace_language {  color: rgb(88, 92, 246);}.ace-chrome .ace_constant.ace_library {  color: rgb(6, 150, 14);}.ace-chrome .ace_invalid {  background-color: rgb(153, 0, 0);  color: white;}.ace-chrome .ace_fold {}.ace-chrome .ace_support.ace_function {  color: rgb(60, 76, 114);}.ace-chrome .ace_support.ace_constant {  color: rgb(6, 150, 14);}.ace-chrome .ace_support.ace_type,.ace-chrome .ace_support.ace_class.ace-chrome .ace_support.ace_other {  color: rgb(109, 121, 222);}.ace-chrome .ace_variable.ace_parameter {  font-style:italic;  color:#FD971F;}.ace-chrome .ace_keyword.ace_operator {  color: rgb(104, 118, 135);}.ace-chrome .ace_comment {  color: #236e24;}.ace-chrome .ace_comment.ace_doc {  color: #236e24;}.ace-chrome .ace_comment.ace_doc.ace_tag {  color: #236e24;}.ace-chrome .ace_constant.ace_numeric {  color: rgb(0, 0, 205);}.ace-chrome .ace_variable {  color: rgb(49, 132, 149);}.ace-chrome .ace_xml-pe {  color: rgb(104, 104, 91);}.ace-chrome .ace_entity.ace_name.ace_function {  color: #0000A2;}.ace-chrome .ace_heading {  color: rgb(12, 7, 255);}.ace-chrome .ace_list {  color:rgb(185, 6, 144);}.ace-chrome .ace_marker-layer .ace_selection {  background: rgb(181, 213, 255);}.ace-chrome .ace_marker-layer .ace_step {  background: rgb(252, 255, 0);}.ace-chrome .ace_marker-layer .ace_stack {  background: rgb(164, 229, 101);}.ace-chrome .ace_marker-layer .ace_bracket {  margin: -1px 0 0 -1px;  border: 1px solid rgb(192, 192, 192);}.ace-chrome .ace_marker-layer .ace_active-line {  background: rgba(0, 0, 0, 0.07);}.ace-chrome .ace_gutter-active-line {    background-color : #dcdcdc;}.ace-chrome .ace_marker-layer .ace_selected-word {  background: rgb(250, 250, 255);  border: 1px solid rgb(200, 200, 250);}.ace-chrome .ace_storage,.ace-chrome .ace_keyword,.ace-chrome .ace_meta.ace_tag {  color: rgb(147, 15, 128);}.ace-chrome .ace_string.ace_regex {  color: rgb(255, 0, 0)}.ace-chrome .ace_string {  color: #1A1AA6;}.ace-chrome .ace_entity.ace_other.ace_attribute-name {  color: #994409;}.ace-chrome .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)}),function(e,t){"object"==typeof module&&module.exports?module.exports=e.document?t(e):t:e.Highcharts=t(e)}("undefined"!=typeof window?window:this,function(e){e=function(){var e=window,t=e.document,i=e.navigator&&e.navigator.userAgent||"",n=t&&t.createElementNS&&!!t.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect,r=/(edge|msie|trident)/i.test(i)&&!window.opera,o=!n,s=/Firefox/.test(i),a=s&&4>parseInt(i.split("Firefox/")[1],10);return e.Highcharts?e.Highcharts.error(16,!0):{product:"Highcharts",version:"5.0.12",deg2rad:2*Math.PI/360,doc:t,hasBidiBug:a,hasTouch:t&&void 0!==t.documentElement.ontouchstart,isMS:r,isWebKit:/AppleWebKit/.test(i),isFirefox:s,isTouchDevice:/(Mobile|Android|Windows Phone)/.test(i),SVG_NS:"http://www.w3.org/2000/svg",chartCount:0,seriesTypes:{},symbolSizes:{},svg:n,vml:o,win:e,marginNames:["plotTop","marginRight","marginBottom","plotLeft"],noop:function(){},charts:[]}}(),function(e){var t=[],i=e.charts,n=e.doc,r=e.win;e.error=function(t,i){if(t=e.isNumber(t)?"Highcharts error #"+t+": www.highcharts.com/errors/"+t:t,i)throw Error(t);r.console&&console.log(t)},e.Fx=function(e,t,i){this.options=t,this.elem=e,this.prop=i},e.Fx.prototype={dSetter:function(){var e,t=this.paths[0],i=this.paths[1],n=[],r=this.now,o=t.length;if(1===r)n=this.toD;else if(o===i.length&&1>r)for(;o--;)e=parseFloat(t[o]),n[o]=isNaN(e)?t[o]:r*parseFloat(i[o]-e)+e;else n=i;this.elem.attr("d",n,null,!0)},update:function(){var e=this.elem,t=this.prop,i=this.now,n=this.options.step;this[t+"Setter"]?this[t+"Setter"]():e.attr?e.element&&e.attr(t,i,null,!0):e.style[t]=i+this.unit,n&&n.call(e,i,this)},run:function(e,i,n){var r,o=this,s=function(e){return!s.stopped&&o.step(e)};this.startTime=+new Date,this.start=e,this.end=i,this.unit=n,this.now=this.start,this.pos=0,s.elem=this.elem,s.prop=this.prop,s()&&1===t.push(s)&&(s.timerId=setInterval(function(){for(r=0;r<t.length;r++)t[r]()||t.splice(r--,1);t.length||clearInterval(s.timerId)},13))},step:function(t){var i,n=+new Date,r=this.options,o=this.elem,s=r.complete,a=r.duration,l=r.curAnim;return o.attr&&!o.element?t=!1:t||n>=a+this.startTime?(this.now=this.end,this.pos=1,this.update(),i=l[this.prop]=!0,e.objectEach(l,function(e){!0!==e&&(i=!1)}),i&&s&&s.call(o),t=!1):(this.pos=r.easing((n-this.startTime)/a),this.now=this.start+(this.end-this.start)*this.pos,this.update(),t=!0),t},initPath:function(t,i,n){function r(e){var t,i;for(u=e.length;u--;)t="M"===e[u]||"L"===e[u],i=/[a-zA-Z]/.test(e[u+3]),t&&i&&e.splice(u+1,0,e[u+1],e[u+2],e[u+1],e[u+2])}function o(e,t){for(;e.length<l;){e[0]=t[l-e.length];var i=e.slice(0,g);[].splice.apply(e,[0,0].concat(i)),m&&(i=e.slice(e.length-g),[].splice.apply(e,[e.length,0].concat(i)),u--)}e[0]="M"}function s(e,t){for(var i=(l-e.length)/g;0<i&&i--;)c=e.slice().splice(e.length/v-g,g*v),c[0]=t[l-g-i*g],p&&(c[g-6]=c[g-2],c[g-5]=c[g-1]),[].splice.apply(e,[e.length/v,0].concat(c)),m&&i--}i=i||"";var a,l,c,u,d=t.startX,h=t.endX,p=-1<i.indexOf("C"),g=p?7:3;i=i.split(" "),n=n.slice();var f,m=t.isArea,v=m?2:1;if(p&&(r(i),r(n)),d&&h){for(u=0;u<d.length;u++){if(d[u]===h[0]){a=u;break}if(d[0]===h[h.length-d.length+u]){a=u,f=!0;break}}void 0===a&&(i=[])}return i.length&&e.isNumber(a)&&(l=n.length+a*v*g,f?(o(i,n),s(n,i)):(o(n,i),s(i,n))),[i,n]}},e.Fx.prototype.fillSetter=e.Fx.prototype.strokeSetter=function(){this.elem.attr(this.prop,e.color(this.start).tweenTo(e.color(this.end),this.pos),null,!0)},e.extend=function(e,t){var i;e||(e={});for(i in t)e[i]=t[i];return e},e.merge=function(){var t,i,n=arguments,r={},o=function(t,i){return"object"!=typeof t&&(t={}),e.objectEach(i,function(n,r){!e.isObject(n,!0)||e.isClass(n)||e.isDOMElement(n)?t[r]=i[r]:t[r]=o(t[r]||{},n)}),t};for(!0===n[0]&&(r=n[1],n=Array.prototype.slice.call(n,2)),i=n.length,t=0;t<i;t++)r=o(r,n[t]);return r},e.pInt=function(e,t){return parseInt(e,t||10)},e.isString=function(e){return"string"==typeof e},e.isArray=function(e){return"[object Array]"===(e=Object.prototype.toString.call(e))||"[object Array Iterator]"===e},e.isObject=function(t,i){return!(!t||"object"!=typeof t||i&&e.isArray(t))},e.isDOMElement=function(t){return e.isObject(t)&&"number"==typeof t.nodeType},e.isClass=function(t){var i=t&&t.constructor;return!(!e.isObject(t,!0)||e.isDOMElement(t)||!i||!i.name||"Object"===i.name)},e.isNumber=function(e){return"number"==typeof e&&!isNaN(e)},e.erase=function(e,t){for(var i=e.length;i--;)if(e[i]===t){e.splice(i,1);break}},e.defined=function(e){return void 0!==e&&null!==e},e.attr=function(t,i,n){var r;return e.isString(i)?e.defined(n)?t.setAttribute(i,n):t&&t.getAttribute&&(r=t.getAttribute(i)):e.defined(i)&&e.isObject(i)&&e.objectEach(i,function(e,i){t.setAttribute(i,e)}),r},e.splat=function(t){return e.isArray(t)?t:[t]},e.syncTimeout=function(e,t,i){if(t)return setTimeout(e,t,i);e.call(0,i)},e.pick=function(){var e,t,i=arguments,n=i.length;for(e=0;e<n;e++)if(void 0!==(t=i[e])&&null!==t)return t},e.css=function(t,i){e.isMS&&!e.svg&&i&&void 0!==i.opacity&&(i.filter="alpha(opacity="+100*i.opacity+")"),e.extend(t.style,i)},e.createElement=function(t,i,r,o,s){t=n.createElement(t);var a=e.css;return i&&e.extend(t,i),s&&a(t,{padding:0,border:"none",margin:0}),r&&a(t,r),o&&o.appendChild(t),t},e.extendClass=function(t,i){var n=function(){};return n.prototype=new t,e.extend(n.prototype,i),n},e.pad=function(e,t,i){return Array((t||2)+1-String(e).length).join(i||0)+e},e.relativeLength=function(e,t){return/%$/.test(e)?t*parseFloat(e)/100:parseFloat(e)},e.wrap=function(e,t,i){var n=e[t];e[t]=function(){var e=Array.prototype.slice.call(arguments),t=arguments,r=this;return r.proceed=function(){n.apply(r,arguments.length?arguments:t)},e.unshift(n),e=i.apply(this,e),r.proceed=null,e}},e.getTZOffset=function(t){var i=e.Date;return 6e4*(i.hcGetTimezoneOffset&&i.hcGetTimezoneOffset(t)||i.hcTimezoneOffset||0)},e.dateFormat=function(t,i,n){if(!e.defined(i)||isNaN(i))return e.defaultOptions.lang.invalidDate||"";t=e.pick(t,"%Y-%m-%d %H:%M:%S");var r=e.Date,o=new r(i-e.getTZOffset(i)),s=o[r.hcGetHours](),a=o[r.hcGetDay](),l=o[r.hcGetDate](),c=o[r.hcGetMonth](),u=o[r.hcGetFullYear](),d=e.defaultOptions.lang,h=d.weekdays,p=d.shortWeekdays,g=e.pad,r=e.extend({a:p?p[a]:h[a].substr(0,3),A:h[a],d:g(l),e:g(l,2," "),w:a,b:d.shortMonths[c],B:d.months[c],m:g(c+1),y:u.toString().substr(2,2),Y:u,H:g(s),k:s,I:g(s%12||12),l:s%12||12,M:g(o[r.hcGetMinutes]()),p:12>s?"AM":"PM",P:12>s?"am":"pm",S:g(o.getSeconds()),L:g(Math.round(i%1e3),3)},e.dateFormats);return e.objectEach(r,function(e,n){for(;-1!==t.indexOf("%"+n);)t=t.replace("%"+n,"function"==typeof e?e(i):e)}),n?t.substr(0,1).toUpperCase()+t.substr(1):t},e.formatSingle=function(t,i){var n=/\.([0-9])/,r=e.defaultOptions.lang;return/f$/.test(t)?(n=(n=t.match(n))?n[1]:-1,null!==i&&(i=e.numberFormat(i,n,r.decimalPoint,-1<t.indexOf(",")?r.thousandsSep:""))):i=e.dateFormat(t,i),i},e.format=function(t,i){for(var n,r,o,s,a,l="{",c=!1,u=[];t&&-1!==(l=t.indexOf(l));){if(n=t.slice(0,l),c){for(n=n.split(":"),r=n.shift().split("."),s=r.length,a=i,o=0;o<s;o++)a=a[r[o]];n.length&&(a=e.formatSingle(n.join(":"),a)),u.push(a)}else u.push(n);t=t.slice(l+1),l=(c=!c)?"}":"{"}return u.push(t),u.join("")},e.getMagnitude=function(e){return Math.pow(10,Math.floor(Math.log(e)/Math.LN10))},e.normalizeTickInterval=function(t,i,n,r,o){var s,a=t;for(n=e.pick(n,1),s=t/n,i||(i=o?[1,1.2,1.5,2,2.5,3,4,5,6,8,10]:[1,2,2.5,5,10],!1===r&&(1===n?i=e.grep(i,function(e){return 0==e%1}):.1>=n&&(i=[1/n]))),r=0;r<i.length&&(a=i[r],!(o&&a*n>=t||!o&&s<=(i[r]+(i[r+1]||i[r]))/2));r++);return a=e.correctFloat(a*n,-Math.round(Math.log(.001)/Math.LN10))},e.stableSort=function(e,t){var i,n,r=e.length;for(n=0;n<r;n++)e[n].safeI=n;for(e.sort(function(e,n){return i=t(e,n),0===i?e.safeI-n.safeI:i}),n=0;n<r;n++)delete e[n].safeI},e.arrayMin=function(e){for(var t=e.length,i=e[0];t--;)e[t]<i&&(i=e[t]);return i},e.arrayMax=function(e){for(var t=e.length,i=e[0];t--;)e[t]>i&&(i=e[t]);return i},e.destroyObjectProperties=function(t,i){e.objectEach(t,function(e,n){e&&e!==i&&e.destroy&&e.destroy(),delete t[n]})},e.discardElement=function(t){var i=e.garbageBin;i||(i=e.createElement("div")),t&&i.appendChild(t),i.innerHTML=""},e.correctFloat=function(e,t){return parseFloat(e.toPrecision(t||14))},e.setAnimation=function(t,i){i.renderer.globalAnimation=e.pick(t,i.options.chart.animation,!0)},e.animObject=function(t){return e.isObject(t)?e.merge(t):{duration:t?500:0}},e.timeUnits={millisecond:1,second:1e3,minute:6e4,hour:36e5,day:864e5,week:6048e5,month:24192e5,year:314496e5},e.numberFormat=function(t,i,n,r){t=+t||0,i=+i;var o,s,a=e.defaultOptions.lang,l=(t.toString().split(".")[1]||"").length;return-1===i?i=Math.min(l,20):e.isNumber(i)||(i=2),s=(Math.abs(t)+Math.pow(10,-Math.max(i,l)-1)).toFixed(i),l=String(e.pInt(s)),o=3<l.length?l.length%3:0,n=e.pick(n,a.decimalPoint),r=e.pick(r,a.thousandsSep),t=(0>t?"-":"")+(o?l.substr(0,o)+r:""),t+=l.substr(o).replace(/(\d{3})(?=\d)/g,"$1"+r),i&&(t+=n+s.slice(-i)),t},Math.easeInOutSine=function(e){return-.5*(Math.cos(Math.PI*e)-1)},e.getStyle=function(t,i,n){return"width"===i?Math.min(t.offsetWidth,t.scrollWidth)-e.getStyle(t,"padding-left")-e.getStyle(t,"padding-right"):"height"===i?Math.min(t.offsetHeight,t.scrollHeight)-e.getStyle(t,"padding-top")-e.getStyle(t,"padding-bottom"):((t=r.getComputedStyle(t,void 0))&&(t=t.getPropertyValue(i),e.pick(n,!0)&&(t=e.pInt(t))),t)},e.inArray=function(e,t){return t.indexOf?t.indexOf(e):[].indexOf.call(t,e)},e.grep=function(e,t){return[].filter.call(e,t)},e.find=function(e,t){return[].find.call(e,t)},e.map=function(e,t){for(var i=[],n=0,r=e.length;n<r;n++)i[n]=t.call(e[n],e[n],n,e);return i},e.offset=function(e){var t=n.documentElement;return e=e.getBoundingClientRect(),{top:e.top+(r.pageYOffset||t.scrollTop)-(t.clientTop||0),left:e.left+(r.pageXOffset||t.scrollLeft)-(t.clientLeft||0)}},e.stop=function(e,i){for(var n=t.length;n--;)t[n].elem!==e||i&&i!==t[n].prop||(t[n].stopped=!0)},e.each=function(e,t,i){return Array.prototype.forEach.call(e,t,i)},e.objectEach=function(e,t,i){for(var n in e)e.hasOwnProperty(n)&&t.call(i,e[n],n,e)},e.addEvent=function(t,i,n){function o(e){e.target=e.srcElement||r,n.call(t,e)}var s=t.hcEvents=t.hcEvents||{};return t.addEventListener?t.addEventListener(i,n,!1):t.attachEvent&&(t.hcEventsIE||(t.hcEventsIE={}),t.hcEventsIE[n.toString()]=o,t.attachEvent("on"+i,o)),s[i]||(s[i]=[]),s[i].push(n),function(){e.removeEvent(t,i,n)}},e.removeEvent=function(t,i,n){function r(e,i){t.removeEventListener?t.removeEventListener(e,i,!1):t.attachEvent&&(i=t.hcEventsIE[i.toString()],t.detachEvent("on"+e,i))}function o(){var n,o;t.nodeName&&(i?(n={},n[i]=!0):n=l,e.objectEach(n,function(e,t){if(l[t])for(o=l[t].length;o--;)r(t,l[t][o])}))}var s,a,l=t.hcEvents;l&&(i?(s=l[i]||[],n?(a=e.inArray(n,s),-1<a&&(s.splice(a,1),l[i]=s),r(i,n)):(o(),l[i]=[])):(o(),t.hcEvents={}))},e.fireEvent=function(t,i,r,o){var s;s=t.hcEvents;var a,l;if(r=r||{},n.createEvent&&(t.dispatchEvent||t.fireEvent))s=n.createEvent("Events"),s.initEvent(i,!0,!0),e.extend(s,r),t.dispatchEvent?t.dispatchEvent(s):t.fireEvent(i,s);else if(s)for(s=s[i]||[],a=s.length,r.target||e.extend(r,{preventDefault:function(){r.defaultPrevented=!0},target:t,type:i}),i=0;i<a;i++)(l=s[i])&&!1===l.call(t,r)&&r.preventDefault();o&&!r.defaultPrevented&&o(r)},e.animate=function(t,i,n){var r,o,s,a,l="";e.isObject(n)||(a=arguments,n={duration:a[2],easing:a[3],complete:a[4]}),e.isNumber(n.duration)||(n.duration=400),n.easing="function"==typeof n.easing?n.easing:Math[n.easing]||Math.easeInOutSine,n.curAnim=e.merge(i),e.objectEach(i,function(a,c){e.stop(t,c),s=new e.Fx(t,n,c),o=null,"d"===c?(s.paths=s.initPath(t,t.d,i.d),s.toD=i.d,r=0,o=1):t.attr?r=t.attr(c):(r=parseFloat(e.getStyle(t,c))||0,"opacity"!==c&&(l="px")),o||(o=a),o&&o.match&&o.match("px")&&(o=o.replace(/px/g,"")),s.run(r,o,l)})},e.seriesType=function(t,i,n,r,o){var s=e.getOptions(),a=e.seriesTypes;return a[t]?e.error(27):(s.plotOptions[t]=e.merge(s.plotOptions[i],n),a[t]=e.extendClass(a[i]||function(){},r),a[t].prototype.type=t,o&&(a[t].prototype.pointClass=e.extendClass(e.Point,o)),a[t])},e.uniqueKey=function(){var e=Math.random().toString(36).substring(2,9),t=0;return function(){return"highcharts-"+e+"-"+t++}}(),r.jQuery&&(r.jQuery.fn.highcharts=function(){var t=[].slice.call(arguments);if(this[0])return t[0]?(new(e[e.isString(t[0])?t.shift():"Chart"])(this[0],t[0],t[1]),this):i[e.attr(this[0],"data-highcharts-chart")]}),n&&!n.defaultView&&(e.getStyle=function(t,i){var n={width:"clientWidth",height:"clientHeight"}[i];return t.style[i]?e.pInt(t.style[i]):("opacity"===i&&(i="filter"),n?(t.style.zoom=1,Math.max(t[n]-2*e.getStyle(t,"padding"),0)):(t=t.currentStyle[i.replace(/\-(\w)/g,function(e,t){return t.toUpperCase()})],"filter"===i&&(t=t.replace(/alpha\(opacity=([0-9]+)\)/,function(e,t){return t/100})),""===t?1:e.pInt(t)))}),Array.prototype.forEach||(e.each=function(e,t,i){for(var n=0,r=e.length;n<r;n++)if(!1===t.call(i,e[n],n,e))return n}),Array.prototype.indexOf||(e.inArray=function(e,t){var i,n=0;if(t)for(i=t.length;n<i;n++)if(t[n]===e)return n;return-1}),Array.prototype.filter||(e.grep=function(e,t){for(var i=[],n=0,r=e.length;n<r;n++)t(e[n],n)&&i.push(e[n]);return i}),Array.prototype.find||(e.find=function(e,t){var i,n=e.length;for(i=0;i<n;i++)if(t(e[i],i))return e[i]})}(e),function(e){var t=e.each,i=e.isNumber,n=e.map,r=e.merge,o=e.pInt;e.Color=function(t){if(!(this instanceof e.Color))return new e.Color(t);this.init(t)},e.Color.prototype={parsers:[{
regex:/rgba\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]?(?:\.[0-9]+)?)\s*\)/,parse:function(e){return[o(e[1]),o(e[2]),o(e[3]),parseFloat(e[4],10)]}},{regex:/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/,parse:function(e){return[o(e[1]),o(e[2]),o(e[3]),1]}}],names:{none:"rgba(255,255,255,0)",white:"#ffffff",black:"#000000"},init:function(t){var i,r,o,s;if((this.input=t=this.names[t&&t.toLowerCase?t.toLowerCase():""]||t)&&t.stops)this.stops=n(t.stops,function(t){return new e.Color(t[1])});else if(t&&"#"===t[0]&&(i=t.length,t=parseInt(t.substr(1),16),7===i?r=[(16711680&t)>>16,(65280&t)>>8,255&t,1]:4===i&&(r=[(3840&t)>>4|(3840&t)>>8,(240&t)>>4|240&t,(15&t)<<4|15&t,1])),!r)for(o=this.parsers.length;o--&&!r;)s=this.parsers[o],(i=s.regex.exec(t))&&(r=s.parse(i));this.rgba=r||[]},get:function(e){var n,o=this.input,s=this.rgba;return this.stops?(n=r(o),n.stops=[].concat(n.stops),t(this.stops,function(t,i){n.stops[i]=[n.stops[i][0],t.get(e)]})):n=s&&i(s[0])?"rgb"===e||!e&&1===s[3]?"rgb("+s[0]+","+s[1]+","+s[2]+")":"a"===e?s[3]:"rgba("+s.join(",")+")":o,n},brighten:function(e){var n,r=this.rgba;if(this.stops)t(this.stops,function(t){t.brighten(e)});else if(i(e)&&0!==e)for(n=0;3>n;n++)r[n]+=o(255*e),0>r[n]&&(r[n]=0),255<r[n]&&(r[n]=255);return this},setOpacity:function(e){return this.rgba[3]=e,this},tweenTo:function(e,t){var i,n;return e.rgba.length?(i=this.rgba,e=e.rgba,n=1!==e[3]||1!==i[3],e=(n?"rgba(":"rgb(")+Math.round(e[0]+(i[0]-e[0])*(1-t))+","+Math.round(e[1]+(i[1]-e[1])*(1-t))+","+Math.round(e[2]+(i[2]-e[2])*(1-t))+(n?","+(e[3]+(i[3]-e[3])*(1-t)):"")+")"):e=e.input||"none",e}},e.color=function(t){return new e.Color(t)}}(e),function(e){var t,i,n=e.addEvent,r=e.animate,o=e.attr,s=e.charts,a=e.color,l=e.css,c=e.createElement,u=e.defined,d=e.deg2rad,h=e.destroyObjectProperties,p=e.doc,g=e.each,f=e.extend,m=e.erase,v=e.grep,y=e.hasTouch,w=e.inArray,C=e.isArray,b=e.isFirefox,A=e.isMS,x=e.isObject,S=e.isString,E=e.isWebKit,$=e.merge,F=e.noop,k=e.objectEach,D=e.pick,T=e.pInt,M=e.removeEvent,L=e.stop,R=e.svg,_=e.SVG_NS,B=e.symbolSizes,P=e.win;t=e.SVGElement=function(){return this},f(t.prototype,{opacity:1,SVG_NS:_,textProps:"direction fontSize fontWeight fontFamily fontStyle color lineHeight width textAlign textDecoration textOverflow textOutline".split(" "),init:function(e,t){this.element="span"===t?c(t):p.createElementNS(this.SVG_NS,t),this.renderer=e},animate:function(t,i,n){return i=e.animObject(D(i,this.renderer.globalAnimation,!0)),0!==i.duration?(n&&(i.complete=n),r(this,t,i)):(this.attr(t,null,n),i.step&&i.step.call(this)),this},colorGradient:function(t,i,n){var r,o,s,a,l,c,d,h,p,f,m,v=this.renderer,y=[];t.radialGradient?o="radialGradient":t.linearGradient&&(o="linearGradient"),o&&(s=t[o],l=v.gradients,d=t.stops,f=n.radialReference,C(s)&&(t[o]=s={x1:s[0],y1:s[1],x2:s[2],y2:s[3],gradientUnits:"userSpaceOnUse"}),"radialGradient"===o&&f&&!u(s.gradientUnits)&&(a=s,s=$(s,v.getRadialAttr(f,a),{gradientUnits:"userSpaceOnUse"})),k(s,function(e,t){"id"!==t&&y.push(t,e)}),k(d,function(e){y.push(e)}),y=y.join(","),l[y]?f=l[y].attr("id"):(s.id=f=e.uniqueKey(),l[y]=c=v.createElement(o).attr(s).add(v.defs),c.radAttr=a,c.stops=[],g(d,function(t){0===t[1].indexOf("rgba")?(r=e.color(t[1]),h=r.get("rgb"),p=r.get("a")):(h=t[1],p=1),t=v.createElement("stop").attr({offset:t[0],"stop-color":h,"stop-opacity":p}).add(c),c.stops.push(t)})),m="url("+v.url+"#"+f+")",n.setAttribute(i,m),n.gradient=y,t.toString=function(){return m})},applyTextOutline:function(t){var i,n,r,s,a,l=this.element;if(-1!==t.indexOf("contrast")&&(t=t.replace(/contrast/g,this.renderer.getContrast(l.style.fill))),t=t.split(" "),n=t[t.length-1],(r=t[0])&&"none"!==r&&e.svg){for(this.fakeTS=!0,t=[].slice.call(l.getElementsByTagName("tspan")),this.ySetter=this.xSetter,r=r.replace(/(^[\d\.]+)(.*?)$/g,function(e,t,i){return 2*t+i}),a=t.length;a--;)i=t[a],"highcharts-text-outline"===i.getAttribute("class")&&m(t,l.removeChild(i));s=l.firstChild,g(t,function(e,t){0===t&&(e.setAttribute("x",l.getAttribute("x")),t=l.getAttribute("y"),e.setAttribute("y",t||0),null===t&&l.setAttribute("y",0)),e=e.cloneNode(1),o(e,{"class":"highcharts-text-outline",fill:n,stroke:n,"stroke-width":r,"stroke-linejoin":"round"}),l.insertBefore(e,s)})}},attr:function(e,t,i,n){var r,o,s,a,l=this.element,c=this;return"string"==typeof e&&void 0!==t&&(r=e,e={},e[r]=t),"string"==typeof e?c=(this[e+"Getter"]||this._defaultGetter).call(this,e,l):(k(e,function(t,i){s=!1,n||L(this,i),this.symbolName&&/^(x|y|width|height|r|start|end|innerR|anchorX|anchorY)$/.test(i)&&(o||(this.symbolAttr(e),o=!0),s=!0),!this.rotation||"x"!==i&&"y"!==i||(this.doTransform=!0),s||(a=this[i+"Setter"]||this._defaultSetter,a.call(this,t,i,l),this.shadows&&/^(width|height|visibility|x|y|d|transform|cx|cy|r)$/.test(i)&&this.updateShadows(i,t,a))},this),this.afterSetters()),i&&i(),c},afterSetters:function(){this.doTransform&&(this.updateTransform(),this.doTransform=!1)},updateShadows:function(e,t,i){for(var n=this.shadows,r=n.length;r--;)i.call(n[r],"height"===e?Math.max(t-(n[r].cutHeight||0),0):"d"===e?this.d:t,e,n[r])},addClass:function(e,t){var i=this.attr("class")||"";return-1===i.indexOf(e)&&(t||(e=(i+(i?" ":"")+e).replace("  "," ")),this.attr("class",e)),this},hasClass:function(e){return-1!==o(this.element,"class").indexOf(e)},removeClass:function(e){return o(this.element,"class",(o(this.element,"class")||"").replace(e,"")),this},symbolAttr:function(e){var t=this;g("x y r start end width height innerR anchorX anchorY".split(" "),function(i){t[i]=D(e[i],t[i])}),t.attr({d:t.renderer.symbols[t.symbolName](t.x,t.y,t.width,t.height,t)})},clip:function(e){return this.attr("clip-path",e?"url("+this.renderer.url+"#"+e.id+")":"none")},crisp:function(e,t){var i,n=this,r={};return t=t||e.strokeWidth||0,i=Math.round(t)%2/2,e.x=Math.floor(e.x||n.x||0)+i,e.y=Math.floor(e.y||n.y||0)+i,e.width=Math.floor((e.width||n.width||0)-2*i),e.height=Math.floor((e.height||n.height||0)-2*i),u(e.strokeWidth)&&(e.strokeWidth=t),k(e,function(e,t){n[t]!==e&&(n[t]=r[t]=e)}),r},css:function(e){var t,i,n=this.styles,r={},s=this.element,a="",c=!n,u=["textOutline","textOverflow","width"];return e&&e.color&&(e.fill=e.color),n&&k(e,function(e,t){e!==n[t]&&(r[t]=e,c=!0)}),c&&(n&&(e=f(n,r)),t=this.textWidth=e&&e.width&&"auto"!==e.width&&"text"===s.nodeName.toLowerCase()&&T(e.width),this.styles=e,t&&!R&&this.renderer.forExport&&delete e.width,A&&!R?l(this.element,e):(i=function(e,t){return"-"+t.toLowerCase()},k(e,function(e,t){-1===w(t,u)&&(a+=t.replace(/([A-Z])/g,i)+":"+e+";")}),a&&o(s,"style",a)),this.added&&("text"===this.element.nodeName&&this.renderer.buildText(this),e&&e.textOutline&&this.applyTextOutline(e.textOutline))),this},strokeWidth:function(){return this["stroke-width"]||0},on:function(e,t){var i=this,n=i.element;return y&&"click"===e?(n.ontouchstart=function(e){i.touchEventFired=Date.now(),e.preventDefault(),t.call(n,e)},n.onclick=function(e){(-1===P.navigator.userAgent.indexOf("Android")||1100<Date.now()-(i.touchEventFired||0))&&t.call(n,e)}):n["on"+e]=t,this},setRadialReference:function(e){var t=this.renderer.gradients[this.element.gradient];return this.element.radialReference=e,t&&t.radAttr&&t.animate(this.renderer.getRadialAttr(e,t.radAttr)),this},translate:function(e,t){return this.attr({translateX:e,translateY:t})},invert:function(e){return this.inverted=e,this.updateTransform(),this},updateTransform:function(){var e=this.translateX||0,t=this.translateY||0,i=this.scaleX,n=this.scaleY,r=this.inverted,o=this.rotation,s=this.element;r&&(e+=this.width,t+=this.height),e=["translate("+e+","+t+")"],r?e.push("rotate(90) scale(-1,1)"):o&&e.push("rotate("+o+" "+(s.getAttribute("x")||0)+" "+(s.getAttribute("y")||0)+")"),(u(i)||u(n))&&e.push("scale("+D(i,1)+" "+D(n,1)+")"),e.length&&s.setAttribute("transform",e.join(" "))},toFront:function(){var e=this.element;return e.parentNode.appendChild(e),this},align:function(e,t,i){var n,r,o,s,a={};r=this.renderer,o=r.alignedObjects;var l,c;return e?(this.alignOptions=e,this.alignByTranslate=t,(!i||S(i))&&(this.alignTo=n=i||"renderer",m(o,this),o.push(this),i=null)):(e=this.alignOptions,t=this.alignByTranslate,n=this.alignTo),i=D(i,r[n],r),n=e.align,r=e.verticalAlign,o=(i.x||0)+(e.x||0),s=(i.y||0)+(e.y||0),"right"===n?l=1:"center"===n&&(l=2),l&&(o+=(i.width-(e.width||0))/l),a[t?"translateX":"x"]=Math.round(o),"bottom"===r?c=1:"middle"===r&&(c=2),c&&(s+=(i.height-(e.height||0))/c),a[t?"translateY":"y"]=Math.round(s),this[this.placed?"animate":"attr"](a),this.placed=!0,this.alignAttr=a,this},getBBox:function(e,t){var i,n,r,o,s,a=this.renderer,l=this.element,c=this.styles,u=this.textStr,h=a.cache,p=a.cacheKeys;if(t=D(t,this.rotation),n=t*d,r=c&&c.fontSize,void 0!==u&&(s=u.toString(),-1===s.indexOf("<")&&(s=s.replace(/[0-9]/g,"0")),s+=["",t||0,r,c&&c.width,c&&c.textOverflow].join()),s&&!e&&(i=h[s]),!i){if(l.namespaceURI===this.SVG_NS||a.forExport){try{(o=this.fakeTS&&function(e){g(l.querySelectorAll(".highcharts-text-outline"),function(t){t.style.display=e})})&&o("none"),i=l.getBBox?f({},l.getBBox()):{width:l.offsetWidth,height:l.offsetHeight},o&&o("")}catch(e){}(!i||0>i.width)&&(i={width:0,height:0})}else i=this.htmlGetBBox();if(a.isSVG&&(e=i.width,a=i.height,c&&"11px"===c.fontSize&&17===Math.round(a)&&(i.height=a=14),t&&(i.width=Math.abs(a*Math.sin(n))+Math.abs(e*Math.cos(n)),i.height=Math.abs(a*Math.cos(n))+Math.abs(e*Math.sin(n)))),s&&0<i.height){for(;250<p.length;)delete h[p.shift()];h[s]||p.push(s),h[s]=i}}return i},show:function(e){return this.attr({visibility:e?"inherit":"visible"})},hide:function(){return this.attr({visibility:"hidden"})},fadeOut:function(e){var t=this;t.animate({opacity:0},{duration:e||150,complete:function(){t.attr({y:-9999})}})},add:function(e){var t,i=this.renderer,n=this.element;return e&&(this.parentGroup=e),this.parentInverted=e&&e.inverted,void 0!==this.textStr&&i.buildText(this),this.added=!0,(!e||e.handleZ||this.zIndex)&&(t=this.zIndexSetter()),t||(e?e.element:i.box).appendChild(n),this.onAdd&&this.onAdd(),this},safeRemoveChild:function(e){var t=e.parentNode;t&&t.removeChild(e)},destroy:function(){var e=this,t=e.element||{},i=e.renderer.isSVG&&"SPAN"===t.nodeName&&e.parentGroup,n=t.ownerSVGElement;if(t.onclick=t.onmouseout=t.onmouseover=t.onmousemove=t.point=null,L(e),e.clipPath&&n&&(g(n.querySelectorAll("[clip-path]"),function(t){-1<t.getAttribute("clip-path").indexOf(e.clipPath.element.id+")")&&t.removeAttribute("clip-path")}),e.clipPath=e.clipPath.destroy()),e.stops){for(n=0;n<e.stops.length;n++)e.stops[n]=e.stops[n].destroy();e.stops=null}for(e.safeRemoveChild(t),e.destroyShadows();i&&i.div&&0===i.div.childNodes.length;)t=i.parentGroup,e.safeRemoveChild(i.div),delete i.div,i=t;return e.alignTo&&m(e.renderer.alignedObjects,e),k(e,function(t,i){delete e[i]}),null},shadow:function(e,t,i){var n,r,s,a,l,c,u=[],d=this.element;if(e){if(!this.shadows){for(a=D(e.width,3),l=(e.opacity||.15)/a,c=this.parentInverted?"(-1,-1)":"("+D(e.offsetX,1)+", "+D(e.offsetY,1)+")",n=1;n<=a;n++)r=d.cloneNode(0),s=2*a+1-2*n,o(r,{isShadow:"true",stroke:e.color||"#000000","stroke-opacity":l*n,"stroke-width":s,transform:"translate"+c,fill:"none"}),i&&(o(r,"height",Math.max(o(r,"height")-s,0)),r.cutHeight=s),t?t.element.appendChild(r):d.parentNode.insertBefore(r,d),u.push(r);this.shadows=u}}else this.destroyShadows();return this},destroyShadows:function(){g(this.shadows||[],function(e){this.safeRemoveChild(e)},this),this.shadows=void 0},xGetter:function(e){return"circle"===this.element.nodeName&&("x"===e?e="cx":"y"===e&&(e="cy")),this._defaultGetter(e)},_defaultGetter:function(e){return e=D(this[e],this.element?this.element.getAttribute(e):null,0),/^[\-0-9\.]+$/.test(e)&&(e=parseFloat(e)),e},dSetter:function(e,t,i){e&&e.join&&(e=e.join(" ")),/(NaN| {2}|^$)/.test(e)&&(e="M 0 0"),i.setAttribute(t,e),this[t]=e},dashstyleSetter:function(e){var t,i=this["stroke-width"];if("inherit"===i&&(i=1),e=e&&e.toLowerCase()){for(e=e.replace("shortdashdotdot","3,1,1,1,1,1,").replace("shortdashdot","3,1,1,1").replace("shortdot","1,1,").replace("shortdash","3,1,").replace("longdash","8,3,").replace(/dot/g,"1,3,").replace("dash","4,3,").replace(/,$/,"").split(","),t=e.length;t--;)e[t]=T(e[t])*i;e=e.join(",").replace(/NaN/g,"none"),this.element.setAttribute("stroke-dasharray",e)}},alignSetter:function(e){this.element.setAttribute("text-anchor",{left:"start",center:"middle",right:"end"}[e])},opacitySetter:function(e,t,i){this[t]=e,i.setAttribute(t,e)},titleSetter:function(e){var t=this.element.getElementsByTagName("title")[0];t||(t=p.createElementNS(this.SVG_NS,"title"),this.element.appendChild(t)),t.firstChild&&t.removeChild(t.firstChild),t.appendChild(p.createTextNode(String(D(e),"").replace(/<[^>]*>/g,"")))},textSetter:function(e){e!==this.textStr&&(delete this.bBox,this.textStr=e,this.added&&this.renderer.buildText(this))},fillSetter:function(e,t,i){"string"==typeof e?i.setAttribute(t,e):e&&this.colorGradient(e,t,i)},visibilitySetter:function(e,t,i){"inherit"===e?i.removeAttribute(t):i.setAttribute(t,e)},zIndexSetter:function(e,t){var i,n,r=this.renderer,o=this.parentGroup,s=(o||r).element||r.box,a=this.element;i=this.added;var l;if(u(e)&&(a.zIndex=e,e=+e,this[t]===e&&(i=!1),this[t]=e),i){for((e=this.zIndex)&&o&&(o.handleZ=!0),t=s.childNodes,l=0;l<t.length&&!n;l++)o=t[l],i=o.zIndex,o!==a&&(T(i)>e||!u(e)&&u(i)||0>e&&!u(i)&&s!==r.box)&&(s.insertBefore(a,o),n=!0);n||s.appendChild(a)}return n},_defaultSetter:function(e,t,i){i.setAttribute(t,e)}}),t.prototype.yGetter=t.prototype.xGetter,t.prototype.translateXSetter=t.prototype.translateYSetter=t.prototype.rotationSetter=t.prototype.verticalAlignSetter=t.prototype.scaleXSetter=t.prototype.scaleYSetter=function(e,t){this[t]=e,this.doTransform=!0},t.prototype["stroke-widthSetter"]=t.prototype.strokeSetter=function(e,i,n){this[i]=e,this.stroke&&this["stroke-width"]?(t.prototype.fillSetter.call(this,this.stroke,"stroke",n),n.setAttribute("stroke-width",this["stroke-width"]),this.hasStroke=!0):"stroke-width"===i&&0===e&&this.hasStroke&&(n.removeAttribute("stroke"),this.hasStroke=!1)},i=e.SVGRenderer=function(){this.init.apply(this,arguments)},f(i.prototype,{Element:t,SVG_NS:_,init:function(e,t,i,r,s,a){var c;r=this.createElement("svg").attr({version:"1.1","class":"highcharts-root"}).css(this.getStyle(r)),c=r.element,e.appendChild(c),-1===e.innerHTML.indexOf("xmlns")&&o(c,"xmlns",this.SVG_NS),this.isSVG=!0,this.box=c,this.boxWrapper=r,this.alignedObjects=[],this.url=(b||E)&&p.getElementsByTagName("base").length?P.location.href.replace(/#.*?$/,"").replace(/<[^>]*>/g,"").replace(/([\('\)])/g,"\\$1").replace(/ /g,"%20"):"",this.createElement("desc").add().element.appendChild(p.createTextNode("Created with Highcharts 5.0.12")),this.defs=this.createElement("defs").add(),this.allowHTML=a,this.forExport=s,this.gradients={},this.cache={},this.cacheKeys=[],this.imgCount=0,this.setSize(t,i,!1);var u;b&&e.getBoundingClientRect&&(t=function(){l(e,{left:0,top:0}),u=e.getBoundingClientRect(),l(e,{left:Math.ceil(u.left)-u.left+"px",top:Math.ceil(u.top)-u.top+"px"})},t(),this.unSubPixelFix=n(P,"resize",t))},getStyle:function(e){return this.style=f({fontFamily:'"Lucida Grande", "Lucida Sans Unicode", Arial, Helvetica, sans-serif',fontSize:"12px"},e)},setStyle:function(e){this.boxWrapper.css(this.getStyle(e))},isHidden:function(){return!this.boxWrapper.getBBox().width},destroy:function(){var e=this.defs;return this.box=null,this.boxWrapper=this.boxWrapper.destroy(),h(this.gradients||{}),this.gradients=null,e&&(this.defs=e.destroy()),this.unSubPixelFix&&this.unSubPixelFix(),this.alignedObjects=null},createElement:function(e){var t=new this.Element;return t.init(this,e),t},draw:F,getRadialAttr:function(e,t){return{cx:e[0]-e[2]/2+t.cx*e[2],cy:e[1]-e[2]/2+t.cy*e[2],r:t.r*e[2]}},getSpanWidth:function(e,t){var i=e.getBBox(!0).width;return!R&&this.forExport&&(i=this.measureSpanWidth(t.firstChild.data,e.styles)),i},applyEllipsis:function(e,t,i,n){var r,o=this.getSpanWidth(e,t),s=o>n,o=i,a=0,l=i.length,c=function(e){t.removeChild(t.firstChild),e&&t.appendChild(p.createTextNode(e))};if(s){for(;a<=l;)r=Math.ceil((a+l)/2),o=i.substring(0,r)+"\u2026",c(o),o=this.getSpanWidth(e,t),a===l?a=l+1:o>n?l=r-1:a=r;0===l&&c("")}return s},buildText:function(e){var t,i,n,r,s,a,c=e.element,u=this,d=u.forExport,h=D(e.textStr,"").toString(),f=-1!==h.indexOf("<"),m=c.childNodes,y=o(c,"x"),w=e.styles,C=e.textWidth,b=w&&w.lineHeight,A=w&&w.textOutline,x=w&&"ellipsis"===w.textOverflow,S=w&&"nowrap"===w.whiteSpace,E=w&&w.fontSize,$=m.length,w=C&&!e.added&&this.box,F=function(e){var t;return t=/(px|em)$/.test(e&&e.style.fontSize)?e.style.fontSize:E||u.style.fontSize||12,b?T(b):u.fontMetrics(t,e.getAttribute("style")?e:c).h};if((s=[h,x,S,b,A,E,C].join())!==e.textCache){for(e.textCache=s;$--;)c.removeChild(m[$]);f||A||x||C||-1!==h.indexOf(" ")?(t=/<.*class="([^"]+)".*>/,i=/<.*style="([^"]+)".*>/,n=/<.*href="([^"]+)".*>/,w&&w.appendChild(c),h=f?h.replace(/<(b|strong)>/g,'<span style="font-weight:bold">').replace(/<(i|em)>/g,'<span style="font-style:italic">').replace(/<a/g,"<span").replace(/<\/(b|strong|i|em|a)>/g,"</span>").split(/<br.*?>/g):[h],h=v(h,function(e){return""!==e}),g(h,function(s,h){var f,m=0;s=s.replace(/^\s+|\s+$/g,"").replace(/<span/g,"|||<span").replace(/<\/span>/g,"</span>|||"),f=s.split("|||"),g(f,function(s){if(""!==s||1===f.length){var g,v,w={},b=p.createElementNS(u.SVG_NS,"tspan");if(t.test(s)&&(g=s.match(t)[1],o(b,"class",g)),i.test(s)&&(v=s.match(i)[1].replace(/(;| |^)color([ :])/,"$1fill$2"),o(b,"style",v)),n.test(s)&&!d&&(o(b,"onclick",'location.href="'+s.match(n)[1]+'"'),l(b,{cursor:"pointer"}))," "!==(s=(s.replace(/<(.|\n)*?>/g,"")||" ").replace(/&lt;/g,"<").replace(/&gt;/g,">"))){if(b.appendChild(p.createTextNode(s)),m?w.dx=0:h&&null!==y&&(w.x=y),o(b,w),c.appendChild(b),!m&&a&&(!R&&d&&l(b,{display:"block"}),o(b,"dy",F(b))),C){w=s.replace(/([^\^])-/g,"$1- ").split(" "),g=1<f.length||h||1<w.length&&!S;var A,E=[],$=F(b),k=e.rotation;for(x&&(r=u.applyEllipsis(e,b,s,C));!x&&g&&(w.length||E.length);)e.rotation=0,A=u.getSpanWidth(e,b),s=A>C,void 0===r&&(r=s),s&&1!==w.length?(b.removeChild(b.firstChild),E.unshift(w.pop())):(w=E,E=[],w.length&&!S&&(b=p.createElementNS(_,"tspan"),o(b,{dy:$,x:y}),v&&o(b,"style",v),c.appendChild(b)),A>C&&(C=A)),w.length&&b.appendChild(p.createTextNode(w.join(" ").replace(/- /g,"-")));e.rotation=k}m++}}}),a=a||c.childNodes.length}),r&&e.attr("title",e.textStr),w&&w.removeChild(c),A&&e.applyTextOutline&&e.applyTextOutline(A)):c.appendChild(p.createTextNode(h.replace(/&lt;/g,"<").replace(/&gt;/g,">")))}},getContrast:function(e){return e=a(e).rgba,510<e[0]+e[1]+e[2]?"#000000":"#FFFFFF"},button:function(e,t,i,r,o,s,a,l,c){var u=this.label(e,t,i,c,null,null,null,null,"button"),d=0;u.attr($({padding:8,r:2},o));var h,p,g,m;return o=$({fill:"#f7f7f7",stroke:"#cccccc","stroke-width":1,style:{color:"#333333",cursor:"pointer",fontWeight:"normal"}},o),h=o.style,delete o.style,s=$(o,{fill:"#e6e6e6"},s),p=s.style,delete s.style,a=$(o,{fill:"#e6ebf5",style:{color:"#000000",fontWeight:"bold"}},a),g=a.style,delete a.style,l=$(o,{style:{color:"#cccccc"}},l),m=l.style,delete l.style,n(u.element,A?"mouseover":"mouseenter",function(){3!==d&&u.setState(1)}),n(u.element,A?"mouseout":"mouseleave",function(){3!==d&&u.setState(d)}),u.setState=function(e){1!==e&&(u.state=d=e),u.removeClass(/highcharts-button-(normal|hover|pressed|disabled)/).addClass("highcharts-button-"+["normal","hover","pressed","disabled"][e||0]),u.attr([o,s,a,l][e||0]).css([h,p,g,m][e||0])},u.attr(o).css(f({cursor:"default"},h)),u.on("click",function(e){3!==d&&r.call(u,e)})},crispLine:function(e,t){return e[1]===e[4]&&(e[1]=e[4]=Math.round(e[1])-t%2/2),e[2]===e[5]&&(e[2]=e[5]=Math.round(e[2])+t%2/2),e},path:function(e){var t={fill:"none"};return C(e)?t.d=e:x(e)&&f(t,e),this.createElement("path").attr(t)},circle:function(e,t,i){return e=x(e)?e:{x:e,y:t,r:i},t=this.createElement("circle"),t.xSetter=t.ySetter=function(e,t,i){i.setAttribute("c"+t,e)},t.attr(e)},arc:function(e,t,i,n,r,o){return x(e)?(n=e,t=n.y,i=n.r,e=n.x):n={innerR:n,start:r,end:o},e=this.symbol("arc",e,t,i,i,n),e.r=i,e},rect:function(e,t,i,n,r,s){r=x(e)?e.r:r;var a=this.createElement("rect");return e=x(e)?e:void 0===e?{}:{x:e,y:t,width:Math.max(i,0),height:Math.max(n,0)},void 0!==s&&(e.strokeWidth=s,e=a.crisp(e)),e.fill="none",r&&(e.r=r),a.rSetter=function(e,t,i){o(i,{rx:e,ry:e})},a.attr(e)},setSize:function(e,t,i){var n=this.alignedObjects,r=n.length;for(this.width=e,this.height=t,this.boxWrapper.animate({width:e,height:t},{step:function(){this.attr({viewBox:"0 0 "+this.attr("width")+" "+this.attr("height")})},duration:D(i,!0)?void 0:0});r--;)n[r].align()},g:function(e){var t=this.createElement("g");return e?t.attr({"class":"highcharts-"+e}):t},image:function(e,t,i,n,r){var o={preserveAspectRatio:"none"};return 1<arguments.length&&f(o,{x:t,y:i,width:n,height:r}),o=this.createElement("image").attr(o),o.element.setAttributeNS?o.element.setAttributeNS("http://www.w3.org/1999/xlink","href",e):o.element.setAttribute("hc-svg-href",e),o},symbol:function(e,t,i,n,r,o){var a,d,h,m=this,v=/^url\((.*?)\)$/,y=v.test(e),w=!y&&(this.symbols[e]?e:"circle"),C=w&&this.symbols[w],b=u(t)&&C&&C.call(this.symbols,Math.round(t),Math.round(i),n,r,o);return C?(a=this.path(b),a.attr("fill","none"),f(a,{symbolName:w,x:t,y:i,width:n,height:r}),o&&f(a,o)):y&&(d=e.match(v)[1],a=this.image(d),a.imgwidth=D(B[d]&&B[d].width,o&&o.width),a.imgheight=D(B[d]&&B[d].height,o&&o.height),h=function(){a.attr({width:a.width,height:a.height})},g(["width","height"],function(e){a[e+"Setter"]=function(e,t){var i={},n=this["img"+t],r="width"===t?"translateX":"translateY";this[t]=e,u(n)&&(this.element&&this.element.setAttribute(t,n),this.alignByTranslate||(i[r]=((this[t]||0)-n)/2,this.attr(i)))}}),u(t)&&a.attr({x:t,y:i}),a.isImg=!0,u(a.imgwidth)&&u(a.imgheight)?h():(a.attr({width:0,height:0}),c("img",{onload:function(){var e=s[m.chartIndex];0===this.width&&(l(this,{position:"absolute",top:"-999em"}),p.body.appendChild(this)),B[d]={width:this.width,height:this.height},a.imgwidth=this.width,a.imgheight=this.height,a.element&&h(),this.parentNode&&this.parentNode.removeChild(this),!--m.imgCount&&e&&e.onload&&e.onload()},src:d}),this.imgCount++)),a},symbols:{circle:function(e,t,i,n){return this.arc(e+i/2,t+n/2,i/2,n/2,{start:0,end:2*Math.PI,open:!1})},square:function(e,t,i,n){return["M",e,t,"L",e+i,t,e+i,t+n,e,t+n,"Z"]},triangle:function(e,t,i,n){return["M",e+i/2,t,"L",e+i,t+n,e,t+n,"Z"]},"triangle-down":function(e,t,i,n){return["M",e,t,"L",e+i,t,e+i/2,t+n,"Z"]},diamond:function(e,t,i,n){return["M",e+i/2,t,"L",e+i,t+n/2,e+i/2,t+n,e,t+n/2,"Z"]},arc:function(e,t,i,n,r){var o=r.start,s=r.r||i,a=r.r||n||i,l=r.end-.001;i=r.innerR,n=r.open;var c=Math.cos(o),d=Math.sin(o),h=Math.cos(l),l=Math.sin(l);return r=r.end-o<Math.PI?0:1,s=["M",e+s*c,t+a*d,"A",s,a,0,r,1,e+s*h,t+a*l],u(i)&&s.push(n?"M":"L",e+i*h,t+i*l,"A",i,i,0,r,0,e+i*c,t+i*d),s.push(n?"":"Z"),s},callout:function(e,t,i,n,r){var o=Math.min(r&&r.r||0,i,n),s=o+6,a=r&&r.anchorX;r=r&&r.anchorY;var l;return l=["M",e+o,t,"L",e+i-o,t,"C",e+i,t,e+i,t,e+i,t+o,"L",e+i,t+n-o,"C",e+i,t+n,e+i,t+n,e+i-o,t+n,"L",e+o,t+n,"C",e,t+n,e,t+n,e,t+n-o,"L",e,t+o,"C",e,t,e,t,e+o,t],a&&a>i?r>t+s&&r<t+n-s?l.splice(13,3,"L",e+i,r-6,e+i+6,r,e+i,r+6,e+i,t+n-o):l.splice(13,3,"L",e+i,n/2,a,r,e+i,n/2,e+i,t+n-o):a&&0>a?r>t+s&&r<t+n-s?l.splice(33,3,"L",e,r+6,e-6,r,e,r-6,e,t+o):l.splice(33,3,"L",e,n/2,a,r,e,n/2,e,t+o):r&&r>n&&a>e+s&&a<e+i-s?l.splice(23,3,"L",a+6,t+n,a,t+n+6,a-6,t+n,e+o,t+n):r&&0>r&&a>e+s&&a<e+i-s&&l.splice(3,3,"L",a-6,t,a,t-6,a+6,t,i-o,t),l}},clipRect:function(t,i,n,r){var o=e.uniqueKey(),s=this.createElement("clipPath").attr({id:o}).add(this.defs);return t=this.rect(t,i,n,r,0).add(s),t.id=o,t.clipPath=s,t.count=0,t},text:function(e,t,i,n){var r=!R&&this.forExport,o={};return!n||!this.allowHTML&&this.forExport?(o.x=Math.round(t||0),i&&(o.y=Math.round(i)),(e||0===e)&&(o.text=e),e=this.createElement("text").attr(o),r&&e.css({position:"absolute"}),n||(e.xSetter=function(e,t,i){var n,r,o=i.getElementsByTagName("tspan"),s=i.getAttribute(t);for(r=0;r<o.length;r++)n=o[r],n.getAttribute(t)===s&&n.setAttribute(t,e);i.setAttribute(t,e)}),e):this.html(e,t,i)},fontMetrics:function(e,t){return e=e||t&&t.style&&t.style.fontSize||this.style&&this.style.fontSize,e=/px/.test(e)?T(e):/em/.test(e)?parseFloat(e)*(t?this.fontMetrics(null,t.parentNode).f:16):12,t=24>e?e+3:Math.round(1.2*e),{h:t,b:Math.round(.8*t),f:e}},rotCorr:function(e,t,i){var n=e;return t&&i&&(n=Math.max(n*Math.cos(t*d),4)),{x:-e/3*Math.sin(t*d),y:n}},label:function(i,n,r,o,s,a,l,c,d){var h,p,m,v,y,w,C,b,A,x,S,E,F,k=this,D=k.g("button"!==d&&"label"),T=D.text=k.text("",0,0,l).attr({zIndex:1}),L=0,R=3,_=0,B={},P=/^url\((.*?)\)$/.test(o),O=P;d&&D.addClass("highcharts-"+d),O=P,x=function(){return(b||0)%2/2},S=function(){var e=T.element.style,t={};p=(void 0===m||void 0===v||C)&&u(T.textStr)&&T.getBBox(),D.width=(m||p.width||0)+2*R+_,D.height=(v||p.height||0)+2*R,A=R+k.fontMetrics(e&&e.fontSize,T).b,O&&(h||(D.box=h=k.symbols[o]||P?k.symbol(o):k.rect(),h.addClass(("button"===d?"":"highcharts-label-box")+(d?" highcharts-"+d+"-box":"")),h.add(D),e=x(),t.x=e,t.y=(c?-A:0)+e),t.width=Math.round(D.width),t.height=Math.round(D.height),h.attr(f(t,B)),B={})},E=function(){var e,t=_+R;e=c?0:A,u(m)&&p&&("center"===C||"right"===C)&&(t+={center:.5,right:1}[C]*(m-p.width)),t===T.x&&e===T.y||(T.attr("x",t),void 0!==e&&T.attr("y",e)),T.x=t,T.y=e},F=function(e,t){h?h.attr(e,t):B[e]=t},D.onAdd=function(){T.add(D),D.attr({text:i||0===i?i:"",x:n,y:r}),h&&u(s)&&D.attr({anchorX:s,anchorY:a})},D.widthSetter=function(t){m=e.isNumber(t)?t:null},D.heightSetter=function(e){v=e},D["text-alignSetter"]=function(e){C=e},D.paddingSetter=function(e){u(e)&&e!==R&&(R=D.padding=e,E())},D.paddingLeftSetter=function(e){u(e)&&e!==_&&(_=e,E())},D.alignSetter=function(e){(e={left:0,center:.5,right:1}[e])!==L&&(L=e,p&&D.attr({x:y}))},D.textSetter=function(e){void 0!==e&&T.textSetter(e),S(),E()},D["stroke-widthSetter"]=function(e,t){e&&(O=!0),b=this["stroke-width"]=e,F(t,e)},D.strokeSetter=D.fillSetter=D.rSetter=function(e,t){"fill"===t&&e&&(O=!0),F(t,e)},D.anchorXSetter=function(e,t){s=D.anchorX=e,F(t,Math.round(e)-x()-y)},D.anchorYSetter=function(e,t){a=D.anchorY=e,F(t,e-w)},D.xSetter=function(e){D.x=e,L&&(e-=L*((m||p.width)+2*R)),y=Math.round(e),D.attr("translateX",y)},D.ySetter=function(e){w=D.y=Math.round(e),D.attr("translateY",w)};var I=D.css;return f(D,{css:function(e){if(e){var t={};e=$(e),g(D.textProps,function(i){void 0!==e[i]&&(t[i]=e[i],delete e[i])}),T.css(t)}return I.call(D,e)},getBBox:function(){return{width:p.width+2*R,height:p.height+2*R,x:p.x-R,y:p.y-R}},shadow:function(e){return e&&(S(),h&&h.shadow(e)),D},destroy:function(){M(D.element,"mouseenter"),M(D.element,"mouseleave"),T&&(T=T.destroy()),h&&(h=h.destroy()),t.prototype.destroy.call(D),D=k=S=E=F=null}})}}),e.Renderer=i}(e),function(e){var t=e.attr,i=e.createElement,n=e.css,r=e.defined,o=e.each,s=e.extend,a=e.isFirefox,l=e.isMS,c=e.isWebKit,u=e.pInt,d=e.SVGRenderer,h=e.win,p=e.wrap;s(e.SVGElement.prototype,{htmlCss:function(e){var t=this.element;return(t=e&&"SPAN"===t.tagName&&e.width)&&(delete e.width,this.textWidth=t,this.updateTransform()),e&&"ellipsis"===e.textOverflow&&(e.whiteSpace="nowrap",e.overflow="hidden"),this.styles=s(this.styles,e),n(this.element,e),this},htmlGetBBox:function(){var e=this.element;return"text"===e.nodeName&&(e.style.position="absolute"),{x:e.offsetLeft,y:e.offsetTop,width:e.offsetWidth,height:e.offsetHeight}},htmlUpdateTransform:function(){if(this.added){var e=this.renderer,t=this.element,i=this.translateX||0,s=this.translateY||0,a=this.x||0,l=this.y||0,d=this.textAlign||"left",h={left:0,center:.5,right:1}[d],p=this.styles;if(n(t,{marginLeft:i,marginTop:s}),this.shadows&&o(this.shadows,function(e){n(e,{marginLeft:i+1,marginTop:s+1})}),this.inverted&&o(t.childNodes,function(i){e.invertChild(i,t)}),"SPAN"===t.tagName){var g=this.rotation,f=u(this.textWidth),m=p&&p.whiteSpace,v=[g,d,t.innerHTML,this.textWidth,this.textAlign].join();v!==this.cTT&&(p=e.fontMetrics(t.style.fontSize).b,r(g)&&this.setSpanRotation(g,h,p),n(t,{width:"",whiteSpace:m||"nowrap"}),t.offsetWidth>f&&/[ \-]/.test(t.textContent||t.innerText)&&n(t,{width:f+"px",display:"block",whiteSpace:m||"normal"}),this.getSpanCorrection(t.offsetWidth,p,h,g,d)),n(t,{left:a+(this.xCorr||0)+"px",top:l+(this.yCorr||0)+"px"}),c&&(p=t.offsetHeight),this.cTT=v}}else this.alignOnAdd=!0},setSpanRotation:function(e,t,i){var r={},o=l?"-ms-transform":c?"-webkit-transform":a?"MozTransform":h.opera?"-o-transform":"";r[o]=r.transform="rotate("+e+"deg)",r[o+(a?"Origin":"-origin")]=r.transformOrigin=100*t+"% "+i+"px",n(this.element,r)},getSpanCorrection:function(e,t,i){this.xCorr=-e*i,this.yCorr=-t}}),s(d.prototype,{html:function(e,n,r){var a=this.createElement("span"),l=a.element,c=a.renderer,u=c.isSVG,d=function(e,t){o(["opacity","visibility"],function(i){p(e,i+"Setter",function(e,i,n,r){e.call(this,i,n,r),t[n]=i})})};return a.textSetter=function(e){e!==l.innerHTML&&delete this.bBox,l.innerHTML=this.textStr=e,a.htmlUpdateTransform()},u&&d(a,a.element.style),a.xSetter=a.ySetter=a.alignSetter=a.rotationSetter=function(e,t){"align"===t&&(t="textAlign"),a[t]=e,a.htmlUpdateTransform()},a.attr({text:e,x:Math.round(n),y:Math.round(r)}).css({fontFamily:this.style.fontFamily,fontSize:this.style.fontSize,position:"absolute"}),l.style.whiteSpace="nowrap",a.css=a.htmlCss,u&&(a.add=function(e){var n,r=c.box.parentNode,u=[];if(this.parentGroup=e){if(!(n=e.div)){for(;e;)u.push(e),e=e.parentGroup;o(u.reverse(),function(e){var o,l=t(e.element,"class");l&&(l={className:l}),n=e.div=e.div||i("div",l,{position:"absolute",left:(e.translateX||0)+"px",top:(e.translateY||0)+"px",display:e.display,opacity:e.opacity,pointerEvents:e.styles&&e.styles.pointerEvents},n||r),o=n.style,s(e,{on:function(){return a.on.apply({element:u[0].div},arguments),e},translateXSetter:function(t,i){o.left=t+"px",e[i]=t,e.doTransform=!0},translateYSetter:function(t,i){o.top=t+"px",e[i]=t,e.doTransform=!0}}),d(e,o)})}}else n=r;return n.appendChild(l),a.added=!0,a.alignOnAdd&&a.htmlUpdateTransform(),a}),a}})}(e),function(e){var t,i,n=e.createElement,r=e.css,o=e.defined,s=e.deg2rad,a=e.discardElement,l=e.doc,c=e.each,u=e.erase,d=e.extend;t=e.extendClass;var h=e.isArray,p=e.isNumber,g=e.isObject,f=e.merge;i=e.noop;var m=e.pick,v=e.pInt,y=e.SVGElement,w=e.SVGRenderer,C=e.win;e.svg||(i={docMode8:l&&8===l.documentMode,init:function(e,t){var i=["<",t,' filled="f" stroked="f"'],r=["position: ","absolute",";"],o="div"===t;("shape"===t||o)&&r.push("left:0;top:0;width:1px;height:1px;"),r.push("visibility: ",o?"hidden":"visible"),i.push(' style="',r.join(""),'"/>'),t&&(i=o||"span"===t||"img"===t?i.join(""):e.prepVML(i),this.element=n(i)),this.renderer=e},add:function(e){var t=this.renderer,i=this.element,n=t.box,r=e&&e.inverted,n=e?e.element||e:n;return e&&(this.parentGroup=e),r&&t.invertChild(i,n),n.appendChild(i),this.added=!0,this.alignOnAdd&&!this.deferUpdateTransform&&this.updateTransform(),this.onAdd&&this.onAdd(),this.className&&this.attr("class",this.className),this},updateTransform:y.prototype.htmlUpdateTransform,setSpanRotation:function(){var e=this.rotation,t=Math.cos(e*s),i=Math.sin(e*s);r(this.element,{filter:e?["progid:DXImageTransform.Microsoft.Matrix(M11=",t,", M12=",-i,", M21=",i,", M22=",t,", sizingMethod='auto expand')"].join(""):"none"})},getSpanCorrection:function(e,t,i,n,o){var a,l=n?Math.cos(n*s):1,c=n?Math.sin(n*s):0,u=m(this.elemHeight,this.element.offsetHeight);this.xCorr=0>l&&-e,this.yCorr=0>c&&-u,a=0>l*c,this.xCorr+=c*t*(a?1-i:i),this.yCorr-=l*t*(n?a?i:1-i:1),o&&"left"!==o&&(this.xCorr-=e*i*(0>l?-1:1),n&&(this.yCorr-=u*i*(0>c?-1:1)),r(this.element,{textAlign:o}))},pathToVML:function(e){for(var t=e.length,i=[];t--;)p(e[t])?i[t]=Math.round(10*e[t])-5:"Z"===e[t]?i[t]="x":(i[t]=e[t],!e.isArc||"wa"!==e[t]&&"at"!==e[t]||(i[t+5]===i[t+7]&&(i[t+7]+=e[t+7]>e[t+5]?1:-1),i[t+6]===i[t+8]&&(i[t+8]+=e[t+8]>e[t+6]?1:-1)));return i.join(" ")||"x"},clip:function(e){var t,i=this;return e?(t=e.members,u(t,i),t.push(i),i.destroyClip=function(){u(t,i)},e=e.getCSS(i)):(i.destroyClip&&i.destroyClip(),e={clip:i.docMode8?"inherit":"rect(auto)"}),i.css(e)},css:y.prototype.htmlCss,safeRemoveChild:function(e){e.parentNode&&a(e)},destroy:function(){return this.destroyClip&&this.destroyClip(),y.prototype.destroy.apply(this)},on:function(e,t){return this.element["on"+e]=function(){var e=C.event;e.target=e.srcElement,t(e)},this},cutOffPath:function(e,t){var i;return e=e.split(/[ ,]/),i=e.length,9!==i&&11!==i||(e[i-4]=e[i-2]=v(e[i-2])-10*t),e.join(" ")},shadow:function(e,t,i){
var r,o,s,a,l,c,u,d=[],h=this.element,p=this.renderer,g=h.style,f=h.path;if(f&&"string"!=typeof f.value&&(f="x"),l=f,e){for(c=m(e.width,3),u=(e.opacity||.15)/c,r=1;3>=r;r++)a=2*c+1-2*r,i&&(l=this.cutOffPath(f.value,a+.5)),s=['<shape isShadow="true" strokeweight="',a,'" filled="false" path="',l,'" coordsize="10 10" style="',h.style.cssText,'" />'],o=n(p.prepVML(s),null,{left:v(g.left)+m(e.offsetX,1),top:v(g.top)+m(e.offsetY,1)}),i&&(o.cutOff=a+1),s=['<stroke color="',e.color||"#000000",'" opacity="',u*r,'"/>'],n(p.prepVML(s),null,null,o),t?t.element.appendChild(o):h.parentNode.insertBefore(o,h),d.push(o);this.shadows=d}return this},updateShadows:i,setAttr:function(e,t){this.docMode8?this.element[e]=t:this.element.setAttribute(e,t)},classSetter:function(e){(this.added?this.element:this).className=e},dashstyleSetter:function(e,t,i){(i.getElementsByTagName("stroke")[0]||n(this.renderer.prepVML(["<stroke/>"]),null,null,i))[t]=e||"solid",this[t]=e},dSetter:function(e,t,i){var n=this.shadows;if(e=e||[],this.d=e.join&&e.join(" "),i.path=e=this.pathToVML(e),n)for(i=n.length;i--;)n[i].path=n[i].cutOff?this.cutOffPath(e,n[i].cutOff):e;this.setAttr(t,e)},fillSetter:function(e,t,i){var n=i.nodeName;"SPAN"===n?i.style.color=e:"IMG"!==n&&(i.filled="none"!==e,this.setAttr("fillcolor",this.renderer.color(e,i,t,this)))},"fill-opacitySetter":function(e,t,i){n(this.renderer.prepVML(["<",t.split("-")[0],' opacity="',e,'"/>']),null,null,i)},opacitySetter:i,rotationSetter:function(e,t,i){i=i.style,this[t]=i[t]=e,i.left=-Math.round(Math.sin(e*s)+1)+"px",i.top=Math.round(Math.cos(e*s))+"px"},strokeSetter:function(e,t,i){this.setAttr("strokecolor",this.renderer.color(e,i,t,this))},"stroke-widthSetter":function(e,t,i){i.stroked=!!e,this[t]=e,p(e)&&(e+="px"),this.setAttr("strokeweight",e)},titleSetter:function(e,t){this.setAttr(t,e)},visibilitySetter:function(e,t,i){"inherit"===e&&(e="visible"),this.shadows&&c(this.shadows,function(i){i.style[t]=e}),"DIV"===i.nodeName&&(e="hidden"===e?"-999em":0,this.docMode8||(i.style[t]=e?"visible":"hidden"),t="top"),i.style[t]=e},xSetter:function(e,t,i){this[t]=e,"x"===t?t="left":"y"===t&&(t="top"),this.updateClipping?(this[t]=e,this.updateClipping()):i.style[t]=e},zIndexSetter:function(e,t,i){i.style[t]=e}},i["stroke-opacitySetter"]=i["fill-opacitySetter"],e.VMLElement=i=t(y,i),i.prototype.ySetter=i.prototype.widthSetter=i.prototype.heightSetter=i.prototype.xSetter,i={Element:i,isIE8:-1<C.navigator.userAgent.indexOf("MSIE 8.0"),init:function(e,t,i){var n,r;if(this.alignedObjects=[],n=this.createElement("div").css({position:"relative"}),r=n.element,e.appendChild(n.element),this.isVML=!0,this.box=r,this.boxWrapper=n,this.gradients={},this.cache={},this.cacheKeys=[],this.imgCount=0,this.setSize(t,i,!1),!l.namespaces.hcv){l.namespaces.add("hcv","urn:schemas-microsoft-com:vml");try{l.createStyleSheet().cssText="hcv\\:fill, hcv\\:path, hcv\\:shape, hcv\\:stroke{ behavior:url(#default#VML); display: inline-block; } "}catch(e){l.styleSheets[0].cssText+="hcv\\:fill, hcv\\:path, hcv\\:shape, hcv\\:stroke{ behavior:url(#default#VML); display: inline-block; } "}}},isHidden:function(){return!this.box.offsetWidth},clipRect:function(e,t,i,n){var r=this.createElement(),o=g(e);return d(r,{members:[],count:0,left:(o?e.x:e)+1,top:(o?e.y:t)+1,width:(o?e.width:i)-1,height:(o?e.height:n)-1,getCSS:function(e){var t=e.element,i=t.nodeName,n=e.inverted,r=this.top-("shape"===i?t.offsetTop:0),o=this.left,t=o+this.width,s=r+this.height,r={clip:"rect("+Math.round(n?o:r)+"px,"+Math.round(n?s:t)+"px,"+Math.round(n?t:s)+"px,"+Math.round(n?r:o)+"px)"};return!n&&e.docMode8&&"DIV"===i&&d(r,{width:t+"px",height:s+"px"}),r},updateClipping:function(){c(r.members,function(e){e.element&&e.css(r.getCSS(e))})}})},color:function(t,i,r,o){var s,a,l,u=this,d=/^rgba/,h="none";if(t&&t.linearGradient?l="gradient":t&&t.radialGradient&&(l="pattern"),l){var p,g,f,m,v,y,w,C=t.linearGradient||t.radialGradient,b="";t=t.stops;var A,x=[],S=function(){a=['<fill colors="'+x.join(",")+'" opacity="',v,'" o:opacity2="',m,'" type="',l,'" ',b,'focus="100%" method="any" />'],n(u.prepVML(a),null,null,i)};if(f=t[0],A=t[t.length-1],0<f[0]&&t.unshift([0,f[1]]),1>A[0]&&t.push([1,A[1]]),c(t,function(t,i){d.test(t[1])?(s=e.color(t[1]),p=s.get("rgb"),g=s.get("a")):(p=t[1],g=1),x.push(100*t[0]+"% "+p),i?(v=g,y=p):(m=g,w=p)}),"fill"===r)if("gradient"===l)r=C.x1||C[0]||0,t=C.y1||C[1]||0,f=C.x2||C[2]||0,C=C.y2||C[3]||0,b='angle="'+(90-180*Math.atan((C-t)/(f-r))/Math.PI)+'"',S();else{var E,h=C.r,$=2*h,F=2*h,k=C.cx,D=C.cy,T=i.radialReference,h=function(){T&&(E=o.getBBox(),k+=(T[0]-E.x)/E.width-.5,D+=(T[1]-E.y)/E.height-.5,$*=T[2]/E.width,F*=T[2]/E.height),b='src="'+e.getOptions().global.VMLRadialGradientURL+'" size="'+$+","+F+'" origin="0.5,0.5" position="'+k+","+D+'" color2="'+w+'" ',S()};o.added?h():o.onAdd=h,h=y}else h=p}else d.test(t)&&"IMG"!==i.tagName?(s=e.color(t),o[r+"-opacitySetter"](s.get("a"),r,i),h=s.get("rgb")):(h=i.getElementsByTagName(r),h.length&&(h[0].opacity=1,h[0].type="solid"),h=t);return h},prepVML:function(e){var t=this.isIE8;return e=e.join(""),t?(e=e.replace("/>",' xmlns="urn:schemas-microsoft-com:vml" />'),e=-1===e.indexOf('style="')?e.replace("/>",' style="display:inline-block;behavior:url(#default#VML);" />'):e.replace('style="','style="display:inline-block;behavior:url(#default#VML);')):e=e.replace("<","<hcv:"),e},text:w.prototype.html,path:function(e){var t={coordsize:"10 10"};return h(e)?t.d=e:g(e)&&d(t,e),this.createElement("shape").attr(t)},circle:function(e,t,i){var n=this.symbol("circle");return g(e)&&(i=e.r,t=e.y,e=e.x),n.isCircle=!0,n.r=i,n.attr({x:e,y:t})},g:function(e){var t;return e&&(t={className:"highcharts-"+e,"class":"highcharts-"+e}),this.createElement("div").attr(t)},image:function(e,t,i,n,r){var o=this.createElement("img").attr({src:e});return 1<arguments.length&&o.attr({x:t,y:i,width:n,height:r}),o},createElement:function(e){return"rect"===e?this.symbol(e):w.prototype.createElement.call(this,e)},invertChild:function(e,t){var i=this;t=t.style;var n="IMG"===e.tagName&&e.style;r(e,{flip:"x",left:v(t.width)-(n?v(n.top):1),top:v(t.height)-(n?v(n.left):1),rotation:-90}),c(e.childNodes,function(t){i.invertChild(t,e)})},symbols:{arc:function(e,t,i,n,r){var o=r.start,s=r.end,a=r.r||i||n;i=r.innerR,n=Math.cos(o);var l=Math.sin(o),c=Math.cos(s),u=Math.sin(s);return 0==s-o?["x"]:(o=["wa",e-a,t-a,e+a,t+a,e+a*n,t+a*l,e+a*c,t+a*u],r.open&&!i&&o.push("e","M",e,t),o.push("at",e-i,t-i,e+i,t+i,e+i*c,t+i*u,e+i*n,t+i*l,"x","e"),o.isArc=!0,o)},circle:function(e,t,i,n,r){return r&&o(r.r)&&(i=n=2*r.r),r&&r.isCircle&&(e-=i/2,t-=n/2),["wa",e,t,e+i,t+n,e+i,t+n/2,e+i,t+n/2,"e"]},rect:function(e,t,i,n,r){return w.prototype.symbols[o(r)&&r.r?"callout":"square"].call(0,e,t,i,n,r)}}},e.VMLRenderer=t=function(){this.init.apply(this,arguments)},t.prototype=f(w.prototype,i),e.Renderer=t),w.prototype.measureSpanWidth=function(e,t){var i=l.createElement("span");return e=l.createTextNode(e),i.appendChild(e),r(i,t),this.box.appendChild(i),t=i.offsetWidth,a(i),t}}(e),function(e){function t(){var t=e.defaultOptions.global,i=l.moment;if(t.timezone){if(i)return function(e){return-i.tz(e,t.timezone).utcOffset()};e.error(25)}return t.useUTC&&t.getTimezoneOffset}function i(){var i,n=e.defaultOptions.global,s=n.useUTC,c=s?"getUTC":"get",u=s?"setUTC":"set";e.Date=i=n.Date||l.Date,i.hcTimezoneOffset=s&&n.timezoneOffset,i.hcGetTimezoneOffset=t(),i.hcMakeTime=function(e,t,n,r,l,c){var u;return s?(u=i.UTC.apply(0,arguments),u+=o(u)):u=new i(e,t,a(n,1),a(r,0),a(l,0),a(c,0)).getTime(),u},r("Minutes Hours Day Date Month FullYear".split(" "),function(e){i["hcGet"+e]=c+e}),r("Milliseconds Seconds Minutes Hours Date Month FullYear".split(" "),function(e){i["hcSet"+e]=u+e})}var n=e.color,r=e.each,o=e.getTZOffset,s=e.merge,a=e.pick,l=e.win;e.defaultOptions={colors:"#7cb5ec #434348 #90ed7d #f7a35c #8085e9 #f15c80 #e4d354 #2b908f #f45b5b #91e8e1".split(" "),symbols:["circle","diamond","square","triangle","triangle-down"],lang:{loading:"Loading...",months:"January February March April May June July August September October November December".split(" "),shortMonths:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),weekdays:"Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),decimalPoint:".",numericSymbols:"kMGTPE".split(""),resetZoom:"Reset zoom",resetZoomTitle:"Reset zoom level 1:1",thousandsSep:" "},global:{useUTC:!0,VMLRadialGradientURL:"http://code.highcharts.com/5.0.12/gfx/vml-radial-gradient.png"},chart:{borderRadius:0,defaultSeriesType:"line",ignoreHiddenSeries:!0,spacing:[10,10,15,10],resetZoomButton:{theme:{zIndex:20},position:{align:"right",x:-10,y:10}},width:null,height:null,borderColor:"#335cad",backgroundColor:"#ffffff",plotBorderColor:"#cccccc"},title:{text:"Chart title",align:"center",margin:15,widthAdjust:-44},subtitle:{text:"",align:"center",widthAdjust:-44},plotOptions:{},labels:{style:{position:"absolute",color:"#333333"}},legend:{enabled:!0,align:"center",layout:"horizontal",labelFormatter:function(){return this.name},borderColor:"#999999",borderRadius:0,navigation:{activeColor:"#003399",inactiveColor:"#cccccc"},itemStyle:{color:"#333333",fontSize:"12px",fontWeight:"bold",textOverflow:"ellipsis"},itemHoverStyle:{color:"#000000"},itemHiddenStyle:{color:"#cccccc"},shadow:!1,itemCheckboxStyle:{position:"absolute",width:"13px",height:"13px"},squareSymbol:!0,symbolPadding:5,verticalAlign:"bottom",x:0,y:0,title:{style:{fontWeight:"bold"}}},loading:{labelStyle:{fontWeight:"bold",position:"relative",top:"45%"},style:{position:"absolute",backgroundColor:"#ffffff",opacity:.5,textAlign:"center"}},tooltip:{enabled:!0,animation:e.svg,borderRadius:3,dateTimeLabelFormats:{millisecond:"%A, %b %e, %H:%M:%S.%L",second:"%A, %b %e, %H:%M:%S",minute:"%A, %b %e, %H:%M",hour:"%A, %b %e, %H:%M",day:"%A, %b %e, %Y",week:"Week from %A, %b %e, %Y",month:"%B %Y",year:"%Y"},footerFormat:"",padding:8,snap:e.isTouchDevice?25:10,backgroundColor:n("#f7f7f7").setOpacity(.85).get(),borderWidth:1,headerFormat:'<span style="font-size: 10px">{point.key}</span><br/>',pointFormat:'<span style="color:{point.color}">\u25cf</span> {series.name}: <b>{point.y}</b><br/>',shadow:!0,style:{color:"#333333",cursor:"default",fontSize:"12px",pointerEvents:"none",whiteSpace:"nowrap"}},credits:{enabled:!0,href:"http://www.highcharts.com",position:{align:"right",x:-10,verticalAlign:"bottom",y:-5},style:{cursor:"pointer",color:"#999999",fontSize:"9px"},text:"Highcharts.com"}},e.setOptions=function(t){return e.defaultOptions=s(!0,e.defaultOptions,t),i(),e.defaultOptions},e.getOptions=function(){return e.defaultOptions},e.defaultPlotOptions=e.defaultOptions.plotOptions,i()}(e),function(e){var t=e.correctFloat,i=e.defined,n=e.destroyObjectProperties,r=e.isNumber,o=e.merge,s=e.pick,a=e.deg2rad;e.Tick=function(e,t,i,n){this.axis=e,this.pos=t,this.type=i||"",this.isNewLabel=this.isNew=!0,i||n||this.addLabel()},e.Tick.prototype={addLabel:function(){var e,n=this.axis,r=n.options,a=n.chart,l=n.categories,c=n.names,u=this.pos,d=r.labels,h=n.tickPositions,p=u===h[0],g=u===h[h.length-1],c=l?s(l[u],c[u],u):u,l=this.label,h=h.info;n.isDatetimeAxis&&h&&(e=r.dateTimeLabelFormats[h.higherRanks[u]||h.unitName]),this.isFirst=p,this.isLast=g,r=n.labelFormatter.call({axis:n,chart:a,isFirst:p,isLast:g,dateTimeLabelFormat:e,value:n.isLog?t(n.lin2log(c)):c}),i(l)?l&&l.attr({text:r}):(this.labelLength=(this.label=l=i(r)&&d.enabled?a.renderer.text(r,0,0,d.useHTML).css(o(d.style)).add(n.labelGroup):null)&&l.getBBox().width,this.rotation=0)},getLabelSize:function(){return this.label?this.label.getBBox()[this.axis.horiz?"height":"width"]:0},handleOverflow:function(e){var t,i=this.axis,n=e.x,r=i.chart.chartWidth,o=i.chart.spacing,l=s(i.labelLeft,Math.min(i.pos,o[3])),o=s(i.labelRight,Math.max(i.pos+i.len,r-o[1])),c=this.label,u=this.rotation,d={left:0,center:.5,right:1}[i.labelAlign],h=c.getBBox().width,p=i.getSlotWidth(),g=p,f=1,m={};u?0>u&&n-d*h<l?t=Math.round(n/Math.cos(u*a)-l):0<u&&n+d*h>o&&(t=Math.round((r-n)/Math.cos(u*a))):(r=n+(1-d)*h,n-d*h<l?g=e.x+g*(1-d)-l:r>o&&(g=o-e.x+g*d,f=-1),g=Math.min(p,g),g<p&&"center"===i.labelAlign&&(e.x+=f*(p-g-d*(p-Math.min(h,g)))),(h>g||i.autoRotation&&(c.styles||{}).width)&&(t=g)),t&&(m.width=t,(i.options.labels.style||{}).textOverflow||(m.textOverflow="ellipsis"),c.css(m))},getPosition:function(e,t,i,n){var r=this.axis,o=r.chart,s=n&&o.oldChartHeight||o.chartHeight;return{x:e?r.translate(t+i,null,null,n)+r.transB:r.left+r.offset+(r.opposite?(n&&o.oldChartWidth||o.chartWidth)-r.right-r.left:0),y:e?s-r.bottom+r.offset-(r.opposite?r.height:0):s-r.translate(t+i,null,null,n)-r.transB}},getLabelPosition:function(e,t,n,r,o,s,l,c){var u=this.axis,d=u.transA,h=u.reversed,p=u.staggerLines,g=u.tickRotCorr||{x:0,y:0},f=o.y;return i(f)||(f=0===u.side?n.rotation?-8:-n.getBBox().height:2===u.side?g.y+8:Math.cos(n.rotation*a)*(g.y-n.getBBox(!1,0).height/2)),e=e+o.x+g.x-(s&&r?s*d*(h?-1:1):0),t=t+f-(s&&!r?s*d*(h?1:-1):0),p&&(n=l/(c||1)%p,u.opposite&&(n=p-n-1),t+=u.labelOffset/p*n),{x:e,y:Math.round(t)}},getMarkPath:function(e,t,i,n,r,o){return o.crispLine(["M",e,t,"L",e+(r?0:-i),t+(r?i:0)],n)},renderGridLine:function(e,t,i){var n=this.axis,r=n.options,o=this.gridLine,s={},a=this.pos,l=this.type,c=n.tickmarkOffset,u=n.chart.renderer,d=l?l+"Grid":"grid",h=r[d+"LineWidth"],p=r[d+"LineColor"],r=r[d+"LineDashStyle"];o||(s.stroke=p,s["stroke-width"]=h,r&&(s.dashstyle=r),l||(s.zIndex=1),e&&(s.opacity=0),this.gridLine=o=u.path().attr(s).addClass("highcharts-"+(l?l+"-":"")+"grid-line").add(n.gridGroup)),!e&&o&&(e=n.getPlotLinePath(a+c,o.strokeWidth()*i,e,!0))&&o[this.isNew?"attr":"animate"]({d:e,opacity:t})},renderMark:function(e,t,i){var n=this.axis,r=n.options,o=n.chart.renderer,a=this.type,l=a?a+"Tick":"tick",c=n.tickSize(l),u=this.mark,d=!u,h=e.x;e=e.y;var p=s(r[l+"Width"],!a&&n.isXAxis?1:0),r=r[l+"Color"];c&&(n.opposite&&(c[0]=-c[0]),d&&(this.mark=u=o.path().addClass("highcharts-"+(a?a+"-":"")+"tick").add(n.axisGroup),u.attr({stroke:r,"stroke-width":p})),u[d?"attr":"animate"]({d:this.getMarkPath(h,e,c[0],u.strokeWidth()*i,n.horiz,o),opacity:t}))},renderLabel:function(e,t,i,n){var o=this.axis,a=o.horiz,l=o.options,c=this.label,u=l.labels,d=u.step,h=o.tickmarkOffset,p=!0,g=e.x;e=e.y,c&&r(g)&&(c.xy=e=this.getLabelPosition(g,e,c,a,u,h,n,d),this.isFirst&&!this.isLast&&!s(l.showFirstLabel,1)||this.isLast&&!this.isFirst&&!s(l.showLastLabel,1)?p=!1:!a||o.isRadial||u.step||u.rotation||t||0===i||this.handleOverflow(e),d&&n%d&&(p=!1),p&&r(e.y)?(e.opacity=i,c[this.isNewLabel?"attr":"animate"](e),this.isNewLabel=!1):(c.attr("y",-9999),this.isNewLabel=!0),this.isNew=!1)},render:function(e,t,i){var n=this.axis,r=n.horiz,o=this.getPosition(r,this.pos,n.tickmarkOffset,t),a=o.x,l=o.y,n=r&&a===n.pos+n.len||!r&&l===n.pos?-1:1;i=s(i,1),this.isActive=!0,this.renderGridLine(t,i,n),this.renderMark(o,i,n),this.renderLabel(o,t,i,e)},destroy:function(){n(this,this.axis)}}}(e);var t=function(e){var t=e.addEvent,i=e.animObject,n=e.arrayMax,r=e.arrayMin,o=e.color,s=e.correctFloat,a=e.defaultOptions,l=e.defined,c=e.deg2rad,u=e.destroyObjectProperties,d=e.each,h=e.extend,p=e.fireEvent,g=e.format,f=e.getMagnitude,m=e.grep,v=e.inArray,y=e.isArray,w=e.isNumber,C=e.isString,b=e.merge,A=e.normalizeTickInterval,x=e.objectEach,S=e.pick,E=e.removeEvent,$=e.splat,F=e.syncTimeout,k=e.Tick,D=function(){this.init.apply(this,arguments)};return e.extend(D.prototype,{defaultOptions:{dateTimeLabelFormats:{millisecond:"%H:%M:%S.%L",second:"%H:%M:%S",minute:"%H:%M",hour:"%H:%M",day:"%e. %b",week:"%e. %b",month:"%b '%y",year:"%Y"},endOnTick:!1,labels:{enabled:!0,style:{color:"#666666",cursor:"default",fontSize:"11px"},x:0},minPadding:.01,maxPadding:.01,minorTickLength:2,minorTickPosition:"outside",startOfWeek:1,startOnTick:!1,tickLength:10,tickmarkPlacement:"between",tickPixelInterval:100,tickPosition:"outside",title:{align:"middle",style:{color:"#666666"}},type:"linear",minorGridLineColor:"#f2f2f2",minorGridLineWidth:1,minorTickColor:"#999999",lineColor:"#ccd6eb",lineWidth:1,gridLineColor:"#e6e6e6",tickColor:"#ccd6eb"},defaultYAxisOptions:{endOnTick:!0,tickPixelInterval:72,showLastLabel:!0,labels:{x:-8},maxPadding:.05,minPadding:.05,startOnTick:!0,title:{rotation:270,text:"Values"},stackLabels:{enabled:!1,formatter:function(){return e.numberFormat(this.total,-1)},style:{fontSize:"11px",fontWeight:"bold",color:"#000000",textOutline:"1px contrast"}},gridLineWidth:1,lineWidth:0},defaultLeftAxisOptions:{labels:{x:-15},title:{rotation:270}},defaultRightAxisOptions:{labels:{x:15},title:{rotation:90}},defaultBottomAxisOptions:{labels:{autoRotation:[-45],x:0},title:{rotation:0}},defaultTopAxisOptions:{labels:{autoRotation:[-45],x:0},title:{rotation:0}},init:function(e,i){var n=i.isX,r=this;r.chart=e,r.horiz=e.inverted&&!r.isZAxis?!n:n,r.isXAxis=n,r.coll=r.coll||(n?"xAxis":"yAxis"),r.opposite=i.opposite,r.side=i.side||(r.horiz?r.opposite?0:2:r.opposite?1:3),r.setOptions(i);var o=this.options,s=o.type;r.labelFormatter=o.labels.formatter||r.defaultLabelFormatter,r.userOptions=i,r.minPixelPadding=0,r.reversed=o.reversed,r.visible=!1!==o.visible,r.zoomEnabled=!1!==o.zoomEnabled,r.hasNames="category"===s||!0===o.categories,r.categories=o.categories||r.hasNames,r.names=r.names||[],r.plotLinesAndBandsGroups={},r.isLog="logarithmic"===s,r.isDatetimeAxis="datetime"===s,r.positiveValuesOnly=r.isLog&&!r.allowNegativeLog,r.isLinked=l(o.linkedTo),r.ticks={},r.labelEdge=[],r.minorTicks={},r.plotLinesAndBands=[],r.alternateBands={},r.len=0,r.minRange=r.userMinRange=o.minRange||o.maxZoom,r.range=o.range,r.offset=o.offset||0,r.stacks={},r.oldStacks={},r.stacksTouched=0,r.max=null,r.min=null,r.crosshair=S(o.crosshair,$(e.options.tooltip.crosshairs)[n?0:1],!1),i=r.options.events,-1===v(r,e.axes)&&(n?e.axes.splice(e.xAxis.length,0,r):e.axes.push(r),e[r.coll].push(r)),r.series=r.series||[],e.inverted&&!r.isZAxis&&n&&void 0===r.reversed&&(r.reversed=!0),x(i,function(e,i){t(r,i,e)}),r.lin2log=o.linearToLogConverter||r.lin2log,r.isLog&&(r.val2lin=r.log2lin,r.lin2val=r.lin2log)},setOptions:function(e){this.options=b(this.defaultOptions,"yAxis"===this.coll&&this.defaultYAxisOptions,[this.defaultTopAxisOptions,this.defaultRightAxisOptions,this.defaultBottomAxisOptions,this.defaultLeftAxisOptions][this.side],b(a[this.coll],e))},defaultLabelFormatter:function(){var t,i=this.axis,n=this.value,r=i.categories,o=this.dateTimeLabelFormat,s=a.lang,l=s.numericSymbols,s=s.numericSymbolMagnitude||1e3,c=l&&l.length,u=i.options.labels.format,i=i.isLog?Math.abs(n):i.tickInterval;if(u)t=g(u,this);else if(r)t=n;else if(o)t=e.dateFormat(o,n);else if(c&&1e3<=i)for(;c--&&void 0===t;)r=Math.pow(s,c+1),i>=r&&0==10*n%r&&null!==l[c]&&0!==n&&(t=e.numberFormat(n/r,-1)+l[c]);return void 0===t&&(t=1e4<=Math.abs(n)?e.numberFormat(n,-1):e.numberFormat(n,-1,void 0,"")),t},getSeriesExtremes:function(){var e=this,t=e.chart;e.hasVisibleSeries=!1,e.dataMin=e.dataMax=e.threshold=null,e.softThreshold=!e.isXAxis,e.buildStacks&&e.buildStacks(),d(e.series,function(i){if(i.visible||!t.options.chart.ignoreHiddenSeries){var o,s=i.options,a=s.threshold;e.hasVisibleSeries=!0,e.positiveValuesOnly&&0>=a&&(a=null),e.isXAxis?(s=i.xData,s.length&&(i=r(s),w(i)||i instanceof Date||(s=m(s,function(e){return w(e)}),i=r(s)),e.dataMin=Math.min(S(e.dataMin,s[0]),i),e.dataMax=Math.max(S(e.dataMax,s[0]),n(s)))):(i.getExtremes(),o=i.dataMax,i=i.dataMin,l(i)&&l(o)&&(e.dataMin=Math.min(S(e.dataMin,i),i),e.dataMax=Math.max(S(e.dataMax,o),o)),l(a)&&(e.threshold=a),(!s.softThreshold||e.positiveValuesOnly)&&(e.softThreshold=!1))}})},translate:function(e,t,i,n,r,o){var s=this.linkedParent||this,a=1,l=0,c=n?s.oldTransA:s.transA;n=n?s.oldMin:s.min;var u=s.minPixelPadding;return r=(s.isOrdinal||s.isBroken||s.isLog&&r)&&s.lin2val,c||(c=s.transA),i&&(a*=-1,l=s.len),s.reversed&&(a*=-1,l-=a*(s.sector||s.len)),t?(e=(e*a+l-u)/c+n,r&&(e=s.lin2val(e))):(r&&(e=s.val2lin(e)),e=a*(e-n)*c+l+a*u+(w(o)?c*o:0)),e},toPixels:function(e,t){return this.translate(e,!1,!this.horiz,null,!0)+(t?0:this.pos)},toValue:function(e,t){return this.translate(e-(t?0:this.pos),!0,!this.horiz,null,!0)},getPlotLinePath:function(e,t,i,n,r){var o,s,a,l=this.chart,c=this.left,u=this.top,d=i&&l.oldChartHeight||l.chartHeight,h=i&&l.oldChartWidth||l.chartWidth;o=this.transB;var p=function(e,t,i){return(e<t||e>i)&&(n?e=Math.min(Math.max(t,e),i):a=!0),e};return r=S(r,this.translate(e,null,null,i)),e=i=Math.round(r+o),o=s=Math.round(d-r-o),w(r)?this.horiz?(o=u,s=d-this.bottom,e=i=p(e,c,c+this.width)):(e=c,i=h-this.right,o=s=p(o,u,u+this.height)):a=!0,a&&!n?null:l.renderer.crispLine(["M",e,o,"L",i,s],t||1)},getLinearTickPositions:function(e,t,i){var n,r=s(Math.floor(t/e)*e);i=s(Math.ceil(i/e)*e);var o=[];if(this.single)return[t];for(t=r;t<=i&&(o.push(t),(t=s(t+e))!==n);)n=t;return o},getMinorTickPositions:function(){var e=this,t=e.options,i=e.tickPositions,n=e.minorTickInterval,r=[],o=e.pointRangePadding||0,s=e.min-o,o=e.max+o,a=o-s;if(a&&a/n<e.len/3)if(e.isLog)d(this.paddedTicks,function(t,i,o){i&&r.push.apply(r,e.getLogTickPositions(n,o[i-1],o[i],!0))});else if(e.isDatetimeAxis&&"auto"===t.minorTickInterval)r=r.concat(e.getTimeTicks(e.normalizeTimeTickInterval(n),s,o,t.startOfWeek));else for(t=s+(i[0]-s)%n;t<=o&&t!==r[0];t+=n)r.push(t);return 0!==r.length&&e.trimTicks(r),r},adjustForMinRange:function(){var e,t,i,o,s,a,c,u,h=this.options,p=this.min,g=this.max;this.isXAxis&&void 0===this.minRange&&!this.isLog&&(l(h.min)||l(h.max)?this.minRange=null:(d(this.series,function(e){for(a=e.xData,o=c=e.xIncrement?1:a.length-1;0<o;o--)s=a[o]-a[o-1],(void 0===i||s<i)&&(i=s)}),this.minRange=Math.min(5*i,this.dataMax-this.dataMin))),g-p<this.minRange&&(t=this.dataMax-this.dataMin>=this.minRange,u=this.minRange,e=(u-g+p)/2,e=[p-e,S(h.min,p-e)],t&&(e[2]=this.isLog?this.log2lin(this.dataMin):this.dataMin),p=n(e),g=[p+u,S(h.max,p+u)],t&&(g[2]=this.isLog?this.log2lin(this.dataMax):this.dataMax),(g=r(g))-p<u&&(e[0]=g-u,e[1]=S(h.min,g-u),p=n(e))),this.min=p,this.max=g},getClosest:function(){var e;return this.categories?e=1:d(this.series,function(t){var i=t.closestPointRange,n=t.visible||!t.chart.options.chart.ignoreHiddenSeries;!t.noSharedTooltip&&l(i)&&n&&(e=l(e)?Math.min(e,i):i)}),e},nameToX:function(e){var t,i=y(this.categories),n=i?this.categories:this.names,r=e.options.x;return e.series.requireSorting=!1,l(r)||(r=!1===this.options.uniqueNames?e.series.autoIncrement():v(e.name,n)),-1===r?i||(t=n.length):t=r,void 0!==t&&(this.names[t]=e.name),t},updateNames:function(){var e=this;0<this.names.length&&(this.names.length=0,this.minRange=this.userMinRange,d(this.series||[],function(t){t.xIncrement=null,t.points&&!t.isDirtyData||(t.processData(),t.generatePoints()),d(t.points,function(i,n){var r;i.options&&void 0!==(r=e.nameToX(i))&&r!==i.x&&(i.x=r,t.xData[n]=r)})}))},setAxisTranslation:function(e){var t,i=this,n=i.max-i.min,r=i.axisPointRange||0,o=0,s=0,a=i.linkedParent,l=!!i.categories,c=i.transA,u=i.isXAxis;(u||l||r)&&(t=i.getClosest(),a?(o=a.minPointOffset,s=a.pointRangePadding):d(i.series,function(e){var n=l?1:u?S(e.options.pointRange,t,0):i.axisPointRange||0;e=e.options.pointPlacement,r=Math.max(r,n),i.single||(o=Math.max(o,C(e)?0:n/2),s=Math.max(s,"on"===e?0:n))}),a=i.ordinalSlope&&t?i.ordinalSlope/t:1,i.minPointOffset=o*=a,i.pointRangePadding=s*=a,i.pointRange=Math.min(r,n),u&&(i.closestPointRange=t)),e&&(i.oldTransA=c),i.translationSlope=i.transA=c=i.options.staticScale||i.len/(n+s||1),i.transB=i.horiz?i.left:i.bottom,i.minPixelPadding=c*o},minFromRange:function(){return this.max-this.range},setTickInterval:function(t){var i,n,r,o,a=this,c=a.chart,u=a.options,h=a.isLog,g=a.log2lin,m=a.isDatetimeAxis,v=a.isXAxis,y=a.isLinked,C=u.maxPadding,b=u.minPadding,x=u.tickInterval,E=u.tickPixelInterval,$=a.categories,F=a.threshold,k=a.softThreshold;m||$||y||this.getTickAmount(),r=S(a.userMin,u.min),o=S(a.userMax,u.max),y?(a.linkedParent=c[a.coll][u.linkedTo],c=a.linkedParent.getExtremes(),a.min=S(c.min,c.dataMin),a.max=S(c.max,c.dataMax),u.type!==a.linkedParent.options.type&&e.error(11,1)):(!k&&l(F)&&(a.dataMin>=F?(i=F,b=0):a.dataMax<=F&&(n=F,C=0)),a.min=S(r,i,a.dataMin),a.max=S(o,n,a.dataMax)),h&&(a.positiveValuesOnly&&!t&&0>=Math.min(a.min,S(a.dataMin,a.min))&&e.error(10,1),a.min=s(g(a.min),15),a.max=s(g(a.max),15)),a.range&&l(a.max)&&(a.userMin=a.min=r=Math.max(a.min,a.minFromRange()),a.userMax=o=a.max,a.range=null),p(a,"foundExtremes"),a.beforePadding&&a.beforePadding(),a.adjustForMinRange(),!($||a.axisPointRange||a.usePercentage||y)&&l(a.min)&&l(a.max)&&(g=a.max-a.min)&&(!l(r)&&b&&(a.min-=g*b),!l(o)&&C&&(a.max+=g*C)),w(u.softMin)&&(a.min=Math.min(a.min,u.softMin)),w(u.softMax)&&(a.max=Math.max(a.max,u.softMax)),w(u.floor)&&(a.min=Math.max(a.min,u.floor)),w(u.ceiling)&&(a.max=Math.min(a.max,u.ceiling)),k&&l(a.dataMin)&&(F=F||0,!l(r)&&a.min<F&&a.dataMin>=F?a.min=F:!l(o)&&a.max>F&&a.dataMax<=F&&(a.max=F)),a.tickInterval=a.min===a.max||void 0===a.min||void 0===a.max?1:y&&!x&&E===a.linkedParent.options.tickPixelInterval?x=a.linkedParent.tickInterval:S(x,this.tickAmount?(a.max-a.min)/Math.max(this.tickAmount-1,1):void 0,$?1:(a.max-a.min)*E/Math.max(a.len,E)),v&&!t&&d(a.series,function(e){e.processData(a.min!==a.oldMin||a.max!==a.oldMax)}),a.setAxisTranslation(!0),a.beforeSetTickPositions&&a.beforeSetTickPositions(),a.postProcessTickInterval&&(a.tickInterval=a.postProcessTickInterval(a.tickInterval)),a.pointRange&&!x&&(a.tickInterval=Math.max(a.pointRange,a.tickInterval)),t=S(u.minTickInterval,a.isDatetimeAxis&&a.closestPointRange),!x&&a.tickInterval<t&&(a.tickInterval=t),m||h||x||(a.tickInterval=A(a.tickInterval,null,f(a.tickInterval),S(u.allowDecimals,!(.5<a.tickInterval&&5>a.tickInterval&&1e3<a.max&&9999>a.max)),!!this.tickAmount)),this.tickAmount||(a.tickInterval=a.unsquish()),this.setTickPositions()},setTickPositions:function(){var e,t=this.options,i=t.tickPositions,n=t.tickPositioner,r=t.startOnTick,o=t.endOnTick;this.tickmarkOffset=this.categories&&"between"===t.tickmarkPlacement&&1===this.tickInterval?.5:0,this.minorTickInterval="auto"===t.minorTickInterval&&this.tickInterval?this.tickInterval/5:t.minorTickInterval,this.single=this.min===this.max&&l(this.min)&&!this.tickAmount&&(parseInt(this.min,10)===this.min||!1!==t.allowDecimals),this.tickPositions=e=i&&i.slice(),!e&&(e=this.isDatetimeAxis?this.getTimeTicks(this.normalizeTimeTickInterval(this.tickInterval,t.units),this.min,this.max,t.startOfWeek,this.ordinalPositions,this.closestPointRange,!0):this.isLog?this.getLogTickPositions(this.tickInterval,this.min,this.max):this.getLinearTickPositions(this.tickInterval,this.min,this.max),e.length>this.len&&(e=[e[0],e.pop()]),this.tickPositions=e,n&&(n=n.apply(this,[this.min,this.max])))&&(this.tickPositions=e=n),this.paddedTicks=e.slice(0),this.trimTicks(e,r,o),this.isLinked||(this.single&&(this.min-=.5,this.max+=.5),i||n||this.adjustTickAmount())},trimTicks:function(e,t,i){var n=e[0],r=e[e.length-1],o=this.minPointOffset||0;if(!this.isLinked){if(t&&-Infinity!==n)this.min=n;else for(;this.min-o>e[0];)e.shift();if(i)this.max=r;else for(;this.max+o<e[e.length-1];)e.pop();0===e.length&&l(n)&&e.push((r+n)/2)}},alignToOthers:function(){var e,t={},i=this.options;return!1===this.chart.options.chart.alignTicks||!1===i.alignTicks||this.isLog||d(this.chart[this.coll],function(i){var n=i.options,n=[i.horiz?n.left:n.top,n.width,n.height,n.pane].join();i.series.length&&(t[n]?e=!0:t[n]=1)}),e},getTickAmount:function(){var e=this.options,t=e.tickAmount,i=e.tickPixelInterval;!l(e.tickInterval)&&this.len<i&&!this.isRadial&&!this.isLog&&e.startOnTick&&e.endOnTick&&(t=2),!t&&this.alignToOthers()&&(t=Math.ceil(this.len/i)+1),4>t&&(this.finalTickAmt=t,t=5),this.tickAmount=t},adjustTickAmount:function(){var e=this.tickInterval,t=this.tickPositions,i=this.tickAmount,n=this.finalTickAmt,r=t&&t.length;if(r<i){for(;t.length<i;)t.push(s(t[t.length-1]+e));this.transA*=(r-1)/(i-1),this.max=t[t.length-1]}else r>i&&(this.tickInterval*=2,this.setTickPositions());if(l(n)){for(e=i=t.length;e--;)(3===n&&1==e%2||2>=n&&0<e&&e<i-1)&&t.splice(e,1);this.finalTickAmt=void 0}},setScale:function(){var e,t;this.oldMin=this.min,this.oldMax=this.max,this.oldAxisLength=this.len,this.setAxisSize(),t=this.len!==this.oldAxisLength,d(this.series,function(t){(t.isDirtyData||t.isDirty||t.xAxis.isDirty)&&(e=!0)}),t||e||this.isLinked||this.forceRedraw||this.userMin!==this.oldUserMin||this.userMax!==this.oldUserMax||this.alignToOthers()?(this.resetStacks&&this.resetStacks(),this.forceRedraw=!1,this.getSeriesExtremes(),this.setTickInterval(),this.oldUserMin=this.userMin,this.oldUserMax=this.userMax,this.isDirty||(this.isDirty=t||this.min!==this.oldMin||this.max!==this.oldMax)):this.cleanStacks&&this.cleanStacks()},setExtremes:function(e,t,i,n,r){var o=this,s=o.chart;i=S(i,!0),d(o.series,function(e){delete e.kdTree}),r=h(r,{min:e,max:t}),p(o,"setExtremes",r,function(){o.userMin=e,o.userMax=t,o.eventArgs=r,i&&s.redraw(n)})},zoom:function(e,t){var i=this.dataMin,n=this.dataMax,r=this.options,o=Math.min(i,S(r.min,i)),r=Math.max(n,S(r.max,n));return e===this.min&&t===this.max||(this.allowZoomOutside||(l(i)&&(e<o&&(e=o),e>r&&(e=r)),l(n)&&(t<o&&(t=o),t>r&&(t=r))),this.displayBtn=void 0!==e||void 0!==t,this.setExtremes(e,t,!1,void 0,{trigger:"zoom"})),!0},setAxisSize:function(){var e=this.chart,t=this.options,i=t.offsets||[0,0,0,0],n=this.horiz,r=S(t.width,e.plotWidth-i[3]+i[1]),o=S(t.height,e.plotHeight-i[0]+i[2]),s=S(t.top,e.plotTop+i[0]),t=S(t.left,e.plotLeft+i[3]),i=/%$/;i.test(o)&&(o=Math.round(parseFloat(o)/100*e.plotHeight)),i.test(s)&&(s=Math.round(parseFloat(s)/100*e.plotHeight+e.plotTop)),this.left=t,this.top=s,this.width=r,this.height=o,this.bottom=e.chartHeight-o-s,this.right=e.chartWidth-r-t,this.len=Math.max(n?r:o,0),this.pos=n?t:s},getExtremes:function(){var e=this.isLog,t=this.lin2log;return{min:e?s(t(this.min)):this.min,max:e?s(t(this.max)):this.max,dataMin:this.dataMin,dataMax:this.dataMax,userMin:this.userMin,userMax:this.userMax}},getThreshold:function(e){var t=this.isLog,i=this.lin2log,n=t?i(this.min):this.min,t=t?i(this.max):this.max;return null===e?e=n:n>e?e=n:t<e&&(e=t),this.translate(e,0,1,0,1)},autoLabelAlign:function(e){return e=(S(e,0)-90*this.side+720)%360,15<e&&165>e?"right":195<e&&345>e?"left":"center"},tickSize:function(e){var t=this.options,i=t[e+"Length"],n=S(t[e+"Width"],"tick"===e&&this.isXAxis?1:0);if(n&&i)return"inside"===t[e+"Position"]&&(i=-i),[i,n]},labelMetrics:function(){var e=this.tickPositions&&this.tickPositions[0]||0;return this.chart.renderer.fontMetrics(this.options.labels.style&&this.options.labels.style.fontSize,this.ticks[e]&&this.ticks[e].label)},unsquish:function(){var e,t,i,n=this.options.labels,r=this.horiz,o=this.tickInterval,s=o,a=this.len/(((this.categories?1:0)+this.max-this.min)/o),u=n.rotation,h=this.labelMetrics(),p=Number.MAX_VALUE,g=function(e){return e/=a||1,(e=1<e?Math.ceil(e):1)*o};return r?(i=!n.staggerLines&&!n.step&&(l(u)?[u]:a<S(n.autoRotationLimit,80)&&n.autoRotation))&&d(i,function(i){var n;(i===u||i&&-90<=i&&90>=i)&&(t=g(Math.abs(h.h/Math.sin(c*i))),(n=t+Math.abs(i/360))<p&&(p=n,e=i,s=t))}):n.step||(s=g(h.h)),this.autoRotation=i,this.labelRotation=S(e,u),s},getSlotWidth:function(){var e=this.chart,t=this.horiz,i=this.options.labels,n=Math.max(this.tickPositions.length-(this.categories?0:1),1),r=e.margin[3];return t&&2>(i.step||0)&&!i.rotation&&(this.staggerLines||1)*this.len/n||!t&&(r&&r-e.spacing[3]||.33*e.chartWidth)},renderUnsquish:function(){var e,t,i,n=this.chart,r=n.renderer,o=this.tickPositions,s=this.ticks,a=this.options.labels,l=this.horiz,c=this.getSlotWidth(),u=Math.max(1,Math.round(c-2*(a.padding||5))),h={},p=this.labelMetrics(),g=a.style&&a.style.textOverflow,f=0;if(C(a.rotation)||(h.rotation=a.rotation||0),d(o,function(e){(e=s[e])&&e.labelLength>f&&(f=e.labelLength)}),this.maxLabelLength=f,this.autoRotation)f>u&&f>p.h?h.rotation=this.labelRotation:this.labelRotation=0;else if(c&&(e={width:u+"px"},!g))for(e.textOverflow="clip",t=o.length;!l&&t--;)i=o[t],(u=s[i].label)&&(u.styles&&"ellipsis"===u.styles.textOverflow?u.css({textOverflow:"clip"}):s[i].labelLength>c&&u.css({width:c+"px"}),u.getBBox().height>this.len/o.length-(p.h-p.f)&&(u.specCss={textOverflow:"ellipsis"}));h.rotation&&(e={width:(f>.5*n.chartHeight?.33*n.chartHeight:n.chartHeight)+"px"},g||(e.textOverflow="ellipsis")),(this.labelAlign=a.align||this.autoLabelAlign(this.labelRotation))&&(h.align=this.labelAlign),d(o,function(t){var i=(t=s[t])&&t.label;i&&(i.attr(h),e&&i.css(b(e,i.specCss)),delete i.specCss,t.rotation=h.rotation)}),this.tickRotCorr=r.rotCorr(p.b,this.labelRotation||0,0!==this.side)},hasData:function(){return this.hasVisibleSeries||l(this.min)&&l(this.max)&&!!this.tickPositions},addTitle:function(e){
var t,i=this.chart.renderer,n=this.horiz,r=this.opposite,o=this.options.title;this.axisTitle||((t=o.textAlign)||(t=(n?{low:"left",middle:"center",high:"right"}:{low:r?"right":"left",middle:"center",high:r?"left":"right"})[o.align]),this.axisTitle=i.text(o.text,0,0,o.useHTML).attr({zIndex:7,rotation:o.rotation||0,align:t}).addClass("highcharts-axis-title").css(o.style).add(this.axisGroup),this.axisTitle.isNew=!0),this.axisTitle[e?"show":"hide"](!0)},generateTick:function(e){var t=this.ticks;t[e]?t[e].addLabel():t[e]=new k(this,e)},getOffset:function(){var e,t,i,n=this,r=n.chart,o=r.renderer,s=n.options,a=n.tickPositions,c=n.ticks,u=n.horiz,h=n.side,p=r.inverted&&!n.isZAxis?[1,0,3,2][h]:h,g=0,f=0,m=s.title,v=s.labels,y=0,w=r.axisOffset,r=r.clipOffset,C=[-1,1,1,-1][h],b=s.className,A=n.axisParent,E=this.tickSize("tick");e=n.hasData(),n.showAxis=t=e||S(s.showEmpty,!0),n.staggerLines=n.horiz&&v.staggerLines,n.axisGroup||(n.gridGroup=o.g("grid").attr({zIndex:s.gridZIndex||1}).addClass("highcharts-"+this.coll.toLowerCase()+"-grid "+(b||"")).add(A),n.axisGroup=o.g("axis").attr({zIndex:s.zIndex||2}).addClass("highcharts-"+this.coll.toLowerCase()+" "+(b||"")).add(A),n.labelGroup=o.g("axis-labels").attr({zIndex:v.zIndex||7}).addClass("highcharts-"+n.coll.toLowerCase()+"-labels "+(b||"")).add(A)),e||n.isLinked?(d(a,function(e,t){n.generateTick(e,t)}),n.renderUnsquish(),!1===v.reserveSpace||0!==h&&2!==h&&{1:"left",3:"right"}[h]!==n.labelAlign&&"center"!==n.labelAlign||d(a,function(e){y=Math.max(c[e].getLabelSize(),y)}),n.staggerLines&&(y*=n.staggerLines,n.labelOffset=y*(n.opposite?-1:1))):x(c,function(e,t){e.destroy(),delete c[t]}),m&&m.text&&!1!==m.enabled&&(n.addTitle(t),t&&!1!==m.reserveSpace&&(n.titleOffset=g=n.axisTitle.getBBox()[u?"height":"width"],i=m.offset,f=l(i)?0:S(m.margin,u?5:10))),n.renderLine(),n.offset=C*S(s.offset,w[h]),n.tickRotCorr=n.tickRotCorr||{x:0,y:0},o=0===h?-n.labelMetrics().h:2===h?n.tickRotCorr.y:0,f=Math.abs(y)+f,y&&(f=f-o+C*(u?S(v.y,n.tickRotCorr.y+8*C):v.x)),n.axisTitleMargin=S(i,f),w[h]=Math.max(w[h],n.axisTitleMargin+g+C*n.offset,f,e&&a.length&&E?E[0]+C*n.offset:0),a=2*Math.floor(n.axisLine.strokeWidth()/2),0<s.offset&&(a-=2*s.offset),r[p]=Math.max(r[p]||a,a)},getLinePath:function(e){var t=this.chart,i=this.opposite,n=this.offset,r=this.horiz,o=this.left+(i?this.width:0)+n,n=t.chartHeight-this.bottom-(i?this.height:0)+n;return i&&(e*=-1),t.renderer.crispLine(["M",r?this.left:o,r?n:this.top,"L",r?t.chartWidth-this.right:o,r?n:t.chartHeight-this.bottom],e)},renderLine:function(){this.axisLine||(this.axisLine=this.chart.renderer.path().addClass("highcharts-axis-line").add(this.axisGroup),this.axisLine.attr({stroke:this.options.lineColor,"stroke-width":this.options.lineWidth,zIndex:7}))},getTitlePosition:function(){var e=this.horiz,t=this.left,i=this.top,n=this.len,r=this.options.title,o=e?t:i,s=this.opposite,a=this.offset,l=r.x||0,c=r.y||0,u=this.chart.renderer.fontMetrics(r.style&&r.style.fontSize,this.axisTitle).f,n={low:o+(e?0:n),middle:o+n/2,high:o+(e?n:0)}[r.align],t=(e?i+this.height:t)+(e?1:-1)*(s?-1:1)*this.axisTitleMargin+(2===this.side?u:0);return{x:e?n+l:t+(s?this.width:0)+a+l,y:e?t+c-(s?this.height:0)+a:n+c}},renderMinorTick:function(e){var t=this.chart.hasRendered&&w(this.oldMin),i=this.minorTicks;i[e]||(i[e]=new k(this,e,"minor")),t&&i[e].isNew&&i[e].render(null,!0),i[e].render(null,!1,1)},renderTick:function(e,t){var i=this.isLinked,n=this.ticks,r=this.chart.hasRendered&&w(this.oldMin);(!i||e>=this.min&&e<=this.max)&&(n[e]||(n[e]=new k(this,e)),r&&n[e].isNew&&n[e].render(t,!0,.1),n[e].render(t))},render:function(){var t,n,r=this,o=r.chart,s=r.options,a=r.isLog,l=r.lin2log,c=r.isLinked,u=r.tickPositions,h=r.axisTitle,p=r.ticks,g=r.minorTicks,f=r.alternateBands,m=s.stackLabels,v=s.alternateGridColor,y=r.tickmarkOffset,C=r.axisLine,b=r.showAxis,A=i(o.renderer.globalAnimation);r.labelEdge.length=0,r.overlap=!1,d([p,g,f],function(e){x(e,function(e){e.isActive=!1})}),(r.hasData()||c)&&(r.minorTickInterval&&!r.categories&&d(r.getMinorTickPositions(),function(e){r.renderMinorTick(e)}),u.length&&(d(u,function(e,t){r.renderTick(e,t)}),y&&(0===r.min||r.single)&&(p[-1]||(p[-1]=new k(r,-1,null,!0)),p[-1].render(-1))),v&&d(u,function(i,s){n=void 0!==u[s+1]?u[s+1]+y:r.max-y,0==s%2&&i<r.max&&n<=r.max+(o.polar?-y:y)&&(f[i]||(f[i]=new e.PlotLineOrBand(r)),t=i+y,f[i].options={from:a?l(t):t,to:a?l(n):n,color:v},f[i].render(),f[i].isActive=!0)}),r._addedPlotLB||(d((s.plotLines||[]).concat(s.plotBands||[]),function(e){r.addPlotBandOrLine(e)}),r._addedPlotLB=!0)),d([p,g,f],function(e){var t,i=[],n=A.duration;x(e,function(e,t){e.isActive||(e.render(t,!1,0),e.isActive=!1,i.push(t))}),F(function(){for(t=i.length;t--;)e[i[t]]&&!e[i[t]].isActive&&(e[i[t]].destroy(),delete e[i[t]])},e!==f&&o.hasRendered&&n?n:0)}),C&&(C[C.isPlaced?"animate":"attr"]({d:this.getLinePath(C.strokeWidth())}),C.isPlaced=!0,C[b?"show":"hide"](!0)),h&&b&&(s=r.getTitlePosition(),w(s.y)?(h[h.isNew?"attr":"animate"](s),h.isNew=!1):(h.attr("y",-9999),h.isNew=!0)),m&&m.enabled&&r.renderStackTotals(),r.isDirty=!1},redraw:function(){this.visible&&(this.render(),d(this.plotLinesAndBands,function(e){e.render()})),d(this.series,function(e){e.isDirty=!0})},keepProps:"extKey hcEvents names series userMax userMin".split(" "),destroy:function(e){var t,i=this,n=i.stacks,r=i.plotLinesAndBands;if(e||E(i),x(n,function(e,t){u(e),n[t]=null}),d([i.ticks,i.minorTicks,i.alternateBands],function(e){u(e)}),r)for(e=r.length;e--;)r[e].destroy();d("stackTotalGroup axisLine axisTitle axisGroup gridGroup labelGroup cross".split(" "),function(e){i[e]&&(i[e]=i[e].destroy())});for(t in i.plotLinesAndBandsGroups)i.plotLinesAndBandsGroups[t]=i.plotLinesAndBandsGroups[t].destroy();x(i,function(e,t){-1===v(t,i.keepProps)&&delete i[t]})},drawCrosshair:function(e,t){var i,n,r=this.crosshair,s=S(r.snap,!0),a=this.cross;e||(e=this.cross&&this.cross.e),this.crosshair&&!1!==(l(t)||!s)?(s?l(t)&&(n=this.isXAxis?t.plotX:this.len-t.plotY):n=e&&(this.horiz?e.chartX-this.pos:this.len-e.chartY+this.pos),l(n)&&(i=this.getPlotLinePath(t&&(this.isXAxis?t.x:S(t.stackY,t.y)),null,null,null,n)||null),l(i)?(t=this.categories&&!this.isRadial,a||(this.cross=a=this.chart.renderer.path().addClass("highcharts-crosshair highcharts-crosshair-"+(t?"category ":"thin ")+r.className).attr({zIndex:S(r.zIndex,2)}).add(),a.attr({stroke:r.color||(t?o("#ccd6eb").setOpacity(.25).get():"#cccccc"),"stroke-width":S(r.width,1)}),r.dashStyle&&a.attr({dashstyle:r.dashStyle})),a.show().attr({d:i}),t&&!r.width&&a.attr({"stroke-width":this.transA}),this.cross.e=e):this.hideCrosshair()):this.hideCrosshair()},hideCrosshair:function(){this.cross&&this.cross.hide()}}),e.Axis=D}(e);return function(e){var t=e.Axis,i=e.Date,n=e.dateFormat,r=e.defaultOptions,o=e.defined,s=e.each,a=e.extend,l=e.getMagnitude,c=e.getTZOffset,u=e.normalizeTickInterval,d=e.pick,h=e.timeUnits;t.prototype.getTimeTicks=function(e,t,l,u){var p,g,f=[],m={},v=r.global.useUTC,y=new i(t-Math.max(c(t),c(l))),w=i.hcMakeTime,C=e.unitRange,b=e.count;if(o(t)){y[i.hcSetMilliseconds](C>=h.second?0:b*Math.floor(y.getMilliseconds()/b)),C>=h.second&&y[i.hcSetSeconds](C>=h.minute?0:b*Math.floor(y.getSeconds()/b)),C>=h.minute&&y[i.hcSetMinutes](C>=h.hour?0:b*Math.floor(y[i.hcGetMinutes]()/b)),C>=h.hour&&y[i.hcSetHours](C>=h.day?0:b*Math.floor(y[i.hcGetHours]()/b)),C>=h.day&&y[i.hcSetDate](C>=h.month?1:b*Math.floor(y[i.hcGetDate]()/b)),C>=h.month&&(y[i.hcSetMonth](C>=h.year?0:b*Math.floor(y[i.hcGetMonth]()/b)),p=y[i.hcGetFullYear]()),C>=h.year&&y[i.hcSetFullYear](p-p%b),C===h.week&&y[i.hcSetDate](y[i.hcGetDate]()-y[i.hcGetDay]()+d(u,1)),p=y[i.hcGetFullYear](),u=y[i.hcGetMonth]();var A=y[i.hcGetDate](),x=y[i.hcGetHours]();for((i.hcTimezoneOffset||i.hcGetTimezoneOffset)&&(g=(!v||!!i.hcGetTimezoneOffset)&&(l-t>4*h.month||c(t)!==c(l)),y=y.getTime(),y=new i(y+c(y))),v=y.getTime(),t=1;v<l;)f.push(v),v=C===h.year?w(p+t*b,0):C===h.month?w(p,u+t*b):!g||C!==h.day&&C!==h.week?g&&C===h.hour?w(p,u,A,x+t*b):v+C*b:w(p,u,A+t*b*(C===h.day?1:7)),t++;f.push(v),C<=h.hour&&1e4>f.length&&s(f,function(e){0==e%18e5&&"000000000"===n("%H%M%S%L",e)&&(m[e]="day")})}return f.info=a(e,{higherRanks:m,totalRange:C*b}),f},t.prototype.normalizeTimeTickInterval=function(e,t){var i=t||[["millisecond",[1,2,5,10,20,25,50,100,200,500]],["second",[1,2,5,10,15,30]],["minute",[1,2,5,10,15,30]],["hour",[1,2,3,4,6,8,12]],["day",[1,2]],["week",[1,2]],["month",[1,2,3,4,6]],["year",null]];t=i[i.length-1];var n,r=h[t[0]],o=t[1];for(n=0;n<i.length&&(t=i[n],r=h[t[0]],o=t[1],!(i[n+1]&&e<=(r*o[o.length-1]+h[i[n+1][0]])/2));n++);return r===h.year&&e<5*r&&(o=[1,2,5]),e=u(e/r,o,"year"===t[0]?Math.max(l(e/r),1):1),{unitRange:r,count:e,unitName:t[0]}}}(e),function(e){var t=e.Axis,i=e.getMagnitude,n=e.map,r=e.normalizeTickInterval,o=e.pick;t.prototype.getLogTickPositions=function(e,t,s,a){var l=this.options,c=this.len,u=this.lin2log,d=this.log2lin,h=[];if(a||(this._minorAutoInterval=null),.5<=e)e=Math.round(e),h=this.getLinearTickPositions(e,t,s);else if(.08<=e)for(var p,g,f,m,v,c=Math.floor(t),l=.3<e?[1,2,4]:.15<e?[1,2,4,6,8]:[1,2,3,4,5,6,7,8,9];c<s+1&&!v;c++)for(g=l.length,p=0;p<g&&!v;p++)f=d(u(c)*l[p]),f>t&&(!a||m<=s)&&void 0!==m&&h.push(m),m>s&&(v=!0),m=f;else t=u(t),s=u(s),e=l[a?"minorTickInterval":"tickInterval"],e=o("auto"===e?null:e,this._minorAutoInterval,l.tickPixelInterval/(a?5:1)*(s-t)/((a?c/this.tickPositions.length:c)||1)),e=r(e,null,i(e)),h=n(this.getLinearTickPositions(e,t,s),d),a||(this._minorAutoInterval=e/5);return a||(this.tickInterval=e),h},t.prototype.log2lin=function(e){return Math.log(e)/Math.LN10},t.prototype.lin2log=function(e){return Math.pow(10,e)}}(e),function(e,t){var i=e.arrayMax,n=e.arrayMin,r=e.defined,o=e.destroyObjectProperties,s=e.each,a=e.erase,l=e.merge,c=e.pick;e.PlotLineOrBand=function(e,t){this.axis=e,t&&(this.options=t,this.id=t.id)},e.PlotLineOrBand.prototype={render:function(){var t=this,i=t.axis,n=i.horiz,o=t.options,s=o.label,a=t.label,u=o.to,d=o.from,h=o.value,p=r(d)&&r(u),g=r(h),f=t.svgElem,m=!f,v=[],y=o.color,w=c(o.zIndex,0),C=o.events,v={"class":"highcharts-plot-"+(p?"band ":"line ")+(o.className||"")},b={},A=i.chart.renderer,x=p?"bands":"lines",S=i.log2lin;if(i.isLog&&(d=S(d),u=S(u),h=S(h)),g?(v={stroke:y,"stroke-width":o.width},o.dashStyle&&(v.dashstyle=o.dashStyle)):p&&(y&&(v.fill=y),o.borderWidth&&(v.stroke=o.borderColor,v["stroke-width"]=o.borderWidth)),b.zIndex=w,x+="-"+w,(y=i.plotLinesAndBandsGroups[x])||(i.plotLinesAndBandsGroups[x]=y=A.g("plot-"+x).attr(b).add()),m&&(t.svgElem=f=A.path().attr(v).add(y)),g)v=i.getPlotLinePath(h,f.strokeWidth());else{if(!p)return;v=i.getPlotBandPath(d,u,o)}return m&&v&&v.length?(f.attr({d:v}),C&&e.objectEach(C,function(e,i){f.on(i,function(e){C[i].apply(t,[e])})})):f&&(v?(f.show(),f.animate({d:v})):(f.hide(),a&&(t.label=a=a.destroy()))),s&&r(s.text)&&v&&v.length&&0<i.width&&0<i.height&&!v.flat?(s=l({align:n&&p&&"center",x:n?!p&&4:10,verticalAlign:!n&&p&&"middle",y:n?p?16:10:p?6:-4,rotation:n&&!p&&90},s),this.renderLabel(s,v,p,w)):a&&a.hide(),t},renderLabel:function(e,t,r,o){var s=this.label,a=this.axis.chart.renderer;s||(s={align:e.textAlign||e.align,rotation:e.rotation,"class":"highcharts-plot-"+(r?"band":"line")+"-label "+(e.className||"")},s.zIndex=o,this.label=s=a.text(e.text,0,0,e.useHTML).attr(s).add(),s.css(e.style)),o=[t[1],t[4],r?t[6]:t[1]],t=[t[2],t[5],r?t[7]:t[2]],r=n(o),a=n(t),s.align(e,!1,{x:r,y:a,width:i(o)-r,height:i(t)-a}),s.show()},destroy:function(){a(this.axis.plotLinesAndBands,this),delete this.axis,o(this)}},e.extend(t.prototype,{getPlotBandPath:function(e,t){var i=this.getPlotLinePath(t,null,null,!0),n=this.getPlotLinePath(e,null,null,!0),r=this.horiz,o=1;return e=e<this.min&&t<this.min||e>this.max&&t>this.max,n&&i?(e&&(n.flat=n.toString()===i.toString(),o=0),n.push(r&&i[4]===n[4]?i[4]+o:i[4],r||i[5]!==n[5]?i[5]:i[5]+o,r&&i[1]===n[1]?i[1]+o:i[1],r||i[2]!==n[2]?i[2]:i[2]+o)):n=null,n},addPlotBand:function(e){return this.addPlotBandOrLine(e,"plotBands")},addPlotLine:function(e){return this.addPlotBandOrLine(e,"plotLines")},addPlotBandOrLine:function(t,i){var n=new e.PlotLineOrBand(this,t).render(),r=this.userOptions;return n&&(i&&(r[i]=r[i]||[],r[i].push(t)),this.plotLinesAndBands.push(n)),n},removePlotBandOrLine:function(e){for(var t=this.plotLinesAndBands,i=this.options,n=this.userOptions,r=t.length;r--;)t[r].id===e&&t[r].destroy();s([i.plotLines||[],n.plotLines||[],i.plotBands||[],n.plotBands||[]],function(t){for(r=t.length;r--;)t[r].id===e&&a(t,t[r])})},removePlotBand:function(e){this.removePlotBandOrLine(e)},removePlotLine:function(e){this.removePlotBandOrLine(e)}})}(e,t),function(e){var t=e.dateFormat,i=e.each,n=e.extend,r=e.format,o=e.isNumber,s=e.map,a=e.merge,l=e.pick,c=e.splat,u=e.syncTimeout,d=e.timeUnits;e.Tooltip=function(){this.init.apply(this,arguments)},e.Tooltip.prototype={init:function(e,t){this.chart=e,this.options=t,this.crosshairs=[],this.now={x:0,y:0},this.isHidden=!0,this.split=t.split&&!e.inverted,this.shared=t.shared||this.split},cleanSplit:function(e){i(this.chart.series,function(t){var i=t&&t.tt;i&&(!i.isActive||e?t.tt=i.destroy():i.isActive=!1)})},getLabel:function(){var e=this.chart.renderer,t=this.options;return this.label||(this.split?this.label=e.g("tooltip"):(this.label=e.label("",0,0,t.shape||"callout",null,null,t.useHTML,null,"tooltip").attr({padding:t.padding,r:t.borderRadius}),this.label.attr({fill:t.backgroundColor,"stroke-width":t.borderWidth}).css(t.style).shadow(t.shadow)),this.label.attr({zIndex:8}).add()),this.label},update:function(e){this.destroy(),a(!0,this.chart.options.tooltip.userOptions,e),this.init(this.chart,a(!0,this.options,e))},destroy:function(){this.label&&(this.label=this.label.destroy()),this.split&&this.tt&&(this.cleanSplit(this.chart,!0),this.tt=this.tt.destroy()),clearTimeout(this.hideTimer),clearTimeout(this.tooltipTimeout)},move:function(e,t,i,r){var o=this,s=o.now,a=!1!==o.options.animation&&!o.isHidden&&(1<Math.abs(e-s.x)||1<Math.abs(t-s.y)),l=o.followPointer||1<o.len;n(s,{x:a?(2*s.x+e)/3:e,y:a?(s.y+t)/2:t,anchorX:l?void 0:a?(2*s.anchorX+i)/3:i,anchorY:l?void 0:a?(s.anchorY+r)/2:r}),o.getLabel().attr(s),a&&(clearTimeout(this.tooltipTimeout),this.tooltipTimeout=setTimeout(function(){o&&o.move(e,t,i,r)},32))},hide:function(e){var t=this;clearTimeout(this.hideTimer),e=l(e,this.options.hideDelay,500),this.isHidden||(this.hideTimer=u(function(){t.getLabel()[e?"fadeOut":"hide"](),t.isHidden=!0},e))},getAnchor:function(e,t){var n,r,o,a=this.chart,l=a.inverted,u=a.plotTop,d=a.plotLeft,h=0,p=0;return e=c(e),n=e[0].tooltipPos,this.followPointer&&t&&(void 0===t.chartX&&(t=a.pointer.normalize(t)),n=[t.chartX-a.plotLeft,t.chartY-u]),n||(i(e,function(e){r=e.series.yAxis,o=e.series.xAxis,h+=e.plotX+(!l&&o?o.left-d:0),p+=(e.plotLow?(e.plotLow+e.plotHigh)/2:e.plotY)+(!l&&r?r.top-u:0)}),h/=e.length,p/=e.length,n=[l?a.plotWidth-p:h,this.shared&&!l&&1<e.length&&t?t.chartY-u:l?a.plotHeight-h:p]),s(n,Math.round)},getPosition:function(e,t,i){var n,r=this.chart,o=this.distance,s={},a=i.h||0,c=["y",r.chartHeight,t,i.plotY+r.plotTop,r.plotTop,r.plotTop+r.plotHeight],u=["x",r.chartWidth,e,i.plotX+r.plotLeft,r.plotLeft,r.plotLeft+r.plotWidth],d=!this.followPointer&&l(i.ttBelow,!r.inverted==!!i.negative),h=function(e,t,i,n,r,l){var c=i<n-o,u=n+o+i<t,h=n-o-i;if(n+=o,d&&u)s[e]=n;else if(!d&&c)s[e]=h;else if(c)s[e]=Math.min(l-i,0>h-a?h:h-a);else{if(!u)return!1;s[e]=Math.max(r,n+a+i>t?n:n+a)}},p=function(e,t,i,n){var r;return n<o||n>t-o?r=!1:s[e]=n<i/2?1:n>t-i/2?t-i-2:n-i/2,r},g=function(e){var t=c;c=u,u=t,n=e},f=function(){!1!==h.apply(0,c)?!1!==p.apply(0,u)||n||(g(!0),f()):n?s.x=s.y=0:(g(!0),f())};return(r.inverted||1<this.len)&&g(),f(),s},defaultFormatter:function(e){var t,i=this.points||c(this);return t=[e.tooltipFooterHeaderFormatter(i[0])],t=t.concat(e.bodyFormatter(i)),t.push(e.tooltipFooterHeaderFormatter(i[0],!0)),t},refresh:function(e,t){var n,r,o,s=this.options,a=e,u={},d=[];n=s.formatter||this.defaultFormatter;var h,u=this.shared;clearTimeout(this.hideTimer),this.followPointer=c(a)[0].series.tooltipOptions.followPointer,o=this.getAnchor(a,t),t=o[0],r=o[1],!u||a.series&&a.series.noSharedTooltip?u=a.getLabelConfig():(i(a,function(e){e.setState("hover"),d.push(e.getLabelConfig())}),u={x:a[0].category,y:a[0].y},u.points=d,a=a[0]),this.len=d.length,u=n.call(u,this),h=a.series,this.distance=l(h.tooltipOptions.distance,16),!1===u?this.hide():(n=this.getLabel(),this.isHidden&&n.attr({opacity:1}).show(),this.split?this.renderSplit(u,e):(s.style.width||n.css({width:this.chart.spacingBox.width}),n.attr({text:u&&u.join?u.join(""):u}),n.removeClass(/highcharts-color-[\d]+/g).addClass("highcharts-color-"+l(a.colorIndex,h.colorIndex)),n.attr({stroke:s.borderColor||a.color||h.color||"#666666"}),this.updatePosition({plotX:t,plotY:r,negative:a.negative,ttBelow:a.ttBelow,h:o[2]||0})),this.isHidden=!1)},renderSplit:function(t,n){var r,o=this,s=[],a=this.chart,c=a.renderer,u=!0,d=this.options,h=this.getLabel();i(t.slice(0,n.length+1),function(e,t){t=n[t-1]||{isHeader:!0,plotX:n[0].plotX};var i=t.series||o,p=i.tt,g=t.series||{},f="highcharts-color-"+l(t.colorIndex,g.colorIndex,"none");p||(i.tt=p=c.label(null,null,null,"callout").addClass("highcharts-tooltip-box "+f).attr({padding:d.padding,r:d.borderRadius,fill:d.backgroundColor,stroke:t.color||g.color||"#333333","stroke-width":d.borderWidth}).add(h)),p.isActive=!0,p.attr({text:e}),p.css(d.style),e=p.getBBox(),g=e.width+p.strokeWidth(),t.isHeader?(r=e.height,g=Math.max(0,Math.min(t.plotX+a.plotLeft-g/2,a.chartWidth-g))):g=t.plotX+a.plotLeft-l(d.distance,16)-g,0>g&&(u=!1),e=(t.series&&t.series.yAxis&&t.series.yAxis.pos)+(t.plotY||0),e-=a.plotTop,s.push({target:t.isHeader?a.plotHeight+r:e,rank:t.isHeader?1:0,size:i.tt.getBBox().height+1,point:t,x:g,tt:p})}),this.cleanSplit(),e.distribute(s,a.plotHeight+r),i(s,function(e){var t=e.point,i=t.series;e.tt.attr({visibility:void 0===e.pos?"hidden":"inherit",x:u||t.isHeader?e.x:t.plotX+a.plotLeft+l(d.distance,16),y:e.pos+a.plotTop,anchorX:t.isHeader?t.plotX+a.plotLeft:t.plotX+i.xAxis.pos,anchorY:t.isHeader?e.pos+a.plotTop-15:t.plotY+i.yAxis.pos})})},updatePosition:function(e){var t=this.chart,i=this.getLabel(),i=(this.options.positioner||this.getPosition).call(this,i.width,i.height,e);this.move(Math.round(i.x),Math.round(i.y||0),e.plotX+t.plotLeft,e.plotY+t.plotTop)},getDateFormat:function(e,i,n,r){var o,s,a=t("%m-%d %H:%M:%S.%L",i),l={millisecond:15,second:12,minute:9,hour:6,day:3},c="millisecond";for(s in d){if(e===d.week&&+t("%w",i)===n&&"00:00:00.000"===a.substr(6)){s="week";break}if(d[s]>e){s=c;break}if(l[s]&&a.substr(l[s])!=="01-01 00:00:00.000".substr(l[s]))break;"week"!==s&&(c=s)}return s&&(o=r[s]),o},getXDateFormat:function(e,t,i){t=t.dateTimeLabelFormats;var n=i&&i.closestPointRange;return(n?this.getDateFormat(n,e.x,i.options.startOfWeek,t):t.day)||t.year},tooltipFooterHeaderFormatter:function(e,t){var i=t?"footer":"header";t=e.series;var n=t.tooltipOptions,s=n.xDateFormat,a=t.xAxis,l=a&&"datetime"===a.options.type&&o(e.key),i=n[i+"Format"];return l&&!s&&(s=this.getXDateFormat(e,n,a)),l&&s&&(i=i.replace("{point.key}","{point.key:"+s+"}")),r(i,{point:e,series:t})},bodyFormatter:function(e){return s(e,function(e){var t=e.series.tooltipOptions;return(t.pointFormatter||e.point.tooltipFormatter).call(e.point,t.pointFormat)})}}}(e),function(e){var t=e.addEvent,i=e.attr,n=e.charts,r=e.color,o=e.css,s=e.defined,a=e.doc,l=e.each,c=e.extend,u=e.fireEvent,d=e.offset,h=e.pick,p=e.removeEvent,g=e.splat,f=e.Tooltip,m=e.win;e.Pointer=function(e,t){this.init(e,t)},e.Pointer.prototype={init:function(e,t){this.options=t,this.chart=e,this.runChartClick=t.chart.events&&!!t.chart.events.click,this.pinchDown=[],this.lastValidTouch={},f&&t.tooltip.enabled&&(e.tooltip=new f(e,t.tooltip),this.followTouchMove=h(t.tooltip.followTouchMove,!0)),this.setDOMEvents()},zoomOption:function(e){var t=this.chart,i=t.options.chart,n=i.zoomType||"",t=t.inverted;/touch/.test(e.type)&&(n=h(i.pinchType,n)),this.zoomX=e=/x/.test(n),this.zoomY=n=/y/.test(n),this.zoomHor=e&&!t||n&&t,this.zoomVert=n&&!t||e&&t,this.hasZoom=e||n},normalize:function(e,t){var i,n;return e=e||m.event,e.target||(e.target=e.srcElement),n=e.touches?e.touches.length?e.touches.item(0):e.changedTouches[0]:e,t||(this.chartPosition=t=d(this.chart.container)),void 0===n.pageX?(i=Math.max(e.x,e.clientX-t.left),t=e.y):(i=n.pageX-t.left,t=n.pageY-t.top),c(e,{chartX:Math.round(i),chartY:Math.round(t)})},getCoordinates:function(e){var t={xAxis:[],yAxis:[]};return l(this.chart.axes,function(i){t[i.isXAxis?"xAxis":"yAxis"].push({axis:i,value:i.toValue(e[i.horiz?"chartX":"chartY"])})}),t},getKDPoints:function(e,t,i){var n,r,o,s=[];if(l(e,function(e){n=e.noSharedTooltip&&t,r=!t&&e.directTouch,e.visible&&!r&&h(e.options.enableMouseTracking,!0)&&(o=e.searchPoint(i,!n&&0>e.options.findNearestPointBy.indexOf("y")))&&o.series&&s.push(o)}),s.sort(function(e,i){var n=e.distX-i.distX,r=e.dist-i.dist,o=(i.series.group&&i.series.group.zIndex)-(e.series.group&&e.series.group.zIndex);return 0!==n&&t?n:0!==r?r:0!==o?o:e.series.index>i.series.index?-1:1}),t&&s[0]&&!s[0].series.noSharedTooltip)for(e=s.length;e--;)(s[e].x!==s[0].x||s[e].series.noSharedTooltip)&&s.splice(e,1);return s},getPointFromEvent:function(e){e=e.target;for(var t;e&&!t;)t=e.point,e=e.parentNode;return t},getChartCoordinatesFromPoint:function(e,t){var i=e.series,n=i.xAxis,i=i.yAxis;if(n&&i)return t?{chartX:n.len+n.pos-e.clientX,chartY:i.len+i.pos-e.plotY}:{chartX:e.clientX+n.pos,chartY:e.plotY+i.pos}},getHoverData:function(t,i,n,r,o,s){var a=t,l=i,a=o?n:[l];r=!(!r||!t),i=l&&!l.stickyTracking;var c,u=function(e,t){return 0===t};return r?u=function(e){return e===t}:i?u=function(e){return e.series===l}:a=e.grep(n,function(e){return e.stickyTracking}),c=r&&!o?[t]:this.getKDPoints(a,o,s),l=(a=e.find(c,u))&&a.series,r||i||!o||(c=this.getKDPoints(n,o,s)),c.sort(function(e,t){return e.series.index-t.series.index}),{hoverPoint:a,hoverSeries:l,hoverPoints:c}},runPointActions:function(i,r){var o=this.chart,s=o.tooltip,c=!!s&&s.shared,u=r||o.hoverPoint,d=u&&u.series||o.hoverSeries;r=this.getHoverData(u,d,o.series,!!r||d&&d.directTouch&&this.isDirectTouch,c,i);var p,g,u=r.hoverPoint;p=(d=r.hoverSeries)&&d.tooltipOptions.followPointer,g=(c=c&&u&&!u.series.noSharedTooltip)?r.hoverPoints:u?[u]:[],u&&(u!==o.hoverPoint||s&&s.isHidden)?(l(o.hoverPoints||[],function(t){-1===e.inArray(t,g)&&t.setState()}),l(g||[],function(e){e.setState("hover")}),o.hoverSeries!==d&&d.onMouseOver(),o.hoverPoint&&o.hoverPoint.firePointEvent("mouseOut"),u.firePointEvent("mouseOver"),o.hoverPoints=g,o.hoverPoint=u,s&&s.refresh(c?g:u,i)):p&&s&&!s.isHidden&&(d=s.getAnchor([{}],i),s.updatePosition({plotX:d[0],plotY:d[1]})),this.unDocMouseMove||(this.unDocMouseMove=t(a,"mousemove",function(t){var i=n[e.hoverChartIndex];i&&i.pointer.onDocumentMouseMove(t)})),l(o.axes,function(t){h(t.crosshair.snap,!0)?e.find(g,function(e){return e.series[t.coll]===t})?t.drawCrosshair(i,u):t.hideCrosshair():t.drawCrosshair(i)})},reset:function(e,t){var i=this.chart,n=i.hoverSeries,r=i.hoverPoint,o=i.hoverPoints,s=i.tooltip,a=s&&s.shared?o:r;e&&a&&l(g(a),function(t){t.series.isCartesian&&void 0===t.plotX&&(e=!1)}),e?s&&a&&(s.refresh(a),r&&(r.setState(r.state,!0),l(i.axes,function(e){e.crosshair&&e.drawCrosshair(null,r)}))):(r&&r.onMouseOut(),o&&l(o,function(e){e.setState()}),n&&n.onMouseOut(),s&&s.hide(t),this.unDocMouseMove&&(this.unDocMouseMove=this.unDocMouseMove()),l(i.axes,function(e){e.hideCrosshair()}),this.hoverX=i.hoverPoints=i.hoverPoint=null)},scaleGroups:function(e,t){var i,n=this.chart;l(n.series,function(r){i=e||r.getPlotBox(),r.xAxis&&r.xAxis.zoomEnabled&&r.group&&(r.group.attr(i),r.markerGroup&&(r.markerGroup.attr(i),r.markerGroup.clip(t?n.clipRect:null)),r.dataLabelsGroup&&r.dataLabelsGroup.attr(i))}),n.clipRect.attr(t||n.clipBox)},dragStart:function(e){var t=this.chart;t.mouseIsDown=e.type,t.cancelClick=!1,t.mouseDownX=this.mouseDownX=e.chartX,t.mouseDownY=this.mouseDownY=e.chartY},drag:function(e){var t,i=this.chart,n=i.options.chart,o=e.chartX,s=e.chartY,a=this.zoomHor,l=this.zoomVert,c=i.plotLeft,u=i.plotTop,d=i.plotWidth,h=i.plotHeight,p=this.selectionMarker,g=this.mouseDownX,f=this.mouseDownY,m=n.panKey&&e[n.panKey+"Key"];p&&p.touch||(o<c?o=c:o>c+d&&(o=c+d),s<u?s=u:s>u+h&&(s=u+h),this.hasDragged=Math.sqrt(Math.pow(g-o,2)+Math.pow(f-s,2)),10<this.hasDragged&&(t=i.isInsidePlot(g-c,f-u),i.hasCartesianSeries&&(this.zoomX||this.zoomY)&&t&&!m&&!p&&(this.selectionMarker=p=i.renderer.rect(c,u,a?1:d,l?1:h,0).attr({fill:n.selectionMarkerFill||r("#335cad").setOpacity(.25).get(),"class":"highcharts-selection-marker",zIndex:7}).add()),p&&a&&(o-=g,p.attr({width:Math.abs(o),x:(0<o?0:o)+g})),p&&l&&(o=s-f,p.attr({height:Math.abs(o),y:(0<o?0:o)+f})),t&&!p&&n.panning&&i.pan(e,n.panning)))},drop:function(e){var t=this,i=this.chart,n=this.hasPinched;if(this.selectionMarker){var r,a={originalEvent:e,xAxis:[],yAxis:[]},d=this.selectionMarker,h=d.attr?d.attr("x"):d.x,p=d.attr?d.attr("y"):d.y,g=d.attr?d.attr("width"):d.width,f=d.attr?d.attr("height"):d.height;(this.hasDragged||n)&&(l(i.axes,function(i){if(i.zoomEnabled&&s(i.min)&&(n||t[{xAxis:"zoomX",yAxis:"zoomY"}[i.coll]])){var o=i.horiz,l="touchend"===e.type?i.minPixelPadding:0,c=i.toValue((o?h:p)+l),o=i.toValue((o?h+g:p+f)-l);a[i.coll].push({axis:i,min:Math.min(c,o),max:Math.max(c,o)}),r=!0}}),r&&u(i,"selection",a,function(e){i.zoom(c(e,n?{animation:!1}:null))})),this.selectionMarker=this.selectionMarker.destroy(),n&&this.scaleGroups()}i&&(o(i.container,{cursor:i._cursor}),i.cancelClick=10<this.hasDragged,i.mouseIsDown=this.hasDragged=this.hasPinched=!1,this.pinchDown=[])},onContainerMouseDown:function(e){e=this.normalize(e),this.zoomOption(e),e.preventDefault&&e.preventDefault(),this.dragStart(e)},onDocumentMouseUp:function(t){n[e.hoverChartIndex]&&n[e.hoverChartIndex].pointer.drop(t)},onDocumentMouseMove:function(e){var t=this.chart,i=this.chartPosition;e=this.normalize(e,i),!i||this.inClass(e.target,"highcharts-tracker")||t.isInsidePlot(e.chartX-t.plotLeft,e.chartY-t.plotTop)||this.reset()},onContainerMouseLeave:function(t){var i=n[e.hoverChartIndex];i&&(t.relatedTarget||t.toElement)&&(i.pointer.reset(),i.pointer.chartPosition=null)},onContainerMouseMove:function(t){var i=this.chart;s(e.hoverChartIndex)&&n[e.hoverChartIndex]&&n[e.hoverChartIndex].mouseIsDown||(e.hoverChartIndex=i.index),t=this.normalize(t),t.returnValue=!1,"mousedown"===i.mouseIsDown&&this.drag(t),!this.inClass(t.target,"highcharts-tracker")&&!i.isInsidePlot(t.chartX-i.plotLeft,t.chartY-i.plotTop)||i.openMenu||this.runPointActions(t)},inClass:function(e,t){for(var n;e;){if(n=i(e,"class")){if(-1!==n.indexOf(t))return!0;if(-1!==n.indexOf("highcharts-container"))return!1}e=e.parentNode}},onTrackerMouseOut:function(e){var t=this.chart.hoverSeries;e=e.relatedTarget||e.toElement,this.isDirectTouch=!1,!t||!e||t.stickyTracking||this.inClass(e,"highcharts-tooltip")||this.inClass(e,"highcharts-series-"+t.index)&&this.inClass(e,"highcharts-tracker")||t.onMouseOut()},onContainerClick:function(e){var t=this.chart,i=t.hoverPoint,n=t.plotLeft,r=t.plotTop;e=this.normalize(e),t.cancelClick||(i&&this.inClass(e.target,"highcharts-tracker")?(u(i.series,"click",c(e,{point:i})),t.hoverPoint&&i.firePointEvent("click",e)):(c(e,this.getCoordinates(e)),t.isInsidePlot(e.chartX-n,e.chartY-r)&&u(t,"click",e)))},setDOMEvents:function(){var i=this,n=i.chart.container;n.onmousedown=function(e){i.onContainerMouseDown(e)},n.onmousemove=function(e){i.onContainerMouseMove(e)},n.onclick=function(e){i.onContainerClick(e)},t(n,"mouseleave",i.onContainerMouseLeave),1===e.chartCount&&t(a,"mouseup",i.onDocumentMouseUp),e.hasTouch&&(n.ontouchstart=function(e){i.onContainerTouchStart(e)},n.ontouchmove=function(e){i.onContainerTouchMove(e)},1===e.chartCount&&t(a,"touchend",i.onDocumentTouchEnd))},destroy:function(){var t=this;t.unDocMouseMove&&t.unDocMouseMove(),p(t.chart.container,"mouseleave",t.onContainerMouseLeave),e.chartCount||(p(a,"mouseup",t.onDocumentMouseUp),p(a,"touchend",t.onDocumentTouchEnd)),clearInterval(t.tooltipTimeout),e.objectEach(t,function(e,i){t[i]=null})}}}(e),function(e){var t=e.charts,i=e.each,n=e.extend,r=e.map,o=e.noop,s=e.pick;n(e.Pointer.prototype,{pinchTranslate:function(e,t,i,n,r,o){this.zoomHor&&this.pinchTranslateDirection(!0,e,t,i,n,r,o),this.zoomVert&&this.pinchTranslateDirection(!1,e,t,i,n,r,o)},pinchTranslateDirection:function(e,t,i,n,r,o,s,a){var l,c,u,d=this.chart,h=e?"x":"y",p=e?"X":"Y",g="chart"+p,f=e?"width":"height",m=d["plot"+(e?"Left":"Top")],v=a||1,y=d.inverted,w=d.bounds[e?"h":"v"],C=1===t.length,b=t[0][g],A=i[0][g],x=!C&&t[1][g],S=!C&&i[1][g];i=function(){!C&&20<Math.abs(b-x)&&(v=a||Math.abs(A-S)/Math.abs(b-x)),c=(m-A)/v+b,l=d["plot"+(e?"Width":"Height")]/v},i(),t=c,t<w.min?(t=w.min,u=!0):t+l>w.max&&(t=w.max-l,u=!0),u?(A-=.8*(A-s[h][0]),C||(S-=.8*(S-s[h][1])),i()):s[h]=[A,S],y||(o[h]=c-m,o[f]=l),o=y?1/v:v,r[f]=l,r[h]=t,n[y?e?"scaleY":"scaleX":"scale"+p]=v,n["translate"+p]=o*m+(A-o*b)},pinch:function(e){var t=this,a=t.chart,l=t.pinchDown,c=e.touches,u=c.length,d=t.lastValidTouch,h=t.hasZoom,p=t.selectionMarker,g={},f=1===u&&(t.inClass(e.target,"highcharts-tracker")&&a.runTrackerClick||t.runChartClick),m={};1<u&&(t.initiated=!0),h&&t.initiated&&!f&&e.preventDefault(),r(c,function(e){return t.normalize(e)}),"touchstart"===e.type?(i(c,function(e,t){l[t]={chartX:e.chartX,chartY:e.chartY}}),d.x=[l[0].chartX,l[1]&&l[1].chartX],d.y=[l[0].chartY,l[1]&&l[1].chartY],i(a.axes,function(e){if(e.zoomEnabled){var t=a.bounds[e.horiz?"h":"v"],i=e.minPixelPadding,n=e.toPixels(s(e.options.min,e.dataMin)),r=e.toPixels(s(e.options.max,e.dataMax)),o=Math.max(n,r);t.min=Math.min(e.pos,Math.min(n,r)-i),t.max=Math.max(e.pos+e.len,o+i)}}),t.res=!0):t.followTouchMove&&1===u?this.runPointActions(t.normalize(e)):l.length&&(p||(t.selectionMarker=p=n({destroy:o,touch:!0},a.plotBox)),t.pinchTranslate(l,c,g,p,m,d),t.hasPinched=h,t.scaleGroups(g,m),t.res&&(t.res=!1,this.reset(!1,0)))},touch:function(t,i){var n,r=this.chart;r.index!==e.hoverChartIndex&&this.onContainerMouseLeave({relatedTarget:!0}),e.hoverChartIndex=r.index,1===t.touches.length?(t=this.normalize(t),r.isInsidePlot(t.chartX-r.plotLeft,t.chartY-r.plotTop)&&!r.openMenu?(i&&this.runPointActions(t),"touchmove"===t.type&&(i=this.pinchDown,n=!!i[0]&&4<=Math.sqrt(Math.pow(i[0].chartX-t.chartX,2)+Math.pow(i[0].chartY-t.chartY,2))),s(n,!0)&&this.pinch(t)):i&&this.reset()):2===t.touches.length&&this.pinch(t)},onContainerTouchStart:function(e){this.zoomOption(e),this.touch(e,!0)},onContainerTouchMove:function(e){this.touch(e)},onDocumentTouchEnd:function(i){t[e.hoverChartIndex]&&t[e.hoverChartIndex].pointer.drop(i)}})}(e),function(e){var t=e.addEvent,i=e.charts,n=e.css,r=e.doc,o=e.extend,s=e.noop,a=e.Pointer,l=e.removeEvent,c=e.win,u=e.wrap;if(!e.hasTouch&&(c.PointerEvent||c.MSPointerEvent)){var d={},h=!!c.PointerEvent,p=function(){var t=[];return t.item=function(e){return this[e]},e.objectEach(d,function(e){t.push({pageX:e.pageX,pageY:e.pageY,target:e.target})}),t},g=function(t,n,r,o){"touch"!==t.pointerType&&t.pointerType!==t.MSPOINTER_TYPE_TOUCH||!i[e.hoverChartIndex]||(o(t),o=i[e.hoverChartIndex].pointer,o[n]({type:r,target:t.currentTarget,preventDefault:s,touches:p()}))};o(a.prototype,{onContainerPointerDown:function(e){g(e,"onContainerTouchStart","touchstart",function(e){d[e.pointerId]={pageX:e.pageX,pageY:e.pageY,target:e.currentTarget}})},onContainerPointerMove:function(e){g(e,"onContainerTouchMove","touchmove",function(e){d[e.pointerId]={pageX:e.pageX,pageY:e.pageY},d[e.pointerId].target||(d[e.pointerId].target=e.currentTarget)})},onDocumentPointerUp:function(e){g(e,"onDocumentTouchEnd","touchend",function(e){delete d[e.pointerId]})},batchMSEvents:function(e){e(this.chart.container,h?"pointerdown":"MSPointerDown",this.onContainerPointerDown),e(this.chart.container,h?"pointermove":"MSPointerMove",this.onContainerPointerMove),e(r,h?"pointerup":"MSPointerUp",this.onDocumentPointerUp)}}),u(a.prototype,"init",function(e,t,i){e.call(this,t,i),this.hasZoom&&n(t.container,{"-ms-touch-action":"none","touch-action":"none"})}),u(a.prototype,"setDOMEvents",function(e){e.apply(this),(this.hasZoom||this.followTouchMove)&&this.batchMSEvents(t)}),u(a.prototype,"destroy",function(e){this.batchMSEvents(l),e.call(this)})}}(e),function(e){var t=e.addEvent,i=e.css,n=e.discardElement,r=e.defined,o=e.each,s=e.isFirefox,a=e.marginNames,l=e.merge,c=e.pick,u=e.setAnimation,d=e.stableSort,h=e.win,p=e.wrap;e.Legend=function(e,t){this.init(e,t)},e.Legend.prototype={init:function(e,i){this.chart=e,this.setOptions(i),i.enabled&&(this.render(),t(this.chart,"endResize",function(){this.legend.positionCheckboxes()}))},setOptions:function(e){var t=c(e.padding,8);this.options=e,
this.itemStyle=e.itemStyle,this.itemHiddenStyle=l(this.itemStyle,e.itemHiddenStyle),this.itemMarginTop=e.itemMarginTop||0,this.padding=t,this.initialItemY=t-5,this.itemHeight=this.maxItemWidth=0,this.symbolWidth=c(e.symbolWidth,16),this.pages=[]},update:function(e,t){var i=this.chart;this.setOptions(l(!0,this.options,e)),this.destroy(),i.isDirtyLegend=i.isDirtyBox=!0,c(t,!0)&&i.redraw()},colorizeItem:function(t,i){t.legendGroup[i?"removeClass":"addClass"]("highcharts-legend-item-hidden");var n=this.options,r=t.legendItem,o=t.legendLine,s=t.legendSymbol,a=this.itemHiddenStyle.color,n=i?n.itemStyle.color:a,l=i?t.color||a:a,c=t.options&&t.options.marker,u={fill:l};r&&r.css({fill:n,color:n}),o&&o.attr({stroke:l}),s&&(c&&s.isMarker&&(u=t.pointAttribs(),i||e.objectEach(u,function(e,t){u[t]=a})),s.attr(u))},positionItem:function(e){var t=this.options,i=t.symbolPadding,t=!t.rtl,n=e._legendItemPos,r=n[0],n=n[1],o=e.checkbox;(e=e.legendGroup)&&e.element&&e.translate(t?r:this.legendWidth-r-2*i-4,n),o&&(o.x=r,o.y=n)},destroyItem:function(e){var t=e.checkbox;o(["legendItem","legendLine","legendSymbol","legendGroup"],function(t){e[t]&&(e[t]=e[t].destroy())}),t&&n(e.checkbox)},destroy:function(){function e(e){this[e]&&(this[e]=this[e].destroy())}o(this.getAllItems(),function(t){o(["legendItem","legendGroup"],e,t)}),o("clipRect up down pager nav box title group".split(" "),e,this),this.display=null},positionCheckboxes:function(e){var t,n=this.group&&this.group.alignAttr,r=this.clipHeight||this.legendHeight,s=this.titleHeight;n&&(t=n.translateY,o(this.allItems,function(o){var a,l=o.checkbox;l&&(a=t+s+l.y+(e||0)+3,i(l,{left:n.translateX+o.checkboxOffset+l.x-20+"px",top:a+"px",display:a>t-6&&a<t+r-6?"":"none"}))}))},renderTitle:function(){var e=this.options,t=this.padding,i=e.title,n=0;i.text&&(this.title||(this.title=this.chart.renderer.label(i.text,t-3,t-4,null,null,null,e.useHTML,null,"legend-title").attr({zIndex:1}).css(i.style).add(this.group)),e=this.title.getBBox(),n=e.height,this.offsetWidth=e.width,this.contentGroup.attr({translateY:n})),this.titleHeight=n},setText:function(t){var i=this.options;t.legendItem.attr({text:i.labelFormat?e.format(i.labelFormat,t):i.labelFormatter.call(t)})},renderItem:function(e){var t=this.chart,i=t.renderer,n=this.options,r="horizontal"===n.layout,o=this.symbolWidth,s=n.symbolPadding,a=this.itemStyle,u=this.itemHiddenStyle,d=this.padding,h=r?c(n.itemDistance,20):0,p=!n.rtl,g=n.width,f=n.itemMarginBottom||0,m=this.itemMarginTop,v=e.legendItem,y=!e.series,w=!y&&e.series.drawLegendSymbol?e.series:e,C=w.options,b=this.createCheckboxForItem&&C&&C.showCheckbox,C=o+s+h+(b?20:0),A=n.useHTML,x=e.options.className;v||(e.legendGroup=i.g("legend-item").addClass("highcharts-"+w.type+"-series highcharts-color-"+e.colorIndex+(x?" "+x:"")+(y?" highcharts-series-"+e.index:"")).attr({zIndex:1}).add(this.scrollGroup),e.legendItem=v=i.text("",p?o+s:-s,this.baseline||0,A).css(l(e.visible?a:u)).attr({align:p?"left":"right",zIndex:2}).add(e.legendGroup),this.baseline||(o=a.fontSize,this.fontMetrics=i.fontMetrics(o,v),this.baseline=this.fontMetrics.f+3+m,v.attr("y",this.baseline)),this.symbolHeight=n.symbolHeight||this.fontMetrics.f,w.drawLegendSymbol(this,e),this.setItemEvents&&this.setItemEvents(e,v,A),b&&this.createCheckboxForItem(e)),this.colorizeItem(e,e.visible),a.width||v.css({width:(n.itemWidth||t.spacingBox.width)-C}),this.setText(e),i=v.getBBox(),a=e.checkboxOffset=n.itemWidth||e.legendItemWidth||i.width+C,this.itemHeight=i=Math.round(e.legendItemHeight||i.height||this.symbolHeight),r&&this.itemX-d+a>(g||t.spacingBox.width-2*d-n.x)&&(this.itemX=d,this.itemY+=m+this.lastLineHeight+f,this.lastLineHeight=0),this.maxItemWidth=Math.max(this.maxItemWidth,a),this.lastItemY=m+this.itemY+f,this.lastLineHeight=Math.max(i,this.lastLineHeight),e._legendItemPos=[this.itemX,this.itemY],r?this.itemX+=a:(this.itemY+=m+i+f,this.lastLineHeight=i),this.offsetWidth=g||Math.max((r?this.itemX-d-h:a)+d,this.offsetWidth)},getAllItems:function(){var e=[];return o(this.chart.series,function(t){var i=t&&t.options;t&&c(i.showInLegend,!r(i.linkedTo)&&void 0,!0)&&(e=e.concat(t.legendItems||("point"===i.legendType?t.data:t)))}),e},adjustMargins:function(e,t){var i=this.chart,n=this.options,s=n.align.charAt(0)+n.verticalAlign.charAt(0)+n.layout.charAt(0);n.floating||o([/(lth|ct|rth)/,/(rtv|rm|rbv)/,/(rbh|cb|lbh)/,/(lbv|lm|ltv)/],function(o,l){o.test(s)&&!r(e[l])&&(i[a[l]]=Math.max(i[a[l]],i.legend[(l+1)%2?"legendHeight":"legendWidth"]+[1,-1,-1,1][l]*n[l%2?"x":"y"]+c(n.margin,12)+t[l]))})},render:function(){var e,t,i,n,r=this,s=r.chart,a=s.renderer,c=r.group,u=r.box,h=r.options,p=r.padding;r.itemX=p,r.itemY=r.initialItemY,r.offsetWidth=0,r.lastItemY=0,c||(r.group=c=a.g("legend").attr({zIndex:7}).add(),r.contentGroup=a.g().attr({zIndex:1}).add(c),r.scrollGroup=a.g().add(r.contentGroup)),r.renderTitle(),e=r.getAllItems(),d(e,function(e,t){return(e.options&&e.options.legendIndex||0)-(t.options&&t.options.legendIndex||0)}),h.reversed&&e.reverse(),r.allItems=e,r.display=t=!!e.length,r.lastLineHeight=0,o(e,function(e){r.renderItem(e)}),i=(h.width||r.offsetWidth)+p,n=r.lastItemY+r.lastLineHeight+r.titleHeight,n=r.handleOverflow(n),n+=p,u||(r.box=u=a.rect().addClass("highcharts-legend-box").attr({r:h.borderRadius}).add(c),u.isNew=!0),u.attr({stroke:h.borderColor,"stroke-width":h.borderWidth||0,fill:h.backgroundColor||"none"}).shadow(h.shadow),0<i&&0<n&&(u[u.isNew?"attr":"animate"](u.crisp({x:0,y:0,width:i,height:n},u.strokeWidth())),u.isNew=!1),u[t?"show":"hide"](),r.legendWidth=i,r.legendHeight=n,o(e,function(e){r.positionItem(e)}),t&&c.align(l(h,{width:i,height:n}),!0,"spacingBox"),s.isResizing||this.positionCheckboxes()},handleOverflow:function(e){var t,i,n=this,r=this.chart,s=r.renderer,a=this.options,l=a.y,u=this.padding,r=r.spacingBox.height+("top"===a.verticalAlign?-l:l)-u,l=a.maxHeight,d=this.clipRect,h=a.navigation,p=c(h.animation,!0),g=h.arrowSize||12,f=this.nav,m=this.pages,v=this.allItems,y=function(e){"number"==typeof e?d.attr({height:e}):d&&(n.clipRect=d.destroy(),n.contentGroup.clip()),n.contentGroup.div&&(n.contentGroup.div.style.clip=e?"rect("+u+"px,9999px,"+(u+e)+"px,0)":"auto")};return"horizontal"!==a.layout||"middle"===a.verticalAlign||a.floating||(r/=2),l&&(r=Math.min(r,l)),m.length=0,e>r&&!1!==h.enabled?(this.clipHeight=t=Math.max(r-20-this.titleHeight-u,0),this.currentPage=c(this.currentPage,1),this.fullHeight=e,o(v,function(e,n){var r=e._legendItemPos[1];e=Math.round(e.legendItem.getBBox().height);var o=m.length;(!o||r-m[o-1]>t&&(i||r)!==m[o-1])&&(m.push(i||r),o++),n===v.length-1&&r+e-m[o-1]>t&&m.push(r),r!==i&&(i=r)}),d||(d=n.clipRect=s.clipRect(0,u,9999,0),n.contentGroup.clip(d)),y(t),f||(this.nav=f=s.g().attr({zIndex:1}).add(this.group),this.up=s.symbol("triangle",0,0,g,g).on("click",function(){n.scroll(-1,p)}).add(f),this.pager=s.text("",15,10).addClass("highcharts-legend-navigation").css(h.style).add(f),this.down=s.symbol("triangle-down",0,0,g,g).on("click",function(){n.scroll(1,p)}).add(f)),n.scroll(0),e=r):f&&(y(),this.nav=f.destroy(),this.scrollGroup.attr({translateY:1}),this.clipHeight=0),e},scroll:function(e,t){var i=this.pages,n=i.length;e=this.currentPage+e;var r=this.clipHeight,o=this.options.navigation,s=this.pager,a=this.padding;e>n&&(e=n),0<e&&(void 0!==t&&u(t,this.chart),this.nav.attr({translateX:a,translateY:r+this.padding+7+this.titleHeight,visibility:"visible"}),this.up.attr({"class":1===e?"highcharts-legend-nav-inactive":"highcharts-legend-nav-active"}),s.attr({text:e+"/"+n}),this.down.attr({x:18+this.pager.getBBox().width,"class":e===n?"highcharts-legend-nav-inactive":"highcharts-legend-nav-active"}),this.up.attr({fill:1===e?o.inactiveColor:o.activeColor}).css({cursor:1===e?"default":"pointer"}),this.down.attr({fill:e===n?o.inactiveColor:o.activeColor}).css({cursor:e===n?"default":"pointer"}),t=-i[e-1]+this.initialItemY,this.scrollGroup.animate({translateY:t}),this.currentPage=e,this.positionCheckboxes(t))}},e.LegendSymbolMixin={drawRectangle:function(e,t){var i=e.symbolHeight,n=e.options.squareSymbol;t.legendSymbol=this.chart.renderer.rect(n?(e.symbolWidth-i)/2:0,e.baseline-i+1,n?i:e.symbolWidth,i,c(e.options.symbolRadius,i/2)).addClass("highcharts-point").attr({zIndex:3}).add(t.legendGroup)},drawLineMarker:function(e){var t=this.options,i=t.marker,n=e.symbolWidth,r=e.symbolHeight,o=r/2,s=this.chart.renderer,a=this.legendGroup;e=e.baseline-Math.round(.3*e.fontMetrics.b);var u;u={"stroke-width":t.lineWidth||0},t.dashStyle&&(u.dashstyle=t.dashStyle),this.legendLine=s.path(["M",0,e,"L",n,e]).addClass("highcharts-graph").attr(u).add(a),i&&!1!==i.enabled&&(t=Math.min(c(i.radius,o),o),0===this.symbol.indexOf("url")&&(i=l(i,{width:r,height:r}),t=0),this.legendSymbol=i=s.symbol(this.symbol,n/2-t,e-t,2*t,2*t,i).addClass("highcharts-point").add(a),i.isMarker=!0)}},(/Trident\/7\.0/.test(h.navigator.userAgent)||s)&&p(e.Legend.prototype,"positionItem",function(e,t){var i=this,n=function(){t._legendItemPos&&e.call(i,t)};n(),setTimeout(n)})}(e),function(e){var t=e.addEvent,i=e.animate,n=e.animObject,r=e.attr,o=e.doc,s=e.Axis,a=e.createElement,l=e.defaultOptions,c=e.discardElement,u=e.charts,d=e.css,h=e.defined,p=e.each,g=e.extend,f=e.find,m=e.fireEvent,v=e.getStyle,y=e.grep,w=e.isNumber,C=e.isObject,b=e.isString,A=e.Legend,x=e.marginNames,S=e.merge,E=e.objectEach,$=e.Pointer,F=e.pick,k=e.pInt,D=e.removeEvent,T=e.seriesTypes,M=e.splat,L=e.svg,R=e.syncTimeout,_=e.win,B=e.Renderer,P=e.Chart=function(){this.getArgs.apply(this,arguments)};e.chart=function(e,t,i){return new P(e,t,i)},g(P.prototype,{callbacks:[],getArgs:function(){var e=[].slice.call(arguments);(b(e[0])||e[0].nodeName)&&(this.renderTo=e.shift()),this.init(e[0],e[1])},init:function(i,n){var r,o,s=i.series,a=i.plotOptions||{};i.series=null,r=S(l,i);for(o in r.plotOptions)r.plotOptions[o].tooltip=a[o]&&S(a[o].tooltip)||void 0;r.tooltip.userOptions=i.chart&&i.chart.forExport&&i.tooltip.userOptions||i.tooltip,r.series=i.series=s,this.userOptions=i,i=r.chart,o=i.events,this.margin=[],this.spacing=[],this.bounds={h:{},v:{}},this.callback=n,this.isResizing=0,this.options=r,this.axes=[],this.series=[],this.hasCartesianSeries=i.showAxes;var c=this;c.index=u.length,u.push(c),e.chartCount++,o&&E(o,function(e,i){t(c,i,e)}),c.xAxis=[],c.yAxis=[],c.pointCount=c.colorCounter=c.symbolCounter=0,c.firstRender()},initSeries:function(t){var i=this.options.chart;return(i=T[t.type||i.type||i.defaultSeriesType])||e.error(17,!0),i=new i,i.init(this,t),i},orderSeries:function(e){var t=this.series;for(e=e||0;e<t.length;e++)t[e]&&(t[e].index=e,t[e].name=t[e].name||"Series "+(t[e].index+1))},isInsidePlot:function(e,t,i){var n=i?t:e;return e=i?e:t,0<=n&&n<=this.plotWidth&&0<=e&&e<=this.plotHeight},redraw:function(t){var i,n,r,o=this.axes,s=this.series,a=this.pointer,l=this.legend,c=this.isDirtyLegend,u=this.hasCartesianSeries,d=this.isDirtyBox,h=this.renderer,f=h.isHidden(),v=[];for(this.setResponsive&&this.setResponsive(!1),e.setAnimation(t,this),f&&this.temporaryDisplay(),this.layOutTitles(),t=s.length;t--;)if(r=s[t],r.options.stacking&&(i=!0,r.isDirty)){n=!0;break}if(n)for(t=s.length;t--;)r=s[t],r.options.stacking&&(r.isDirty=!0);p(s,function(e){e.isDirty&&"point"===e.options.legendType&&(e.updateTotals&&e.updateTotals(),c=!0),e.isDirtyData&&m(e,"updatedData")}),c&&l.options.enabled&&(l.render(),this.isDirtyLegend=!1),i&&this.getStacks(),u&&p(o,function(e){e.updateNames(),e.setScale()}),this.getMargins(),u&&(p(o,function(e){e.isDirty&&(d=!0)}),p(o,function(e){var t=e.min+","+e.max;e.extKey!==t&&(e.extKey=t,v.push(function(){m(e,"afterSetExtremes",g(e.eventArgs,e.getExtremes())),delete e.eventArgs})),(d||i)&&e.redraw()})),d&&this.drawChartBox(),m(this,"predraw"),p(s,function(e){(d||e.isDirty)&&e.visible&&e.redraw(),e.isDirtyData=!1}),a&&a.reset(!0),h.draw(),m(this,"redraw"),m(this,"render"),f&&this.temporaryDisplay(!0),p(v,function(e){e.call()})},get:function(e){function t(t){return t.id===e||t.options&&t.options.id===e}var i,n,r=this.series;for(i=f(this.axes,t)||f(this.series,t),n=0;!i&&n<r.length;n++)i=f(r[n].points||[],t);return i},getAxes:function(){var e=this,t=this.options,i=t.xAxis=M(t.xAxis||{}),t=t.yAxis=M(t.yAxis||{});p(i,function(e,t){e.index=t,e.isX=!0}),p(t,function(e,t){e.index=t}),i=i.concat(t),p(i,function(t){new s(e,t)})},getSelectedPoints:function(){var e=[];return p(this.series,function(t){e=e.concat(y(t.data||[],function(e){return e.selected}))}),e},getSelectedSeries:function(){return y(this.series,function(e){return e.selected})},setTitle:function(e,t,i){var n,r=this,o=r.options;n=o.title=S({style:{color:"#333333",fontSize:o.isStock?"16px":"18px"}},o.title,e),o=o.subtitle=S({style:{color:"#666666"}},o.subtitle,t),p([["title",e,n],["subtitle",t,o]],function(e,t){var i=e[0],n=r[i],o=e[1];e=e[2],n&&o&&(r[i]=n=n.destroy()),e&&e.text&&!n&&(r[i]=r.renderer.text(e.text,0,0,e.useHTML).attr({align:e.align,"class":"highcharts-"+i,zIndex:e.zIndex||4}).add(),r[i].update=function(e){r.setTitle(!t&&e,t&&e)},r[i].css(e.style))}),r.layOutTitles(i)},layOutTitles:function(e){var t,i=0,n=this.renderer,r=this.spacingBox;p(["title","subtitle"],function(e){var t=this[e],o=this.options[e];e="title"===e?-3:o.verticalAlign?0:i+2;var s;t&&(s=o.style.fontSize,s=n.fontMetrics(s,t).b,t.css({width:(o.width||r.width+o.widthAdjust)+"px"}).align(g({y:e+s},o),!1,"spacingBox"),o.floating||o.verticalAlign||(i=Math.ceil(i+t.getBBox(o.useHTML).height)))},this),t=this.titleOffset!==i,this.titleOffset=i,!this.isDirtyBox&&t&&(this.isDirtyBox=t,this.hasRendered&&F(e,!0)&&this.isDirtyBox&&this.redraw())},getChartSize:function(){var t=this.options.chart,i=t.width,t=t.height,n=this.renderTo;h(i)||(this.containerWidth=v(n,"width")),h(t)||(this.containerHeight=v(n,"height")),this.chartWidth=Math.max(0,i||this.containerWidth||600),this.chartHeight=Math.max(0,e.relativeLength(t,this.chartWidth)||this.containerHeight||400)},temporaryDisplay:function(t){var i=this.renderTo;if(t)for(;i&&i.style;)i.hcOrigStyle&&(e.css(i,i.hcOrigStyle),delete i.hcOrigStyle),i=i.parentNode;else for(;i&&i.style;)"none"===v(i,"display",!1)&&(i.hcOrigStyle={display:i.style.display,height:i.style.height,overflow:i.style.overflow},t={display:"block",overflow:"hidden"},i!==this.renderTo&&(t.height=0),e.css(i,t),i.style.setProperty&&i.style.setProperty("display","block","important")),i=i.parentNode},setClassName:function(e){this.container.className="highcharts-container "+(e||"")},getContainer:function(){var t,i,n,s=this.options,l=s.chart;t=this.renderTo;var c,d=e.uniqueKey();t||(this.renderTo=t=l.renderTo),b(t)&&(this.renderTo=t=o.getElementById(t)),t||e.error(13,!0),i=k(r(t,"data-highcharts-chart")),w(i)&&u[i]&&u[i].hasRendered&&u[i].destroy(),r(t,"data-highcharts-chart",this.index),t.innerHTML="",l.skipClone||t.offsetWidth||this.temporaryDisplay(),this.getChartSize(),i=this.chartWidth,n=this.chartHeight,c=g({position:"relative",overflow:"hidden",width:i+"px",height:n+"px",textAlign:"left",lineHeight:"normal",zIndex:0,"-webkit-tap-highlight-color":"rgba(0,0,0,0)"},l.style),this.container=t=a("div",{id:d},c,t),this._cursor=t.style.cursor,this.renderer=new(e[l.renderer]||B)(t,i,n,null,l.forExport,s.exporting&&s.exporting.allowHTML),this.setClassName(l.className),this.renderer.setStyle(l.style),this.renderer.chartIndex=this.index},getMargins:function(e){var t=this.spacing,i=this.margin,n=this.titleOffset;this.resetMargins(),n&&!h(i[0])&&(this.plotTop=Math.max(this.plotTop,n+this.options.title.margin+t[0])),this.legend.display&&this.legend.adjustMargins(i,t),this.extraMargin&&(this[this.extraMargin.type]=(this[this.extraMargin.type]||0)+this.extraMargin.value),this.extraTopMargin&&(this.plotTop+=this.extraTopMargin),e||this.getAxisMargins()},getAxisMargins:function(){var e=this,t=e.axisOffset=[0,0,0,0],i=e.margin;e.hasCartesianSeries&&p(e.axes,function(e){e.visible&&e.getOffset()}),p(x,function(n,r){h(i[r])||(e[n]+=t[r])}),e.setChartSize()},reflow:function(e){var t=this,i=t.options.chart,n=t.renderTo,r=h(i.width),s=i.width||v(n,"width"),i=i.height||v(n,"height"),n=e?e.target:_;r||t.isPrinting||!s||!i||n!==_&&n!==o||(s===t.containerWidth&&i===t.containerHeight||(clearTimeout(t.reflowTimeout),t.reflowTimeout=R(function(){t.container&&t.setSize(void 0,void 0,!1)},e?100:0)),t.containerWidth=s,t.containerHeight=i)},initReflow:function(){var e,i=this;e=t(_,"resize",function(e){i.reflow(e)}),t(i,"destroy",e)},setSize:function(t,r,o){var s=this,a=s.renderer;s.isResizing+=1,e.setAnimation(o,s),s.oldChartHeight=s.chartHeight,s.oldChartWidth=s.chartWidth,void 0!==t&&(s.options.chart.width=t),void 0!==r&&(s.options.chart.height=r),s.getChartSize(),t=a.globalAnimation,(t?i:d)(s.container,{width:s.chartWidth+"px",height:s.chartHeight+"px"},t),s.setChartSize(!0),a.setSize(s.chartWidth,s.chartHeight,o),p(s.axes,function(e){e.isDirty=!0,e.setScale()}),s.isDirtyLegend=!0,s.isDirtyBox=!0,s.layOutTitles(),s.getMargins(),s.redraw(o),s.oldChartHeight=null,m(s,"resize"),R(function(){s&&m(s,"endResize",null,function(){--s.isResizing})},n(t).duration)},setChartSize:function(e){function t(e){return e=g[e]||0,Math.max(s||e,e)/2}var i,n,r,o,s,a=this.inverted,l=this.renderer,c=this.chartWidth,u=this.chartHeight,d=this.options.chart,h=this.spacing,g=this.clipOffset;this.plotLeft=i=Math.round(this.plotLeft),this.plotTop=n=Math.round(this.plotTop),this.plotWidth=r=Math.max(0,Math.round(c-i-this.marginRight)),this.plotHeight=o=Math.max(0,Math.round(u-n-this.marginBottom)),this.plotSizeX=a?o:r,this.plotSizeY=a?r:o,this.plotBorderWidth=d.plotBorderWidth||0,this.spacingBox=l.spacingBox={x:h[3],y:h[0],width:c-h[3]-h[1],height:u-h[0]-h[2]},this.plotBox=l.plotBox={x:i,y:n,width:r,height:o},s=2*Math.floor(this.plotBorderWidth/2),a=Math.ceil(t(3)),l=Math.ceil(t(0)),this.clipBox={x:a,y:l,width:Math.floor(this.plotSizeX-t(1)-a),height:Math.max(0,Math.floor(this.plotSizeY-t(2)-l))},e||p(this.axes,function(e){e.setAxisSize(),e.setAxisTranslation()})},resetMargins:function(){var e=this,t=e.options.chart;p(["margin","spacing"],function(i){var n=t[i],r=C(n)?n:[n,n,n,n];p(["Top","Right","Bottom","Left"],function(n,o){e[i][o]=F(t[i+n],r[o])})}),p(x,function(t,i){e[t]=F(e.margin[i],e.spacing[i])}),e.axisOffset=[0,0,0,0],e.clipOffset=[]},drawChartBox:function(){var e,t,i=this.options.chart,n=this.renderer,r=this.chartWidth,o=this.chartHeight,s=this.chartBackground,a=this.plotBackground,l=this.plotBorder,c=this.plotBGImage,u=i.backgroundColor,d=i.plotBackgroundColor,h=i.plotBackgroundImage,p=this.plotLeft,g=this.plotTop,f=this.plotWidth,m=this.plotHeight,v=this.plotBox,y=this.clipRect,w=this.clipBox,C="animate";s||(this.chartBackground=s=n.rect().addClass("highcharts-background").add(),C="attr"),e=i.borderWidth||0,t=e+(i.shadow?8:0),u={fill:u||"none"},(e||s["stroke-width"])&&(u.stroke=i.borderColor,u["stroke-width"]=e),s.attr(u).shadow(i.shadow),s[C]({x:t/2,y:t/2,width:r-t-e%2,height:o-t-e%2,r:i.borderRadius}),C="animate",a||(C="attr",this.plotBackground=a=n.rect().addClass("highcharts-plot-background").add()),a[C](v),a.attr({fill:d||"none"}).shadow(i.plotShadow),h&&(c?c.animate(v):this.plotBGImage=n.image(h,p,g,f,m).add()),y?y.animate({width:w.width,height:w.height}):this.clipRect=n.clipRect(w),C="animate",l||(C="attr",this.plotBorder=l=n.rect().addClass("highcharts-plot-border").attr({zIndex:1}).add()),l.attr({stroke:i.plotBorderColor,"stroke-width":i.plotBorderWidth||0,fill:"none"}),l[C](l.crisp({x:p,y:g,width:f,height:m},-l.strokeWidth())),this.isDirtyBox=!1},propFromSeries:function(){var e,t,i,n=this,r=n.options.chart,o=n.options.series;p(["inverted","angular","polar"],function(s){for(e=T[r.type||r.defaultSeriesType],i=r[s]||e&&e.prototype[s],t=o&&o.length;!i&&t--;)(e=T[o[t].type])&&e.prototype[s]&&(i=!0);n[s]=i})},linkSeries:function(){var e=this,t=e.series;p(t,function(e){e.linkedSeries.length=0}),p(t,function(t){var i=t.options.linkedTo;b(i)&&(i=":previous"===i?e.series[t.index-1]:e.get(i))&&i.linkedParent!==t&&(i.linkedSeries.push(t),t.linkedParent=i,t.visible=F(t.options.visible,i.options.visible,t.visible))})},renderSeries:function(){p(this.series,function(e){e.translate(),e.render()})},renderLabels:function(){var e=this,t=e.options.labels;t.items&&p(t.items,function(i){var n=g(t.style,i.style),r=k(n.left)+e.plotLeft,o=k(n.top)+e.plotTop+12;delete n.left,delete n.top,e.renderer.text(i.html,r,o).attr({zIndex:2}).css(n).add()})},render:function(){var e,t,i,n=this.axes,r=this.renderer,o=this.options;this.setTitle(),this.legend=new A(this,o.legend),this.getStacks&&this.getStacks(),this.getMargins(!0),this.setChartSize(),o=this.plotWidth,e=this.plotHeight-=21,p(n,function(e){e.setScale()}),this.getAxisMargins(),t=1.1<o/this.plotWidth,i=1.05<e/this.plotHeight,(t||i)&&(p(n,function(e){(e.horiz&&t||!e.horiz&&i)&&e.setTickInterval(!0)}),this.getMargins()),this.drawChartBox(),this.hasCartesianSeries&&p(n,function(e){e.visible&&e.render()}),this.seriesGroup||(this.seriesGroup=r.g("series-group").attr({zIndex:3}).add()),this.renderSeries(),this.renderLabels(),this.addCredits(),this.setResponsive&&this.setResponsive(),this.hasRendered=!0},addCredits:function(e){var t=this;e=S(!0,this.options.credits,e),e.enabled&&!this.credits&&(this.credits=this.renderer.text(e.text+(this.mapCredits||""),0,0).addClass("highcharts-credits").on("click",function(){e.href&&(_.location.href=e.href)}).attr({align:e.position.align,zIndex:8}).css(e.style).add().align(e.position),this.credits.update=function(e){t.credits=t.credits.destroy(),t.addCredits(e)})},destroy:function(){var t,i=this,n=i.axes,r=i.series,o=i.container,s=o&&o.parentNode;for(m(i,"destroy"),i.renderer.forExport?e.erase(u,i):u[i.index]=void 0,e.chartCount--,i.renderTo.removeAttribute("data-highcharts-chart"),D(i),t=n.length;t--;)n[t]=n[t].destroy();for(this.scroller&&this.scroller.destroy&&this.scroller.destroy(),t=r.length;t--;)r[t]=r[t].destroy();p("title subtitle chartBackground plotBackground plotBGImage plotBorder seriesGroup clipRect credits pointer rangeSelector legend resetZoomButton tooltip renderer".split(" "),function(e){var t=i[e];t&&t.destroy&&(i[e]=t.destroy())}),o&&(o.innerHTML="",D(o),s&&c(o)),E(i,function(e,t){delete i[t]})},isReadyToRender:function(){var e=this;return!(!L&&_==_.top&&"complete"!==o.readyState)||(o.attachEvent("onreadystatechange",function(){o.detachEvent("onreadystatechange",e.firstRender),"complete"===o.readyState&&e.firstRender()}),!1)},firstRender:function(){var e=this,t=e.options;e.isReadyToRender()&&(e.getContainer(),m(e,"init"),e.resetMargins(),e.setChartSize(),e.propFromSeries(),e.getAxes(),p(t.series||[],function(t){e.initSeries(t)}),e.linkSeries(),m(e,"beforeRender"),$&&(e.pointer=new $(e,t)),e.render(),!e.renderer.imgCount&&e.onload&&e.onload(),e.temporaryDisplay(!0))},onload:function(){p([this.callback].concat(this.callbacks),function(e){e&&void 0!==this.index&&e.apply(this,[this])},this),m(this,"load"),m(this,"render"),h(this.index)&&!1!==this.options.chart.reflow&&this.initReflow(),this.onload=null}})}(e),function(e){var t,i=e.each,n=e.extend,r=e.erase,o=e.fireEvent,s=e.format,a=e.isArray,l=e.isNumber,c=e.pick,u=e.removeEvent;e.Point=t=function(){},e.Point.prototype={init:function(e,t,i){return this.series=e,this.color=e.color,this.applyOptions(t,i),e.options.colorByPoint?(t=e.options.colors||e.chart.options.colors,this.color=this.color||t[e.colorCounter],t=t.length,i=e.colorCounter,++e.colorCounter===t&&(e.colorCounter=0)):i=e.colorIndex,this.colorIndex=c(this.colorIndex,i),e.chart.pointCount++,this},applyOptions:function(e,i){var r=this.series,o=r.options.pointValKey||r.pointValKey;return e=t.prototype.optionsToObject.call(this,e),n(this,e),this.options=this.options?n(this.options,e):e,e.group&&delete this.group,o&&(this.y=this[o]),this.isNull=c(this.isValid&&!this.isValid(),null===this.x||!l(this.y,!0)),this.selected&&(this.state="select"),"name"in this&&void 0===i&&r.xAxis&&r.xAxis.hasNames&&(this.x=r.xAxis.nameToX(this)),void 0===this.x&&r&&(this.x=void 0===i?r.autoIncrement(this):i),this},optionsToObject:function(e){var t={},i=this.series,n=i.options.keys,r=n||i.pointArrayMap||["y"],o=r.length,s=0,c=0;if(l(e)||null===e)t[r[0]]=e;else if(a(e))for(!n&&e.length>o&&(i=typeof e[0],"string"===i?t.name=e[0]:"number"===i&&(t.x=e[0]),s++);c<o;)n&&void 0===e[s]||(t[r[c]]=e[s]),s++,c++;else"object"==typeof e&&(t=e,e.dataLabels&&(i._hasPointLabels=!0),e.marker&&(i._hasPointMarkers=!0));return t},getClassName:function(){return"highcharts-point"+(this.selected?" highcharts-point-select":"")+(this.negative?" highcharts-negative":"")+(this.isNull?" highcharts-null-point":"")+(void 0!==this.colorIndex?" highcharts-color-"+this.colorIndex:"")+(this.options.className?" "+this.options.className:"")+(this.zone&&this.zone.className?" "+this.zone.className.replace("highcharts-negative",""):"")},getZone:function(){var e,t=this.series,i=t.zones,t=t.zoneAxis||"y",n=0;for(e=i[n];this[t]>=e.value;)e=i[++n];return e&&e.color&&!this.options.color&&(this.color=e.color),e},destroy:function(){var e,t=this.series.chart,i=t.hoverPoints;t.pointCount--,i&&(this.setState(),r(i,this),i.length||(t.hoverPoints=null)),this===t.hoverPoint&&this.onMouseOut(),(this.graphic||this.dataLabel)&&(u(this),this.destroyElements()),this.legendItem&&t.legend.destroyItem(this);for(e in this)this[e]=null},destroyElements:function(){for(var e,t=["graphic","dataLabel","dataLabelUpper","connector","shadowGroup"],i=6;i--;)e=t[i],this[e]&&(this[e]=this[e].destroy())},getLabelConfig:function(){return{x:this.category,y:this.y,color:this.color,colorIndex:this.colorIndex,key:this.name||this.category,series:this.series,point:this,percentage:this.percentage,total:this.total||this.stackTotal}},tooltipFormatter:function(e){var t=this.series,n=t.tooltipOptions,r=c(n.valueDecimals,""),o=n.valuePrefix||"",a=n.valueSuffix||"";return i(t.pointArrayMap||["y"],function(t){t="{point."+t,(o||a)&&(e=e.replace(t+"}",o+t+"}"+a)),e=e.replace(t+"}",t+":,."+r+"f}")}),s(e,{point:this,series:this.series})},firePointEvent:function(e,t,i){var n=this,r=this.series.options;(r.point.events[e]||n.options&&n.options.events&&n.options.events[e])&&this.importEvents(),"click"===e&&r.allowPointSelect&&(i=function(e){n.select&&n.select(null,e.ctrlKey||e.metaKey||e.shiftKey)}),o(this,e,t,i)},visible:!0}}(e),function(e){var t=e.addEvent,i=e.animObject,n=e.arrayMax,r=e.arrayMin,o=e.correctFloat,s=e.Date,a=e.defaultOptions,l=e.defaultPlotOptions,c=e.defined,u=e.each,d=e.erase,h=e.extend,p=e.fireEvent,g=e.grep,f=e.isArray,m=e.isNumber,v=e.isString,y=e.merge,w=e.objectEach,C=e.pick,b=e.removeEvent,A=e.splat,x=e.SVGElement,S=e.syncTimeout,E=e.win;e.Series=e.seriesType("line",null,{lineWidth:2,allowPointSelect:!1,showCheckbox:!1,animation:{duration:1e3},events:{},marker:{lineWidth:0,lineColor:"#ffffff",radius:4,states:{hover:{animation:{duration:50},enabled:!0,radiusPlus:2,lineWidthPlus:1},select:{fillColor:"#cccccc",lineColor:"#000000",lineWidth:2}}},point:{events:{}},dataLabels:{align:"center",formatter:function(){return null===this.y?"":e.numberFormat(this.y,-1)},style:{fontSize:"11px",fontWeight:"bold",color:"contrast",textOutline:"1px contrast"},verticalAlign:"bottom",x:0,y:0,padding:5},cropThreshold:300,pointRange:0,softThreshold:!0,states:{hover:{animation:{duration:50},lineWidthPlus:1,marker:{},halo:{size:10,opacity:.25}},select:{marker:{}}},stickyTracking:!0,turboThreshold:1e3,findNearestPointBy:"x"},{isCartesian:!0,pointClass:e.Point,sorted:!0,requireSorting:!0,directTouch:!1,axisTypes:["xAxis","yAxis"],colorCounter:0,parallelArrays:["x","y"],coll:"series",init:function(e,i){var n,r,o=this,s=e.series;o.chart=e,o.options=i=o.setOptions(i),o.linkedSeries=[],o.bindAxes(),h(o,{name:i.name,state:"",visible:!1!==i.visible,selected:!0===i.selected}),n=i.events,w(n,function(e,i){t(o,i,e)}),(n&&n.click||i.point&&i.point.events&&i.point.events.click||i.allowPointSelect)&&(e.runTrackerClick=!0),o.getColor(),o.getSymbol(),u(o.parallelArrays,function(e){o[e+"Data"]=[]}),o.setData(i.data,!1),o.isCartesian&&(e.hasCartesianSeries=!0),s.length&&(r=s[s.length-1]),o._i=C(r&&r._i,-1)+1,e.orderSeries(this.insert(s))},insert:function(e){var t,i=this.options.index;if(m(i)){for(t=e.length;t--;)if(i>=C(e[t].options.index,e[t]._i)){e.splice(t+1,0,this);break}-1===t&&e.unshift(this),t+=1}else e.push(this);return C(t,e.length-1)},bindAxes:function(){var t,i=this,n=i.options,r=i.chart;u(i.axisTypes||[],function(o){u(r[o],function(e){t=e.options,(n[o]===t.index||void 0!==n[o]&&n[o]===t.id||void 0===n[o]&&0===t.index)&&(i.insert(e.series),i[o]=e,e.isDirty=!0)}),i[o]||i.optionalAxis===o||e.error(18,!0)})},updateParallelArrays:function(e,t){var i=e.series,n=arguments,r=m(t)?function(n){var r="y"===n&&i.toYData?i.toYData(e):e[n];i[n+"Data"][t]=r}:function(e){Array.prototype[t].apply(i[e+"Data"],Array.prototype.slice.call(n,2))};u(i.parallelArrays,r)},autoIncrement:function(){var e,t=this.options,i=this.xIncrement,n=t.pointIntervalUnit,i=C(i,t.pointStart,0);return this.pointInterval=e=C(this.pointInterval,t.pointInterval,1),n&&(t=new s(i),"day"===n?t=+t[s.hcSetDate](t[s.hcGetDate]()+e):"month"===n?t=+t[s.hcSetMonth](t[s.hcGetMonth]()+e):"year"===n&&(t=+t[s.hcSetFullYear](t[s.hcGetFullYear]()+e)),e=t-i),this.xIncrement=i+e,i},setOptions:function(e){var t=this.chart,i=t.options,n=i.plotOptions,r=(t.userOptions||{}).plotOptions||{},o=n[this.type];return this.userOptions=e,t=y(o,n.series,e),this.tooltipOptions=y(a.tooltip,a.plotOptions.series&&a.plotOptions.series.tooltip,a.plotOptions[this.type].tooltip,i.tooltip.userOptions,n.series&&n.series.tooltip,n[this.type].tooltip,e.tooltip),this.stickyTracking=C(e.stickyTracking,r[this.type]&&r[this.type].stickyTracking,r.series&&r.series.stickyTracking,!(!this.tooltipOptions.shared||this.noSharedTooltip)||t.stickyTracking),null===o.marker&&delete t.marker,this.zoneAxis=t.zoneAxis,e=this.zones=(t.zones||[]).slice(),!t.negativeColor&&!t.negativeFillColor||t.zones||e.push({value:t[this.zoneAxis+"Threshold"]||t.threshold||0,className:"highcharts-negative",color:t.negativeColor,fillColor:t.negativeFillColor}),e.length&&c(e[e.length-1].value)&&e.push({color:this.color,fillColor:this.fillColor}),t},getCyclic:function(e,t,i){var n,r=this.chart,o=this.userOptions,s=e+"Index",a=e+"Counter",l=i?i.length:C(r.options.chart[e+"Count"],r[e+"Count"]);t||(n=C(o[s],o["_"+s]),c(n)||(r.series.length||(r[a]=0),o["_"+s]=n=r[a]%l,r[a]+=1),i&&(t=i[n])),void 0!==n&&(this[s]=n),this[e]=t},getColor:function(){this.options.colorByPoint?this.options.color=null:this.getCyclic("color",this.options.color||l[this.type].color,this.chart.options.colors)},getSymbol:function(){this.getCyclic("symbol",this.options.marker.symbol,this.chart.options.symbols)},drawLegendSymbol:e.LegendSymbolMixin.drawLineMarker,setData:function(t,i,n,r){var o,s=this,a=s.points,l=a&&a.length||0,c=s.options,d=s.chart,h=null,p=s.xAxis,g=c.turboThreshold,y=this.xData,w=this.yData,b=(o=s.pointArrayMap)&&o.length;if(t=t||[],o=t.length,i=C(i,!0),!1!==r&&o&&l===o&&!s.cropped&&!s.hasGroupedData&&s.visible)u(t,function(e,t){a[t].update&&e!==c.data[t]&&a[t].update(e,!1,null,!1)});else{if(s.xIncrement=null,s.colorCounter=0,u(this.parallelArrays,function(e){s[e+"Data"].length=0}),g&&o>g){for(n=0;null===h&&n<o;)h=t[n],n++;if(m(h))for(n=0;n<o;n++)y[n]=this.autoIncrement(),w[n]=t[n];else if(f(h))if(b)for(n=0;n<o;n++)h=t[n],y[n]=h[0],w[n]=h.slice(1,b+1);else for(n=0;n<o;n++)h=t[n],y[n]=h[0],w[n]=h[1];else e.error(12)}else for(n=0;n<o;n++)void 0!==t[n]&&(h={series:s},s.pointClass.prototype.applyOptions.apply(h,[t[n]]),s.updateParallelArrays(h,n));for(v(w[0])&&e.error(14,!0),s.data=[],s.options.data=s.userOptions.data=t,n=l;n--;)a[n]&&a[n].destroy&&a[n].destroy();p&&(p.minRange=p.userMinRange),s.isDirty=d.isDirtyBox=!0,s.isDirtyData=!!a,n=!1}"point"===c.legendType&&(this.processData(),this.generatePoints()),i&&d.redraw(n)},processData:function(t){var i,n=this.xData,r=this.yData,o=n.length;i=0;var s,a,l,c=this.xAxis,u=this.options;l=u.cropThreshold;var d,h,p=this.getExtremesFromAll||u.getExtremesFromAll,g=this.isCartesian,u=c&&c.val2lin,f=c&&c.isLog;if(g&&!this.isDirty&&!c.isDirty&&!this.yAxis.isDirty&&!t)return!1;for(c&&(t=c.getExtremes(),d=t.min,h=t.max),g&&this.sorted&&!p&&(!l||o>l||this.forceCrop)&&(n[o-1]<d||n[0]>h?(n=[],r=[]):(n[0]<d||n[o-1]>h)&&(i=this.cropData(this.xData,this.yData,d,h),n=i.xData,r=i.yData,i=i.start,s=!0)),l=n.length||1;--l;)o=f?u(n[l])-u(n[l-1]):n[l]-n[l-1],0<o&&(void 0===a||o<a)?a=o:0>o&&this.requireSorting&&e.error(15);this.cropped=s,this.cropStart=i,this.processedXData=n,this.processedYData=r,this.closestPointRange=a},cropData:function(e,t,i,n){var r,o=e.length,s=0,a=o,l=C(this.cropShoulder,1);for(r=0;r<o;r++)if(e[r]>=i){s=Math.max(0,r-l);break}for(i=r;i<o;i++)if(e[i]>n){a=i+l;break}return{xData:e.slice(s,a),yData:t.slice(s,a),start:s,end:a}},
generatePoints:function(){var e,t,i,n,r=this.options,o=r.data,s=this.data,a=this.processedXData,l=this.processedYData,c=this.pointClass,u=a.length,d=this.cropStart||0,h=this.hasGroupedData,r=r.keys,p=[];for(s||h||(s=[],s.length=o.length,s=this.data=s),r&&h&&(this.options.keys=!1),n=0;n<u;n++)t=d+n,h?(i=(new c).init(this,[a[n]].concat(A(l[n]))),i.dataGroup=this.groupMap[n]):(i=s[t])||void 0===o[t]||(s[t]=i=(new c).init(this,o[t],a[n])),i&&(i.index=t,p[n]=i);if(this.options.keys=r,s&&(u!==(e=s.length)||h))for(n=0;n<e;n++)n!==d||h||(n+=u),s[n]&&(s[n].destroyElements(),s[n].plotX=void 0);this.data=s,this.points=p},getExtremes:function(e){var t,i=this.yAxis,o=this.processedXData,s=[],a=0;t=this.xAxis.getExtremes();var l,c,u,d,h=t.min,p=t.max;for(e=e||this.stackedYData||this.processedYData||[],t=e.length,d=0;d<t;d++)if(c=o[d],u=e[d],l=(m(u,!0)||f(u))&&(!i.positiveValuesOnly||u.length||0<u),c=this.getExtremesFromAll||this.options.getExtremesFromAll||this.cropped||(o[d]||c)>=h&&(o[d]||c)<=p,l&&c)if(l=u.length)for(;l--;)null!==u[l]&&(s[a++]=u[l]);else s[a++]=u;this.dataMin=r(s),this.dataMax=n(s)},translate:function(){this.processedXData||this.processData(),this.generatePoints();var e,t,i,n,r=this.options,s=r.stacking,a=this.xAxis,l=a.categories,u=this.yAxis,d=this.points,h=d.length,p=!!this.modifyValue,g=r.pointPlacement,f="between"===g||m(g),v=r.threshold,y=r.startFromThreshold?v:0,w=Number.MAX_VALUE;for("between"===g&&(g=.5),m(g)&&(g*=C(r.pointRange||a.pointRange)),r=0;r<h;r++){var b=d[r],A=b.x,x=b.y;t=b.low;var S,E=s&&u.stacks[(this.negStacks&&x<(y?0:v)?"-":"")+this.stackKey];u.positiveValuesOnly&&null!==x&&0>=x&&(b.isNull=!0),b.plotX=e=o(Math.min(Math.max(-1e5,a.translate(A,0,0,0,1,g,"flags"===this.type)),1e5)),s&&this.visible&&!b.isNull&&E&&E[A]&&(n=this.getStackIndicator(n,A,this.index),S=E[A],x=S.points[n.key],t=x[0],x=x[1],t===y&&n.key===E[A].base&&(t=C(v,u.min)),u.positiveValuesOnly&&0>=t&&(t=null),b.total=b.stackTotal=S.total,b.percentage=S.total&&b.y/S.total*100,b.stackY=x,S.setOffset(this.pointXOffset||0,this.barW||0)),b.yBottom=c(t)?u.translate(t,0,1,0,1):null,p&&(x=this.modifyValue(x,b)),b.plotY=t="number"==typeof x&&Infinity!==x?Math.min(Math.max(-1e5,u.translate(x,0,1,0,1)),1e5):void 0,b.isInside=void 0!==t&&0<=t&&t<=u.len&&0<=e&&e<=a.len,b.clientX=f?o(a.translate(A,0,0,0,1,g)):e,b.negative=b.y<(v||0),b.category=l&&void 0!==l[b.x]?l[b.x]:b.x,b.isNull||(void 0!==i&&(w=Math.min(w,Math.abs(e-i))),i=e),b.zone=this.zones.length&&b.getZone()}this.closestPointRangePx=w},getValidPoints:function(e,t){var i=this.chart;return g(e||this.points||[],function(e){return!(t&&!i.isInsidePlot(e.plotX,e.plotY,i.inverted))&&!e.isNull})},setClip:function(e){var t=this.chart,i=this.options,n=t.renderer,r=t.inverted,o=this.clipBox,s=o||t.clipBox,a=this.sharedClipKey||["_sharedClip",e&&e.duration,e&&e.easing,s.height,i.xAxis,i.yAxis].join(),l=t[a],c=t[a+"m"];l||(e&&(s.width=0,t[a+"m"]=c=n.clipRect(-99,r?-t.plotLeft:-t.plotTop,99,r?t.chartWidth:t.chartHeight)),t[a]=l=n.clipRect(s),l.count={length:0}),e&&!l.count[this.index]&&(l.count[this.index]=!0,l.count.length+=1),!1!==i.clip&&(this.group.clip(e||o?l:t.clipRect),this.markerGroup.clip(c),this.sharedClipKey=a),e||(l.count[this.index]&&(delete l.count[this.index],--l.count.length),0===l.count.length&&a&&t[a]&&(o||(t[a]=t[a].destroy()),t[a+"m"]&&(t[a+"m"]=t[a+"m"].destroy())))},animate:function(e){var t,n=this.chart,r=i(this.options.animation);e?this.setClip(r):(t=this.sharedClipKey,(e=n[t])&&e.animate({width:n.plotSizeX},r),n[t+"m"]&&n[t+"m"].animate({width:n.plotSizeX+99},r),this.animate=null)},afterAnimate:function(){this.setClip(),p(this,"afterAnimate")},drawPoints:function(){var e,t,i,n,r,o,s,a,l=this.points,c=this.chart,u=this.options.marker,d=this[this.specialGroup]||this.markerGroup,h=C(u.enabled,!!this.xAxis.isRadial||null,this.closestPointRangePx>=2*u.radius);if(!1!==u.enabled||this._hasPointMarkers)for(t=0;t<l.length;t++)i=l[t],e=i.plotY,n=i.graphic,r=i.marker||{},o=!!i.marker,s=h&&void 0===r.enabled||r.enabled,a=i.isInside,s&&m(e)&&null!==i.y?(e=C(r.symbol,this.symbol),i.hasImage=0===e.indexOf("url"),s=this.markerAttribs(i,i.selected&&"select"),n?n[a?"show":"hide"](!0).animate(s):a&&(0<s.width||i.hasImage)&&(i.graphic=n=c.renderer.symbol(e,s.x,s.y,s.width,s.height,o?r:u).add(d)),n&&n.attr(this.pointAttribs(i,i.selected&&"select")),n&&n.addClass(i.getClassName(),!0)):n&&(i.graphic=n.destroy())},markerAttribs:function(e,t){var i=this.options.marker,n=e.marker||{},r=C(n.radius,i.radius);return t&&(i=i.states[t],t=n.states&&n.states[t],r=C(t&&t.radius,i&&i.radius,r+(i&&i.radiusPlus||0))),e.hasImage&&(r=0),e={x:Math.floor(e.plotX)-r,y:e.plotY-r},r&&(e.width=e.height=2*r),e},pointAttribs:function(e,t){var i=this.options.marker,n=e&&e.options,r=n&&n.marker||{},o=this.color,s=n&&n.color,a=e&&e.color,n=C(r.lineWidth,i.lineWidth);return e=e&&e.zone&&e.zone.color,o=s||e||a||o,e=r.fillColor||i.fillColor||o,o=r.lineColor||i.lineColor||o,t&&(i=i.states[t],t=r.states&&r.states[t]||{},n=C(t.lineWidth,i.lineWidth,n+C(t.lineWidthPlus,i.lineWidthPlus,0)),e=t.fillColor||i.fillColor||e,o=t.lineColor||i.lineColor||o),{stroke:o,"stroke-width":n,fill:e}},destroy:function(){var e,t,i,n,r=this,o=r.chart,s=/AppleWebKit\/533/.test(E.navigator.userAgent),a=r.data||[];for(p(r,"destroy"),b(r),u(r.axisTypes||[],function(e){(n=r[e])&&n.series&&(d(n.series,r),n.isDirty=n.forceRedraw=!0)}),r.legendItem&&r.chart.legend.destroyItem(r),t=a.length;t--;)(i=a[t])&&i.destroy&&i.destroy();r.points=null,clearTimeout(r.animationTimeout),w(r,function(t,i){t instanceof x&&!t.survive&&(e=s&&"group"===i?"hide":"destroy",t[e]())}),o.hoverSeries===r&&(o.hoverSeries=null),d(o.series,r),o.orderSeries(),w(r,function(e,t){delete r[t]})},getGraphPath:function(e,t,i){var n,r,o=this,s=o.options,a=s.step,l=[],d=[];return e=e||o.points,(n=e.reversed)&&e.reverse(),(a={right:1,center:2}[a]||a&&3)&&n&&(a=4-a),!s.connectNulls||t||i||(e=this.getValidPoints(e)),u(e,function(n,u){var h=n.plotX,p=n.plotY,g=e[u-1];(n.leftCliff||g&&g.rightCliff)&&!i&&(r=!0),n.isNull&&!c(t)&&0<u?r=!s.connectNulls:n.isNull&&!t?r=!0:(0===u||r?u=["M",n.plotX,n.plotY]:o.getPointSpline?u=o.getPointSpline(e,n,u):a?(u=1===a?["L",g.plotX,p]:2===a?["L",(g.plotX+h)/2,g.plotY,"L",(g.plotX+h)/2,p]:["L",h,g.plotY],u.push("L",h,p)):u=["L",h,p],d.push(n.x),a&&d.push(n.x),l.push.apply(l,u),r=!1)}),l.xMap=d,o.graphPath=l},drawGraph:function(){var e=this,t=this.options,i=(this.gappedPath||this.getGraphPath).call(this),n=[["graph","highcharts-graph",t.lineColor||this.color,t.dashStyle]];u(this.zones,function(i,r){n.push(["zone-graph-"+r,"highcharts-graph highcharts-zone-graph-"+r+" "+(i.className||""),i.color||e.color,i.dashStyle||t.dashStyle])}),u(n,function(n,r){var o=n[0],s=e[o];s?(s.endX=i.xMap,s.animate({d:i})):i.length&&(e[o]=e.chart.renderer.path(i).addClass(n[1]).attr({zIndex:1}).add(e.group),s={stroke:n[2],"stroke-width":t.lineWidth,fill:e.fillGraph&&e.color||"none"},n[3]?s.dashstyle=n[3]:"square"!==t.linecap&&(s["stroke-linecap"]=s["stroke-linejoin"]="round"),s=e[o].attr(s).shadow(2>r&&t.shadow)),s&&(s.startX=i.xMap,s.isArea=i.isArea)})},applyZones:function(){var e,t,i,n,r,o,s,a,l,c=this,d=this.chart,h=d.renderer,p=this.zones,g=this.clips||[],f=this.graph,m=this.area,v=Math.max(d.chartWidth,d.chartHeight),y=this[(this.zoneAxis||"y")+"Axis"],w=d.inverted,b=!1;p.length&&(f||m)&&y&&void 0!==y.min&&(r=y.reversed,o=y.horiz,f&&f.hide(),m&&m.hide(),n=y.getExtremes(),u(p,function(u,p){e=r?o?d.plotWidth:0:o?0:y.toPixels(n.min),e=Math.min(Math.max(C(t,e),0),v),t=Math.min(Math.max(Math.round(y.toPixels(C(u.value,n.max),!0)),0),v),b&&(e=t=y.toPixels(n.max)),s=Math.abs(e-t),a=Math.min(e,t),l=Math.max(e,t),y.isXAxis?(i={x:w?l:a,y:0,width:s,height:v},o||(i.x=d.plotHeight-i.x)):(i={x:0,y:w?l:a,width:v,height:s},o&&(i.y=d.plotWidth-i.y)),w&&h.isVML&&(i=y.isXAxis?{x:0,y:r?a:l,height:i.width,width:d.chartWidth}:{x:i.y-d.plotLeft-d.spacingBox.x,y:0,width:i.height,height:d.chartHeight}),g[p]?g[p].animate(i):(g[p]=h.clipRect(i),f&&c["zone-graph-"+p].clip(g[p]),m&&c["zone-area-"+p].clip(g[p])),b=u.value>n.max}),this.clips=g)},invertGroups:function(e){function i(){u(["group","markerGroup"],function(t){r[t]&&(o.renderer.isVML&&r[t].attr({width:r.yAxis.len,height:r.xAxis.len}),r[t].width=r.yAxis.len,r[t].height=r.xAxis.len,r[t].invert(e))})}var n,r=this,o=r.chart;r.xAxis&&(n=t(o,"resize",i),t(r,"destroy",n),i(e),r.invertGroups=i)},plotGroup:function(e,t,i,n,r){var o=this[e],s=!o;return s&&(this[e]=o=this.chart.renderer.g().attr({zIndex:n||.1}).add(r)),o.addClass("highcharts-"+t+" highcharts-series-"+this.index+" highcharts-"+this.type+"-series highcharts-color-"+this.colorIndex+" "+(this.options.className||""),!0),o.attr({visibility:i})[s?"attr":"animate"](this.getPlotBox()),o},getPlotBox:function(){var e=this.chart,t=this.xAxis,i=this.yAxis;return e.inverted&&(t=i,i=this.xAxis),{translateX:t?t.left:e.plotLeft,translateY:i?i.top:e.plotTop,scaleX:1,scaleY:1}},render:function(){var e,t=this,n=t.chart,r=t.options,o=!!t.animate&&n.renderer.isSVG&&i(r.animation).duration,s=t.visible?"inherit":"hidden",a=r.zIndex,l=t.hasRendered,c=n.seriesGroup,u=n.inverted;e=t.plotGroup("group","series",s,a,c),t.markerGroup=t.plotGroup("markerGroup","markers",s,a,c),o&&t.animate(!0),e.inverted=!!t.isCartesian&&u,t.drawGraph&&(t.drawGraph(),t.applyZones()),t.drawDataLabels&&t.drawDataLabels(),t.visible&&t.drawPoints(),t.drawTracker&&!1!==t.options.enableMouseTracking&&t.drawTracker(),t.invertGroups(u),!1===r.clip||t.sharedClipKey||l||e.clip(n.clipRect),o&&t.animate(),l||(t.animationTimeout=S(function(){t.afterAnimate()},o)),t.isDirty=!1,t.hasRendered=!0},redraw:function(){var e=this.chart,t=this.isDirty||this.isDirtyData,i=this.group,n=this.xAxis,r=this.yAxis;i&&(e.inverted&&i.attr({width:e.plotWidth,height:e.plotHeight}),i.animate({translateX:C(n&&n.left,e.plotLeft),translateY:C(r&&r.top,e.plotTop)})),this.translate(),this.render(),t&&delete this.kdTree},kdAxisArray:["clientX","plotY"],searchPoint:function(e,t){var i=this.xAxis,n=this.yAxis,r=this.chart.inverted;return this.searchKDTree({clientX:r?i.len-e.chartY+i.pos:e.chartX-i.pos,plotY:r?n.len-e.chartX+n.pos:e.chartY-n.pos},t)},buildKDTree:function(){function e(i,n,r){var o,s;if(s=i&&i.length)return o=t.kdAxisArray[n%r],i.sort(function(e,t){return e[o]-t[o]}),s=Math.floor(s/2),{point:i[s],left:e(i.slice(0,s),n+1,r),right:e(i.slice(s+1),n+1,r)}}this.buildingKdTree=!0;var t=this,i=-1<t.options.findNearestPointBy.indexOf("y")?2:1;delete t.kdTree,S(function(){t.kdTree=e(t.getValidPoints(null,!t.directTouch),i,i),t.buildingKdTree=!1},t.options.kdNow?0:1)},searchKDTree:function(e,t){function i(e,t,a,l){var u,d,h=t.point,p=n.kdAxisArray[a%l],g=h;return d=c(e[r])&&c(h[r])?Math.pow(e[r]-h[r],2):null,u=c(e[o])&&c(h[o])?Math.pow(e[o]-h[o],2):null,u=(d||0)+(u||0),h.dist=c(u)?Math.sqrt(u):Number.MAX_VALUE,h.distX=c(d)?Math.sqrt(d):Number.MAX_VALUE,p=e[p]-h[p],u=0>p?"left":"right",d=0>p?"right":"left",t[u]&&(u=i(e,t[u],a+1,l),g=u[s]<g[s]?u:h),t[d]&&Math.sqrt(p*p)<g[s]&&(e=i(e,t[d],a+1,l),g=e[s]<g[s]?e:g),g}var n=this,r=this.kdAxisArray[0],o=this.kdAxisArray[1],s=t?"distX":"dist";if(t=-1<n.options.findNearestPointBy.indexOf("y")?2:1,this.kdTree||this.buildingKdTree||this.buildKDTree(),this.kdTree)return i(e,this.kdTree,t,t)}})}(e),function(e){function t(e,t,i,n,r){var o=e.chart.inverted;this.axis=e,this.isNegative=i,this.options=t,this.x=n,this.total=null,this.points={},this.stack=r,this.rightCliff=this.leftCliff=0,this.alignOptions={align:t.align||(o?i?"left":"right":"center"),verticalAlign:t.verticalAlign||(o?"middle":i?"bottom":"top"),y:u(t.y,o?4:i?14:-6),x:u(t.x,o?i?-6:6:0)},this.textAlign=t.textAlign||(o?i?"right":"left":"center")}var i=e.Axis,n=e.Chart,r=e.correctFloat,o=e.defined,s=e.destroyObjectProperties,a=e.each,l=e.format,c=e.objectEach,u=e.pick;e=e.Series,t.prototype={destroy:function(){s(this,this.axis)},render:function(e){var t=this.options,i=t.format,i=i?l(i,this):t.formatter.call(this);this.label?this.label.attr({text:i,visibility:"hidden"}):this.label=this.axis.chart.renderer.text(i,null,null,t.useHTML).css(t.style).attr({align:this.textAlign,rotation:t.rotation,visibility:"hidden"}).add(e)},setOffset:function(e,t){var i=this.axis,n=i.chart,r=n.inverted,o=i.reversed,o=this.isNegative&&!o||!this.isNegative&&o,s=i.translate(i.usePercentage?100:this.total,0,0,0,1),i=i.translate(0),i=Math.abs(s-i);e=n.xAxis[0].translate(this.x)+e;var a=n.plotHeight,r={x:r?o?s:s-i:e,y:r?a-e-t:o?a-s-i:a-s,width:r?i:t,height:r?t:i};(t=this.label)&&(t.align(this.alignOptions,null,r),r=t.alignAttr,t[!1===this.options.crop||n.isInsidePlot(r.x,r.y)?"show":"hide"](!0))}},n.prototype.getStacks=function(){var e=this;a(e.yAxis,function(e){e.stacks&&e.hasVisibleSeries&&(e.oldStacks=e.stacks)}),a(e.series,function(t){!t.options.stacking||!0!==t.visible&&!1!==e.options.chart.ignoreHiddenSeries||(t.stackKey=t.type+u(t.options.stack,""))})},i.prototype.buildStacks=function(){var e,t,i=this.series,n=u(this.options.reversedStacks,!0),r=i.length;if(!this.isXAxis){for(this.usePercentage=!1,t=r;t--;)i[n?t:r-t-1].setStackedPoints();for(t=r;t--;)e=i[n?t:r-t-1],e.setStackCliffs&&e.setStackCliffs();if(this.usePercentage)for(t=0;t<r;t++)i[t].setPercentStacks()}},i.prototype.renderStackTotals=function(){var e=this.chart,t=e.renderer,i=this.stacks,n=this.stackTotalGroup;n||(this.stackTotalGroup=n=t.g("stack-labels").attr({visibility:"visible",zIndex:6}).add()),n.translate(e.plotLeft,e.plotTop),c(i,function(e){c(e,function(e){e.render(n)})})},i.prototype.resetStacks=function(){var e=this,t=e.stacks;e.isXAxis||c(t,function(t){c(t,function(i,n){i.touched<e.stacksTouched?(i.destroy(),delete t[n]):(i.total=null,i.cum=null)})})},i.prototype.cleanStacks=function(){var e;this.isXAxis||(this.oldStacks&&(e=this.stacks=this.oldStacks),c(e,function(e){c(e,function(e){e.cum=e.total})}))},e.prototype.setStackedPoints=function(){if(this.options.stacking&&(!0===this.visible||!1===this.chart.options.chart.ignoreHiddenSeries)){var e,i,n,s,a,l,c,d=this.processedXData,h=this.processedYData,p=[],g=h.length,f=this.options,m=f.threshold,v=f.startFromThreshold?m:0,y=f.stack,f=f.stacking,w=this.stackKey,C="-"+w,b=this.negStacks,A=this.yAxis,x=A.stacks,S=A.oldStacks;for(A.stacksTouched+=1,a=0;a<g;a++)l=d[a],c=h[a],e=this.getStackIndicator(e,l,this.index),s=e.key,n=(i=b&&c<(v?0:m))?C:w,x[n]||(x[n]={}),x[n][l]||(S[n]&&S[n][l]?(x[n][l]=S[n][l],x[n][l].total=null):x[n][l]=new t(A,A.options.stackLabels,i,l,y)),n=x[n][l],null!==c&&(n.points[s]=n.points[this.index]=[u(n.cum,v)],o(n.cum)||(n.base=s),n.touched=A.stacksTouched,0<e.index&&!1===this.singleStacks&&(n.points[s][0]=n.points[this.index+","+l+",0"][0])),"percent"===f?(i=i?w:C,b&&x[i]&&x[i][l]?(i=x[i][l],n.total=i.total=Math.max(i.total,n.total)+Math.abs(c)||0):n.total=r(n.total+(Math.abs(c)||0))):n.total=r(n.total+(c||0)),n.cum=u(n.cum,v)+(c||0),null!==c&&(n.points[s].push(n.cum),p[a]=n.cum);"percent"===f&&(A.usePercentage=!0),this.stackedYData=p,A.oldStacks={}}},e.prototype.setPercentStacks=function(){var e,t=this,i=t.stackKey,n=t.yAxis.stacks,o=t.processedXData;a([i,"-"+i],function(i){for(var s,a,l=o.length;l--;)s=o[l],e=t.getStackIndicator(e,s,t.index,i),(s=(a=n[i]&&n[i][s])&&a.points[e.key])&&(a=a.total?100/a.total:0,s[0]=r(s[0]*a),s[1]=r(s[1]*a),t.stackedYData[l]=s[1])})},e.prototype.getStackIndicator=function(e,t,i,n){return!o(e)||e.x!==t||n&&e.key!==n?e={x:t,index:0,key:n}:e.index++,e.key=[i,t,e.index].join(),e}}(e),function(e){var t=e.addEvent,i=e.animate,n=e.Axis,r=e.createElement,o=e.css,s=e.defined,a=e.each,l=e.erase,c=e.extend,u=e.fireEvent,d=e.inArray,h=e.isNumber,p=e.isObject,g=e.isArray,f=e.merge,m=e.objectEach,v=e.pick,y=e.Point,w=e.Series,C=e.seriesTypes,b=e.setAnimation,A=e.splat;c(e.Chart.prototype,{addSeries:function(e,t,i){var n,r=this;return e&&(t=v(t,!0),u(r,"addSeries",{options:e},function(){n=r.initSeries(e),r.isDirtyLegend=!0,r.linkSeries(),t&&r.redraw(i)})),n},addAxis:function(e,t,i,r){var o=t?"xAxis":"yAxis",s=this.options;e=f(e,{index:this[o].length,isX:t}),new n(this,e),s[o]=A(s[o]||{}),s[o].push(e),v(i,!0)&&this.redraw(r)},showLoading:function(e){var n=this,s=n.options,a=n.loadingDiv,l=s.loading,u=function(){a&&o(a,{left:n.plotLeft+"px",top:n.plotTop+"px",width:n.plotWidth+"px",height:n.plotHeight+"px"})};a||(n.loadingDiv=a=r("div",{className:"highcharts-loading highcharts-loading-hidden"},null,n.container),n.loadingSpan=r("span",{className:"highcharts-loading-inner"},null,a),t(n,"redraw",u)),a.className="highcharts-loading",n.loadingSpan.innerHTML=e||s.lang.loading,o(a,c(l.style,{zIndex:10})),o(n.loadingSpan,l.labelStyle),n.loadingShown||(o(a,{opacity:0,display:""}),i(a,{opacity:l.style.opacity||.5},{duration:l.showDuration||0})),n.loadingShown=!0,u()},hideLoading:function(){var e=this.options,t=this.loadingDiv;t&&(t.className="highcharts-loading highcharts-loading-hidden",i(t,{opacity:0},{duration:e.loading.hideDuration||100,complete:function(){o(t,{display:"none"})}})),this.loadingShown=!1},propsRequireDirtyBox:"backgroundColor borderColor borderWidth margin marginTop marginRight marginBottom marginLeft spacing spacingTop spacingRight spacingBottom spacingLeft borderRadius plotBackgroundColor plotBackgroundImage plotBorderColor plotBorderWidth plotShadow shadow".split(" "),propsRequireUpdateSeries:"chart.inverted chart.polar chart.ignoreHiddenSeries chart.type colors plotOptions tooltip".split(" "),update:function(e,t){var i,n,r=this,o={credits:"addCredits",title:"setTitle",subtitle:"setSubtitle"},l=e.chart;l&&(f(!0,r.options.chart,l),"className"in l&&r.setClassName(l.className),("inverted"in l||"polar"in l)&&(r.propFromSeries(),i=!0),"alignTicks"in l&&(i=!0),m(l,function(e,t){-1!==d("chart."+t,r.propsRequireUpdateSeries)&&(n=!0),-1!==d(t,r.propsRequireDirtyBox)&&(r.isDirtyBox=!0)}),"style"in l&&r.renderer.setStyle(l.style)),e.colors&&(this.options.colors=e.colors),e.plotOptions&&f(!0,this.options.plotOptions,e.plotOptions),m(e,function(e,t){r[t]&&"function"==typeof r[t].update?r[t].update(e,!1):"function"==typeof r[o[t]]&&r[o[t]](e),"chart"!==t&&-1!==d(t,r.propsRequireUpdateSeries)&&(n=!0)}),a("xAxis yAxis zAxis series colorAxis pane".split(" "),function(t){e[t]&&a(A(e[t]),function(e,i){(i=s(e.id)&&r.get(e.id)||r[t][i])&&i.coll===t&&i.update(e,!1)})}),i&&a(r.axes,function(e){e.update({},!1)}),n&&a(r.series,function(e){e.update({},!1)}),e.loading&&f(!0,r.options.loading,e.loading),i=l&&l.width,l=l&&l.height,h(i)&&i!==r.chartWidth||h(l)&&l!==r.chartHeight?r.setSize(i,l):v(t,!0)&&r.redraw()},setSubtitle:function(e){this.setTitle(void 0,e)}}),c(y.prototype,{update:function(e,t,i,n){function r(){s.applyOptions(e),null===s.y&&l&&(s.graphic=l.destroy()),p(e,!0)&&(l&&l.element&&e&&e.marker&&e.marker.symbol&&(s.graphic=l.destroy()),e&&e.dataLabels&&s.dataLabel&&(s.dataLabel=s.dataLabel.destroy())),o=s.index,a.updateParallelArrays(s,o),u.data[o]=p(u.data[o],!0)||p(e,!0)?s.options:e,a.isDirty=a.isDirtyData=!0,!a.fixedBox&&a.hasCartesianSeries&&(c.isDirtyBox=!0),"point"===u.legendType&&(c.isDirtyLegend=!0),t&&c.redraw(i)}var o,s=this,a=s.series,l=s.graphic,c=a.chart,u=a.options;t=v(t,!0),!1===n?r():s.firePointEvent("update",{options:e},r)},remove:function(e,t){this.series.removePoint(d(this,this.series.data),e,t)}}),c(w.prototype,{addPoint:function(e,t,i,n){var r,o,s,a,l=this.options,c=this.data,u=this.chart,d=this.xAxis,d=d&&d.hasNames&&d.names,h=l.data,p=this.xData;if(t=v(t,!0),r={series:this},this.pointClass.prototype.applyOptions.apply(r,[e]),a=r.x,s=p.length,this.requireSorting&&a<p[s-1])for(o=!0;s&&p[s-1]>a;)s--;this.updateParallelArrays(r,"splice",s,0,0),this.updateParallelArrays(r,s),d&&r.name&&(d[a]=r.name),h.splice(s,0,e),o&&(this.data.splice(s,0,null),this.processData()),"point"===l.legendType&&this.generatePoints(),i&&(c[0]&&c[0].remove?c[0].remove(!1):(c.shift(),this.updateParallelArrays(r,"shift"),h.shift())),this.isDirtyData=this.isDirty=!0,t&&u.redraw(n)},removePoint:function(e,t,i){var n=this,r=n.data,o=r[e],s=n.points,a=n.chart,l=function(){s&&s.length===r.length&&s.splice(e,1),r.splice(e,1),n.options.data.splice(e,1),n.updateParallelArrays(o||{series:n},"splice",e,1),o&&o.destroy(),n.isDirty=!0,n.isDirtyData=!0,t&&a.redraw()};b(i,a),t=v(t,!0),o?o.firePointEvent("remove",null,l):l()},remove:function(e,t,i){function n(){r.destroy(),o.isDirtyLegend=o.isDirtyBox=!0,o.linkSeries(),v(e,!0)&&o.redraw(t)}var r=this,o=r.chart;!1!==i?u(r,"remove",null,n):n()},update:function(e,t){var i,n=this,r=n.chart,o=n.userOptions,s=n.oldType||n.type,l=e.type||o.type||r.options.chart.type,u=C[s].prototype,d=["group","markerGroup","dataLabelsGroup"];if(Object.keys&&"data"===Object.keys(e).toString())return this.setData(e.data,t);(l&&l!==s||void 0!==e.zIndex)&&(d.length=0),a(d,function(e){d[e]=n[e],delete n[e]}),e=f(o,{animation:!1,index:n.index,pointStart:n.xData[0]},{data:n.options.data},e),n.remove(!1,null,!1);for(i in u)n[i]=void 0;c(n,C[l||s].prototype),a(d,function(e){n[e]=d[e]}),n.init(r,e),n.oldType=s,r.linkSeries(),v(t,!0)&&r.redraw(!1)}}),c(n.prototype,{update:function(e,t){var i=this.chart;e=i.options[this.coll][this.options.index]=f(this.userOptions,e),this.destroy(!0),this.init(i,c(e,{events:void 0})),i.isDirtyBox=!0,v(t,!0)&&i.redraw()},remove:function(e){for(var t=this.chart,i=this.coll,n=this.series,r=n.length;r--;)n[r]&&n[r].remove(!1);l(t.axes,this),l(t[i],this),g(t.options[i])?t.options[i].splice(this.options.index,1):delete t.options[i],a(t[i],function(e,t){e.options.index=t}),this.destroy(),t.isDirtyBox=!0,v(e,!0)&&t.redraw()},setTitle:function(e,t){this.update({title:e},t)},setCategories:function(e,t){this.update({categories:e},t)}})}(e),function(e){var t=e.color,i=e.each,n=e.map,r=e.pick,o=e.Series;(0,e.seriesType)("area","line",{softThreshold:!1,threshold:0},{singleStacks:!1,getStackPoints:function(){var t,o,s=[],a=[],l=this.xAxis,c=this.yAxis,u=c.stacks[this.stackKey],d={},h=this.points,p=this.index,g=c.series,f=g.length,m=r(c.options.reversedStacks,!0)?1:-1;if(this.options.stacking){for(o=0;o<h.length;o++)d[h[o].x]=h[o];e.objectEach(u,function(e,t){null!==e.total&&a.push(t)}),a.sort(function(e,t){return e-t}),t=n(g,function(){return this.visible}),i(a,function(e,n){var r,h,g=0;if(d[e]&&!d[e].isNull)s.push(d[e]),i([-1,1],function(i){var s=1===i?"rightNull":"leftNull",l=0,c=u[a[n+i]];if(c)for(o=p;0<=o&&o<f;)r=c.points[o],r||(o===p?d[e][s]=!0:t[o]&&(h=u[e].points[o])&&(l-=h[1]-h[0])),o+=m;d[e][1===i?"rightCliff":"leftCliff"]=l});else{for(o=p;0<=o&&o<f;){if(r=u[e].points[o]){g=r[1];break}o+=m}g=c.translate(g,0,1,0,1),s.push({isNull:!0,plotX:l.translate(e,0,0,0,1),x:e,plotY:g,yBottom:g})}})}return s},getGraphPath:function(e){var t,i,n,s,a=o.prototype.getGraphPath,l=this.options,c=l.stacking,u=this.yAxis,d=[],h=[],p=this.index,g=u.stacks[this.stackKey],f=l.threshold,m=u.getThreshold(l.threshold),l=l.connectNulls||"percent"===c,v=function(t,i,r){var o=e[t];t=c&&g[o.x].points[p];var s=o[r+"Null"]||0;r=o[r+"Cliff"]||0;var a,l,o=!0;r||s?(a=(s?t[0]:t[1])+r,l=t[0]+r,o=!!s):!c&&e[i]&&e[i].isNull&&(a=l=f),void 0!==a&&(h.push({plotX:n,plotY:null===a?m:u.getThreshold(a),isNull:o,isCliff:!0}),d.push({plotX:n,plotY:null===l?m:u.getThreshold(l),doCurve:!1}))};for(e=e||this.points,c&&(e=this.getStackPoints()),t=0;t<e.length;t++)i=e[t].isNull,n=r(e[t].rectPlotX,e[t].plotX),s=r(e[t].yBottom,m),(!i||l)&&(l||v(t,t-1,"left"),i&&!c&&l||(h.push(e[t]),d.push({x:t,plotX:n,plotY:s})),l||v(t,t+1,"right"));return t=a.call(this,h,!0,!0),d.reversed=!0,i=a.call(this,d,!0,!0),i.length&&(i[0]="L"),i=t.concat(i),a=a.call(this,h,!1,l),i.xMap=t.xMap,this.areaPath=i,a},drawGraph:function(){this.areaPath=[],o.prototype.drawGraph.apply(this);var e=this,n=this.areaPath,s=this.options,a=[["area","highcharts-area",this.color,s.fillColor]];i(this.zones,function(t,i){a.push(["zone-area-"+i,"highcharts-area highcharts-zone-area-"+i+" "+t.className,t.color||e.color,t.fillColor||s.fillColor])}),i(a,function(i){var o=i[0],a=e[o];a?(a.endX=n.xMap,a.animate({d:n})):(a=e[o]=e.chart.renderer.path(n).addClass(i[1]).attr({fill:r(i[3],t(i[2]).setOpacity(r(s.fillOpacity,.75)).get()),zIndex:0}).add(e.group),a.isArea=!0),a.startX=n.xMap,a.shiftUnit=s.step?2:1})},drawLegendSymbol:e.LegendSymbolMixin.drawRectangle})}(e),function(e){var t=e.pick;(e=e.seriesType)("spline","line",{},{getPointSpline:function(e,i,n){var r=i.plotX,o=i.plotY,s=e[n-1];n=e[n+1];var a,l,c,u;if(s&&!s.isNull&&!1!==s.doCurve&&!i.isCliff&&n&&!n.isNull&&!1!==n.doCurve&&!i.isCliff){e=s.plotY,c=n.plotX,n=n.plotY;var d=0;a=(1.5*r+s.plotX)/2.5,l=(1.5*o+e)/2.5,c=(1.5*r+c)/2.5,u=(1.5*o+n)/2.5,c!==a&&(d=(u-l)*(c-r)/(c-a)+o-u),l+=d,u+=d,l>e&&l>o?(l=Math.max(e,o),u=2*o-l):l<e&&l<o&&(l=Math.min(e,o),u=2*o-l),u>n&&u>o?(u=Math.max(n,o),l=2*o-u):u<n&&u<o&&(u=Math.min(n,o),l=2*o-u),i.rightContX=c,i.rightContY=u}return i=["C",t(s.rightContX,s.plotX),t(s.rightContY,s.plotY),t(a,r),t(l,o),r,o],s.rightContX=s.rightContY=null,i}})}(e),function(e){var t=e.seriesTypes.area.prototype;(0,e.seriesType)("areaspline","spline",e.defaultPlotOptions.area,{getStackPoints:t.getStackPoints,getGraphPath:t.getGraphPath,setStackCliffs:t.setStackCliffs,drawGraph:t.drawGraph,drawLegendSymbol:e.LegendSymbolMixin.drawRectangle})}(e),function(e){var t=e.animObject,i=e.color,n=e.each,r=e.extend,o=e.isNumber,s=e.merge,a=e.pick,l=e.Series,c=e.seriesType,u=e.svg;c("column","line",{borderRadius:0,crisp:!0,groupPadding:.2,marker:null,pointPadding:.1,minPointLength:0,cropThreshold:50,pointRange:null,states:{hover:{halo:!1,brightness:.1,shadow:!1},select:{color:"#cccccc",borderColor:"#000000",shadow:!1}},dataLabels:{align:null,verticalAlign:null,y:null},softThreshold:!1,startFromThreshold:!0,stickyTracking:!1,tooltip:{distance:6},threshold:0,borderColor:"#ffffff"},{cropShoulder:0,directTouch:!0,trackerGroups:["group","dataLabelsGroup"],negStacks:!0,init:function(){l.prototype.init.apply(this,arguments);var e=this,t=e.chart;t.hasRendered&&n(t.series,function(t){t.type===e.type&&(t.isDirty=!0)})},getColumnMetrics:function(){var e,t=this,i=t.options,r=t.xAxis,o=t.yAxis,s=r.reversed,l={},c=0;!1===i.grouping?c=1:n(t.chart.series,function(i){var n,r=i.options,s=i.yAxis;i.type!==t.type||!i.visible&&t.chart.options.chart.ignoreHiddenSeries||o.len!==s.len||o.pos!==s.pos||(r.stacking?(e=i.stackKey,void 0===l[e]&&(l[e]=c++),n=l[e]):!1!==r.grouping&&(n=c++),i.columnIndex=n)});var u=Math.min(Math.abs(r.transA)*(r.ordinalSlope||i.pointRange||r.closestPointRange||r.tickInterval||1),r.len),d=u*i.groupPadding,h=(u-2*d)/(c||1),i=Math.min(i.maxPointWidth||r.len,a(i.pointWidth,h*(1-2*i.pointPadding)));return t.columnMetrics={width:i,offset:(h-i)/2+(d+((t.columnIndex||0)+(s?1:0))*h-u/2)*(s?-1:1)},t.columnMetrics},crispCol:function(e,t,i,n){var r=this.chart,o=this.borderWidth,s=-(o%2?.5:0),o=o%2?.5:1;return r.inverted&&r.renderer.isVML&&(o+=1),this.options.crisp&&(i=Math.round(e+i)+s,e=Math.round(e)+s,i-=e),n=Math.round(t+n)+o,s=.5>=Math.abs(t)&&.5<n,t=Math.round(t)+o,n-=t,s&&n&&(--t,n+=1),{x:e,y:t,width:i,height:n}},translate:function(){var e=this,t=e.chart,i=e.options,r=e.dense=2>e.closestPointRange*e.xAxis.transA,r=e.borderWidth=a(i.borderWidth,r?0:1),o=e.yAxis,s=e.translatedThreshold=o.getThreshold(i.threshold),c=a(i.minPointLength,5),u=e.getColumnMetrics(),d=u.width,h=e.barW=Math.max(d,1+2*r),p=e.pointXOffset=u.offset;t.inverted&&(s-=.5),i.pointPadding&&(h=Math.ceil(h)),l.prototype.translate.apply(e),n(e.points,function(i){var n,r=a(i.yBottom,s),l=999+Math.abs(r),l=Math.min(Math.max(-l,i.plotY),o.len+l),u=i.plotX+p,g=h,f=Math.min(l,r),m=Math.max(l,r)-f;Math.abs(m)<c&&c&&(m=c,n=!o.reversed&&!i.negative||o.reversed&&i.negative,f=Math.abs(f-s)>c?r-c:s-(n?c:0)),i.barX=u,i.pointWidth=d,i.tooltipPos=t.inverted?[o.len+o.pos-t.plotLeft-l,e.xAxis.len-u-g/2,m]:[u+g/2,l+o.pos-t.plotTop,m],i.shapeType="rect",i.shapeArgs=e.crispCol.apply(e,i.isNull?[u,s,g,0]:[u,f,g,m])})},getSymbol:e.noop,drawLegendSymbol:e.LegendSymbolMixin.drawRectangle,drawGraph:function(){this.group[this.dense?"addClass":"removeClass"]("highcharts-dense-data")},pointAttribs:function(e,t){var n,r=this.options,o=this.pointAttrToOptions||{};n=o.stroke||"borderColor";var a=o["stroke-width"]||"borderWidth",l=e&&e.color||this.color,c=e[n]||r[n]||this.color||l,u=e[a]||r[a]||this[a]||0,o=r.dashStyle;return e&&this.zones.length&&(l=e.getZone(),l=e.options.color||l&&l.color||this.color),t&&(e=s(r.states[t],e.options.states&&e.options.states[t]||{}),t=e.brightness,l=e.color||void 0!==t&&i(l).brighten(e.brightness).get()||l,c=e[n]||c,u=e[a]||u,o=e.dashStyle||o),n={fill:l,stroke:c,"stroke-width":u},r.borderRadius&&(n.r=r.borderRadius),o&&(n.dashstyle=o),n},drawPoints:function(){var e,t=this,i=this.chart,r=t.options,a=i.renderer,l=r.animationLimit||250;n(t.points,function(n){var c=n.graphic;o(n.plotY)&&null!==n.y?(e=n.shapeArgs,c?c[i.pointCount<l?"animate":"attr"](s(e)):n.graphic=c=a[n.shapeType](e).add(n.group||t.group),c.attr(t.pointAttribs(n,n.selected&&"select")).shadow(r.shadow,null,r.stacking&&!r.borderRadius),c.addClass(n.getClassName(),!0)):c&&(n.graphic=c.destroy())})},animate:function(e){var i=this,n=this.yAxis,o=i.options,s=this.chart.inverted,a={};u&&(e?(a.scaleY=.001,e=Math.min(n.pos+n.len,Math.max(n.pos,n.toPixels(o.threshold))),s?a.translateX=e-n.len:a.translateY=e,i.group.attr(a)):(a[s?"translateX":"translateY"]=n.pos,i.group.animate(a,r(t(i.options.animation),{step:function(e,t){i.group.attr({scaleY:Math.max(.001,t.pos)})}})),i.animate=null))},remove:function(){var e=this,t=e.chart;t.hasRendered&&n(t.series,function(t){t.type===e.type&&(t.isDirty=!0)}),l.prototype.remove.apply(e,arguments)}})}(e),function(e){(e=e.seriesType)("bar","column",null,{inverted:!0})}(e),function(e){var t=e.Series;(e=e.seriesType)("scatter","line",{lineWidth:0,findNearestPointBy:"xy",marker:{enabled:!0},tooltip:{headerFormat:'<span style="color:{point.color}">\u25cf</span> <span style="font-size: 0.85em"> {series.name}</span><br/>',pointFormat:"x: <b>{point.x}</b><br/>y: <b>{point.y}</b><br/>"}},{sorted:!1,requireSorting:!1,noSharedTooltip:!0,trackerGroups:["group","markerGroup","dataLabelsGroup"],takeOrdinalPosition:!1,drawGraph:function(){this.options.lineWidth&&t.prototype.drawGraph.call(this)}})}(e),function(e){var t=e.pick,i=e.relativeLength;e.CenteredSeriesMixin={getCenter:function(){var e,n,r=this.options,o=this.chart,s=2*(r.slicedOffset||0),a=o.plotWidth-2*s,o=o.plotHeight-2*s,l=r.center,l=[t(l[0],"50%"),t(l[1],"50%"),r.size||"100%",r.innerSize||0],c=Math.min(a,o);for(e=0;4>e;++e)n=l[e],r=2>e||2===e&&/%$/.test(n),l[e]=i(n,[a,o,c,l[2]][e])+(r?s:0);return l[3]>l[2]&&(l[3]=l[2]),l}}}(e),function(e){var t=e.addEvent,i=e.defined,n=e.each,r=e.extend,o=e.inArray,s=e.noop,a=e.pick,l=e.Point,c=e.Series,u=e.seriesType,d=e.setAnimation;u("pie","line",{center:[null,null],clip:!1,colorByPoint:!0,dataLabels:{distance:30,enabled:!0,formatter:function(){return this.point.isNull?void 0:this.point.name},x:0},ignoreHiddenPoint:!0,legendType:"point",marker:null,size:null,showInLegend:!1,slicedOffset:10,stickyTracking:!1,tooltip:{followPointer:!0},borderColor:"#ffffff",borderWidth:1,states:{hover:{brightness:.1,shadow:!1}}},{isCartesian:!1,requireSorting:!1,directTouch:!0,noSharedTooltip:!0,trackerGroups:["group","dataLabelsGroup"],axisTypes:[],pointAttribs:e.seriesTypes.column.prototype.pointAttribs,animate:function(e){var t=this,i=t.points,r=t.startAngleRad;e||(n(i,function(e){var i=e.graphic,n=e.shapeArgs;i&&(i.attr({r:e.startR||t.center[3]/2,start:r,end:r}),i.animate({r:n.r,start:n.start,end:n.end},t.options.animation))}),t.animate=null)},updateTotals:function(){var e,t,i=0,n=this.points,r=n.length,o=this.options.ignoreHiddenPoint;for(e=0;e<r;e++)t=n[e],i+=o&&!t.visible?0:t.isNull?0:t.y;for(this.total=i,e=0;e<r;e++)t=n[e],t.percentage=0<i&&(t.visible||!o)?t.y/i*100:0,t.total=i},generatePoints:function(){c.prototype.generatePoints.call(this),this.updateTotals()},translate:function(e){this.generatePoints();var t,i,n,r,o,s,l=0,c=this.options,u=c.slicedOffset,d=u+(c.borderWidth||0),h=c.startAngle||0,p=this.startAngleRad=Math.PI/180*(h-90),h=(this.endAngleRad=Math.PI/180*(a(c.endAngle,h+360)-90))-p,g=this.points,f=c.dataLabels.distance,c=c.ignoreHiddenPoint,m=g.length;for(e||(this.center=e=this.getCenter()),this.getX=function(t,i,r){return n=Math.asin(Math.min((t-e[1])/(e[2]/2+r.labelDistance),1)),e[0]+(i?-1:1)*Math.cos(n)*(e[2]/2+r.labelDistance)},o=0;o<m;o++)s=g[o],s.labelDistance=a(s.options.dataLabels&&s.options.dataLabels.distance,f),this.maxLabelDistance=Math.max(this.maxLabelDistance||0,s.labelDistance),t=p+l*h,c&&!s.visible||(l+=s.percentage/100),i=p+l*h,s.shapeType="arc",s.shapeArgs={x:e[0],y:e[1],r:e[2]/2,innerR:e[3]/2,start:Math.round(1e3*t)/1e3,end:Math.round(1e3*i)/1e3},n=(i+t)/2,n>1.5*Math.PI?n-=2*Math.PI:n<-Math.PI/2&&(n+=2*Math.PI),s.slicedTranslation={
translateX:Math.round(Math.cos(n)*u),translateY:Math.round(Math.sin(n)*u)},i=Math.cos(n)*e[2]/2,r=Math.sin(n)*e[2]/2,s.tooltipPos=[e[0]+.7*i,e[1]+.7*r],s.half=n<-Math.PI/2||n>Math.PI/2?1:0,s.angle=n,t=Math.min(d,s.labelDistance/5),s.labelPos=[e[0]+i+Math.cos(n)*s.labelDistance,e[1]+r+Math.sin(n)*s.labelDistance,e[0]+i+Math.cos(n)*t,e[1]+r+Math.sin(n)*t,e[0]+i,e[1]+r,0>s.labelDistance?"center":s.half?"right":"left",n]},drawGraph:null,drawPoints:function(){var e,t,i,o,s=this,a=s.chart.renderer,l=s.options.shadow;l&&!s.shadowGroup&&(s.shadowGroup=a.g("shadow").add(s.group)),n(s.points,function(n){if(!n.isNull){t=n.graphic,o=n.shapeArgs,e=n.getTranslate();var c=n.shadowGroup;l&&!c&&(c=n.shadowGroup=a.g("shadow").add(s.shadowGroup)),c&&c.attr(e),i=s.pointAttribs(n,n.selected&&"select"),t?t.setRadialReference(s.center).attr(i).animate(r(o,e)):(n.graphic=t=a[n.shapeType](o).setRadialReference(s.center).attr(e).add(s.group),n.visible||t.attr({visibility:"hidden"}),t.attr(i).attr({"stroke-linejoin":"round"}).shadow(l,c)),t.addClass(n.getClassName())}})},searchPoint:s,sortByAngle:function(e,t){e.sort(function(e,i){return void 0!==e.angle&&(i.angle-e.angle)*t})},drawLegendSymbol:e.LegendSymbolMixin.drawRectangle,getCenter:e.CenteredSeriesMixin.getCenter,getSymbol:s},{init:function(){l.prototype.init.apply(this,arguments);var e,i=this;return i.name=a(i.name,"Slice"),e=function(e){i.slice("select"===e.type)},t(i,"select",e),t(i,"unselect",e),i},isValid:function(){return e.isNumber(this.y,!0)&&0<=this.y},setVisible:function(e,t){var i=this,r=i.series,s=r.chart,l=r.options.ignoreHiddenPoint;t=a(t,l),e!==i.visible&&(i.visible=i.options.visible=e=void 0===e?!i.visible:e,r.options.data[o(i,r.data)]=i.options,n(["graphic","dataLabel","connector","shadowGroup"],function(t){i[t]&&i[t][e?"show":"hide"](!0)}),i.legendItem&&s.legend.colorizeItem(i,e),e||"hover"!==i.state||i.setState(""),l&&(r.isDirty=!0),t&&s.redraw())},slice:function(e,t,n){var r=this.series;d(n,r.chart),a(t,!0),this.sliced=this.options.sliced=i(e)?e:!this.sliced,r.options.data[o(this,r.data)]=this.options,this.graphic.animate(this.getTranslate()),this.shadowGroup&&this.shadowGroup.animate(this.getTranslate())},getTranslate:function(){return this.sliced?this.slicedTranslation:{translateX:0,translateY:0}},haloPath:function(e){var t=this.shapeArgs;return this.sliced||!this.visible?[]:this.series.chart.renderer.symbols.arc(t.x,t.y,t.r+e,t.r+e,{innerR:this.shapeArgs.r,start:t.start,end:t.end})}})}(e),function(e){var t=e.addEvent,i=e.arrayMax,n=e.defined,r=e.each,o=e.extend,s=e.format,a=e.map,l=e.merge,c=e.noop,u=e.pick,d=e.relativeLength,h=e.Series,p=e.seriesTypes,g=e.stableSort;e.distribute=function(e,t){function i(e,t){return e.target-t.target}var n,o,s=!0,l=e,c=[];for(o=0,n=e.length;n--;)o+=e[n].size;if(o>t){for(g(e,function(e,t){return(t.rank||0)-(e.rank||0)}),o=n=0;o<=t;)o+=e[n].size,n++;c=e.splice(n-1,e.length)}for(g(e,i),e=a(e,function(e){return{size:e.size,targets:[e.target]}});s;){for(n=e.length;n--;)s=e[n],o=(Math.min.apply(0,s.targets)+Math.max.apply(0,s.targets))/2,s.pos=Math.min(Math.max(0,o-s.size/2),t-s.size);for(n=e.length,s=!1;n--;)0<n&&e[n-1].pos+e[n-1].size>e[n].pos&&(e[n-1].size+=e[n].size,e[n-1].targets=e[n-1].targets.concat(e[n].targets),e[n-1].pos+e[n-1].size>t&&(e[n-1].pos=t-e[n-1].size),e.splice(n,1),s=!0)}n=0,r(e,function(e){var t=0;r(e.targets,function(){l[n].pos=e.pos+t,t+=l[n].size,n++})}),l.push.apply(l,c),g(l,i)},h.prototype.drawDataLabels=function(){var i,o,a,c,d=this,h=d.options,p=h.dataLabels,g=d.points,f=d.hasRendered||0,m=u(p.defer,!!h.animation),v=d.chart.renderer;(p.enabled||d._hasPointLabels)&&(d.dlProcessOptions&&d.dlProcessOptions(p),c=d.plotGroup("dataLabelsGroup","data-labels",m&&!f?"hidden":"visible",p.zIndex||6),m&&(c.attr({opacity:+f}),f||t(d,"afterAnimate",function(){d.visible&&c.show(!0),c[h.animation?"animate":"attr"]({opacity:1},{duration:200})})),o=p,r(g,function(t){var r,g,f,m,y=t.dataLabel,w=t.connector,C=!y;i=t.dlOptions||t.options&&t.options.dataLabels,(r=u(i&&i.enabled,o.enabled)&&null!==t.y)&&(p=l(o,i),g=t.getLabelConfig(),a=p.format?s(p.format,g):p.formatter.call(g,p),m=p.style,g=p.rotation,m.color=u(p.color,m.color,d.color,"#000000"),"contrast"===m.color&&(t.contrastColor=v.getContrast(t.color||d.color),m.color=p.inside||0>u(t.labelDistance,p.distance)||h.stacking?t.contrastColor:"#000000"),h.cursor&&(m.cursor=h.cursor),f={fill:p.backgroundColor,stroke:p.borderColor,"stroke-width":p.borderWidth,r:p.borderRadius||0,rotation:g,padding:p.padding,zIndex:1},e.objectEach(f,function(e,t){void 0===e&&delete f[t]})),!y||r&&n(a)?r&&n(a)&&(y?f.text=a:(y=t.dataLabel=v[g?"text":"label"](a,0,-9999,p.shape,null,null,p.useHTML,null,"data-label"),y.addClass("highcharts-data-label-color-"+t.colorIndex+" "+(p.className||"")+(p.useHTML?"highcharts-tracker":""))),y.attr(f),y.css(m).shadow(p.shadow),y.added||y.add(c),d.alignDataLabel(t,y,p,null,C)):(t.dataLabel=y=y.destroy(),w&&(t.connector=w.destroy()))}))},h.prototype.alignDataLabel=function(e,t,i,n,r){var s,a=this.chart,l=a.inverted,c=u(e.plotX,-9999),d=u(e.plotY,-9999),h=t.getBBox(),p=i.rotation,g=i.align,f=this.visible&&(e.series.forceDL||a.isInsidePlot(c,Math.round(d),l)||n&&a.isInsidePlot(c,l?n.x+1:n.y+n.height-1,l)),m="justify"===u(i.overflow,"justify");f&&(s=i.style.fontSize,s=a.renderer.fontMetrics(s,t).b,n=o({x:l?a.plotWidth-d:c,y:Math.round(l?a.plotHeight-c:d),width:0,height:0},n),o(i,{width:h.width,height:h.height}),p?(m=!1,c=a.renderer.rotCorr(s,p),c={x:n.x+i.x+n.width/2+c.x,y:n.y+i.y+{top:0,middle:.5,bottom:1}[i.verticalAlign]*n.height},t[r?"attr":"animate"](c).attr({align:g}),d=(p+720)%360,d=180<d&&360>d,"left"===g?c.y-=d?h.height:0:"center"===g?(c.x-=h.width/2,c.y-=h.height/2):"right"===g&&(c.x-=h.width,c.y-=d?0:h.height)):(t.align(i,null,n),c=t.alignAttr),m?e.isLabelJustified=this.justifyDataLabel(t,i,c,h,n,r):u(i.crop,!0)&&(f=a.isInsidePlot(c.x,c.y)&&a.isInsidePlot(c.x+h.width,c.y+h.height)),i.shape&&!p)&&t[r?"attr":"animate"]({anchorX:l?a.plotWidth-e.plotY:e.plotX,anchorY:l?a.plotHeight-e.plotX:e.plotY}),f||(t.attr({y:-9999}),t.placed=!1)},h.prototype.justifyDataLabel=function(e,t,i,n,r,o){var s,a,l=this.chart,c=t.align,u=t.verticalAlign,d=e.box?0:e.padding||0;return s=i.x+d,0>s&&("right"===c?t.align="left":t.x=-s,a=!0),s=i.x+n.width-d,s>l.plotWidth&&("left"===c?t.align="right":t.x=l.plotWidth-s,a=!0),s=i.y+d,0>s&&("bottom"===u?t.verticalAlign="top":t.y=-s,a=!0),s=i.y+n.height-d,s>l.plotHeight&&("top"===u?t.verticalAlign="bottom":t.y=l.plotHeight-s,a=!0),a&&(e.placed=!o,e.align(t,null,r)),a},p.pie&&(p.pie.prototype.drawDataLabels=function(){var t,o,s,a,l,c,d,p,g,f,m=this,v=m.data,y=m.chart,w=m.options.dataLabels,C=u(w.connectorPadding,10),b=u(w.connectorWidth,1),A=y.plotWidth,x=y.plotHeight,S=m.center,E=S[2]/2,$=S[1],F=[[],[]],k=[0,0,0,0];m.visible&&(w.enabled||m._hasPointLabels)&&(r(v,function(e){e.dataLabel&&e.visible&&e.dataLabel.shortened&&(e.dataLabel.attr({width:"auto"}).css({width:"auto",textOverflow:"clip"}),e.dataLabel.shortened=!1)}),h.prototype.drawDataLabels.apply(m),r(v,function(e){e.dataLabel&&e.visible&&(F[e.half].push(e),e.dataLabel._pos=null)}),r(F,function(i,o){var u,h,v,b=i.length,F=[];if(b)for(m.sortByAngle(i,o-.5),0<m.maxLabelDistance&&(u=Math.max(0,$-E-m.maxLabelDistance),h=Math.min($+E+m.maxLabelDistance,y.plotHeight),r(i,function(e){0<e.labelDistance&&e.dataLabel&&(e.top=Math.max(0,$-E-e.labelDistance),e.bottom=Math.min($+E+e.labelDistance,y.plotHeight),v=e.dataLabel.getBBox().height||21,e.positionsIndex=F.push({target:e.labelPos[1]-e.top+v/2,size:v,rank:e.y})-1)}),e.distribute(F,h+v-u)),f=0;f<b;f++)t=i[f],h=t.positionsIndex,l=t.labelPos,s=t.dataLabel,g=!1===t.visible?"hidden":"inherit",u=l[1],F&&n(F[h])?void 0===F[h].pos?g="hidden":(c=F[h].size,p=t.top+F[h].pos):p=u,delete t.positionIndex,d=w.justify?S[0]+(o?-1:1)*(E+t.labelDistance):m.getX(p<t.top+2||p>t.bottom-2?u:p,o,t),s._attr={visibility:g,align:l[6]},s._pos={x:d+w.x+({left:C,right:-C}[l[6]]||0),y:p+w.y-10},l.x=d,l.y=p,a=s.getBBox().width,u=null,d-a<C?(u=Math.round(a-d+C),k[3]=Math.max(u,k[3])):d+a>A-C&&(u=Math.round(d+a-A+C),k[1]=Math.max(u,k[1])),0>p-c/2?k[0]=Math.max(Math.round(c/2-p),k[0]):p+c/2>x&&(k[2]=Math.max(Math.round(p+c/2-x),k[2])),s.sideOverflow=u}),0===i(k)||this.verifyDataLabelOverflow(k))&&(this.placeDataLabels(),b&&r(this.points,function(e){var t;o=e.connector,(s=e.dataLabel)&&s._pos&&e.visible&&0<e.labelDistance?(g=s._attr.visibility,(t=!o)&&(e.connector=o=y.renderer.path().addClass("highcharts-data-label-connector highcharts-color-"+e.colorIndex).add(m.dataLabelsGroup),o.attr({"stroke-width":b,stroke:w.connectorColor||e.color||"#666666"})),o[t?"attr":"animate"]({d:m.connectorPath(e.labelPos)}),o.attr("visibility",g)):o&&(e.connector=o.destroy())}))},p.pie.prototype.connectorPath=function(e){var t=e.x,i=e.y;return u(this.options.dataLabels.softConnector,!0)?["M",t+("left"===e[6]?5:-5),i,"C",t,i,2*e[2]-e[4],2*e[3]-e[5],e[2],e[3],"L",e[4],e[5]]:["M",t+("left"===e[6]?5:-5),i,"L",e[2],e[3],"L",e[4],e[5]]},p.pie.prototype.placeDataLabels=function(){r(this.points,function(e){var t=e.dataLabel;t&&e.visible&&((e=t._pos)?(t.sideOverflow&&(t._attr.width=t.getBBox().width-t.sideOverflow,t.css({width:t._attr.width+"px",textOverflow:"ellipsis"}),t.shortened=!0),t.attr(t._attr),t[t.moved?"animate":"attr"](e),t.moved=!0):t&&t.attr({y:-9999}))},this)},p.pie.prototype.alignDataLabel=c,p.pie.prototype.verifyDataLabelOverflow=function(e){var t,i=this.center,n=this.options,r=n.center,o=n.minSize||80,s=null!==n.size;return s||(null!==r[0]?t=Math.max(i[2]-Math.max(e[1],e[3]),o):(t=Math.max(i[2]-e[1]-e[3],o),i[0]+=(e[3]-e[1])/2),null!==r[1]?t=Math.max(Math.min(t,i[2]-Math.max(e[0],e[2])),o):(t=Math.max(Math.min(t,i[2]-e[0]-e[2]),o),i[1]+=(e[0]-e[2])/2),t<i[2]?(i[2]=t,i[3]=Math.min(d(n.innerSize||0,t),t),this.translate(i),this.drawDataLabels&&this.drawDataLabels()):s=!0),s}),p.column&&(p.column.prototype.alignDataLabel=function(e,t,i,n,r){var o=this.chart.inverted,s=e.series,a=e.dlBox||e.shapeArgs,c=u(e.below,e.plotY>u(this.translatedThreshold,s.yAxis.len)),d=u(i.inside,!!this.options.stacking);a&&(n=l(a),0>n.y&&(n.height+=n.y,n.y=0),a=n.y+n.height-s.yAxis.len,0<a&&(n.height-=a),o&&(n={x:s.yAxis.len-n.y-n.height,y:s.xAxis.len-n.x-n.width,width:n.height,height:n.width}),d||(o?(n.x+=c?0:n.width,n.width=0):(n.y+=c?n.height:0,n.height=0))),i.align=u(i.align,!o||d?"center":c?"right":"left"),i.verticalAlign=u(i.verticalAlign,o||d?"middle":c?"top":"bottom"),h.prototype.alignDataLabel.call(this,e,t,i,n,r),e.isLabelJustified&&e.contrastColor&&e.dataLabel.css({color:e.contrastColor})})}(e),function(e){var t=e.Chart,i=e.each,n=e.pick,r=e.addEvent;t.prototype.callbacks.push(function(e){function t(){var t=[];i(e.series||[],function(e){var r=e.options.dataLabels,o=e.dataLabelCollections||["dataLabel"];(r.enabled||e._hasPointLabels)&&!r.allowOverlap&&e.visible&&i(o,function(r){i(e.points,function(e){e[r]&&(e[r].labelrank=n(e.labelrank,e.shapeArgs&&e.shapeArgs.height),t.push(e[r]))})})}),e.hideOverlappingLabels(t)}t(),r(e,"redraw",t)}),t.prototype.hideOverlappingLabels=function(e){var t,n,r,o,s,a,l,c,u,d=e.length,h=function(e,t,i,n,r,o,s,a){return!(r>e+i||r+s<e||o>t+n||o+a<t)};for(n=0;n<d;n++)(t=e[n])&&(t.oldOpacity=t.opacity,t.newOpacity=1);for(e.sort(function(e,t){return(t.labelrank||0)-(e.labelrank||0)}),n=0;n<d;n++)for(r=e[n],t=n+1;t<d;++t)o=e[t],r&&o&&r!==o&&r.placed&&o.placed&&0!==r.newOpacity&&0!==o.newOpacity&&(s=r.alignAttr,a=o.alignAttr,l=r.parentGroup,c=o.parentGroup,u=2*(r.box?0:r.padding),s=h(s.x+l.translateX,s.y+l.translateY,r.width-u,r.height-u,a.x+c.translateX,a.y+c.translateY,o.width-u,o.height-u))&&((r.labelrank<o.labelrank?r:o).newOpacity=0);i(e,function(e){var t,i;e&&(i=e.newOpacity,e.oldOpacity!==i&&e.placed&&(i?e.show(!0):t=function(){e.hide()},e.alignAttr.opacity=i,e[e.isOld?"animate":"attr"](e.alignAttr,null,t)),e.isOld=!0)})}}(e),function(e){var t,i=e.addEvent,n=e.Chart,r=e.createElement,o=e.css,s=e.defaultOptions,a=e.defaultPlotOptions,l=e.each,c=e.extend,u=e.fireEvent,d=e.hasTouch,h=e.inArray,p=e.isObject,g=e.Legend,f=e.merge,m=e.pick,v=e.Point,y=e.Series,w=e.seriesTypes,C=e.svg;t=e.TrackerMixin={drawTrackerPoint:function(){var e=this,t=e.chart.pointer,i=function(e){var i=t.getPointFromEvent(e);void 0!==i&&(t.isDirectTouch=!0,i.onMouseOver(e))};l(e.points,function(e){e.graphic&&(e.graphic.element.point=e),e.dataLabel&&(e.dataLabel.div?e.dataLabel.div.point=e:e.dataLabel.element.point=e)}),e._hasTracking||(l(e.trackerGroups,function(n){e[n]&&(e[n].addClass("highcharts-tracker").on("mouseover",i).on("mouseout",function(e){t.onTrackerMouseOut(e)}),d&&e[n].on("touchstart",i),e.options.cursor&&e[n].css(o).css({cursor:e.options.cursor}))}),e._hasTracking=!0)},drawTrackerGraph:function(){var e,t=this,i=t.options,n=i.trackByArea,r=[].concat(n?t.areaPath:t.graphPath),o=r.length,s=t.chart,a=s.pointer,c=s.renderer,u=s.options.tooltip.snap,h=t.tracker,p=function(){s.hoverSeries!==t&&t.onMouseOver()},g="rgba(192,192,192,"+(C?1e-4:.002)+")";if(o&&!n)for(e=o+1;e--;)"M"===r[e]&&r.splice(e+1,0,r[e+1]-u,r[e+2],"L"),(e&&"M"===r[e]||e===o)&&r.splice(e,0,"L",r[e-2]+u,r[e-1]);h?h.attr({d:r}):t.graph&&(t.tracker=c.path(r).attr({"stroke-linejoin":"round",visibility:t.visible?"visible":"hidden",stroke:g,fill:n?g:"none","stroke-width":t.graph.strokeWidth()+(n?0:2*u),zIndex:2}).add(t.group),l([t.tracker,t.markerGroup],function(e){e.addClass("highcharts-tracker").on("mouseover",p).on("mouseout",function(e){a.onTrackerMouseOut(e)}),i.cursor&&e.css({cursor:i.cursor}),d&&e.on("touchstart",p)}))}},w.column&&(w.column.prototype.drawTracker=t.drawTrackerPoint),w.pie&&(w.pie.prototype.drawTracker=t.drawTrackerPoint),w.scatter&&(w.scatter.prototype.drawTracker=t.drawTrackerPoint),c(g.prototype,{setItemEvents:function(e,t,i){var n=this,r=n.chart.renderer.boxWrapper,o="highcharts-legend-"+(e.series?"point":"series")+"-active";(i?t:e.legendGroup).on("mouseover",function(){e.setState("hover"),r.addClass(o),t.css(n.options.itemHoverStyle)}).on("mouseout",function(){t.css(f(e.visible?n.itemStyle:n.itemHiddenStyle)),r.removeClass(o),e.setState()}).on("click",function(t){var i=function(){e.setVisible&&e.setVisible()};t={browserEvent:t},e.firePointEvent?e.firePointEvent("legendItemClick",t,i):u(e,"legendItemClick",t,i)})},createCheckboxForItem:function(e){e.checkbox=r("input",{type:"checkbox",checked:e.selected,defaultChecked:e.selected},this.options.itemCheckboxStyle,this.chart.container),i(e.checkbox,"click",function(t){u(e.series||e,"checkboxClick",{checked:t.target.checked,item:e},function(){e.select()})})}}),s.legend.itemStyle.cursor="pointer",c(n.prototype,{showResetZoom:function(){var e=this,t=s.lang,i=e.options.chart.resetZoomButton,n=i.theme,r=n.states,o="chart"===i.relativeTo?null:"plotBox";this.resetZoomButton=e.renderer.button(t.resetZoom,null,null,function(){e.zoomOut()},n,r&&r.hover).attr({align:i.position.align,title:t.resetZoomTitle}).addClass("highcharts-reset-zoom").add().align(i.position,!1,o)},zoomOut:function(){var e=this;u(e,"selection",{resetSelection:!0},function(){e.zoom()})},zoom:function(e){var t,i,n=this.pointer,r=!1;!e||e.resetSelection?l(this.axes,function(e){t=e.zoom()}):l(e.xAxis.concat(e.yAxis),function(e){var i=e.axis;n[i.isXAxis?"zoomX":"zoomY"]&&(t=i.zoom(e.min,e.max),i.displayBtn&&(r=!0))}),i=this.resetZoomButton,r&&!i?this.showResetZoom():!r&&p(i)&&(this.resetZoomButton=i.destroy()),t&&this.redraw(m(this.options.chart.animation,e&&e.animation,100>this.pointCount))},pan:function(e,t){var i,n=this,r=n.hoverPoints;r&&l(r,function(e){e.setState()}),l("xy"===t?[1,0]:[1],function(t){t=n[t?"xAxis":"yAxis"][0];var r,o=t.horiz,s=e[o?"chartX":"chartY"],o=o?"mouseDownX":"mouseDownY",a=n[o],l=(t.pointRange||0)/2,c=t.getExtremes(),u=t.toValue(a-s,!0)+l,l=t.toValue(a+t.len-s,!0)-l,d=l<u,a=d?l:u,u=d?u:l,l=Math.min(c.dataMin,t.toValue(t.toPixels(c.min)-t.minPixelPadding)),d=Math.max(c.dataMax,t.toValue(t.toPixels(c.max)+t.minPixelPadding));r=l-a,0<r&&(u+=r,a=l),r=u-d,0<r&&(u=d,a-=r),t.series.length&&a!==c.min&&u!==c.max&&(t.setExtremes(a,u,!1,!1,{trigger:"pan"}),i=!0),n[o]=s}),i&&n.redraw(!1),o(n.container,{cursor:"move"})}}),c(v.prototype,{select:function(e,t){var i=this,n=i.series,r=n.chart;e=m(e,!i.selected),i.firePointEvent(e?"select":"unselect",{accumulate:t},function(){i.selected=i.options.selected=e,n.options.data[h(i,n.data)]=i.options,i.setState(e&&"select"),t||l(r.getSelectedPoints(),function(e){e.selected&&e!==i&&(e.selected=e.options.selected=!1,n.options.data[h(e,n.data)]=e.options,e.setState(""),e.firePointEvent("unselect"))})})},onMouseOver:function(e){var t=this.series.chart,i=t.pointer;e=e?i.normalize(e):i.getChartCoordinatesFromPoint(this,t.inverted),i.runPointActions(e,this)},onMouseOut:function(){var e=this.series.chart;this.firePointEvent("mouseOut"),l(e.hoverPoints||[],function(e){e.setState()}),e.hoverPoints=e.hoverPoint=null},importEvents:function(){if(!this.hasImportedEvents){var t=this,n=f(t.series.options.point,t.options).events;t.events=n,e.objectEach(n,function(e,n){i(t,n,e)}),this.hasImportedEvents=!0}},setState:function(e,t){var i,n=Math.floor(this.plotX),r=this.plotY,o=this.series,s=o.options.states[e]||{},l=a[o.type].marker&&o.options.marker,u=l&&!1===l.enabled,d=l&&l.states&&l.states[e]||{},h=!1===d.enabled,p=o.stateMarkerGraphic,g=this.marker||{},f=o.chart,v=o.halo,y=l&&o.markerAttribs;(e=e||"")===this.state&&!t||this.selected&&"select"!==e||!1===s.enabled||e&&(h||u&&!1===d.enabled)||e&&g.states&&g.states[e]&&!1===g.states[e].enabled||(y&&(i=o.markerAttribs(this,e)),this.graphic?(this.state&&this.graphic.removeClass("highcharts-point-"+this.state),e&&this.graphic.addClass("highcharts-point-"+e),this.graphic.attr(o.pointAttribs(this,e)),i&&this.graphic.animate(i,m(f.options.chart.animation,d.animation,l.animation)),p&&p.hide()):(e&&d&&(l=g.symbol||o.symbol,p&&p.currentSymbol!==l&&(p=p.destroy()),p?p[t?"animate":"attr"]({x:i.x,y:i.y}):l&&(o.stateMarkerGraphic=p=f.renderer.symbol(l,i.x,i.y,i.width,i.height).add(o.markerGroup),p.currentSymbol=l),p&&p.attr(o.pointAttribs(this,e))),p&&(p[e&&f.isInsidePlot(n,r,f.inverted)?"show":"hide"](),p.element.point=this)),(n=s.halo)&&n.size?(v||(o.halo=v=f.renderer.path().add((this.graphic||p).parentGroup)),v[t?"animate":"attr"]({d:this.haloPath(n.size)}),v.attr({"class":"highcharts-halo highcharts-color-"+m(this.colorIndex,o.colorIndex)}),v.point=this,v.attr(c({fill:this.color||o.color,"fill-opacity":n.opacity,zIndex:-1},n.attributes))):v&&v.point&&v.point.haloPath&&v.animate({d:v.point.haloPath(0)}),this.state=e)},haloPath:function(e){return this.series.chart.renderer.symbols.circle(Math.floor(this.plotX)-e,this.plotY-e,2*e,2*e)}}),c(y.prototype,{onMouseOver:function(){var e=this.chart,t=e.hoverSeries;t&&t!==this&&t.onMouseOut(),this.options.events.mouseOver&&u(this,"mouseOver"),this.setState("hover"),e.hoverSeries=this},onMouseOut:function(){var e=this.options,t=this.chart,i=t.tooltip,n=t.hoverPoint;t.hoverSeries=null,n&&n.onMouseOut(),this&&e.events.mouseOut&&u(this,"mouseOut"),!i||this.stickyTracking||i.shared&&!this.noSharedTooltip||i.hide(),this.setState()},setState:function(e){var t=this,i=t.options,n=t.graph,r=i.states,o=i.lineWidth,i=0;if(e=e||"",t.state!==e&&(l([t.group,t.markerGroup,t.dataLabelsGroup],function(i){i&&(t.state&&i.removeClass("highcharts-series-"+t.state),e&&i.addClass("highcharts-series-"+e))}),t.state=e,!r[e]||!1!==r[e].enabled)&&(e&&(o=r[e].lineWidth||o+(r[e].lineWidthPlus||0)),n&&!n.dashstyle))for(o={"stroke-width":o},n.animate(o,m(t.chart.options.chart.animation,r[e]&&r[e].animation));t["zone-graph-"+i];)t["zone-graph-"+i].attr(o),i+=1},setVisible:function(e,t){var i,n=this,r=n.chart,o=n.legendItem,s=r.options.chart.ignoreHiddenSeries,a=n.visible;i=(n.visible=e=n.options.visible=n.userOptions.visible=void 0===e?!a:e)?"show":"hide",l(["group","dataLabelsGroup","markerGroup","tracker","tt"],function(e){n[e]&&n[e][i]()}),r.hoverSeries!==n&&(r.hoverPoint&&r.hoverPoint.series)!==n||n.onMouseOut(),o&&r.legend.colorizeItem(n,e),n.isDirty=!0,n.options.stacking&&l(r.series,function(e){e.options.stacking&&e.visible&&(e.isDirty=!0)}),l(n.linkedSeries,function(t){t.setVisible(e,!1)}),s&&(r.isDirtyBox=!0),!1!==t&&r.redraw(),u(n,i)},show:function(){this.setVisible(!0)},hide:function(){this.setVisible(!1)},select:function(e){this.selected=e=void 0===e?!this.selected:e,this.checkbox&&(this.checkbox.checked=e),u(this,e?"select":"unselect")},drawTracker:t.drawTrackerGraph})}(e),function(e){var t=e.Chart,i=e.each,n=e.inArray,r=e.isArray,o=e.isObject,s=e.pick,a=e.splat;t.prototype.setResponsive=function(t){var n=this.options.responsive,r=[],o=this.currentResponsive;n&&n.rules&&i(n.rules,function(i){void 0===i._id&&(i._id=e.uniqueKey()),this.matchResponsiveRule(i,r,t)},this);var s=e.merge.apply(0,e.map(r,function(t){return e.find(n.rules,function(e){return e._id===t}).chartOptions})),r=r.toString()||void 0;r!==(o&&o.ruleIds)&&(o&&this.update(o.undoOptions,t),r?(this.currentResponsive={ruleIds:r,mergedOptions:s,undoOptions:this.currentOptions(s)},this.update(s,t)):this.currentResponsive=void 0)},t.prototype.matchResponsiveRule=function(e,t){var i=e.condition;(i.callback||function(){return this.chartWidth<=s(i.maxWidth,Number.MAX_VALUE)&&this.chartHeight<=s(i.maxHeight,Number.MAX_VALUE)&&this.chartWidth>=s(i.minWidth,0)&&this.chartHeight>=s(i.minHeight,0)}).call(this)&&t.push(e._id)},t.prototype.currentOptions=function(t){function i(t,s,l,c){var u;e.objectEach(t,function(e,d){if(!c&&-1<n(d,["series","xAxis","yAxis"]))for(t[d]=a(t[d]),l[d]=[],u=0;u<t[d].length;u++)s[d][u]&&(l[d][u]={},i(e[u],s[d][u],l[d][u],c+1));else o(e)?(l[d]=r(e)?[]:{},i(e,s[d]||{},l[d],c+1)):l[d]=s[d]||null})}var s={};return i(t,this.options,s,0),s}}(e),e}),function(e){"use strict";function t(e){return"[object Array]"===Object.prototype.toString.call(e)}function i(e){return e instanceof Function}function n(e){return!i(e)&&e instanceof Object}function r(e,i){var o;for(o in i)n(i[o])||t(i[o])?(n(i[o])&&!n(e[o])&&(e[o]={}),t(i[o])&&!t(e[o])&&(e[o]=[]),r(e[o],i[o])):i[o]!==undefined&&(e[o]=i[o])}function o(e,t){var i={};return r(i,e),r(i,t),i}function s(e){var t,i,n,r,o,s,a,l,c,u,d;return"[object Date]"===(u=Object.prototype.toString.call(e))?e:"[object String]"===u?(n=e.match(J),n?(d=parseInt(n[1],10),s=parseInt(n[3],10)-1,t=parseInt(n[5],10),i=parseInt(n[7],10),o=n[9]?parseInt(n[9],10):0,c=n[11]?parseInt(n[11],10):0,r=n[12]?1e3*parseFloat(Q+n[12].slice(1)):0,l=Date.UTC(d,s,t,i,o,c,r),n[13]&&n[14]&&(a=60*n[15],n[17]&&(a+=parseInt(n[17],10)),a*="-"===n[14]?-1:1,l-=60*a*1e3),new Date(l)):void 0):void 0}function a(e){var t,i,n;for(t=0;t<e.length;t++)for(n=e[t].data,i=0;i<n.length;i++)if(n[i][1]<0)return!0;return!1}function l(e,t,i,n,r,s,l,c){return function(u,d,h){var p=u.data,g=o({},e);return g=o(g,h||{}),(u.hideLegend||"legend"in d)&&t(g,d.legend,u.hideLegend),d.title&&i(g,d.title),"min"in d?n(g,d.min):a(p)||n(g,0),d.max&&r(g,d.max),"stacked"in d&&s(g,d.stacked),d.colors&&(g.colors=d.colors),d.xtitle&&l(g,d.xtitle),d.ytitle&&c(g,d.ytitle),g=o(g,d.library||{})}}function c(e,t){document.body.innerText?e.innerText=t:e.textContent=t}function u(e,t){c(e,"Error Loading Chart: "+t),e.style.color="#ff0000"}function d(e,t,i){se.push([e,t,i]),h()}function h(){if(ae<le){var e=se.shift();e&&(ae++,g(e[0],e[1],e[2]),h())}}function p(){ae--,h()}function g(e,t,i){f(t,i,function(t,i,n){var r="string"==typeof n?n:n.message;u(e,r)})}function f(t,i,n){var r=e.jQuery||e.Zepto||e.$;if(r)r.ajax({dataType:"json",url:t,success:i,error:n,complete:p});else{var o=new XMLHttpRequest;o.open("GET",t,!0),o.setRequestHeader("Content-Type","application/json"),o.onload=function(){p(),200===o.status?i(JSON.parse(o.responseText),o.statusText,o):n(o,"error",o.statusText)},o.send()}}function m(e,t){try{t(e)}catch(t){throw u(e.element,t.message),t}}function v(e,t,i){"string"==typeof i?d(e.element,i,function(i){e.rawData=i,m(e,t)}):(e.rawData=i,m(e,t))}function y(e){var t=e.element,i=document.createElement("a");i.download=!0===e.options.download?"chart.png":e.options.download,i.style.position="absolute",i.style.top="20px",i.style.right="20px",i.style.zIndex=1e3,i.style.lineHeight="20px",i.target="_blank";var n=document.createElement("img");n.alt="Download",n.style.border="none",n.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAMAAAC6V+0/AAABCFBMVEUAAADMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMywEsqxAAAAV3RSTlMAAQIDBggJCgsMDQ4PERQaHB0eISIjJCouLzE0OTo/QUJHSUpLTU5PUllhYmltcHh5foWLjI+SlaCio6atr7S1t7m6vsHHyM7R2tze5Obo7fHz9ff5+/1hlxK2AAAA30lEQVQYGUXBhVYCQQBA0TdYWAt2d3d3YWAHyur7/z9xgD16Lw0DW+XKx+1GgX+FRzM3HWQWrHl5N/oapW5RPe0PkBu+UYeICvozTWZVK23Ao04B79oJrOsJDOoxkZoQPWgX29pHpCZEk7rEvQYiNSFq1UMqvlCjJkRBS1R8hb00Vb/TajtBL7nTHE1X1vyMQF732dQhyF2o6SAwrzP06iUQzvwsArlnzcOdrgBhJyHa1QOgO9U1GsKuvjUTjavliZYQ8nNPapG6sap/3nrIdJ6bOWzmX/fy0XVpfzZP3S8OJT3g9EEiJwAAAABJRU5ErkJggg==",i.appendChild(n),t.style.position="relative",e.downloadAttached=!0,w(t,"mouseover",function(n){var r=n.relatedTarget;(!r||r!==this&&!C(this,r)&&e.options.download)&&(i.href=e.toImage(),t.appendChild(i))}),w(t,"mouseout",function(e){var t=e.relatedTarget;t&&(t===this||C(this,t))||i.parentNode&&i.parentNode.removeChild(i)})}function w(t,i,n){t.addEventListener?t.addEventListener(i,n,!1):t.attachEvent("on"+i,function(){return n.call(t,e.event)})}function C(e,t){if(e===t)return!1;for(;t&&t!==e;)t=t.parentNode;return t===e}function b(e){return""+e}function A(e){return parseFloat(e)}function x(e){var t,i,n,r;if("object"!=typeof e)if("number"==typeof e)e=new Date(1e3*e);else{if(t=e.match(oe))return i=parseInt(t[1],10),n=parseInt(t[3],10)-1,r=parseInt(t[5],10),new Date(i,n,r);var o=e.replace(/ /,"T").replace(" ","").replace("UTC","Z");e=s(o)||new Date(e)}return e}function S(e){if(!t(e)){var i,n=[];for(i in e)e.hasOwnProperty(i)&&n.push([i,e[i]]);e=n}return e}function E(e,t){return e[0].getTime()-t[0].getTime()}function $(e,t){return e[0]-t[0]}function F(e,t){return e-t}function k(){!te&&"Highcharts"in e&&(te=new function(){var t=e.Highcharts;this.name="highcharts";var i={chart:{},xAxis:{title:{text:null},labels:{style:{fontSize:"12px"}}},yAxis:{title:{text:null},labels:{style:{fontSize:"12px"}}},title:{text:null},credits:{enabled:!1},legend:{borderWidth:0},tooltip:{style:{fontSize:"12px"}},plotOptions:{areaspline:{},series:{marker:{}}}},n=function(e,t,i){t!==undefined?(e.legend.enabled=!!t,t&&!0!==t&&("top"===t||"bottom"===t?e.legend.verticalAlign=t:(e.legend.layout="vertical",e.legend.verticalAlign="middle",e.legend.align=t))):i&&(e.legend.enabled=!1)},r=function(e,t){e.title.text=t},s=function(e,t){e.yAxis.min=t},a=function(e,t){e.yAxis.max=t},c=function(e,t){e.plotOptions.series.stacking=t?"normal":null},u=function(e,t){e.xAxis.title.text=t},d=function(e,t){e.yAxis.title.text=t},h=l(i,n,r,s,a,c,u,d);this.renderLineChart=function(e,i){i=i||"spline";var n={};"areaspline"===i&&(n={plotOptions:{areaspline:{stacking:"normal"},area:{stacking:"normal"},series:{marker:{enabled:!1}}}}),!1===e.options.curve&&("areaspline"===i?i="area":"spline"===i&&(i="line"));var r,o,s,a=h(e,e.options,n);a.xAxis.type=e.discrete?"category":"datetime",a.chart.type||(a.chart.type=i),a.chart.renderTo=e.element.id;var l=e.data;for(o=0;o<l.length;o++){if(r=l[o].data,!e.discrete)for(s=0;s<r.length;s++)r[s][0]=r[s][0].getTime();l[o].marker={symbol:"circle"},!1===e.options.points&&(l[o].marker.enabled=!1)}a.series=l,e.chart=new t.Chart(a)},this.renderScatterChart=function(e){var i={},n=h(e,e.options,i);n.chart.type="scatter",n.chart.renderTo=e.element.id,n.series=e.data,e.chart=new t.Chart(n)},this.renderPieChart=function(e){var s=o(i,{});e.options.colors&&(s.colors=e.options.colors),e.options.donut&&(s.plotOptions={pie:{innerSize:"50%"}}),"legend"in e.options&&n(s,e.options.legend),e.options.title&&r(s,e.options.title);var a=o(s,e.options.library||{});a.chart.renderTo=e.element.id,a.series=[{type:"pie",name:e.options.label||"Value",data:e.data}],e.chart=new t.Chart(a)},this.renderColumnChart=function(e,i){i=i||"column";var n,r,o,s,a=e.data,l=h(e,e.options),c=[],u=[];for(l.chart.type=i,l.chart.renderTo=e.element.id,n=0;n<a.length;n++)for(o=a[n],r=0;r<o.data.length;r++)s=o.data[r],c[s[0]]||(c[s[0]]=new Array(a.length),u.push(s[0])),c[s[0]][n]=s[1];"number"===e.options.xtype&&u.sort(F),l.xAxis.categories=u;var d,p=[];for(n=0;n<a.length;n++){for(s=[],r=0;r<u.length;r++)s.push(c[u[r]][n]||0);d={name:a[n].name,data:s},a[n].stack&&(d.stack=a[n].stack),p.push(d)}l.series=p,e.chart=new t.Chart(l)};var p=this;this.renderBarChart=function(e){p.renderColumnChart(e,"bar")},this.renderAreaChart=function(e){p.renderLineChart(e,"areaspline")}},re.push(te)),!ee&&e.google&&(e.google.setOnLoadCallback||e.google.charts)&&(ee=new function(){var t=e.google;this.name="google";var i={},n=[],r=function(){for(var e,i=0;i<n.length;i++)e=n[i],t.visualization&&("corechart"===e.pack&&t.visualization.LineChart||"timeline"===e.pack&&t.visualization.Timeline)&&(e.callback(),n.splice(i,1),i--)},s=function(o,s){if(s||(s=o,o="corechart"),n.push({pack:o,callback:s}),i[o])r();else{i[o]=!0;var a={packages:[o],callback:r};ne.language&&(a.language=ne.language),"corechart"===o&&ne.mapsApiKey&&(a.mapsApiKey=ne.mapsApiKey),e.google.setOnLoadCallback?t.load("visualization","1",a):t.charts.load("current",a)}},a={chartArea:{},fontName:"'Lucida Grande', 'Lucida Sans Unicode', Verdana, Arial, Helvetica, sans-serif",pointSize:6,legend:{textStyle:{fontSize:12,color:"#444"},alignment:"center",position:"right"},curveType:"function",hAxis:{textStyle:{color:"#666",fontSize:12},titleTextStyle:{},gridlines:{color:"transparent"},baselineColor:"#ccc",viewWindow:{}},vAxis:{textStyle:{color:"#666",fontSize:12},titleTextStyle:{},baselineColor:"#ccc",viewWindow:{}},tooltip:{textStyle:{color:"#666",fontSize:12}}},c=function(e,t,i){if(t!==undefined){var n;n=t?!0===t?"right":t:"none",e.legend.position=n}else i&&(e.legend.position="none")},u=function(e,t){e.title=t,e.titleTextStyle={color:"#333",fontSize:"20px"}},d=function(e,t){e.vAxis.viewWindow.min=t},h=function(e,t){e.vAxis.viewWindow.max=t},p=function(e,t){e.hAxis.viewWindow.min=t},g=function(e,t){e.hAxis.viewWindow.max=t},f=function(e,t){e.isStacked=!!t},m=function(e,t){e.hAxis.title=t,e.hAxis.titleTextStyle.italic=!1},v=function(e,t){e.vAxis.title=t,e.vAxis.titleTextStyle.italic=!1},y=l(a,c,u,d,h,f,m,v),w=function(e,i,n){var r,o,s,a,l,c=[],u=[];for(r=0;r<e.length;r++)for(s=e[r],o=0;o<s.data.length;o++)a=s.data[o],l="datetime"===i?a[0].getTime():a[0],c[l]||(c[l]=new Array(e.length),u.push(l)),c[l][r]=A(a[1]);for(var d,h=[],p=!0,o=0;o<u.length;o++){var r=u[o];"datetime"===i?(d=new Date(A(r)),p=p&&R(d)):d="number"===i?A(r):r,h.push([d].concat(c[r]))}if("datetime"===i?h.sort(E):"number"===i&&h.sort($),"number"===n){h.sort($);for(var r=0;r<h.length;r++)h[r][0]=b(h[r][0])}var g=new t.visualization.DataTable;for(i="datetime"===i&&p?"date":i,g.addColumn(i,""),r=0;r<e.length;r++)g.addColumn("number",e[r].name);return g.addRows(h),g},C=function(t){e.attachEvent?e.attachEvent("onresize",t):e.addEventListener&&e.addEventListener("resize",t,!0),t()};this.renderLineChart=function(e){s(function(){var i={};!1===e.options.curve&&(i.curveType="none"),!1===e.options.points&&(i.pointSize=0);var n=y(e,e.options,i),r=e.discrete?"string":"datetime";"number"===e.options.xtype&&(r="number");var o=w(e.data,r);e.chart=new t.visualization.LineChart(e.element),C(function(){e.chart.draw(o,n)})})},this.renderPieChart=function(e){s(function(){var i={chartArea:{top:"10%",height:"80%"},legend:{}};e.options.colors&&(i.colors=e.options.colors),e.options.donut&&(i.pieHole=.5),"legend"in e.options&&c(i,e.options.legend),e.options.title&&u(i,e.options.title);var n=o(o(a,i),e.options.library||{}),r=new t.visualization.DataTable;r.addColumn("string",""),r.addColumn("number","Value"),r.addRows(e.data),e.chart=new t.visualization.PieChart(e.element),C(function(){e.chart.draw(r,n)})})},this.renderColumnChart=function(e){s(function(){var i=y(e,e.options),n=w(e.data,"string",e.options.xtype);e.chart=new t.visualization.ColumnChart(e.element),C(function(){e.chart.draw(n,i)})})},this.renderBarChart=function(e){s(function(){var i={hAxis:{gridlines:{color:"#ccc"}}},n=l(a,c,u,p,g,f,m,v)(e,e.options,i),r=w(e.data,"string",e.options.xtype);e.chart=new t.visualization.BarChart(e.element),C(function(){e.chart.draw(r,n)})})},this.renderAreaChart=function(e){s(function(){var i={isStacked:!0,pointSize:0,areaOpacity:.5
},n=y(e,e.options,i),r=e.discrete?"string":"datetime";"number"===e.options.xtype&&(r="number");var o=w(e.data,r);e.chart=new t.visualization.AreaChart(e.element),C(function(){e.chart.draw(o,n)})})},this.renderGeoChart=function(e){s(function(){var i={legend:"none",colorAxis:{colors:e.options.colors||["#f6c7b6","#ce502d"]}},n=o(o(a,i),e.options.library||{}),r=new t.visualization.DataTable;r.addColumn("string",""),r.addColumn("number",e.options.label||"Value"),r.addRows(e.data),e.chart=new t.visualization.GeoChart(e.element),C(function(){e.chart.draw(r,n)})})},this.renderScatterChart=function(e){s(function(){var i,n,r,o,s={},a=y(e,e.options,s),l=e.data,c=[];for(i=0;i<l.length;i++)for(o=l[i].data,n=0;n<o.length;n++){var u=new Array(l.length+1);u[0]=o[n][0],u[i+1]=o[n][1],c.push(u)}var r=new t.visualization.DataTable;for(r.addColumn("number",""),i=0;i<l.length;i++)r.addColumn("number",l[i].name);r.addRows(c),e.chart=new t.visualization.ScatterChart(e.element),C(function(){e.chart.draw(r,a)})})},this.renderTimeline=function(e){s("timeline",function(){var i={legend:"none"};e.options.colors&&(i.colors=e.options.colors);var n=o(o(a,i),e.options.library||{}),r=new t.visualization.DataTable;r.addColumn({type:"string",id:"Name"}),r.addColumn({type:"date",id:"Start"}),r.addColumn({type:"date",id:"End"}),r.addRows(e.data),e.element.style.lineHeight="normal",e.chart=new t.visualization.Timeline(e.element),C(function(){e.chart.draw(r,n)})})}},re.push(ee)),!ie&&"Chart"in e&&(ie=new function(){var t=e.Chart;this.name="chartjs";var i={maintainAspectRatio:!1,animation:!1,tooltips:{displayColors:!1},legend:{},title:{fontSize:20,fontColor:"#333"}},n={scales:{yAxes:[{ticks:{maxTicksLimit:4},scaleLabel:{fontSize:16,fontColor:"#333"}}],xAxes:[{gridLines:{drawOnChartArea:!1},scaleLabel:{fontSize:16,fontColor:"#333"},time:{},ticks:{}}]}},r=["#3366CC","#DC3912","#FF9900","#109618","#990099","#3B3EAC","#0099C6","#DD4477","#66AA00","#B82E2E","#316395","#994499","#22AA99","#AAAA11","#6633CC","#E67300","#8B0707","#329262","#5574A6","#651067"],s=function(e,t,i){t!==undefined?(e.legend.display=!!t,t&&!0!==t&&(e.legend.position=t)):i&&(e.legend.display=!1)},a=function(e,t){e.title.display=!0,e.title.text=t},c=function(e,t){null!==t&&(e.scales.yAxes[0].ticks.min=A(t))},u=function(e,t){e.scales.yAxes[0].ticks.max=A(t)},d=function(e,t){null!==t&&(e.scales.xAxes[0].ticks.min=A(t))},h=function(e,t){e.scales.xAxes[0].ticks.max=A(t)},p=function(e,t){e.scales.xAxes[0].stacked=!!t,e.scales.yAxes[0].stacked=!!t},g=function(e,t){e.scales.xAxes[0].scaleLabel.display=!0,e.scales.xAxes[0].scaleLabel.labelString=t},f=function(e,t){e.scales.yAxes[0].scaleLabel.display=!0,e.scales.yAxes[0].scaleLabel.labelString=t},m=function(e,i,n,r){e.chart?e.chart.destroy():e.element.innerHTML="<canvas></canvas>";var o=e.element.getElementsByTagName("CANVAS")[0];e.chart=new t(o,{type:i,data:n,options:r})},v=function(e,t){var i=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return i?"rgba("+parseInt(i[1],16)+", "+parseInt(i[2],16)+", "+parseInt(i[3],16)+", "+t+")":e},y=function(e,t,i){var n=Math.ceil(e.element.offsetWidth/4/t.labels.length);n>25&&(n=25),i.scales.xAxes[0].ticks.callback=function(e){return e=b(e),e.length>n?e.substring(0,n-2)+"...":e}},w=l(o(i,n),s,a,c,u,p,g,f),C=function(e,t,i){var n,s,a,l,c,u,d=[],h=[],p=e.options.colors||r,g=!0,f=!0,m=!0,y=!0,w=!0,C=!0,b=("line"===i||"area"===i)&&!e.discrete,x=e.data,S=[],E=[];for(s=0;s<x.length;s++)for(l=x[s],a=0;a<l.data.length;a++)c=l.data[a],u=b?c[0].getTime():c[0],E[u]||(E[u]=new Array(x.length)),E[u][s]=A(c[1]),-1===S.indexOf(u)&&S.push(u);(b||"number"===e.options.xtype)&&S.sort(F);var $=[];for(a=0;a<x.length;a++)$.push([]);var k,D;for(D=0;D<S.length;D++)for(s=S[D],b?(k=new Date(A(s)),g=g&&R(k),n||(n=k.getDay()),f=f&&_(k,n),m=m&&B(k),y=y&&P(k),w=w&&L(k),C=C&&M(k)):k=s,h.push(k),a=0;a<x.length;a++)$[a].push(E[s][a]===undefined?null:E[s][a]);for(s=0;s<x.length;s++){l=x[s];var T=l.color||p[s],O="line"!==i?v(T,.5):T,I={label:l.name,data:$[s],fill:"area"===i,borderColor:T,backgroundColor:O,pointBackgroundColor:T,borderWidth:2};l.stack&&(I.stack=l.stack),!1===e.options.curve&&(I.lineTension=0),!1===e.options.points&&(I.pointRadius=0,I.pointHitRadius=5),d.push(o(I,l.library||{}))}if(b&&h.length>0){var N=h[0].getTime(),z=h[0].getTime();for(s=1;s<h.length;s++)k=h[s].getTime(),k<N&&(N=k),k>z&&(z=k);var H=(z-N)/864e5;if(!t.scales.xAxes[0].time.unit){var G;if(y||H>3650?(t.scales.xAxes[0].time.unit="year",G=365):m||H>300?(t.scales.xAxes[0].time.unit="month",G=30):g||H>10?(t.scales.xAxes[0].time.unit="day",G=1):w||H>.5?(t.scales.xAxes[0].time.displayFormats={hour:"MMM D, h a"},t.scales.xAxes[0].time.unit="hour",G=1/24):C&&(t.scales.xAxes[0].time.displayFormats={minute:"h:mm a"},t.scales.xAxes[0].time.unit="minute",G=1/24/60),G&&H>0){var V=Math.ceil(H/G/(e.element.offsetWidth/100));f&&1===G&&(V=7*Math.ceil(V/7)),t.scales.xAxes[0].time.unitStepSize=V}}t.scales.xAxes[0].time.tooltipFormat||(g?t.scales.xAxes[0].time.tooltipFormat="ll":w?t.scales.xAxes[0].time.tooltipFormat="MMM D, h a":C&&(t.scales.xAxes[0].time.tooltipFormat="h:mm a"))}return{labels:h,datasets:d}};this.renderLineChart=function(e,t){if("number"===e.options.xtype)return x.renderScatterChart(e,t,!0);var i={};!e.options.max&&I(e.data)&&(i.max=1);var n=w(e,o(i,e.options)),r=C(e,n,t||"line");n.scales.xAxes[0].type=e.discrete?"category":"time",m(e,"line",r,n)},this.renderPieChart=function(e){var t=o({},i);e.options.donut&&(t.cutoutPercentage=50),"legend"in e.options&&s(t,e.options.legend),e.options.title&&a(t,e.options.title),t=o(t,e.options.library||{});for(var n=[],l=[],c=0;c<e.data.length;c++){var u=e.data[c];n.push(u[0]),l.push(u[1])}var d={labels:n,datasets:[{data:l,backgroundColor:e.options.colors||r}]};m(e,"pie",d,t)},this.renderColumnChart=function(e,t){var r;r="bar"===t?l(o(i,n),s,a,d,h,p,g,f)(e,e.options):w(e,e.options);var c=C(e,r,"column");y(e,c,r),m(e,"bar"===t?"horizontalBar":"bar",c,r)};var x=this;this.renderAreaChart=function(e){x.renderLineChart(e,"area")},this.renderBarChart=function(e){x.renderColumnChart(e,"bar")},this.renderScatterChart=function(e,t,i){t=t||"line";for(var n=w(e,e.options),o=e.options.colors||r,s=[],a=e.data,l=0;l<a.length;l++){for(var c=a[l],u=[],d=0;d<c.data.length;d++){var h={x:A(c.data[d][0]),y:A(c.data[d][1])};"bubble"===t&&(h.r=A(c.data[d][2])),u.push(h)}var p=c.color||o[l],g="area"===t?v(p,.5):p;s.push({label:c.name,showLine:i||!1,data:u,borderColor:p,backgroundColor:g,pointBackgroundColor:p,fill:"area"===t})}"area"===t&&(t="line");var f={datasets:s};n.scales.xAxes[0].type="linear",n.scales.xAxes[0].position="bottom",m(e,t,f,n)},this.renderBubbleChart=function(e){this.renderScatterChart(e,"bubble")}},re.unshift(ie))}function D(e,t){T(e,t),t.options.download&&!t.downloadAttached&&"chartjs"===t.adapter&&y(t)}function T(e,t){var n,r,o,s;for(o="render"+e,s=t.options.adapter,k(),n=0;n<re.length;n++)if(r=re[n],(!s||s===r.name)&&i(r[o]))return t.adapter=r.name,r[o](t);throw new Error("No adapter found")}function M(e){return 0===e.getMilliseconds()&&0===e.getSeconds()}function L(e){return M(e)&&0===e.getMinutes()}function R(e){return L(e)&&0===e.getHours()}function _(e,t){return R(e)&&e.getDay()===t}function B(e){return R(e)&&1===e.getDate()}function P(e){return B(e)&&0===e.getMonth()}function O(e){return!isNaN(x(e))&&b(e).length>=6}function I(e){var t,i,n;for(t=0;t<e.length;t++)for(n=e[t].data,i=0;i<n.length;i++)if(0!=n[i][1])return!1;return!0}function N(e){var t,i,n;for(t=0;t<e.length;t++)for(n=S(e[t].data),i=0;i<n.length;i++)if(!O(n[i][0]))return!0;return!1}function z(e){var t,i,n=[];for(t=0;t<e.length;t++){var r={};for(i in e[t])e[t].hasOwnProperty(i)&&(r[i]=e[t][i]);n.push(r)}return n}function H(e,i){var n,r=e.options,o=e.rawData;for(!t(o)||"object"!=typeof o[0]||t(o[0])?(o=[{name:r.label||"Value",data:o}],e.hideLegend=!0):e.hideLegend=!1,null!==r.discrete&&r.discrete!==undefined||"bubble"===i||"number"===i?e.discrete=r.discrete:e.discrete=N(o),e.discrete&&(i="string"),e.options.xtype&&(i=e.options.xtype),o=z(o),n=0;n<o.length;n++)o[n].data=ue(S(o[n].data),i);return o}function G(e){var t,i=S(e.rawData);for(t=0;t<i.length;t++)i[t]=[b(i[t][0]),A(i[t][1])];return i}function V(e){var t,i=e.rawData;for(t=0;t<i.length;t++)i[t][1]=x(i[t][1]),i[t][2]=x(i[t][2]);return i}function W(e){return H(e,"datetime")}function j(e){return H(e,"string")}function U(e){return H(e,"string")}function q(e){return H(e,"datetime")}function K(e){return H(e,"number")}function Y(e){return H(e,"bubble")}function X(e,t,i,n,r,s){var a;if("string"==typeof i&&(a=i,!(i=document.getElementById(i))))throw new Error("No element with id "+a);t.element=i,r=o(Z.options,r||{}),t.options=r,t.dataSource=n,s||(s=function(e){return e.rawData}),t.getElement=function(){return i},t.getDataSource=function(){return t.dataSource},t.getData=function(){return t.data},t.getOptions=function(){return t.options},t.getChartObject=function(){return t.chart},t.getAdapter=function(){return t.adapter};var l=function(){t.data=s(t),D(e,t)};t.updateData=function(e,i){t.dataSource=e,i&&(t.options=o(Z.options,i)),v(t,l,e)},t.setOptions=function(e){t.options=o(Z.options,e),t.redraw()},t.redraw=function(){v(t,l,t.rawData)},t.refreshData=function(){if("string"==typeof t.dataSource){var e=-1===t.dataSource.indexOf("?")?"?":"&",i=t.dataSource+e+"_="+(new Date).getTime();v(t,l,i)}},t.stopRefresh=function(){t.intervalId&&clearInterval(t.intervalId)},t.toImage=function(){return"chartjs"===t.adapter?t.chart.toBase64Image():null},Z.charts[i.id]=t,v(t,l,n),r.refresh&&(t.intervalId=setInterval(function(){t.refreshData()},1e3*r.refresh))}var Z,J,Q,ee,te,ie,ne=e.Chartkick||{},re=[],oe=/^(\d\d\d\d)(\-)?(\d\d)(\-)?(\d\d)$/i,se=[],ae=0,le=4;J=/(\d\d\d\d)(\-)?(\d\d)(\-)?(\d\d)(T)?(\d\d)(:)?(\d\d)?(:)?(\d\d)?([\.,]\d+)?($|Z|([\+\-])(\d\d)(:)?(\d\d)?)/i,Q=String(1.5).charAt(1);var ce=function(e,t){return e="number"===t?A(e):"datetime"===t?x(e):b(e)},ue=function(e,t){var i,n,r=[];for(n=0;n<e.length;n++)"bubble"===t?r.push([A(e[n][0]),A(e[n][1]),A(e[n][2])]):(i=ce(e[n][0],t),r.push([i,A(e[n][1])]));return"datetime"===t?r.sort(E):"number"===t&&r.sort($),r};Z={LineChart:function(e,t,i){X("LineChart",this,e,t,i,W)},PieChart:function(e,t,i){X("PieChart",this,e,t,i,G)},ColumnChart:function(e,t,i){X("ColumnChart",this,e,t,i,j)},BarChart:function(e,t,i){X("BarChart",this,e,t,i,U)},AreaChart:function(e,t,i){X("AreaChart",this,e,t,i,q)},GeoChart:function(e,t,i){X("GeoChart",this,e,t,i,G)},ScatterChart:function(e,t,i){X("ScatterChart",this,e,t,i,K)},BubbleChart:function(e,t,i){X("BubbleChart",this,e,t,i,Y)},Timeline:function(e,t,i){X("Timeline",this,e,t,i,V)},charts:{},configure:function(e){for(var t in e)e.hasOwnProperty(t)&&(ne[t]=e[t])},eachChart:function(e){for(var t in Z.charts)Z.charts.hasOwnProperty(t)&&e(Z.charts[t])},options:{},adapters:re,createChart:X},"object"==typeof module&&"object"==typeof module.exports?module.exports=Z:e.Chartkick=Z}(window),function(e,t,i){"use strict";function n(e,t){return t=t||Error,function(){var i,n,r=2,o=arguments,s=o[0],a="["+(e?e+":":"")+s+"] ",l=o[1];for(a+=l.replace(/\{\d+\}/g,function(e){var t=+e.slice(1,-1),i=t+r;return i<o.length?we(o[i]):e}),a+="\nhttp://errors.angularjs.org/1.4.7/"+(e?e+"/":"")+s,n=r,i="?";n<o.length;n++,i="&")a+=i+"p"+(n-r)+"="+encodeURIComponent(we(o[n]));return new t(a)}}function r(e){if(null==e||k(e))return!1;var t="length"in Object(e)&&e.length;return!(e.nodeType!==qn||!t)||(x(e)||In(e)||0===t||"number"==typeof t&&t>0&&t-1 in e)}function o(e,t,i){var n,s;if(e)if($(e))for(n in e)"prototype"==n||"length"==n||"name"==n||e.hasOwnProperty&&!e.hasOwnProperty(n)||t.call(i,e[n],n,e);else if(In(e)||r(e)){var a="object"!=typeof e;for(n=0,s=e.length;n<s;n++)(a||n in e)&&t.call(i,e[n],n,e)}else if(e.forEach&&e.forEach!==o)e.forEach(t,i,e);else if(A(e))for(n in e)t.call(i,e[n],n,e);else if("function"==typeof e.hasOwnProperty)for(n in e)e.hasOwnProperty(n)&&t.call(i,e[n],n,e);else for(n in e)bn.call(e,n)&&t.call(i,e[n],n,e);return e}function s(e,t,i){for(var n=Object.keys(e).sort(),r=0;r<n.length;r++)t.call(i,e[n[r]],n[r]);return n}function a(e){return function(t,i){e(i,t)}}function l(){return++Pn}function c(e,t){t?e.$$hashKey=t:delete e.$$hashKey}function u(e,t,i){for(var n=e.$$hashKey,r=0,o=t.length;r<o;++r){var s=t[r];if(b(s)||$(s))for(var a=Object.keys(s),l=0,d=a.length;l<d;l++){var h=a[l],p=s[h];i&&b(p)?E(p)?e[h]=new Date(p.valueOf()):F(p)?e[h]=new RegExp(p):(b(e[h])||(e[h]=In(p)?[]:{}),u(e[h],[p],!0)):e[h]=p}}return c(e,n),e}function d(e){return u(e,Dn.call(arguments,1),!1)}function h(e){return u(e,Dn.call(arguments,1),!0)}function p(e){return parseInt(e,10)}function g(e,t){return d(Object.create(e),t)}function f(){}function m(e){return e}function v(e){return function(){return e}}function y(e){return $(e.toString)&&e.toString!==Object.prototype.toString}function w(e){return void 0===e}function C(e){return void 0!==e}function b(e){return null!==e&&"object"==typeof e}function A(e){return null!==e&&"object"==typeof e&&!Rn(e)}function x(e){return"string"==typeof e}function S(e){return"number"==typeof e}function E(e){return"[object Date]"===Ln.call(e)}function $(e){return"function"==typeof e}function F(e){return"[object RegExp]"===Ln.call(e)}function k(e){return e&&e.window===e}function D(e){return e&&e.$evalAsync&&e.$watch}function T(e){return"[object File]"===Ln.call(e)}function M(e){return"[object FormData]"===Ln.call(e)}function L(e){return"[object Blob]"===Ln.call(e)}function R(e){return"boolean"==typeof e}function _(e){return e&&$(e.then)}function B(e){return Nn.test(Ln.call(e))}function P(e){return!(!e||!(e.nodeName||e.prop&&e.attr&&e.find))}function O(e){var t,i={},n=e.split(",");for(t=0;t<n.length;t++)i[n[t]]=!0;return i}function I(e){return Cn(e.nodeName||e[0]&&e[0].nodeName)}function N(e,t){var i=e.indexOf(t);return i>=0&&e.splice(i,1),i}function z(e,t,i,n){if(k(e)||D(e))throw _n("cpws","Can't copy! Making copies of Window or Scope instances is not supported.");if(B(t))throw _n("cpta","Can't copy! TypedArray destination cannot be mutated.");if(t){if(e===t)throw _n("cpi","Can't copy! Source and destination are identical.");i=i||[],n=n||[],b(e)&&(i.push(e),n.push(t));var r;if(In(e)){t.length=0;for(var s=0;s<e.length;s++)t.push(z(e[s],null,i,n))}else{var a=t.$$hashKey;if(In(t)?t.length=0:o(t,function(e,i){delete t[i]}),A(e))for(r in e)t[r]=z(e[r],null,i,n);else if(e&&"function"==typeof e.hasOwnProperty)for(r in e)e.hasOwnProperty(r)&&(t[r]=z(e[r],null,i,n));else for(r in e)bn.call(e,r)&&(t[r]=z(e[r],null,i,n));c(t,a)}}else if(t=e,b(e)){var l;if(i&&-1!==(l=i.indexOf(e)))return n[l];if(In(e))return z(e,[],i,n);if(B(e))t=new e.constructor(e);else if(E(e))t=new Date(e.getTime());else if(F(e))t=new RegExp(e.source,e.toString().match(/[^\/]*$/)[0]),t.lastIndex=e.lastIndex;else{if(!$(e.cloneNode)){var u=Object.create(Rn(e));return z(e,u,i,n)}t=e.cloneNode(!0)}n&&(i.push(e),n.push(t))}return t}function H(e,t){if(In(e)){t=t||[];for(var i=0,n=e.length;i<n;i++)t[i]=e[i]}else if(b(e)){t=t||{};for(var r in e)"$"===r.charAt(0)&&"$"===r.charAt(1)||(t[r]=e[r])}return t||e}function G(e,t){if(e===t)return!0;if(null===e||null===t)return!1;if(e!==e&&t!==t)return!0;var i,n,r,o=typeof e,s=typeof t;if(o==s&&"object"==o){if(!In(e)){if(E(e))return!!E(t)&&G(e.getTime(),t.getTime());if(F(e))return!!F(t)&&e.toString()==t.toString();if(D(e)||D(t)||k(e)||k(t)||In(t)||E(t)||F(t))return!1;r=me();for(n in e)if("$"!==n.charAt(0)&&!$(e[n])){if(!G(e[n],t[n]))return!1;r[n]=!0}for(n in t)if(!(n in r)&&"$"!==n.charAt(0)&&C(t[n])&&!$(t[n]))return!1;return!0}if(!In(t))return!1;if((i=e.length)==t.length){for(n=0;n<i;n++)if(!G(e[n],t[n]))return!1;return!0}}return!1}function V(e,t,i){return e.concat(Dn.call(t,i))}function W(e,t){return Dn.call(e,t||0)}function j(e,t){var i=arguments.length>2?W(arguments,2):[];return!$(t)||t instanceof RegExp?t:i.length?function(){return arguments.length?t.apply(e,V(i,arguments,0)):t.apply(e,i)}:function(){return arguments.length?t.apply(e,arguments):t.call(e)}}function U(e,n){var r=n;return"string"==typeof e&&"$"===e.charAt(0)&&"$"===e.charAt(1)?r=i:k(n)?r="$WINDOW":n&&t===n?r="$DOCUMENT":D(n)&&(r="$SCOPE"),r}function q(e,t){return void 0===e?i:(S(t)||(t=t?2:null),JSON.stringify(e,U,t))}function K(e){return x(e)?JSON.parse(e):e}function Y(e,t){var i=Date.parse("Jan 01, 1970 00:00:00 "+e)/6e4;return isNaN(i)?t:i}function X(e,t){return e=new Date(e.getTime()),e.setMinutes(e.getMinutes()+t),e}function Z(e,t,i){return i=i?-1:1,X(e,i*(Y(t,e.getTimezoneOffset())-e.getTimezoneOffset()))}function J(e){e=$n(e).clone();try{e.empty()}catch(e){}var t=$n("<div>").append(e).html();try{return e[0].nodeType===Yn?Cn(t):t.match(/^(<[^>]+>)/)[1].replace(/^<([\w\-]+)/,function(e,t){return"<"+Cn(t)})}catch(e){return Cn(t)}}function Q(e){try{return decodeURIComponent(e)}catch(e){}}function ee(e){var t={};return o((e||"").split("&"),function(e){var i,n,r;e&&(n=e=e.replace(/\+/g,"%20"),i=e.indexOf("="),-1!==i&&(n=e.substring(0,i),r=e.substring(i+1)),n=Q(n),C(n)&&(r=!C(r)||Q(r),bn.call(t,n)?In(t[n])?t[n].push(r):t[n]=[t[n],r]:t[n]=r))}),t}function te(e){var t=[];return o(e,function(e,i){In(e)?o(e,function(e){t.push(ne(i,!0)+(!0===e?"":"="+ne(e,!0)))}):t.push(ne(i,!0)+(!0===e?"":"="+ne(e,!0)))}),t.length?t.join("&"):""}function ie(e){return ne(e,!0).replace(/%26/gi,"&").replace(/%3D/gi,"=").replace(/%2B/gi,"+")}function ne(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 re(e,t){var i,n,r=Wn.length;for(n=0;n<r;++n)if(i=Wn[n]+t,x(i=e.getAttribute(i)))return i;return null}function oe(e,t){var i,n,r={};o(Wn,function(t){var r=t+"app";!i&&e.hasAttribute&&e.hasAttribute(r)&&(i=e,n=e.getAttribute(r))}),o(Wn,function(t){var r,o=t+"app";!i&&(r=e.querySelector("["+o.replace(":","\\:")+"]"))&&(i=r,n=r.getAttribute(o))}),i&&(r.strictDi=null!==re(i,"strict-di"),t(i,n?[n]:[],r))}function se(i,n,r){b(r)||(r={}),r=d({strictDi:!1},r);var s=function(){if(i=$n(i),i.injector()){var e=i[0]===t?"document":J(i);throw _n("btstrpd","App Already Bootstrapped with this Element '{0}'",e.replace(/</,"&lt;").replace(/>/,"&gt;"))}n=n||[],n.unshift(["$provide",function(e){e.value("$rootElement",i)}]),r.debugInfoEnabled&&n.push(["$compileProvider",function(e){e.debugInfoEnabled(!0)}]),n.unshift("ng");var o=Je(n,r.strictDi);return o.invoke(["$rootScope","$rootElement","$compile","$injector",function(e,t,i,n){e.$apply(function(){t.data("$injector",n),i(t)(e)})}]),o},a=/^NG_ENABLE_DEBUG_INFO!/,l=/^NG_DEFER_BOOTSTRAP!/;if(e&&a.test(e.name)&&(r.debugInfoEnabled=!0,e.name=e.name.replace(a,"")),e&&!l.test(e.name))return s();e.name=e.name.replace(l,""),Bn.resumeBootstrap=function(e){return o(e,function(e){n.push(e)}),s()},$(Bn.resumeDeferredBootstrap)&&Bn.resumeDeferredBootstrap()}function ae(){e.name="NG_ENABLE_DEBUG_INFO!"+e.name,e.location.reload()}function le(e){var t=Bn.element(e).injector();if(!t)throw _n("test","no injector found for element argument to getTestability");return t.get("$$testability")}function ce(e,t){return t=t||"_",e.replace(jn,function(e,i){return(i?t:"")+e.toLowerCase()})}function ue(){var t;if(!Un){var n=Vn();Fn=w(n)?e.jQuery:n?e[n]:i,Fn&&Fn.fn.on?($n=Fn,d(Fn.fn,{scope:pr.scope,isolateScope:pr.isolateScope,controller:pr.controller,injector:pr.injector,inheritedData:pr.inheritedData}),t=Fn.cleanData,Fn.cleanData=function(e){var i;if(On)On=!1;else for(var n,r=0;null!=(n=e[r]);r++)(i=Fn._data(n,"events"))&&i.$destroy&&Fn(n).triggerHandler("$destroy");t(e)}):$n=ke,Bn.element=$n,Un=!0}}function de(e,t,i){if(!e)throw _n("areq","Argument '{0}' is {1}",t||"?",i||"required");return e}function he(e,t,i){return i&&In(e)&&(e=e[e.length-1]),de($(e),t,"not a function, got "+(e&&"object"==typeof e?e.constructor.name||"Object":typeof e)),e}function pe(e,t){if("hasOwnProperty"===e)throw _n("badname","hasOwnProperty is not a valid {0} name",t)}function ge(e,t,i){if(!t)return e;for(var n,r=t.split("."),o=e,s=r.length,a=0;a<s;a++)n=r[a],e&&(e=(o=e)[n]);return!i&&$(e)?j(o,e):e}function fe(e){for(var t,i=e[0],n=e[e.length-1],r=1;i!==n&&(i=i.nextSibling);r++)(t||e[r]!==i)&&(t||(t=$n(Dn.call(e,0,r))),t.push(i));return t||e}function me(){return Object.create(null)}function ve(e){function t(e,t,i){return e[t]||(e[t]=i())}var i=n("$injector"),r=n("ng"),o=t(e,"angular",Object);return o.$$minErr=o.$$minErr||n,t(o,"module",function(){var e={};return function(n,o,s){return function(e,t){if("hasOwnProperty"===e)throw r("badname","hasOwnProperty is not a valid {0} name",t)}(n,"module"),o&&e.hasOwnProperty(n)&&(e[n]=null),t(e,n,function(){function e(e,t,i,n){return n||(n=r),function(){return n[i||"push"]([e,t,arguments]),u}}function t(e,t){return function(i,o){return o&&$(o)&&(o.$$moduleName=n),r.push([e,t,arguments]),u}}if(!o)throw i("nomod","Module '{0}' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument.",n);var r=[],a=[],l=[],c=e("$injector","invoke","push",a),u={_invokeQueue:r,_configBlocks:a,_runBlocks:l,requires:o,name:n,provider:t("$provide","provider"),factory:t("$provide","factory"),service:t("$provide","service"),value:e("$provide","value"),constant:e("$provide","constant","unshift"),decorator:t("$provide","decorator"),animation:t("$animateProvider","register"),filter:t("$filterProvider","register"),controller:t("$controllerProvider","register"),directive:t("$compileProvider","directive"),config:c,run:function(e){return l.push(e),this}};return s&&c(s),u})}})}function ye(e){var t=[];return JSON.stringify(e,function(e,i){if(i=U(e,i),b(i)){if(t.indexOf(i)>=0)return"...";t.push(i)}return i})}function we(e){return"function"==typeof e?e.toString().replace(/ \{[\s\S]*$/,""):w(e)?"undefined":"string"!=typeof e?ye(e):e}function Ce(t){d(t,{bootstrap:se,copy:z,extend:d,merge:h,equals:G,element:$n,forEach:o,injector:Je,noop:f,bind:j,toJson:q,fromJson:K,identity:m,isUndefined:w,isDefined:C,isString:x,isFunction:$,isObject:b,isNumber:S,isElement:P,isArray:In,version:Qn,isDate:E,lowercase:Cn,uppercase:An,callbacks:{counter:0},getTestability:le,$$minErr:n,$$csp:Gn,reloadWithDebugInfo:ae}),(kn=ve(e))("ng",["ngLocale"],["$provide",function(e){e.provider({$$sanitizeUri:mi}),e.provider("$compile",lt).directive({a:go,input:Mo,textarea:Mo,form:wo,script:xs,select:$s,style:ks,option:Fs,ngBind:_o,ngBindHtml:Po,ngBindTemplate:Bo,ngClass:Io,ngClassEven:zo,ngClassOdd:No,ngCloak:Ho,ngController:Go,ngForm:Co,ngHide:vs,ngIf:jo,ngInclude:Uo,ngInit:Ko,ngNonBindable:ls,ngPluralize:hs,ngRepeat:ps,ngShow:ms,ngStyle:ys,ngSwitch:ws,ngSwitchWhen:Cs,ngSwitchDefault:bs,ngOptions:ds,ngTransclude:As,ngModel:os,ngList:Yo,ngChange:Oo,pattern:Ts,ngPattern:Ts,required:Ds,ngRequired:Ds,minlength:Ls,ngMinlength:Ls,maxlength:Ms,ngMaxlength:Ms,ngValue:Ro,ngModelOptions:as}).directive({ngInclude:qo}).directive(fo).directive(Vo),e.provider({$anchorScroll:Qe,$animate:kr,$animateCss:Dr,$$animateQueue:Fr,$$AnimateRunner:$r,$browser:ot,$cacheFactory:st,$controller:pt,$document:gt,$exceptionHandler:ft,$filter:Ti,$$forceReflow:_r,$interpolate:Dt,$interval:Tt,$http:Et,$httpParamSerializer:vt,$httpParamSerializerJQLike:yt,$httpBackend:Ft,$xhrFactory:$t,$location:Wt,$log:jt,$parse:ui,$rootScope:fi,$q:di,$$q:hi,$sce:Ci,$sceDelegate:wi,$sniffer:bi,$templateCache:at,$templateRequest:Ai,$$testability:xi,$timeout:Si,$window:Fi,$$rAF:gi,$$jqLite:qe,$$HashMap:vr,$$cookieReader:Di})}])}function be(){return++tr}function Ae(e){return e.replace(rr,function(e,t,i,n){return n?i.toUpperCase():i}).replace(or,"Moz$1")}function xe(e){return!cr.test(e)}function Se(e){var t=e.nodeType;return t===qn||!t||t===Zn}function Ee(e){for(var t in er[e.ng339])return!0;return!1}function $e(e,t){var i,n,r,s,a=t.createDocumentFragment(),l=[];if(xe(e))l.push(t.createTextNode(e));else{for(i=i||a.appendChild(t.createElement("div")),n=(ur.exec(e)||["",""])[1].toLowerCase(),r=hr[n]||hr._default,i.innerHTML=r[1]+e.replace(dr,"<$1></$2>")+r[2],s=r[0];s--;)i=i.lastChild;l=V(l,i.childNodes),i=a.firstChild,i.textContent=""}return a.textContent="",a.innerHTML="",o(l,function(e){a.appendChild(e)}),a}function Fe(e,i){i=i||t;var n;return(n=lr.exec(e))?[i.createElement(n[1])]:(n=$e(e,i))?n.childNodes:[]}function ke(e){if(e instanceof ke)return e;var t;if(x(e)&&(e=zn(e),t=!0),!(this instanceof ke)){if(t&&"<"!=e.charAt(0))throw ar("nosel","Looking up elements via selectors is not supported by jqLite! See: http://docs.angularjs.org/api/angular.element");return new ke(e)}t?Ie(this,Fe(e)):Ie(this,e)}function De(e){return e.cloneNode(!0)}function Te(e,t){if(t||Le(e),e.querySelectorAll)for(var i=e.querySelectorAll("*"),n=0,r=i.length;n<r;n++)Le(i[n])}function Me(e,t,i,n){if(C(n))throw ar("offargs","jqLite#off() does not support the `selector` argument");var r=Re(e),s=r&&r.events,a=r&&r.handle;if(a)if(t)o(t.split(" "),function(t){if(C(i)){var n=s[t];if(N(n||[],i),n&&n.length>0)return}nr(e,t,a),delete s[t]});else for(t in s)"$destroy"!==t&&nr(e,t,a),delete s[t]}function Le(e,t){var n=e.ng339,r=n&&er[n];if(r){if(t)return void delete r.data[t];r.handle&&(r.events.$destroy&&r.handle({},"$destroy"),Me(e)),delete er[n],e.ng339=i}}function Re(e,t){var n=e.ng339,r=n&&er[n];return t&&!r&&(e.ng339=n=be(),r=er[n]={events:{},data:{},handle:i}),r}function _e(e,t,i){if(Se(e)){var n=C(i),r=!n&&t&&!b(t),o=!t,s=Re(e,!r),a=s&&s.data;if(n)a[t]=i;else{if(o)return a;if(r)return a&&a[t];d(a,t)}}}function Be(e,t){return!!e.getAttribute&&(" "+(e.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ").indexOf(" "+t+" ")>-1}function Pe(e,t){t&&e.setAttribute&&o(t.split(" "),function(t){e.setAttribute("class",zn((" "+(e.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ").replace(" "+zn(t)+" "," ")))})}function Oe(e,t){if(t&&e.setAttribute){var i=(" "+(e.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ");o(t.split(" "),function(e){e=zn(e),-1===i.indexOf(" "+e+" ")&&(i+=e+" ")}),e.setAttribute("class",zn(i))}}function Ie(e,t){if(t)if(t.nodeType)e[e.length++]=t;else{var i=t.length;if("number"==typeof i&&t.window!==t){if(i)for(var n=0;n<i;n++)e[e.length++]=t[n]}else e[e.length++]=t}}function Ne(e,t){return ze(e,"$"+(t||"ngController")+"Controller")}function ze(e,t,i){e.nodeType==Zn&&(e=e.documentElement);for(var n=In(t)?t:[t];e;){for(var r=0,o=n.length;r<o;r++)if(C(i=$n.data(e,n[r])))return i;e=e.parentNode||e.nodeType===Jn&&e.host}}function He(e){for(Te(e,!0);e.firstChild;)e.removeChild(e.firstChild)}function Ge(e,t){t||Te(e);var i=e.parentNode;i&&i.removeChild(e)}function Ve(t,i){i=i||e,"complete"===i.document.readyState?i.setTimeout(t):$n(i).on("load",t)}function We(e,t){var i=gr[t.toLowerCase()];return i&&fr[I(e)]&&i}function je(e){return mr[e]}function Ue(e,t){var i=function(i,n){i.isDefaultPrevented=function(){return i.defaultPrevented};var r=t[n||i.type],o=r?r.length:0;if(o){if(w(i.immediatePropagationStopped)){var s=i.stopImmediatePropagation;i.stopImmediatePropagation=function(){i.immediatePropagationStopped=!0,i.stopPropagation&&i.stopPropagation(),s&&s.call(i)}}i.isImmediatePropagationStopped=function(){return!0===i.immediatePropagationStopped},o>1&&(r=H(r));for(var a=0;a<o;a++)i.isImmediatePropagationStopped()||r[a].call(e,i)}};return i.elem=e,i}function qe(){this.$get=function(){return d(ke,{hasClass:function(e,t){return e.attr&&(e=e[0]),Be(e,t)},addClass:function(e,t){return e.attr&&(e=e[0]),Oe(e,t)},removeClass:function(e,t){return e.attr&&(e=e[0]),Pe(e,t)}})}}function Ke(e,t){var i=e&&e.$$hashKey;if(i)return"function"==typeof i&&(i=e.$$hashKey()),i;var n=typeof e;return i="function"==n||"object"==n&&null!==e?e.$$hashKey=n+":"+(t||l)():n+":"+e}function Ye(e,t){if(t){var i=0;this.nextUid=function(){return++i}}o(e,this.put,this)}function Xe(e){var t=e.toString().replace(br,""),i=t.match(yr);return i?"function("+(i[1]||"").replace(/[\s\r\n]+/," ")+")":"fn"}function Ze(e,t,i){var n,r,s,a;if("function"==typeof e){if(!(n=e.$inject)){if(n=[],e.length){if(t)throw x(i)&&i||(i=e.name||Xe(e)),Ar("strictdi","{0} is not using explicit annotation and cannot be invoked in strict mode",i);r=e.toString().replace(br,""),s=r.match(yr),o(s[1].split(wr),function(e){e.replace(Cr,function(e,t,i){n.push(i)})})}e.$inject=n}}else In(e)?(a=e.length-1,he(e[a],"fn"),n=e.slice(0,a)):he(e,"fn",!0);return n}function Je(e,t){function n(e){return function(t,i){if(!b(t))return e(t,i);o(t,a(e))}}function r(e,t){if(pe(e,"service"),($(t)||In(t))&&(t=S.instantiate(t)),!t.$get)throw Ar("pget","Provider '{0}' must define $get factory method.",e);return A[e+m]=t}function s(e,t){return function(){var i=F.invoke(t,this);if(w(i))throw Ar("undef","Provider '{0}' must return a value from $get factory method.",e);return i}}function l(e,t,i){return r(e,{$get:!1!==i?s(e,t):t})}function c(e,t){return l(e,["$injector",function(e){return e.instantiate(t)}])}function u(e,t){return l(e,v(t),!1)}function d(e,t){pe(e,"constant"),A[e]=t,E[e]=t}function h(e,t){var i=S.get(e+m),n=i.$get;i.$get=function(){var e=F.invoke(n,i);return F.invoke(t,null,{$delegate:e})}}function p(e){de(w(e)||In(e),"modulesToLoad","not an array");var t,i=[];return o(e,function(e){function n(e){var t,i;for(t=0,i=e.length;t<i;t++){var n=e[t],r=S.get(n[0]);r[n[1]].apply(r,n[2])}}if(!C.get(e)){C.put(e,!0);try{x(e)?(t=kn(e),i=i.concat(p(t.requires)).concat(t._runBlocks),n(t._invokeQueue),n(t._configBlocks)):$(e)?i.push(S.invoke(e)):In(e)?i.push(S.invoke(e)):he(e,"module")}catch(t){throw In(e)&&(e=e[e.length-1]),t.message&&t.stack&&-1==t.stack.indexOf(t.message)&&(t=t.message+"\n"+t.stack),Ar("modulerr","Failed to instantiate module {0} due to:\n{1}",e,t.stack||t.message||t)}}}),i}function g(e,i){function n(t,n){if(e.hasOwnProperty(t)){if(e[t]===f)throw Ar("cdep","Circular dependency found: {0}",t+" <- "+y.join(" <- "));return e[t]}try{return y.unshift(t),e[t]=f,e[t]=i(t,n)}catch(i){throw e[t]===f&&delete e[t],i}finally{y.shift()}}function r(e,i,r,o){"string"==typeof r&&(o=r,r=null);var s,a,l,c=[],u=Je.$$annotate(e,t,o);for(a=0,s=u.length;a<s;a++){if("string"!=typeof(l=u[a]))throw Ar("itkn","Incorrect injection token! Expected service name as string, got {0}",l);c.push(r&&r.hasOwnProperty(l)?r[l]:n(l,o))}return In(e)&&(e=e[s]),e.apply(i,c)}function o(e,t,i){var n=Object.create((In(e)?e[e.length-1]:e).prototype||null),o=r(e,n,t,i);return b(o)||$(o)?o:n}return{invoke:r,instantiate:o,get:n,annotate:Je.$$annotate,has:function(t){return A.hasOwnProperty(t+m)||e.hasOwnProperty(t)}}}t=!0===t;var f={},m="Provider",y=[],C=new Ye([],!0),A={$provide:{provider:n(r),factory:n(l),service:n(c),value:n(u),constant:n(d),decorator:h}},S=A.$injector=g(A,function(e,t){throw Bn.isString(t)&&y.push(t),Ar("unpr","Unknown provider: {0}",y.join(" <- "))}),E={},F=E.$injector=g(E,function(e,t){var n=S.get(e+m,t);return F.invoke(n.$get,n,i,e)});return o(p(e),function(e){e&&F.invoke(e)}),F}function Qe(){var e=!0;this.disableAutoScrolling=function(){e=!1},this.$get=["$window","$location","$rootScope",function(t,i,n){function r(e){var t=null;return Array.prototype.some.call(e,function(e){if("a"===I(e))return t=e,!0}),t}function o(){var e=a.yOffset;if($(e))e=e();else if(P(e)){var i=e[0],n=t.getComputedStyle(i);e="fixed"!==n.position?0:i.getBoundingClientRect().bottom}else S(e)||(e=0);return e}function s(e){if(e){e.scrollIntoView();var i=o();if(i){var n=e.getBoundingClientRect().top;t.scrollBy(0,n-i)}}else t.scrollTo(0,0)}function a(e){e=x(e)?e:i.hash();var t;e?(t=l.getElementById(e))?s(t):(t=r(l.getElementsByName(e)))?s(t):"top"===e&&s(null):s(null)}var l=t.document;return e&&n.$watch(function(){return i.hash()},function(e,t){e===t&&""===e||Ve(function(){n.$evalAsync(a)})}),a}]}function et(e,t){return e||t?e?t?(In(e)&&(e=e.join(" ")),In(t)&&(t=t.join(" ")),e+" "+t):e:t:""}function tt(e){for(var t=0;t<e.length;t++){var i=e[t];if(i.nodeType===Sr)return i}}function it(e){x(e)&&(e=e.split(" "));var t=me();return o(e,function(e){e.length&&(t[e]=!0)}),t}function nt(e){return b(e)?e:{}}function rt(e,t,i,n){function r(e){try{e.apply(null,W(arguments,1))}finally{if(0===--y)for(;C.length;)try{C.pop()()}catch(e){i.error(e)}}}function s(e){var t=e.indexOf("#");return-1===t?"":e.substr(t)}function a(){E=null,c(),u()}function l(){try{return p.state}catch(e){}}function c(){b=l(),b=w(b)?null:b,G(b,k)&&(b=k),k=b}function u(){x===d.url()&&A===b||(x=d.url(),A=b,o($,function(e){e(d.url(),b)}))}var d=this,h=(t[0],e.location),p=e.history,g=e.setTimeout,m=e.clearTimeout,v={};d.isMock=!1;var y=0,C=[];d.$$completeOutstandingRequest=r,d.$$incOutstandingRequestCount=function(){y++},d.notifyWhenNoOutstandingRequests=function(e){0===y?e():C.push(e)};var b,A,x=h.href,S=t.find("base"),E=null;c(),A=b,d.url=function(t,i,r){if(w(r)&&(r=null),h!==e.location&&(h=e.location),
p!==e.history&&(p=e.history),t){var o=A===r;if(x===t&&(!n.history||o))return d;var a=x&&Bt(x)===Bt(t);return x=t,A=r,!n.history||a&&o?(a&&!E||(E=t),i?h.replace(t):a?h.hash=s(t):h.href=t,h.href!==t&&(E=t)):(p[i?"replaceState":"pushState"](r,"",t),c(),A=b),d}return E||h.href.replace(/%27/g,"'")},d.state=function(){return b};var $=[],F=!1,k=null;d.onUrlChange=function(t){return F||(n.history&&$n(e).on("popstate",a),$n(e).on("hashchange",a),F=!0),$.push(t),t},d.$$applicationDestroyed=function(){$n(e).off("hashchange popstate",a)},d.$$checkUrlChange=u,d.baseHref=function(){var e=S.attr("href");return e?e.replace(/^(https?\:)?\/\/[^\/]*/,""):""},d.defer=function(e,t){var i;return y++,i=g(function(){delete v[i],r(e)},t||0),v[i]=!0,i},d.defer.cancel=function(e){return!!v[e]&&(delete v[e],m(e),r(f),!0)}}function ot(){this.$get=["$window","$log","$sniffer","$document",function(e,t,i,n){return new rt(e,n,t,i)}]}function st(){this.$get=function(){function e(e,i){function r(e){e!=h&&(p?p==e&&(p=e.n):p=e,o(e.n,e.p),o(e,h),h=e,h.n=null)}function o(e,t){e!=t&&(e&&(e.p=t),t&&(t.n=e))}if(e in t)throw n("$cacheFactory")("iid","CacheId '{0}' is already taken!",e);var s=0,a=d({},i,{id:e}),l={},c=i&&i.capacity||Number.MAX_VALUE,u={},h=null,p=null;return t[e]={put:function(e,t){if(!w(t)){if(c<Number.MAX_VALUE){r(u[e]||(u[e]={key:e}))}return e in l||s++,l[e]=t,s>c&&this.remove(p.key),t}},get:function(e){if(c<Number.MAX_VALUE){var t=u[e];if(!t)return;r(t)}return l[e]},remove:function(e){if(c<Number.MAX_VALUE){var t=u[e];if(!t)return;t==h&&(h=t.p),t==p&&(p=t.n),o(t.n,t.p),delete u[e]}delete l[e],s--},removeAll:function(){l={},s=0,u={},h=p=null},destroy:function(){l=null,a=null,u=null,delete t[e]},info:function(){return d({},a,{size:s})}}}var t={};return e.info=function(){var e={};return o(t,function(t,i){e[i]=t.info()}),e},e.get=function(e){return t[e]},e}}function at(){this.$get=["$cacheFactory",function(e){return e("templates")}]}function lt(e,n){function r(e,t,i){var n=/^\s*([@&]|=(\*?))(\??)\s*(\w*)\s*$/,r={};return o(e,function(e,o){var s=e.match(n);if(!s)throw Tr("iscp","Invalid {3} for directive '{0}'. Definition: {... {1}: '{2}' ...}",t,o,e,i?"controller bindings definition":"isolate scope definition");r[o]={mode:s[1][0],collection:"*"===s[2],optional:"?"===s[3],attrName:s[4]||o}}),r}function s(e,t){var i={isolateScope:null,bindToController:null};if(b(e.scope)&&(!0===e.bindToController?(i.bindToController=r(e.scope,t,!0),i.isolateScope={}):i.isolateScope=r(e.scope,t,!1)),b(e.bindToController)&&(i.bindToController=r(e.bindToController,t,!0)),b(i.bindToController)){var n=e.controller,o=e.controllerAs;if(!n)throw Tr("noctrl","Cannot bind to controller without directive '{0}'s controller.",t);if(!ht(n,o))throw Tr("noident","Cannot bind to controller without identifier for directive '{0}'.",t)}return i}function l(e){var t=e.charAt(0);if(!t||t!==Cn(t))throw Tr("baddir","Directive name '{0}' is invalid. The first character must be a lowercase letter",e);if(e!==e.trim())throw Tr("baddir","Directive name '{0}' is invalid. The name should not contain leading or trailing whitespaces",e)}var c={},u="Directive",h=/^\s*directive\:\s*([\w\-]+)\s+(.*)$/,p=/(([\w\-]+)(?:\:([^;]+))?;?)/,y=O("ngSrc,ngSrcset,src,srcset"),A=/^(?:(\^\^?)?(\?)?(\^\^?)?)?/,S=/^(on[a-z]+|formaction)$/;this.directive=function t(i,n){return pe(i,"directive"),x(i)?(l(i),de(n,"directiveFactory"),c.hasOwnProperty(i)||(c[i]=[],e.factory(i+u,["$injector","$exceptionHandler",function(e,t){var n=[];return o(c[i],function(r,o){try{var a=e.invoke(r);$(a)?a={compile:v(a)}:!a.compile&&a.link&&(a.compile=v(a.link)),a.priority=a.priority||0,a.index=o,a.name=a.name||i,a.require=a.require||a.controller&&a.name,a.restrict=a.restrict||"EA";var l=a.$$bindings=s(a,a.name);b(l.isolateScope)&&(a.$$isolateBindings=l.isolateScope),a.$$moduleName=r.$$moduleName,n.push(a)}catch(e){t(e)}}),n}])),c[i].push(n)):o(i,a(t)),this},this.aHrefSanitizationWhitelist=function(e){return C(e)?(n.aHrefSanitizationWhitelist(e),this):n.aHrefSanitizationWhitelist()},this.imgSrcSanitizationWhitelist=function(e){return C(e)?(n.imgSrcSanitizationWhitelist(e),this):n.imgSrcSanitizationWhitelist()};var E=!0;this.debugInfoEnabled=function(e){return C(e)?(E=e,this):E},this.$get=["$injector","$interpolate","$exceptionHandler","$templateRequest","$parse","$controller","$rootScope","$document","$sce","$animate","$$sanitizeUri",function(e,n,r,s,a,l,v,C,F,k,T){function M(e,t){try{e.addClass(t)}catch(e){}}function L(e,t,i,n,r){e instanceof $n||(e=$n(e)),o(e,function(t,i){t.nodeType==Yn&&t.nodeValue.match(/\S+/)&&(e[i]=$n(t).wrap("<span></span>").parent()[0])});var s=_(e,t,e,i,n,r);L.$$addScopeClass(e);var a=null;return function(t,i,n){de(t,"scope"),n=n||{};var r=n.parentBoundTranscludeFn,o=n.transcludeControllers,l=n.futureParentElement;r&&r.$$boundTransclude&&(r=r.$$boundTransclude),a||(a=R(l));var c;if(c="html"!==a?$n(Q(a,$n("<div>").append(e).html())):i?pr.clone.call(e):e,o)for(var u in o)c.data("$"+u+"Controller",o[u].instance);return L.$$addScopeInfo(c,t),i&&i(c,t),s&&s(t,c,c,r),c}}function R(e){var t=e&&e[0];return t&&"foreignobject"!==I(t)&&t.toString().match(/SVG/)?"svg":"html"}function _(e,t,n,r,o,s){function a(e,n,r,o){var s,a,l,c,u,d,h,p,m;if(g){var v=n.length;for(m=new Array(v),u=0;u<f.length;u+=3)h=f[u],m[h]=n[h]}else m=n;for(u=0,d=f.length;u<d;)if(l=m[f[u++]],s=f[u++],a=f[u++],s){if(s.scope){c=e.$new(),L.$$addScopeInfo($n(l),c);var y=s.$$destroyBindings;y&&(s.$$destroyBindings=null,c.$on("$destroyed",y))}else c=e;p=s.transcludeOnThisElement?B(e,s.transclude,o):!s.templateOnThisElement&&o?o:!o&&t?B(e,t):null,s(a,c,l,r,p,s)}else a&&a(e,l.childNodes,i,o)}for(var l,c,u,d,h,p,g,f=[],m=0;m<e.length;m++)l=new se,c=P(e[m],[],l,0===m?r:i,o),u=c.length?H(c,e[m],l,t,n,null,[],[],s):null,u&&u.scope&&L.$$addScopeClass(l.$$element),h=u&&u.terminal||!(d=e[m].childNodes)||!d.length?null:_(d,u?(u.transcludeOnThisElement||!u.templateOnThisElement)&&u.transclude:t),(u||h)&&(f.push(m,u,h),p=!0,g=g||u),s=null;return p?a:null}function B(e,t,i){return function(n,r,o,s,a){return n||(n=e.$new(!1,a),n.$$transcluded=!0),t(n,r,{parentBoundTranscludeFn:i,transcludeControllers:o,futureParentElement:s})}}function P(e,t,i,n,r){var o,s,a=e.nodeType,l=i.$attr;switch(a){case qn:j(t,ct(I(e)),"E",n,r);for(var c,u,d,g,f,m,v=e.attributes,y=0,w=v&&v.length;y<w;y++){var C=!1,A=!1;c=v[y],u=c.name,f=zn(c.value),g=ct(u),(m=he.test(g))&&(u=u.replace(Mr,"").substr(8).replace(/_(.)/g,function(e,t){return t.toUpperCase()}));var S=g.replace(/(Start|End)$/,"");U(S)&&g===S+"Start"&&(C=u,A=u.substr(0,u.length-5)+"end",u=u.substr(0,u.length-6)),d=ct(u.toLowerCase()),l[d]=u,!m&&i.hasOwnProperty(d)||(i[d]=f,We(e,d)&&(i[d]=!0)),te(e,t,f,d,m),j(t,d,"A",n,r,C,A)}if(s=e.className,b(s)&&(s=s.animVal),x(s)&&""!==s)for(;o=p.exec(s);)d=ct(o[2]),j(t,d,"C",n,r)&&(i[d]=zn(o[3])),s=s.substr(o.index+o[0].length);break;case Yn:if(11===En)for(;e.parentNode&&e.nextSibling&&e.nextSibling.nodeType===Yn;)e.nodeValue=e.nodeValue+e.nextSibling.nodeValue,e.parentNode.removeChild(e.nextSibling);Z(t,e.nodeValue);break;case Xn:try{o=h.exec(e.nodeValue),o&&(d=ct(o[1]),j(t,d,"M",n,r)&&(i[d]=zn(o[2])))}catch(e){}}return t.sort(Y),t}function O(e,t,i){var n=[],r=0;if(t&&e.hasAttribute&&e.hasAttribute(t)){do{if(!e)throw Tr("uterdir","Unterminated attribute, found '{0}' but no matching '{1}' found.",t,i);e.nodeType==qn&&(e.hasAttribute(t)&&r++,e.hasAttribute(i)&&r--),n.push(e),e=e.nextSibling}while(r>0)}else n.push(e);return $n(n)}function z(e,t,i){return function(n,r,o,s,a){return r=O(r[0],t,i),e(n,r,o,s,a)}}function H(e,n,o,s,a,c,u,d,h){function p(e,t,i,n){e&&(i&&(e=z(e,i,n)),e.require=v.require,e.directiveName=y,(T===v||v.$$isolateScope)&&(e=ne(e,{isolateScope:!0})),u.push(e)),t&&(i&&(t=z(t,i,n)),t.require=v.require,t.directiveName=y,(T===v||v.$$isolateScope)&&(t=ne(t,{isolateScope:!0})),d.push(t))}function g(e,t,i,n){var r;if(x(t)){var o=t.match(A),s=t.substring(o[0].length),a=o[1]||o[3],l="?"===o[2];if("^^"===a?i=i.parent():(r=n&&n[s],r=r&&r.instance),!r){var c="$"+s+"Controller";r=a?i.inheritedData(c):i.data(c)}if(!r&&!l)throw Tr("ctreq","Controller '{0}', required by directive '{1}', can't be found!",s,e)}else if(In(t)){r=[];for(var u=0,d=t.length;u<d;u++)r[u]=g(e,t[u],i,n)}return r||null}function f(e,t,i,n,r,o){var s=me();for(var a in n){var c=n[a],u={$scope:c===T||c.$$isolateScope?r:o,$element:e,$attrs:t,$transclude:i},d=c.controller;"@"==d&&(d=t[c.name]);var h=l(d,u,!0,c.controllerAs);s[c.name]=h,I||e.data("$"+c.name+"Controller",h.instance)}return s}function m(e,t,r,s,a,l){function c(e,t,n){var r;return D(e)||(n=t,t=e,e=i),I&&(r=w),n||(n=I?b.parent():b),a(e,t,r,n,R)}var h,p,m,v,y,w,C,b,A;if(n===r?(A=o,b=o.$$element):(b=$n(r),A=new se(b,o)),T&&(y=t.$new(!0)),a&&(C=c,C.$$boundTransclude=a),k&&(w=f(b,A,C,k,y,t)),T&&(L.$$addScopeInfo(b,y,!0,!(M&&(M===T||M===T.$$originalDirective))),L.$$addScopeClass(b,!0),y.$$isolateBindings=T.$$isolateBindings,oe(t,A,y,y.$$isolateBindings,T,y)),w){var x,S,E=T||F;E&&w[E.name]&&(x=E.$$bindings.bindToController,(v=w[E.name])&&v.identifier&&x&&(S=v,l.$$destroyBindings=oe(t,A,v.instance,x,E)));for(h in w){v=w[h];var $=v();$!==v.instance&&(v.instance=$,b.data("$"+h+"Controller",$),v===S&&(l.$$destroyBindings(),l.$$destroyBindings=oe(t,A,$,x,E)))}}for(h=0,p=u.length;h<p;h++)m=u[h],re(m,m.isolateScope?y:t,b,A,m.require&&g(m.directiveName,m.require,b,w),C);var R=t;for(T&&(T.template||null===T.templateUrl)&&(R=y),e&&e(R,r.childNodes,i,a),h=d.length-1;h>=0;h--)m=d[h],re(m,m.isolateScope?y:t,b,A,m.require&&g(m.directiveName,m.require,b,w),C)}h=h||{};for(var v,y,w,C,S,E=-Number.MAX_VALUE,F=h.newScopeDirective,k=h.controllerDirectives,T=h.newIsolateScopeDirective,M=h.templateDirective,R=h.nonTlbTranscludeDirective,_=!1,B=!1,I=h.hasElementTranscludeDirective,N=o.$$element=$n(n),H=c,G=s,j=0,U=e.length;j<U;j++){v=e[j];var Y=v.$$start,Z=v.$$end;if(Y&&(N=O(n,Y,Z)),w=i,E>v.priority)break;if((S=v.scope)&&(v.templateUrl||(b(S)?(X("new/isolated scope",T||F,v,N),T=v):X("new/isolated scope",T,v,N)),F=F||v),y=v.name,!v.templateUrl&&v.controller&&(S=v.controller,k=k||me(),X("'"+y+"' controller",k[y],v,N),k[y]=v),(S=v.transclude)&&(_=!0,v.$$tlb||(X("transclusion",R,v,N),R=v),"element"==S?(I=!0,E=v.priority,w=N,N=o.$$element=$n(t.createComment(" "+y+": "+o[y]+" ")),n=N[0],ie(a,W(w),n),G=L(w,s,E,H&&H.name,{nonTlbTranscludeDirective:R})):(w=$n(De(n)).contents(),N.empty(),G=L(w,s))),v.template)if(B=!0,X("template",M,v,N),M=v,S=$(v.template)?v.template(N,o):v.template,S=ue(S),v.replace){if(H=v,w=xe(S)?[]:dt(Q(v.templateNamespace,zn(S))),n=w[0],1!=w.length||n.nodeType!==qn)throw Tr("tplrt","Template for directive '{0}' must have exactly one root element. {1}",y,"");ie(a,N,n);var ee={$attr:{}},te=P(n,[],ee),ae=e.splice(j+1,e.length-(j+1));T&&V(te),e=e.concat(te).concat(ae),q(o,ee),U=e.length}else N.html(S);if(v.templateUrl)B=!0,X("template",M,v,N),M=v,v.replace&&(H=v),m=K(e.splice(j,e.length-j),N,o,a,_&&G,u,d,{controllerDirectives:k,newScopeDirective:F!==v&&F,newIsolateScopeDirective:T,templateDirective:M,nonTlbTranscludeDirective:R}),U=e.length;else if(v.compile)try{C=v.compile(N,o,G),$(C)?p(null,C,Y,Z):C&&p(C.pre,C.post,Y,Z)}catch(e){r(e,J(N))}v.terminal&&(m.terminal=!0,E=Math.max(E,v.priority))}return m.scope=F&&!0===F.scope,m.transcludeOnThisElement=_,m.templateOnThisElement=B,m.transclude=G,h.hasElementTranscludeDirective=I,m}function V(e){for(var t=0,i=e.length;t<i;t++)e[t]=g(e[t],{$$isolateScope:!0})}function j(t,i,n,o,s,a,l){if(i===s)return null;var d=null;if(c.hasOwnProperty(i))for(var h,p=e.get(i+u),f=0,m=p.length;f<m;f++)try{h=p[f],(w(o)||o>h.priority)&&-1!=h.restrict.indexOf(n)&&(a&&(h=g(h,{$$start:a,$$end:l})),t.push(h),d=h)}catch(e){r(e)}return d}function U(t){if(c.hasOwnProperty(t))for(var i,n=e.get(t+u),r=0,o=n.length;r<o;r++)if(i=n[r],i.multiElement)return!0;return!1}function q(e,t){var i=t.$attr,n=e.$attr,r=e.$$element;o(e,function(n,r){"$"!=r.charAt(0)&&(t[r]&&t[r]!==n&&(n+=("style"===r?";":" ")+t[r]),e.$set(r,n,!0,i[r]))}),o(t,function(t,o){"class"==o?(M(r,t),e["class"]=(e["class"]?e["class"]+" ":"")+t):"style"==o?(r.attr("style",r.attr("style")+";"+t),e.style=(e.style?e.style+";":"")+t):"$"==o.charAt(0)||e.hasOwnProperty(o)||(e[o]=t,n[o]=i[o])})}function K(e,t,i,n,r,a,l,c){var u,d,h=[],p=t[0],f=e.shift(),m=g(f,{templateUrl:null,transclude:null,replace:null,$$originalDirective:f}),v=$(f.templateUrl)?f.templateUrl(t,i):f.templateUrl,y=f.templateNamespace;return t.empty(),s(v).then(function(s){var g,w,C,A;if(s=ue(s),f.replace){if(C=xe(s)?[]:dt(Q(y,zn(s))),g=C[0],1!=C.length||g.nodeType!==qn)throw Tr("tplrt","Template for directive '{0}' must have exactly one root element. {1}",f.name,v);w={$attr:{}},ie(n,t,g);var x=P(g,[],w);b(f.scope)&&V(x),e=x.concat(e),q(i,w)}else g=p,t.html(s);for(e.unshift(m),u=H(e,g,i,r,t,f,a,l,c),o(n,function(e,i){e==g&&(n[i]=t[0])}),d=_(t[0].childNodes,r);h.length;){var S=h.shift(),E=h.shift(),$=h.shift(),F=h.shift(),k=t[0];if(!S.$$destroyed){if(E!==p){var D=E.className;c.hasElementTranscludeDirective&&f.replace||(k=De(g)),ie($,$n(E),k),M($n(k),D)}A=u.transcludeOnThisElement?B(S,u.transclude,F):F,u(d,S,k,n,A,u)}}h=null}),function(e,t,i,n,r){var o=r;t.$$destroyed||(h?h.push(t,i,n,o):(u.transcludeOnThisElement&&(o=B(t,u.transclude,r)),u(d,t,i,n,o,u)))}}function Y(e,t){var i=t.priority-e.priority;return 0!==i?i:e.name!==t.name?e.name<t.name?-1:1:e.index-t.index}function X(e,t,i,n){function r(e){return e?" (module: "+e+")":""}if(t)throw Tr("multidir","Multiple directives [{0}{1}, {2}{3}] asking for {4} on: {5}",t.name,r(t.$$moduleName),i.name,r(i.$$moduleName),e,J(n))}function Z(e,t){var i=n(t,!0);i&&e.push({priority:0,compile:function(e){var t=e.parent(),n=!!t.length;return n&&L.$$addBindingClass(t),function(e,t){var r=t.parent();n||L.$$addBindingClass(r),L.$$addBindingInfo(r,i.expressions),e.$watch(i,function(e){t[0].nodeValue=e})}}})}function Q(e,i){switch(e=Cn(e||"html")){case"svg":case"math":var n=t.createElement("div");return n.innerHTML="<"+e+">"+i+"</"+e+">",n.childNodes[0].childNodes;default:return i}}function ee(e,t){if("srcdoc"==t)return F.HTML;var i=I(e);return"xlinkHref"==t||"form"==i&&"action"==t||"img"!=i&&("src"==t||"ngSrc"==t)?F.RESOURCE_URL:void 0}function te(e,t,i,r,o){var s=ee(e,r);o=y[r]||o;var a=n(i,!0,s,o);if(a){if("multiple"===r&&"select"===I(e))throw Tr("selmulti","Binding to the 'multiple' attribute is not supported. Element: {0}",J(e));t.push({priority:100,compile:function(){return{pre:function(e,t,l){var c=l.$$observers||(l.$$observers=me());if(S.test(r))throw Tr("nodomevents","Interpolations for HTML DOM event attributes are disallowed.  Please use the ng- versions (such as ng-click instead of onclick) instead.");var u=l[r];u!==i&&(a=u&&n(u,!0,s,o),i=u),a&&(l[r]=a(e),(c[r]||(c[r]=[])).$$inter=!0,(l.$$observers&&l.$$observers[r].$$scope||e).$watch(a,function(e,t){"class"===r&&e!=t?l.$updateClass(e,t):l.$set(r,e)}))}}}})}}function ie(e,i,n){var r,o,s=i[0],a=i.length,l=s.parentNode;if(e)for(r=0,o=e.length;r<o;r++)if(e[r]==s){e[r++]=n;for(var c=r,u=c+a-1,d=e.length;c<d;c++,u++)u<d?e[c]=e[u]:delete e[c];e.length-=a-1,e.context===s&&(e.context=n);break}l&&l.replaceChild(n,s);var h=t.createDocumentFragment();h.appendChild(s),$n.hasData(s)&&($n(n).data($n(s).data()),Fn?(On=!0,Fn.cleanData([s])):delete $n.cache[s[$n.expando]]);for(var p=1,g=i.length;p<g;p++){var f=i[p];$n(f).remove(),h.appendChild(f),delete i[p]}i[0]=n,i.length=1}function ne(e,t){return d(function(){return e.apply(null,arguments)},e,t)}function re(e,t,i,n,o,s){try{e(t,i,n,o,s)}catch(e){r(e,J(i))}}function oe(e,t,i,r,s,l){var c;o(r,function(r,o){var l,u,d,h,p=r.attrName,g=r.optional,m=r.mode;switch(m){case"@":g||bn.call(t,p)||(i[o]=t[p]=void 0),t.$observe(p,function(e){x(e)&&(i[o]=e)}),t.$$observers[p].$$scope=e,x(t[p])&&(i[o]=n(t[p])(e));break;case"=":if(!bn.call(t,p)){if(g)break;t[p]=void 0}if(g&&!t[p])break;u=a(t[p]),h=u.literal?G:function(e,t){return e===t||e!==e&&t!==t},d=u.assign||function(){throw l=i[o]=u(e),Tr("nonassign","Expression '{0}' used with directive '{1}' is non-assignable!",t[p],s.name)},l=i[o]=u(e);var v=function(t){return h(t,i[o])||(h(t,l)?d(e,t=i[o]):i[o]=t),l=t};v.$stateful=!0;var y;y=r.collection?e.$watchCollection(t[p],v):e.$watch(a(t[p],v),null,u.literal),c=c||[],c.push(y);break;case"&":if((u=t.hasOwnProperty(p)?a(t[p]):f)===f&&g)break;i[o]=function(t){return u(e,t)}}});var u=c?function(){for(var e=0,t=c.length;e<t;++e)c[e]()}:f;return l&&u!==f?(l.$on("$destroy",u),f):u}var se=function(e,t){if(t){var i,n,r,o=Object.keys(t);for(i=0,n=o.length;i<n;i++)r=o[i],this[r]=t[r]}else this.$attr={};this.$$element=e};se.prototype={$normalize:ct,$addClass:function(e){e&&e.length>0&&k.addClass(this.$$element,e)},$removeClass:function(e){e&&e.length>0&&k.removeClass(this.$$element,e)},$updateClass:function(e,t){var i=ut(e,t);i&&i.length&&k.addClass(this.$$element,i);var n=ut(t,e);n&&n.length&&k.removeClass(this.$$element,n)},$set:function(e,t,i,n){var s,a=this.$$element[0],l=We(a,e),c=je(e),u=e;if(l?(this.$$element.prop(e,t),n=l):c&&(this[c]=t,u=c),this[e]=t,n?this.$attr[e]=n:(n=this.$attr[e])||(this.$attr[e]=n=ce(e,"-")),"a"===(s=I(this.$$element))&&"href"===e||"img"===s&&"src"===e)this[e]=t=T(t,"src"===e);else if("img"===s&&"srcset"===e){for(var d="",h=zn(t),p=/(\s+\d+x\s*,|\s+\d+w\s*,|\s+,|,\s+)/,g=/\s/.test(h)?p:/(,)/,f=h.split(g),m=Math.floor(f.length/2),v=0;v<m;v++){var y=2*v;d+=T(zn(f[y]),!0),d+=" "+zn(f[y+1])}var C=zn(f[2*v]).split(/\s/);d+=T(zn(C[0]),!0),2===C.length&&(d+=" "+zn(C[1])),this[e]=t=d}!1!==i&&(null===t||w(t)?this.$$element.removeAttr(n):this.$$element.attr(n,t));var b=this.$$observers;b&&o(b[u],function(e){try{e(t)}catch(e){r(e)}})},$observe:function(e,t){var i=this,n=i.$$observers||(i.$$observers=me()),r=n[e]||(n[e]=[]);return r.push(t),v.$evalAsync(function(){r.$$inter||!i.hasOwnProperty(e)||w(i[e])||t(i[e])}),function(){N(r,t)}}};var ae=n.startSymbol(),le=n.endSymbol(),ue="{{"==ae||"}}"==le?m:function(e){return e.replace(/\{\{/g,ae).replace(/}}/g,le)},he=/^ngAttr[A-Z]/;return L.$$addBindingInfo=E?function(e,t){var i=e.data("$binding")||[];In(t)?i=i.concat(t):i.push(t),e.data("$binding",i)}:f,L.$$addBindingClass=E?function(e){M(e,"ng-binding")}:f,L.$$addScopeInfo=E?function(e,t,i,n){var r=i?n?"$isolateScopeNoTemplate":"$isolateScope":"$scope";e.data(r,t)}:f,L.$$addScopeClass=E?function(e,t){M(e,t?"ng-isolate-scope":"ng-scope")}:f,L}]}function ct(e){return Ae(e.replace(Mr,""))}function ut(e,t){var i="",n=e.split(/\s+/),r=t.split(/\s+/);e:for(var o=0;o<n.length;o++){for(var s=n[o],a=0;a<r.length;a++)if(s==r[a])continue e;i+=(i.length>0?" ":"")+s}return i}function dt(e){e=$n(e);var t=e.length;if(t<=1)return e;for(;t--;){e[t].nodeType===Xn&&Tn.call(e,t,1)}return e}function ht(e,t){if(t&&x(t))return t;if(x(e)){var i=Rr.exec(e);if(i)return i[3]}}function pt(){var e={},t=!1;this.register=function(t,i){pe(t,"controller"),b(t)?d(e,t):e[t]=i},this.allowGlobals=function(){t=!0},this.$get=["$injector","$window",function(r,o){function s(e,t,i,r){if(!e||!b(e.$scope))throw n("$controller")("noscp","Cannot export controller '{0}' as '{1}'! No $scope object provided via `locals`.",r,t);e.$scope[t]=i}return function(n,a,l,c){var u,h,p,g;if(l=!0===l,c&&x(c)&&(g=c),x(n)){if(!(h=n.match(Rr)))throw Lr("ctrlfmt","Badly formed controller string '{0}'. Must match `__name__ as __id__` or `__name__`.",n);p=h[1],g=g||h[3],n=e.hasOwnProperty(p)?e[p]:ge(a.$scope,p,!0)||(t?ge(o,p,!0):i),he(n,p,!0)}if(l){var f=(In(n)?n[n.length-1]:n).prototype;u=Object.create(f||null),g&&s(a,g,u,p||n.name);return d(function(){var e=r.invoke(n,u,a,p);return e!==u&&(b(e)||$(e))&&(u=e,g&&s(a,g,u,p||n.name)),u},{instance:u,identifier:g})}return u=r.instantiate(n,a,p),g&&s(a,g,u,p||n.name),u}}]}function gt(){this.$get=["$window",function(e){return $n(e.document)}]}function ft(){this.$get=["$log",function(e){return function(){e.error.apply(e,arguments)}}]}function mt(e){return b(e)?E(e)?e.toISOString():q(e):e}function vt(){this.$get=function(){return function(e){if(!e)return"";var t=[];return s(e,function(e,i){null===e||w(e)||(In(e)?o(e,function(e){t.push(ne(i)+"="+ne(mt(e)))}):t.push(ne(i)+"="+ne(mt(e))))}),t.join("&")}}}function yt(){this.$get=function(){return function(e){function t(e,n,r){null===e||w(e)||(In(e)?o(e,function(e,i){t(e,n+"["+(b(e)?i:"")+"]")}):b(e)&&!E(e)?s(e,function(e,i){t(e,n+(r?"":"[")+i+(r?"":"]"))}):i.push(ne(n)+"="+ne(mt(e))))}if(!e)return"";var i=[];return t(e,"",!0),i.join("&")}}}function wt(e,t){if(x(e)){var i=e.replace(Nr,"").trim();if(i){var n=t("Content-Type");(n&&0===n.indexOf(Br)||Ct(i))&&(e=K(i))}}return e}function Ct(e){var t=e.match(Or);return t&&Ir[t[0]].test(e)}function bt(e){function t(e,t){e&&(n[e]=n[e]?n[e]+", "+t:t)}var i,n=me();return x(e)?o(e.split("\n"),function(e){i=e.indexOf(":"),t(Cn(zn(e.substr(0,i))),zn(e.substr(i+1)))}):b(e)&&o(e,function(e,i){t(Cn(i),zn(e))}),n}function At(e){var t;return function(i){if(t||(t=bt(e)),i){var n=t[Cn(i)];return void 0===n&&(n=null),n}return t}}function xt(e,t,i,n){return $(n)?n(e,t,i):(o(n,function(n){e=n(e,t,i)}),e)}function St(e){return 200<=e&&e<300}function Et(){var e=this.defaults={transformResponse:[wt],transformRequest:[function(e){return!b(e)||T(e)||L(e)||M(e)?e:q(e)}],headers:{common:{Accept:"application/json, text/plain, */*"},post:H(Pr),put:H(Pr),patch:H(Pr)},xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",paramSerializer:"$httpParamSerializer"},t=!1;this.useApplyAsync=function(e){return C(e)?(t=!!e,this):t};var r=!0;this.useLegacyPromiseExtensions=function(e){return C(e)?(r=!!e,this):r};var s=this.interceptors=[];this.$get=["$httpBackend","$$cookieReader","$cacheFactory","$rootScope","$q","$injector",function(a,l,c,u,h,p){function g(t){function s(e){var t=d({},e);return e.data?t.data=xt(e.data,e.headers,e.status,c.transformResponse):t.data=e.data,St(e.status)?t:h.reject(t)}function a(e,t){var i,n={};return o(e,function(e,r){$(e)?null!=(i=e(t))&&(n[r]=i):n[r]=e}),n}function l(t){var i,n,r,o=e.headers,s=d({},t.headers);o=d({},o.common,o[Cn(t.method)]);e:for(i in o){n=Cn(i);for(r in s)if(Cn(r)===n)continue e;s[i]=o[i]}return a(s,H(t))}if(!Bn.isObject(t))throw n("$http")("badreq","Http request configuration must be an object.  Received: {0}",t);var c=d({method:"get",transformRequest:e.transformRequest,transformResponse:e.transformResponse,paramSerializer:e.paramSerializer},t);c.headers=l(t),c.method=An(c.method),c.paramSerializer=x(c.paramSerializer)?p.get(c.paramSerializer):c.paramSerializer;var u=function(t){var n=t.headers,r=xt(t.data,At(n),i,t.transformRequest);return w(r)&&o(n,function(e,t){"content-type"===Cn(t)&&delete n[t]}),w(t.withCredentials)&&!w(e.withCredentials)&&(t.withCredentials=e.withCredentials),v(t,r).then(s,s)},g=[u,i],f=h.when(c);for(o(S,function(e){(e.request||e.requestError)&&g.unshift(e.request,e.requestError),(e.response||e.responseError)&&g.push(e.response,e.responseError)});g.length;){var m=g.shift(),y=g.shift();f=f.then(m,y)}return r?(f.success=function(e){return he(e,"fn"),f.then(function(t){e(t.data,t.status,t.headers,c)}),f},f.error=function(e){return he(e,"fn"),f.then(null,function(t){e(t.data,t.status,t.headers,c)}),f}):(f.success=Hr("success"),f.error=Hr("error")),f}function f(){o(arguments,function(e){g[e]=function(t,i){return g(d({},i||{},{method:e,url:t}))}})}function m(){o(arguments,function(e){g[e]=function(t,i,n){return g(d({},n||{},{method:e,url:t,data:i}))}})}function v(n,r){function o(e,i,n,r){function o(){s(i,e,n,r)}p&&(St(e)?p.put(S,[e,i,bt(n),r]):p.remove(S)),t?u.$applyAsync(o):(o(),u.$$phase||u.$apply())}function s(e,t,i,r){t=t>=-1?t:0,(St(t)?m.resolve:m.reject)({data:e,status:t,headers:At(i),config:n,statusText:r})}function c(e){s(e.data,e.status,H(e.headers()),e.statusText)}function d(){var e=g.pendingRequests.indexOf(n);-1!==e&&g.pendingRequests.splice(e,1)}var p,f,m=h.defer(),v=m.promise,x=n.headers,S=y(n.url,n.paramSerializer(n.params));if(g.pendingRequests.push(n),v.then(d,d),!n.cache&&!e.cache||!1===n.cache||"GET"!==n.method&&"JSONP"!==n.method||(p=b(n.cache)?n.cache:b(e.cache)?e.cache:A),p&&(f=p.get(S),C(f)?_(f)?f.then(c,c):In(f)?s(f[1],f[0],H(f[2]),f[3]):s(f,200,{},"OK"):p.put(S,v)),w(f)){var E=$i(n.url)?l()[n.xsrfCookieName||e.xsrfCookieName]:i;E&&(x[n.xsrfHeaderName||e.xsrfHeaderName]=E),a(n.method,S,r,o,x,n.timeout,n.withCredentials,n.responseType)}return v}function y(e,t){return t.length>0&&(e+=(-1==e.indexOf("?")?"?":"&")+t),e}var A=c("$http");e.paramSerializer=x(e.paramSerializer)?p.get(e.paramSerializer):e.paramSerializer;var S=[];return o(s,function(e){S.unshift(x(e)?p.get(e):p.invoke(e))}),g.pendingRequests=[],f("get","delete","head","jsonp"),m("post","put","patch"),g.defaults=e,g}]}function $t(){this.$get=function(){return function(){return new e.XMLHttpRequest}}}function Ft(){this.$get=["$browser","$window","$document","$xhrFactory",function(e,t,i,n){return kt(e,n,e.defer,t.angular.callbacks,i[0])}]}function kt(e,t,i,n,r){function s(e,t,i){var o=r.createElement("script"),s=null;return o.type="text/javascript",o.src=e,o.async=!0,s=function(e){nr(o,"load",s),nr(o,"error",s),r.body.removeChild(o),o=null;var a=-1,l="unknown";e&&("load"!==e.type||n[t].called||(e={type:"error"}),l=e.type,a="error"===e.type?404:200),i&&i(a,l)},ir(o,"load",s),ir(o,"error",s),r.body.appendChild(o),s}return function(r,a,l,c,u,d,h,p){function g(){y&&y(),b&&b.abort()}function m(t,n,r,o,s){C(x)&&i.cancel(x),y=b=null,t(n,r,o,s),e.$$completeOutstandingRequest(f)}if(e.$$incOutstandingRequestCount(),a=a||e.url(),"jsonp"==Cn(r)){var v="_"+(n.counter++).toString(36);n[v]=function(e){n[v].data=e,n[v].called=!0};var y=s(a.replace("JSON_CALLBACK","angular.callbacks."+v),v,function(e,t){m(c,e,n[v].data,"",t),n[v]=f})}else{var b=t(r,a);b.open(r,a,!0),o(u,function(e,t){C(e)&&b.setRequestHeader(t,e)}),b.onload=function(){var e=b.statusText||"",t="response"in b?b.response:b.responseText,i=1223===b.status?204:b.status;0===i&&(i=t?200:"file"==Ei(a).protocol?404:0),m(c,i,t,b.getAllResponseHeaders(),e)};var A=function(){m(c,-1,null,null,"")};if(b.onerror=A,b.onabort=A,h&&(b.withCredentials=!0),p)try{b.responseType=p}catch(e){if("json"!==p)throw e}b.send(w(l)?null:l)}if(d>0)var x=i(g,d);else _(d)&&d.then(g)}}function Dt(){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(i,n,r){function o(e){return"\\\\\\"+e}function s(i){return i.replace(h,e).replace(p,t)}function a(e){if(null==e)return"";switch(typeof e){case"string":break;case"number":e=""+e;break;default:e=q(e)}return e}function l(o,l,h,p){function g(e){try{return e=k(e),p&&!C(e)?e:a(e)}catch(e){n(Gr.interr(o,e))}}p=!!p;for(var f,m,v,y=0,b=[],A=[],x=o.length,S=[],E=[];y<x;){if(-1==(f=o.indexOf(e,y))||-1==(m=o.indexOf(t,f+c))){y!==x&&S.push(s(o.substring(y)));break}y!==f&&S.push(s(o.substring(y,f))),v=o.substring(f+c,m),b.push(v),A.push(i(v,g)),y=m+u,E.push(S.length),S.push("")}if(h&&S.length>1&&Gr.throwNoconcat(o),!l||b.length){var F=function(e){for(var t=0,i=b.length;t<i;t++){if(p&&w(e[t]))return;S[E[t]]=e[t]}return S.join("")},k=function(e){return h?r.getTrusted(h,e):r.valueOf(e)};return d(function(e){var t=0,i=b.length,r=new Array(i);try{for(;t<i;t++)r[t]=A[t](e);return F(r)}catch(e){n(Gr.interr(o,e))}},{exp:o,expressions:b,$$watchDelegate:function(e,t){var i;return e.$watchGroup(A,function(n,r){var o=F(n);$(t)&&t.call(this,o,n!==r?i:o,e),i=o})}})}}var c=e.length,u=t.length,h=new RegExp(e.replace(/./g,o),"g"),p=new RegExp(t.replace(/./g,o),"g");return l.startSymbol=function(){return e},l.endSymbol=function(){return t},l}]}function Tt(){this.$get=["$rootScope","$window","$q","$$q",function(e,t,i,n){function r(r,s,a,l){var c=arguments.length>4,u=c?W(arguments,4):[],d=t.setInterval,h=t.clearInterval,p=0,g=C(l)&&!l,f=(g?n:i).defer(),m=f.promise;return a=C(a)?a:0,m.then(null,null,c?function(){r.apply(null,u)}:r),m.$$intervalId=d(function(){f.notify(p++),a>0&&p>=a&&(f.resolve(p),h(m.$$intervalId),delete o[m.$$intervalId]),g||e.$apply()},s),o[m.$$intervalId]=f,m}var o={};return r.cancel=function(e){return!!(e&&e.$$intervalId in o)&&(o[e.$$intervalId].reject("canceled"),t.clearInterval(e.$$intervalId),delete o[e.$$intervalId],!0)},r}]}function Mt(e){for(var t=e.split("/"),i=t.length;i--;)t[i]=ie(t[i]);return t.join("/")}function Lt(e,t){var i=Ei(e);t.$$protocol=i.protocol,t.$$host=i.hostname,t.$$port=p(i.port)||Wr[i.protocol]||null}function Rt(e,t){var i="/"!==e.charAt(0);i&&(e="/"+e);var n=Ei(e);t.$$path=decodeURIComponent(i&&"/"===n.pathname.charAt(0)?n.pathname.substring(1):n.pathname),t.$$search=ee(n.search),t.$$hash=decodeURIComponent(n.hash),t.$$path&&"/"!=t.$$path.charAt(0)&&(t.$$path="/"+t.$$path)}function _t(e,t){if(0===t.indexOf(e))return t.substr(e.length)}function Bt(e){var t=e.indexOf("#");return-1==t?e:e.substr(0,t)}function Pt(e){return e.replace(/(#.+)|#$/,"$1")}function Ot(e){return e.substr(0,Bt(e).lastIndexOf("/")+1)}function It(e){return e.substring(0,e.indexOf("/",e.indexOf("//")+2))}function Nt(e,t,i){this.$$html5=!0,i=i||"",Lt(e,this),this.$$parse=function(e){var i=_t(t,e);if(!x(i))throw jr("ipthprfx",'Invalid url "{0}", missing path prefix "{1}".',e,t);Rt(i,this),this.$$path||(this.$$path="/"),this.$$compose()},this.$$compose=function(){var e=te(this.$$search),i=this.$$hash?"#"+ie(this.$$hash):"";this.$$url=Mt(this.$$path)+(e?"?"+e:"")+i,this.$$absUrl=t+this.$$url.substr(1)},this.$$parseLinkUrl=function(n,r){if(r&&"#"===r[0])return this.hash(r.slice(1)),!0;var o,s,a;return C(o=_t(e,n))?(s=o,a=C(o=_t(i,o))?t+(_t("/",o)||o):e+s):C(o=_t(t,n))?a=t+o:t==n+"/"&&(a=t),a&&this.$$parse(a),!!a}}function zt(e,t,i){Lt(e,this),this.$$parse=function(n){function r(e,t,i){var n,r=/^\/[A-Z]:(\/.*)/;return 0===t.indexOf(i)&&(t=t.replace(i,"")),r.exec(t)?e:(n=r.exec(e),n?n[1]:e)}var o,s=_t(e,n)||_t(t,n);w(s)||"#"!==s.charAt(0)?this.$$html5?o=s:(o="",w(s)&&(e=n,this.replace())):(o=_t(i,s),w(o)&&(o=s)),Rt(o,this),this.$$path=r(this.$$path,o,e),this.$$compose()},this.$$compose=function(){var t=te(this.$$search),n=this.$$hash?"#"+ie(this.$$hash):"";this.$$url=Mt(this.$$path)+(t?"?"+t:"")+n,this.$$absUrl=e+(this.$$url?i+this.$$url:"")},this.$$parseLinkUrl=function(t){return Bt(e)==Bt(t)&&(this.$$parse(t),!0)}}function Ht(e,t,i){this.$$html5=!0,zt.apply(this,arguments),this.$$parseLinkUrl=function(n,r){if(r&&"#"===r[0])return this.hash(r.slice(1)),!0;var o,s;return e==Bt(n)?o=n:(s=_t(t,n))?o=e+i+s:t===n+"/"&&(o=t),o&&this.$$parse(o),!!o},this.$$compose=function(){var t=te(this.$$search),n=this.$$hash?"#"+ie(this.$$hash):"";this.$$url=Mt(this.$$path)+(t?"?"+t:"")+n,this.$$absUrl=e+i+this.$$url}}function Gt(e){return function(){return this[e]}}function Vt(e,t){return function(i){return w(i)?this[e]:(this[e]=t(i),this.$$compose(),this)}}function Wt(){var e="",t={enabled:!1,requireBase:!0,rewriteLinks:!0};this.hashPrefix=function(t){return C(t)?(e=t,this):e},this.html5Mode=function(e){return R(e)?(t.enabled=e,this):b(e)?(R(e.enabled)&&(t.enabled=e.enabled),R(e.requireBase)&&(t.requireBase=e.requireBase),R(e.rewriteLinks)&&(t.rewriteLinks=e.rewriteLinks),this):t},this.$get=["$rootScope","$browser","$sniffer","$rootElement","$window",function(i,n,r,o,s){function a(e,t,i){var r=c.url(),o=c.$$state;try{n.url(e,t,i),c.$$state=n.state()}catch(e){throw c.url(r),c.$$state=o,e}}function l(e,t){i.$broadcast("$locationChangeSuccess",c.absUrl(),e,c.$$state,t)}var c,u,d,h=n.baseHref(),p=n.url();if(t.enabled){if(!h&&t.requireBase)throw jr("nobase","$location in HTML5 mode requires a <base> tag to be present!");d=It(p)+(h||"/"),u=r.history?Nt:Ht}else d=Bt(p),u=zt;var g=Ot(d);c=new u(d,g,"#"+e),c.$$parseLinkUrl(p,p),c.$$state=n.state();var f=/^\s*(javascript|mailto):/i;o.on("click",function(e){if(t.rewriteLinks&&!e.ctrlKey&&!e.metaKey&&!e.shiftKey&&2!=e.which&&2!=e.button){for(var r=$n(e.target);"a"!==I(r[0]);)if(r[0]===o[0]||!(r=r.parent())[0])return;var a=r.prop("href"),l=r.attr("href")||r.attr("xlink:href");b(a)&&"[object SVGAnimatedString]"===a.toString()&&(a=Ei(a.animVal).href),f.test(a)||!a||r.attr("target")||e.isDefaultPrevented()||c.$$parseLinkUrl(a,l)&&(e.preventDefault(),c.absUrl()!=n.url()&&(i.$apply(),s.angular["ff-684208-preventDefault"]=!0))}}),Pt(c.absUrl())!=Pt(p)&&n.url(c.absUrl(),!0);var m=!0;return n.onUrlChange(function(e,t){if(w(_t(g,e)))return void(s.location.href=e);i.$evalAsync(function(){var n,r=c.absUrl(),o=c.$$state;c.$$parse(e),c.$$state=t,n=i.$broadcast("$locationChangeStart",e,r,t,o).defaultPrevented,c.absUrl()===e&&(n?(c.$$parse(r),c.$$state=o,a(r,!1,o)):(m=!1,l(r,o)))}),i.$$phase||i.$digest()}),i.$watch(function(){var e=Pt(n.url()),t=Pt(c.absUrl()),o=n.state(),s=c.$$replace,u=e!==t||c.$$html5&&r.history&&o!==c.$$state;(m||u)&&(m=!1,i.$evalAsync(function(){
var t=c.absUrl(),n=i.$broadcast("$locationChangeStart",t,e,c.$$state,o).defaultPrevented;c.absUrl()===t&&(n?(c.$$parse(e),c.$$state=o):(u&&a(t,s,o===c.$$state?null:c.$$state),l(e,o)))})),c.$$replace=!1}),c}]}function jt(){var e=!0,t=this;this.debugEnabled=function(t){return C(t)?(e=t,this):e},this.$get=["$window",function(i){function n(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}function r(e){var t=i.console||{},r=t[e]||t.log||f,s=!1;try{s=!!r.apply}catch(e){}return s?function(){var e=[];return o(arguments,function(t){e.push(n(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 i=r("debug");return function(){e&&i.apply(t,arguments)}}()}}]}function Ut(e,t){if("__defineGetter__"===e||"__defineSetter__"===e||"__lookupGetter__"===e||"__lookupSetter__"===e||"__proto__"===e)throw qr("isecfld","Attempting to access a disallowed field in Angular expressions! Expression: {0}",t);return e}function qt(e,t){if(e+="",!x(e))throw qr("iseccst","Cannot convert object to primitive value! Expression: {0}",t);return e}function Kt(e,t){if(e){if(e.constructor===e)throw qr("isecfn","Referencing Function in Angular expressions is disallowed! Expression: {0}",t);if(e.window===e)throw qr("isecwindow","Referencing the Window in Angular expressions is disallowed! Expression: {0}",t);if(e.children&&(e.nodeName||e.prop&&e.attr&&e.find))throw qr("isecdom","Referencing DOM nodes in Angular expressions is disallowed! Expression: {0}",t);if(e===Object)throw qr("isecobj","Referencing Object in Angular expressions is disallowed! Expression: {0}",t)}return e}function Yt(e,t){if(e){if(e.constructor===e)throw qr("isecfn","Referencing Function in Angular expressions is disallowed! Expression: {0}",t);if(e===Kr||e===Yr||e===Xr)throw qr("isecff","Referencing call, apply or bind in Angular expressions is disallowed! Expression: {0}",t)}}function Xt(e,t){if(e&&(e===(0).constructor||e===(!1).constructor||e==="".constructor||e==={}.constructor||e===[].constructor||e===Function.constructor))throw qr("isecaf","Assigning to a constructor is disallowed! Expression: {0}",t)}function Zt(e,t){return void 0!==e?e:t}function Jt(e,t){return void 0===e?t:void 0===t?e:e+t}function Qt(e,t){return!e(t).$stateful}function ei(e,t){var i,n;switch(e.type){case eo.Program:i=!0,o(e.body,function(e){ei(e.expression,t),i=i&&e.expression.constant}),e.constant=i;break;case eo.Literal:e.constant=!0,e.toWatch=[];break;case eo.UnaryExpression:ei(e.argument,t),e.constant=e.argument.constant,e.toWatch=e.argument.toWatch;break;case eo.BinaryExpression:ei(e.left,t),ei(e.right,t),e.constant=e.left.constant&&e.right.constant,e.toWatch=e.left.toWatch.concat(e.right.toWatch);break;case eo.LogicalExpression:ei(e.left,t),ei(e.right,t),e.constant=e.left.constant&&e.right.constant,e.toWatch=e.constant?[]:[e];break;case eo.ConditionalExpression:ei(e.test,t),ei(e.alternate,t),ei(e.consequent,t),e.constant=e.test.constant&&e.alternate.constant&&e.consequent.constant,e.toWatch=e.constant?[]:[e];break;case eo.Identifier:e.constant=!1,e.toWatch=[e];break;case eo.MemberExpression:ei(e.object,t),e.computed&&ei(e.property,t),e.constant=e.object.constant&&(!e.computed||e.property.constant),e.toWatch=[e];break;case eo.CallExpression:i=!!e.filter&&Qt(t,e.callee.name),n=[],o(e.arguments,function(e){ei(e,t),i=i&&e.constant,e.constant||n.push.apply(n,e.toWatch)}),e.constant=i,e.toWatch=e.filter&&Qt(t,e.callee.name)?n:[e];break;case eo.AssignmentExpression:ei(e.left,t),ei(e.right,t),e.constant=e.left.constant&&e.right.constant,e.toWatch=[e];break;case eo.ArrayExpression:i=!0,n=[],o(e.elements,function(e){ei(e,t),i=i&&e.constant,e.constant||n.push.apply(n,e.toWatch)}),e.constant=i,e.toWatch=n;break;case eo.ObjectExpression:i=!0,n=[],o(e.properties,function(e){ei(e.value,t),i=i&&e.value.constant,e.value.constant||n.push.apply(n,e.value.toWatch)}),e.constant=i,e.toWatch=n;break;case eo.ThisExpression:e.constant=!1,e.toWatch=[]}}function ti(e){if(1==e.length){var t=e[0].expression,n=t.toWatch;return 1!==n.length?n:n[0]!==t?n:i}}function ii(e){return e.type===eo.Identifier||e.type===eo.MemberExpression}function ni(e){if(1===e.body.length&&ii(e.body[0].expression))return{type:eo.AssignmentExpression,left:e.body[0].expression,right:{type:eo.NGValueParameter},operator:"="}}function ri(e){return 0===e.body.length||1===e.body.length&&(e.body[0].expression.type===eo.Literal||e.body[0].expression.type===eo.ArrayExpression||e.body[0].expression.type===eo.ObjectExpression)}function oi(e){return e.constant}function si(e,t){this.astBuilder=e,this.$filter=t}function ai(e,t){this.astBuilder=e,this.$filter=t}function li(e){return"constructor"==e}function ci(e){return $(e.valueOf)?e.valueOf():io.call(e)}function ui(){var e=me(),t=me();this.$get=["$filter",function(n){function r(e,t){return null==e||null==t?e===t:("object"!=typeof e||"object"!=typeof(e=ci(e)))&&(e===t||e!==e&&t!==t)}function s(e,t,n,o,s){var a,l=o.inputs;if(1===l.length){var c=r;return l=l[0],e.$watch(function(e){var t=l(e);return r(t,c)||(a=o(e,i,i,[t]),c=t&&ci(t)),a},t,n,s)}for(var u=[],d=[],h=0,p=l.length;h<p;h++)u[h]=r,d[h]=null;return e.$watch(function(e){for(var t=!1,n=0,s=l.length;n<s;n++){var c=l[n](e);(t||(t=!r(c,u[n])))&&(d[n]=c,u[n]=c&&ci(c))}return t&&(a=o(e,i,i,d)),a},t,n,s)}function a(e,t,i,n){var r,o;return r=e.$watch(function(e){return n(e)},function(e,i,n){o=e,$(t)&&t.apply(this,arguments),C(e)&&n.$$postDigest(function(){C(o)&&r()})},i)}function l(e,t,i,n){function r(e){var t=!0;return o(e,function(e){C(e)||(t=!1)}),t}var s,a;return s=e.$watch(function(e){return n(e)},function(e,i,n){a=e,$(t)&&t.call(this,e,i,n),r(e)&&n.$$postDigest(function(){r(a)&&s()})},i)}function c(e,t,i,n){var r;return r=e.$watch(function(e){return n(e)},function(){$(t)&&t.apply(this,arguments),r()},i)}function u(e,t){if(!t)return e;var i=e.$$watchDelegate,n=i!==l&&i!==a,r=n?function(i,n,r,o){var s=e(i,n,r,o);return t(s,i,n)}:function(i,n,r,o){var s=e(i,n,r,o),a=t(s,i,n);return C(s)?a:s};return e.$$watchDelegate&&e.$$watchDelegate!==s?r.$$watchDelegate=e.$$watchDelegate:t.$stateful||(r.$$watchDelegate=s,r.inputs=e.inputs?e.inputs:[e]),r}var d=Gn().noUnsafeEval,h={csp:d,expensiveChecks:!1},p={csp:d,expensiveChecks:!0};return function(i,r,o){var d,g,m;switch(typeof i){case"string":i=i.trim(),m=i;var v=o?t:e;if(!(d=v[m])){":"===i.charAt(0)&&":"===i.charAt(1)&&(g=!0,i=i.substring(2));var y=o?p:h,w=new Qr(y);d=new to(w,n,y).parse(i),d.constant?d.$$watchDelegate=c:g?d.$$watchDelegate=d.literal?l:a:d.inputs&&(d.$$watchDelegate=s),v[m]=d}return u(d,r);case"function":return u(i,r);default:return f}}}]}function di(){this.$get=["$rootScope","$exceptionHandler",function(e,t){return pi(function(t){e.$evalAsync(t)},t)}]}function hi(){this.$get=["$browser","$exceptionHandler",function(e,t){return pi(function(t){e.defer(t)},t)}]}function pi(e,t){function r(e,t,i){function n(t){return function(i){r||(r=!0,t.call(e,i))}}var r=!1;return[n(t),n(i)]}function s(){this.$$state={status:0}}function a(e,t){return function(i){t.call(e,i)}}function l(e){var n,r,o;o=e.pending,e.processScheduled=!1,e.pending=i;for(var s=0,a=o.length;s<a;++s){r=o[s][0],n=o[s][e.status];try{$(n)?r.resolve(n(e.value)):1===e.status?r.resolve(e.value):r.reject(e.value)}catch(e){r.reject(e),t(e)}}}function c(t){!t.processScheduled&&t.pending&&(t.processScheduled=!0,e(function(){l(t)}))}function u(){this.promise=new s,this.resolve=a(this,this.resolve),this.reject=a(this,this.reject),this.notify=a(this,this.notify)}function h(e){var t=new u,i=0,n=In(e)?[]:{};return o(e,function(e,r){i++,y(e).then(function(e){n.hasOwnProperty(r)||(n[r]=e,--i||t.resolve(n))},function(e){n.hasOwnProperty(r)||t.reject(e)})}),0===i&&t.resolve(n),t.promise}var p=n("$q",TypeError),g=function(){return new u};d(s.prototype,{then:function(e,t,i){if(w(e)&&w(t)&&w(i))return this;var n=new u;return this.$$state.pending=this.$$state.pending||[],this.$$state.pending.push([n,e,t,i]),this.$$state.status>0&&c(this.$$state),n.promise},"catch":function(e){return this.then(null,e)},"finally":function(e,t){return this.then(function(t){return v(t,!0,e)},function(t){return v(t,!1,e)},t)}}),d(u.prototype,{resolve:function(e){this.promise.$$state.status||(e===this.promise?this.$$reject(p("qcycle","Expected promise to be resolved with value other than itself '{0}'",e)):this.$$resolve(e))},$$resolve:function(e){var i,n;n=r(this,this.$$resolve,this.$$reject);try{(b(e)||$(e))&&(i=e&&e.then),$(i)?(this.promise.$$state.status=-1,i.call(e,n[0],n[1],this.notify)):(this.promise.$$state.value=e,this.promise.$$state.status=1,c(this.promise.$$state))}catch(e){n[1](e),t(e)}},reject:function(e){this.promise.$$state.status||this.$$reject(e)},$$reject:function(e){this.promise.$$state.value=e,this.promise.$$state.status=2,c(this.promise.$$state)},notify:function(i){var n=this.promise.$$state.pending;this.promise.$$state.status<=0&&n&&n.length&&e(function(){for(var e,r,o=0,s=n.length;o<s;o++){r=n[o][0],e=n[o][3];try{r.notify($(e)?e(i):i)}catch(e){t(e)}}})}});var f=function(e){var t=new u;return t.reject(e),t.promise},m=function(e,t){var i=new u;return t?i.resolve(e):i.reject(e),i.promise},v=function(e,t,i){var n=null;try{$(i)&&(n=i())}catch(e){return m(e,!1)}return _(n)?n.then(function(){return m(e,t)},function(e){return m(e,!1)}):m(e,t)},y=function(e,t,i,n){var r=new u;return r.resolve(e),r.promise.then(t,i,n)},C=y,A=function e(t){function i(e){r.resolve(e)}function n(e){r.reject(e)}if(!$(t))throw p("norslvr","Expected resolverFn, got '{0}'",t);if(!(this instanceof e))return new e(t);var r=new u;return t(i,n),r.promise};return A.defer=g,A.reject=f,A.when=y,A.resolve=C,A.all=h,A}function gi(){this.$get=["$window","$timeout",function(e,t){var i=e.requestAnimationFrame||e.webkitRequestAnimationFrame,n=e.cancelAnimationFrame||e.webkitCancelAnimationFrame||e.webkitCancelRequestAnimationFrame,r=!!i,o=r?function(e){var t=i(e);return function(){n(t)}}:function(e){var i=t(e,16.66,!1);return function(){t.cancel(i)}};return o.supported=r,o}]}function fi(){function e(e){function t(){this.$$watchers=this.$$nextSibling=this.$$childHead=this.$$childTail=null,this.$$listeners={},this.$$listenerCount={},this.$$watchersCount=0,this.$id=l(),this.$$ChildScope=null}return t.prototype=e,t}var t=10,i=n("$rootScope"),s=null,a=null;this.digestTtl=function(e){return arguments.length&&(t=e),t},this.$get=["$injector","$exceptionHandler","$parse","$browser",function(n,c,u,d){function h(e){e.currentScope.$$destroyed=!0}function p(){this.$id=l(),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 g(e){if(S.$$phase)throw i("inprog","{0} already in progress",S.$$phase);S.$$phase=e}function m(){S.$$phase=null}function v(e,t){do{e.$$watchersCount+=t}while(e=e.$parent)}function y(e,t,i){do{e.$$listenerCount[i]-=t,0===e.$$listenerCount[i]&&delete e.$$listenerCount[i]}while(e=e.$parent)}function C(){}function A(){for(;k.length;)try{k.shift()()}catch(e){c(e)}a=null}function x(){null===a&&(a=d.defer(function(){S.$apply(A)}))}p.prototype={constructor:p,$new:function(t,i){var n;return i=i||this,t?(n=new p,n.$root=this.$root):(this.$$ChildScope||(this.$$ChildScope=e(this)),n=new this.$$ChildScope),n.$parent=i,n.$$prevSibling=i.$$childTail,i.$$childHead?(i.$$childTail.$$nextSibling=n,i.$$childTail=n):i.$$childHead=i.$$childTail=n,(t||i!=this)&&n.$on("$destroy",h),n},$watch:function(e,t,i,n){var r=u(e);if(r.$$watchDelegate)return r.$$watchDelegate(this,t,i,r,e);var o=this,a=o.$$watchers,l={fn:t,last:C,get:r,exp:n||e,eq:!!i};return s=null,$(t)||(l.fn=f),a||(a=o.$$watchers=[]),a.unshift(l),v(this,1),function(){N(a,l)>=0&&v(o,-1),s=null}},$watchGroup:function(e,t){function i(){l=!1,c?(c=!1,t(r,r,a)):t(r,n,a)}var n=new Array(e.length),r=new Array(e.length),s=[],a=this,l=!1,c=!0;if(!e.length){var u=!0;return a.$evalAsync(function(){u&&t(r,r,a)}),function(){u=!1}}return 1===e.length?this.$watch(e[0],function(e,i,o){r[0]=e,n[0]=i,t(r,e===i?r:n,o)}):(o(e,function(e,t){var o=a.$watch(e,function(e,o){r[t]=e,n[t]=o,l||(l=!0,a.$evalAsync(i))});s.push(o)}),function(){for(;s.length;)s.shift()()})},$watchCollection:function(e,t){function i(e){o=e;var t,i,n,a;if(!w(o)){if(b(o))if(r(o)){s!==p&&(s=p,m=s.length=0,d++),t=o.length,m!==t&&(d++,s.length=m=t);for(var l=0;l<t;l++)a=s[l],n=o[l],a!==a&&n!==n||a===n||(d++,s[l]=n)}else{s!==g&&(s=g={},m=0,d++),t=0;for(i in o)bn.call(o,i)&&(t++,n=o[i],a=s[i],i in s?a!==a&&n!==n||a===n||(d++,s[i]=n):(m++,s[i]=n,d++));if(m>t){d++;for(i in s)bn.call(o,i)||(m--,delete s[i])}}else s!==o&&(s=o,d++);return d}}function n(){if(f?(f=!1,t(o,o,l)):t(o,a,l),c)if(b(o))if(r(o)){a=new Array(o.length);for(var e=0;e<o.length;e++)a[e]=o[e]}else{a={};for(var i in o)bn.call(o,i)&&(a[i]=o[i])}else a=o}i.$stateful=!0;var o,s,a,l=this,c=t.length>1,d=0,h=u(e,i),p=[],g={},f=!0,m=0;return this.$watch(h,n)},$digest:function(){var e,n,r,o,l,u,h,p,f,v,y=t,w=this,b=[];g("$digest"),d.$$checkUrlChange(),this===S&&null!==a&&(d.defer.cancel(a),A()),s=null;do{for(u=!1,p=w;E.length;){try{v=E.shift(),v.scope.$eval(v.expression,v.locals)}catch(e){c(e)}s=null}e:do{if(o=p.$$watchers)for(l=o.length;l--;)try{if(e=o[l])if((n=e.get(p))===(r=e.last)||(e.eq?G(n,r):"number"==typeof n&&"number"==typeof r&&isNaN(n)&&isNaN(r))){if(e===s){u=!1;break e}}else u=!0,s=e,e.last=e.eq?z(n,null):n,e.fn(n,r===C?n:r,p),y<5&&(f=4-y,b[f]||(b[f]=[]),b[f].push({msg:$(e.exp)?"fn: "+(e.exp.name||e.exp.toString()):e.exp,newVal:n,oldVal:r}))}catch(e){c(e)}if(!(h=p.$$watchersCount&&p.$$childHead||p!==w&&p.$$nextSibling))for(;p!==w&&!(h=p.$$nextSibling);)p=p.$parent}while(p=h);if((u||E.length)&&!y--)throw m(),i("infdig","{0} $digest() iterations reached. Aborting!\nWatchers fired in the last 5 iterations: {1}",t,b)}while(u||E.length);for(m();F.length;)try{F.shift()()}catch(e){c(e)}},$destroy:function(){if(!this.$$destroyed){var e=this.$parent;this.$broadcast("$destroy"),this.$$destroyed=!0,this===S&&d.$$applicationDestroyed(),v(this,-this.$$watchersCount);for(var t in this.$$listenerCount)y(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=f,this.$on=this.$watch=this.$watchGroup=function(){return f},this.$$listeners={},this.$parent=this.$$nextSibling=this.$$prevSibling=this.$$childHead=this.$$childTail=this.$root=this.$$watchers=null}},$eval:function(e,t){return u(e)(this,t)},$evalAsync:function(e,t){S.$$phase||E.length||d.defer(function(){E.length&&S.$digest()}),E.push({scope:this,expression:e,locals:t})},$$postDigest:function(e){F.push(e)},$apply:function(e){try{g("$apply");try{return this.$eval(e)}finally{m()}}catch(e){c(e)}finally{try{S.$digest()}catch(e){throw c(e),e}}},$applyAsync:function(e){function t(){i.$eval(e)}var i=this;e&&k.push(t),x()},$on:function(e,t){var i=this.$$listeners[e];i||(this.$$listeners[e]=i=[]),i.push(t);var n=this;do{n.$$listenerCount[e]||(n.$$listenerCount[e]=0),n.$$listenerCount[e]++}while(n=n.$parent);var r=this;return function(){var n=i.indexOf(t);-1!==n&&(i[n]=null,y(r,1,e))}},$emit:function(e){var t,i,n,r=[],o=this,s=!1,a={name:e,targetScope:o,stopPropagation:function(){s=!0},preventDefault:function(){a.defaultPrevented=!0},defaultPrevented:!1},l=V([a],arguments,1);do{for(t=o.$$listeners[e]||r,a.currentScope=o,i=0,n=t.length;i<n;i++)if(t[i])try{t[i].apply(null,l)}catch(e){c(e)}else t.splice(i,1),i--,n--;if(s)return a.currentScope=null,a;o=o.$parent}while(o);return a.currentScope=null,a},$broadcast:function(e){var t=this,i=t,n=t,r={name:e,targetScope:t,preventDefault:function(){r.defaultPrevented=!0},defaultPrevented:!1};if(!t.$$listenerCount[e])return r;for(var o,s,a,l=V([r],arguments,1);i=n;){for(r.currentScope=i,o=i.$$listeners[e]||[],s=0,a=o.length;s<a;s++)if(o[s])try{o[s].apply(null,l)}catch(e){c(e)}else o.splice(s,1),s--,a--;if(!(n=i.$$listenerCount[e]&&i.$$childHead||i!==t&&i.$$nextSibling))for(;i!==t&&!(n=i.$$nextSibling);)i=i.$parent}return r.currentScope=null,r}};var S=new p,E=S.$$asyncQueue=[],F=S.$$postDigestQueue=[],k=S.$$applyAsyncQueue=[];return S}]}function mi(){var e=/^\s*(https?|ftp|mailto|tel|file):/,t=/^\s*((https?|ftp|file|blob):|data:image\/)/;this.aHrefSanitizationWhitelist=function(t){return C(t)?(e=t,this):e},this.imgSrcSanitizationWhitelist=function(e){return C(e)?(t=e,this):t},this.$get=function(){return function(i,n){var r,o=n?t:e;return r=Ei(i).href,""===r||r.match(o)?i:"unsafe:"+r}}}function vi(e){if("self"===e)return e;if(x(e)){if(e.indexOf("***")>-1)throw no("iwcard","Illegal sequence *** in string matcher.  String: {0}",e);return e=Hn(e).replace("\\*\\*",".*").replace("\\*","[^:/.?&;]*"),new RegExp("^"+e+"$")}if(F(e))return new RegExp("^"+e.source+"$");throw no("imatcher",'Matchers may only be "self", string patterns or RegExp objects')}function yi(e){var t=[];return C(e)&&o(e,function(e){t.push(vi(e))}),t}function wi(){this.SCE_CONTEXTS=ro;var e=["self"],t=[];this.resourceUrlWhitelist=function(t){return arguments.length&&(e=yi(t)),e},this.resourceUrlBlacklist=function(e){return arguments.length&&(t=yi(e)),t},this.$get=["$injector",function(i){function n(e,t){return"self"===e?$i(t):!!e.exec(t.href)}function r(i){var r,o,s=Ei(i.toString()),a=!1;for(r=0,o=e.length;r<o;r++)if(n(e[r],s)){a=!0;break}if(a)for(r=0,o=t.length;r<o;r++)if(n(t[r],s)){a=!1;break}return a}function o(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}function s(e,t){var i=d.hasOwnProperty(e)?d[e]:null;if(!i)throw no("icontext","Attempted to trust a value in invalid context. Context: {0}; Value: {1}",e,t);if(null===t||w(t)||""===t)return t;if("string"!=typeof t)throw no("itype","Attempted to trust a non-string value in a content requiring a string: Context: {0}",e);return new i(t)}function a(e){return e instanceof u?e.$$unwrapTrustedValue():e}function l(e,t){if(null===t||w(t)||""===t)return t;var i=d.hasOwnProperty(e)?d[e]:null;if(i&&t instanceof i)return t.$$unwrapTrustedValue();if(e===ro.RESOURCE_URL){if(r(t))return t;throw no("insecurl","Blocked loading resource from url not allowed by $sceDelegate policy.  URL: {0}",t.toString())}if(e===ro.HTML)return c(t);throw no("unsafe","Attempting to use an unsafe value in a safe context.")}var c=function(){throw no("unsafe","Attempting to use an unsafe value in a safe context.")};i.has("$sanitize")&&(c=i.get("$sanitize"));var u=o(),d={};return d[ro.HTML]=o(u),d[ro.CSS]=o(u),d[ro.URL]=o(u),d[ro.JS]=o(u),d[ro.RESOURCE_URL]=o(d[ro.URL]),{trustAs:s,getTrusted:l,valueOf:a}}]}function Ci(){var e=!0;this.enabled=function(t){return arguments.length&&(e=!!t),e},this.$get=["$parse","$sceDelegate",function(t,i){if(e&&En<8)throw no("iequirks","Strict Contextual Escaping does not support Internet Explorer version < 11 in quirks mode.  You can fix this by adding the text <!doctype html> to the top of your HTML document.  See http://docs.angularjs.org/api/ng.$sce for more information.");var n=H(ro);n.isEnabled=function(){return e},n.trustAs=i.trustAs,n.getTrusted=i.getTrusted,n.valueOf=i.valueOf,e||(n.trustAs=n.getTrusted=function(e,t){return t},n.valueOf=m),n.parseAs=function(e,i){var r=t(i);return r.literal&&r.constant?r:t(i,function(t){return n.getTrusted(e,t)})};var r=n.parseAs,s=n.getTrusted,a=n.trustAs;return o(ro,function(e,t){var i=Cn(t);n[Ae("parse_as_"+i)]=function(t){return r(e,t)},n[Ae("get_trusted_"+i)]=function(t){return s(e,t)},n[Ae("trust_as_"+i)]=function(t){return a(e,t)}}),n}]}function bi(){this.$get=["$window","$document",function(e,t){var i,n,r={},o=p((/android (\d+)/.exec(Cn((e.navigator||{}).userAgent))||[])[1]),s=/Boxee/i.test((e.navigator||{}).userAgent),a=t[0]||{},l=/^(Moz|webkit|ms)(?=[A-Z])/,c=a.body&&a.body.style,u=!1,d=!1;if(c){for(var h in c)if(n=l.exec(h)){i=n[0],i=i.substr(0,1).toUpperCase()+i.substr(1);break}i||(i="WebkitOpacity"in c&&"webkit"),u=!!("transition"in c||i+"Transition"in c),d=!!("animation"in c||i+"Animation"in c),!o||u&&d||(u=x(c.webkitTransition),d=x(c.webkitAnimation))}return{history:!(!e.history||!e.history.pushState||o<4||s),hasEvent:function(e){if("input"===e&&En<=11)return!1;if(w(r[e])){var t=a.createElement("div");r[e]="on"+e in t}return r[e]},csp:Gn(),vendorPrefix:i,transitions:u,animations:d,android:o}}]}function Ai(){this.$get=["$templateCache","$http","$q","$sce",function(e,t,i,n){function r(o,s){function a(e){if(!s)throw Tr("tpload","Failed to load template: {0} (HTTP status: {1} {2})",o,e.status,e.statusText);return i.reject(e)}r.totalPendingRequests++,x(o)&&e.get(o)||(o=n.getTrustedResourceUrl(o));var l=t.defaults&&t.defaults.transformResponse;In(l)?l=l.filter(function(e){return e!==wt}):l===wt&&(l=null);var c={cache:e,transformResponse:l};return t.get(o,c)["finally"](function(){r.totalPendingRequests--}).then(function(t){return e.put(o,t.data),t.data},a)}return r.totalPendingRequests=0,r}]}function xi(){this.$get=["$rootScope","$browser","$location",function(e,t,i){var n={};return n.findBindings=function(e,t,i){var n=e.getElementsByClassName("ng-binding"),r=[];return o(n,function(e){var n=Bn.element(e).data("$binding");n&&o(n,function(n){if(i){new RegExp("(^|\\s)"+Hn(t)+"(\\s|\\||$)").test(n)&&r.push(e)}else-1!=n.indexOf(t)&&r.push(e)})}),r},n.findModels=function(e,t,i){for(var n=["ng-","data-ng-","ng\\:"],r=0;r<n.length;++r){var o=i?"=":"*=",s="["+n[r]+"model"+o+'"'+t+'"]',a=e.querySelectorAll(s);if(a.length)return a}},n.getLocation=function(){return i.url()},n.setLocation=function(t){t!==i.url()&&(i.url(t),e.$digest())},n.whenStable=function(e){t.notifyWhenNoOutstandingRequests(e)},n}]}function Si(){this.$get=["$rootScope","$browser","$q","$$q","$exceptionHandler",function(e,t,i,n,r){function o(o,a,l){$(o)||(l=a,a=o,o=f);var c,u=W(arguments,3),d=C(l)&&!l,h=(d?n:i).defer(),p=h.promise;return c=t.defer(function(){try{h.resolve(o.apply(null,u))}catch(e){h.reject(e),r(e)}finally{delete s[p.$$timeoutId]}d||e.$apply()},a),p.$$timeoutId=c,s[c]=h,p}var s={};return o.cancel=function(e){return!!(e&&e.$$timeoutId in s)&&(s[e.$$timeoutId].reject("canceled"),delete s[e.$$timeoutId],t.defer.cancel(e.$$timeoutId))},o}]}function Ei(e){var t=e;return En&&(oo.setAttribute("href",t),t=oo.href),oo.setAttribute("href",t),{href:oo.href,protocol:oo.protocol?oo.protocol.replace(/:$/,""):"",host:oo.host,search:oo.search?oo.search.replace(/^\?/,""):"",hash:oo.hash?oo.hash.replace(/^#/,""):"",hostname:oo.hostname,port:oo.port,pathname:"/"===oo.pathname.charAt(0)?oo.pathname:"/"+oo.pathname}}function $i(e){var t=x(e)?Ei(e):e;return t.protocol===so.protocol&&t.host===so.host}function Fi(){this.$get=v(e)}function ki(e){function t(e){try{return decodeURIComponent(e)}catch(t){return e}}var i=e[0]||{},n={},r="";return function(){var e,o,s,a,l,c=i.cookie||"";if(c!==r)for(r=c,e=r.split("; "),n={},s=0;s<e.length;s++)o=e[s],(a=o.indexOf("="))>0&&(l=t(o.substring(0,a)),w(n[l])&&(n[l]=t(o.substring(a+1))));return n}}function Di(){this.$get=ki}function Ti(e){function t(n,r){if(b(n)){var s={};return o(n,function(e,i){s[i]=t(i,e)}),s}return e.factory(n+i,r)}var i="Filter";this.register=t,this.$get=["$injector",function(e){return function(t){return e.get(t+i)}}],t("currency",Bi),t("date",Ki),t("filter",Mi),t("json",Yi),t("limitTo",Xi),t("lowercase",ho),t("number",Pi),t("orderBy",Zi),t("uppercase",po)}function Mi(){return function(e,t,i){if(!r(e)){if(null==e)return e;throw n("filter")("notarray","Expected array but received: {0}",e)}var o,s,a=_i(t);switch(a){case"function":o=t;break;case"boolean":case"null":case"number":case"string":s=!0;case"object":o=Li(t,i,s);break;default:return e}return Array.prototype.filter.call(e,o)}}function Li(e,t,i){var n=b(e)&&"$"in e;return!0===t?t=G:$(t)||(t=function(e,t){return!w(e)&&(null===e||null===t?e===t:!(b(t)||b(e)&&!y(e))&&(e=Cn(""+e),t=Cn(""+t),-1!==e.indexOf(t)))}),function(r){return n&&!b(r)?Ri(r,e.$,t,!1):Ri(r,e,t,i)}}function Ri(e,t,i,n,r){var o=_i(e),s=_i(t);if("string"===s&&"!"===t.charAt(0))return!Ri(e,t.substring(1),i,n);if(In(e))return e.some(function(e){return Ri(e,t,i,n)});switch(o){case"object":var a;if(n){for(a in e)if("$"!==a.charAt(0)&&Ri(e[a],t,i,!0))return!0;return!r&&Ri(e,t,i,!1)}if("object"===s){for(a in t){var l=t[a];if(!$(l)&&!w(l)){var c="$"===a;if(!Ri(c?e:e[a],l,i,c,c))return!1}}return!0}return i(e,t);case"function":return!1;default:return i(e,t)}}function _i(e){return null===e?"null":typeof e}function Bi(e){var t=e.NUMBER_FORMATS;return function(e,i,n){return w(i)&&(i=t.CURRENCY_SYM),w(n)&&(n=t.PATTERNS[1].maxFrac),null==e?e:Oi(e,t.PATTERNS[1],t.GROUP_SEP,t.DECIMAL_SEP,n).replace(/\u00A4/g,i)}}function Pi(e){var t=e.NUMBER_FORMATS;return function(e,i){return null==e?e:Oi(e,t.PATTERNS[0],t.GROUP_SEP,t.DECIMAL_SEP,i)}}function Oi(e,t,i,n,r){if(b(e))return"";var o=e<0;e=Math.abs(e);var s=e===Infinity;if(!s&&!isFinite(e))return"";var a=e+"",l="",c=!1,u=[];if(s&&(l="\u221e"),!s&&-1!==a.indexOf("e")){var d=a.match(/([\d\.]+)e(-?)(\d+)/);d&&"-"==d[2]&&d[3]>r+1?e=0:(l=a,c=!0)}if(s||c)r>0&&e<1&&(l=e.toFixed(r),e=parseFloat(l),l=l.replace(ao,n));else{var h=(a.split(ao)[1]||"").length;w(r)&&(r=Math.min(Math.max(t.minFrac,h),t.maxFrac)),e=+(Math.round(+(e.toString()+"e"+r)).toString()+"e"+-r);var p=(""+e).split(ao),g=p[0];p=p[1]||"";var f,m=0,v=t.lgSize,y=t.gSize;if(g.length>=v+y)for(m=g.length-v,f=0;f<m;f++)(m-f)%y==0&&0!==f&&(l+=i),l+=g.charAt(f);for(f=m;f<g.length;f++)(g.length-f)%v==0&&0!==f&&(l+=i),l+=g.charAt(f);for(;p.length<r;)p+="0";r&&"0"!==r&&(l+=n+p.substr(0,r))}return 0===e&&(o=!1),u.push(o?t.negPre:t.posPre,l,o?t.negSuf:t.posSuf),u.join("")}function Ii(e,t,i){var n="";for(e<0&&(n="-",e=-e),e=""+e;e.length<t;)e="0"+e;return i&&(e=e.substr(e.length-t)),n+e}function Ni(e,t,i,n){return i=i||0,function(r){var o=r["get"+e]();return(i>0||o>-i)&&(o+=i),0===o&&-12==i&&(o=12),Ii(o,t,n)}}function zi(e,t){return function(i,n){var r=i["get"+e]();return n[An(t?"SHORT"+e:e)][r]}}function Hi(e,t,i){var n=-1*i,r=n>=0?"+":"";return r+=Ii(Math[n>0?"floor":"ceil"](n/60),2)+Ii(Math.abs(n%60),2)}function Gi(e){var t=new Date(e,0,1).getDay();return new Date(e,0,(t<=4?5:12)-t)}function Vi(e){return new Date(e.getFullYear(),e.getMonth(),e.getDate()+(4-e.getDay()))}function Wi(e){return function(t){var i=Gi(t.getFullYear()),n=Vi(t),r=+n-+i;return Ii(1+Math.round(r/6048e5),e)}}function ji(e,t){return e.getHours()<12?t.AMPMS[0]:t.AMPMS[1]}function Ui(e,t){return e.getFullYear()<=0?t.ERAS[0]:t.ERAS[1]}function qi(e,t){return e.getFullYear()<=0?t.ERANAMES[0]:t.ERANAMES[1]}function Ki(e){function t(e){var t;if(t=e.match(i)){var n=new Date(0),r=0,o=0,s=t[8]?n.setUTCFullYear:n.setFullYear,a=t[8]?n.setUTCHours:n.setHours;t[9]&&(r=p(t[9]+t[10]),o=p(t[9]+t[11])),s.call(n,p(t[1]),p(t[2])-1,p(t[3]));var l=p(t[4]||0)-r,c=p(t[5]||0)-o,u=p(t[6]||0),d=Math.round(1e3*parseFloat("0."+(t[7]||0)));return a.call(n,l,c,u,d),n}return e}var i=/^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/;return function(i,n,r){var s,a,l="",c=[];if(n=n||"mediumDate",n=e.DATETIME_FORMATS[n]||n,x(i)&&(i=uo.test(i)?p(i):t(i)),S(i)&&(i=new Date(i)),!E(i)||!isFinite(i.getTime()))return i;for(;n;)a=co.exec(n),a?(c=V(c,a,1),n=c.pop()):(c.push(n),n=null);var u=i.getTimezoneOffset();return r&&(u=Y(r,i.getTimezoneOffset()),i=Z(i,r,!0)),o(c,function(t){s=lo[t],l+=s?s(i,e.DATETIME_FORMATS,u):t.replace(/(^'|'$)/g,"").replace(/''/g,"'")}),l}}function Yi(){return function(e,t){return w(t)&&(t=2),q(e,t)}}function Xi(){return function(e,t,i){return t=Math.abs(Number(t))===Infinity?Number(t):p(t),isNaN(t)?e:(S(e)&&(e=e.toString()),In(e)||x(e)?(i=!i||isNaN(i)?0:p(i),i=i<0&&i>=-e.length?e.length+i:i,t>=0?e.slice(i,i+t):0===i?e.slice(t,e.length):e.slice(Math.max(0,i+t),i)):e)}}function Zi(e){function t(t,i){return i=i?-1:1,t.map(function(t){var n=1,r=m;if($(t))r=t;else if(x(t)&&("+"!=t.charAt(0)&&"-"!=t.charAt(0)||(n="-"==t.charAt(0)?-1:1,t=t.substring(1)),""!==t&&(r=e(t),r.constant))){var o=r();r=function(e){return e[o]}}return{get:r,descending:n*i}})}function i(e){switch(typeof e){case"number":case"boolean":case"string":return!0;default:return!1}}function n(e,t){return"function"==typeof e.valueOf&&(e=e.valueOf(),i(e))?e:y(e)&&(e=e.toString(),i(e))?e:t}function o(e,t){var i=typeof e;return null===e?(i="string",e="null"):"string"===i?e=e.toLowerCase():"object"===i&&(e=n(e,t)),{value:e,type:i}}function s(e,t){var i=0;return e.type===t.type?e.value!==t.value&&(i=e.value<t.value?-1:1):i=e.type<t.type?-1:1,i}return function(e,i,n){function a(e,t){return{value:e,predicateValues:c.map(function(i){return o(i.get(e),t)})}}function l(e,t){for(var i=0,n=0,r=c.length;n<r&&!(i=s(e.predicateValues[n],t.predicateValues[n])*c[n].descending);++n);return i}if(!r(e))return e;In(i)||(i=[i]),0===i.length&&(i=["+"]);var c=t(i,n);c.push({get:function(){return{}},descending:n?-1:1});var u=Array.prototype.map.call(e,a);return u.sort(l),e=u.map(function(e){return e.value})}}function Ji(e){return $(e)&&(e={link:e}),e.restrict=e.restrict||"AC",v(e)}function Qi(e,t){e.$name=t}function en(e,t,n,r,s){var a=this,l=[];a.$error={},a.$$success={},a.$pending=i,a.$name=s(t.name||t.ngForm||"")(n),a.$dirty=!1,a.$pristine=!0,a.$valid=!0,a.$invalid=!1,a.$submitted=!1,a.$$parentForm=mo,a.$rollbackViewValue=function(){o(l,function(e){e.$rollbackViewValue()})},a.$commitViewValue=function(){o(l,function(e){e.$commitViewValue()})},a.$addControl=function(e){pe(e.$name,"input"),l.push(e),e.$name&&(a[e.$name]=e),e.$$parentForm=a},a.$$renameControl=function(e,t){var i=e.$name;a[i]===e&&delete a[i],a[t]=e,e.$name=t},a.$removeControl=function(e){e.$name&&a[e.$name]===e&&delete a[e.$name],o(a.$pending,function(t,i){a.$setValidity(i,null,e)}),o(a.$error,function(t,i){a.$setValidity(i,null,e)}),o(a.$$success,function(t,i){a.$setValidity(i,null,e)}),N(l,e),e.$$parentForm=mo},mn({ctrl:this,$element:e,set:function(e,t,i){var n=e[t];if(n){-1===n.indexOf(i)&&n.push(i)}else e[t]=[i]},unset:function(e,t,i){var n=e[t];n&&(N(n,i),0===n.length&&delete e[t])},$animate:r}),a.$setDirty=function(){r.removeClass(e,Jo),r.addClass(e,Qo),a.$dirty=!0,a.$pristine=!1,a.$$parentForm.$setDirty()},a.$setPristine=function(){r.setClass(e,Jo,Qo+" "+vo),a.$dirty=!1,a.$pristine=!0,a.$submitted=!1,o(l,function(e){e.$setPristine()})},a.$setUntouched=function(){o(l,function(e){e.$setUntouched()})},a.$setSubmitted=function(){r.addClass(e,vo),a.$submitted=!0,a.$$parentForm.$setSubmitted()}}function tn(e){e.$formatters.push(function(t){return e.$isEmpty(t)?t:t.toString()})}function nn(e,t,i,n,r,o){rn(e,t,i,n,r,o),tn(n)}function rn(e,t,i,n,r,o){var s=Cn(t[0].type);if(!r.android){var a=!1;t.on("compositionstart",function(){a=!0}),t.on("compositionend",function(){a=!1,l()})}var l=function(e){if(c&&(o.defer.cancel(c),c=null),!a){var r=t.val(),l=e&&e.type;"password"===s||i.ngTrim&&"false"===i.ngTrim||(r=zn(r)),(n.$viewValue!==r||""===r&&n.$$hasNativeValidators)&&n.$setViewValue(r,l)}};if(r.hasEvent("input"))t.on("input",l);else{var c,u=function(e,t,i){c||(c=o.defer(function(){c=null,t&&t.value===i||l(e)}))};t.on("keydown",function(e){var t=e.keyCode;91===t||15<t&&t<19||37<=t&&t<=40||u(e,this,this.value)}),r.hasEvent("paste")&&t.on("paste cut",u)}t.on("change",l),n.$render=function(){var e=n.$isEmpty(n.$viewValue)?"":n.$viewValue;t.val()!==e&&t.val(e)}}function on(e,t){if(E(e))return e;if(x(e)){Fo.lastIndex=0;var i=Fo.exec(e);if(i){var n=+i[1],r=+i[2],o=0,s=0,a=0,l=0,c=Gi(n),u=7*(r-1);return t&&(o=t.getHours(),s=t.getMinutes(),a=t.getSeconds(),l=t.getMilliseconds()),new Date(n,0,c.getDate()+u,o,s,a,l)}}return NaN}function sn(e,t){return function(i,n){var r,s;if(E(i))return i;if(x(i)){if('"'==i.charAt(0)&&'"'==i.charAt(i.length-1)&&(i=i.substring(1,i.length-1)),bo.test(i))return new Date(i);if(e.lastIndex=0,r=e.exec(i))return r.shift(),s=n?{yyyy:n.getFullYear(),MM:n.getMonth()+1,dd:n.getDate(),HH:n.getHours(),mm:n.getMinutes(),ss:n.getSeconds(),sss:n.getMilliseconds()/1e3}:{yyyy:1970,MM:1,dd:1,HH:0,mm:0,ss:0,sss:0},o(r,function(e,i){i<t.length&&(s[t[i]]=+e)}),new Date(s.yyyy,s.MM-1,s.dd,s.HH,s.mm,s.ss||0,1e3*s.sss||0)}return NaN}}function an(e,t,n,r){return function(o,s,a,l,c,u,d){function h(e){return e&&!(e.getTime&&e.getTime()!==e.getTime())}
function p(e){return C(e)&&!E(e)?n(e)||i:e}ln(o,s,a,l),rn(o,s,a,l,c,u);var g,f=l&&l.$options&&l.$options.timezone;if(l.$$parserName=e,l.$parsers.push(function(e){if(l.$isEmpty(e))return null;if(t.test(e)){var r=n(e,g);return f&&(r=Z(r,f)),r}return i}),l.$formatters.push(function(e){if(e&&!E(e))throw ns("datefmt","Expected `{0}` to be a date",e);return h(e)?(g=e,g&&f&&(g=Z(g,f,!0)),d("date")(e,r,f)):(g=null,"")}),C(a.min)||a.ngMin){var m;l.$validators.min=function(e){return!h(e)||w(m)||n(e)>=m},a.$observe("min",function(e){m=p(e),l.$validate()})}if(C(a.max)||a.ngMax){var v;l.$validators.max=function(e){return!h(e)||w(v)||n(e)<=v},a.$observe("max",function(e){v=p(e),l.$validate()})}}}function ln(e,t,n,r){var o=t[0];(r.$$hasNativeValidators=b(o.validity))&&r.$parsers.push(function(e){var n=t.prop(wn)||{};return n.badInput&&!n.typeMismatch?i:e})}function cn(e,t,n,r,o,s){if(ln(e,t,n,r),rn(e,t,n,r,o,s),r.$$parserName="number",r.$parsers.push(function(e){return r.$isEmpty(e)?null:So.test(e)?parseFloat(e):i}),r.$formatters.push(function(e){if(!r.$isEmpty(e)){if(!S(e))throw ns("numfmt","Expected `{0}` to be a number",e);e=e.toString()}return e}),C(n.min)||n.ngMin){var a;r.$validators.min=function(e){return r.$isEmpty(e)||w(a)||e>=a},n.$observe("min",function(e){C(e)&&!S(e)&&(e=parseFloat(e,10)),a=S(e)&&!isNaN(e)?e:i,r.$validate()})}if(C(n.max)||n.ngMax){var l;r.$validators.max=function(e){return r.$isEmpty(e)||w(l)||e<=l},n.$observe("max",function(e){C(e)&&!S(e)&&(e=parseFloat(e,10)),l=S(e)&&!isNaN(e)?e:i,r.$validate()})}}function un(e,t,i,n,r,o){rn(e,t,i,n,r,o),tn(n),n.$$parserName="url",n.$validators.url=function(e,t){var i=e||t;return n.$isEmpty(i)||Ao.test(i)}}function dn(e,t,i,n,r,o){rn(e,t,i,n,r,o),tn(n),n.$$parserName="email",n.$validators.email=function(e,t){var i=e||t;return n.$isEmpty(i)||xo.test(i)}}function hn(e,t,i,n){w(i.name)&&t.attr("name",l());var r=function(e){t[0].checked&&n.$setViewValue(i.value,e&&e.type)};t.on("click",r),n.$render=function(){var e=i.value;t[0].checked=e==n.$viewValue},i.$observe("value",n.$render)}function pn(e,t,i,n,r){var o;if(C(n)){if(o=e(n),!o.constant)throw ns("constexpr","Expected constant expression for `{0}`, but saw `{1}`.",i,n);return o(t)}return r}function gn(e,t,i,n,r,o,s,a){var l=pn(a,e,"ngTrueValue",i.ngTrueValue,!0),c=pn(a,e,"ngFalseValue",i.ngFalseValue,!1),u=function(e){n.$setViewValue(t[0].checked,e&&e.type)};t.on("click",u),n.$render=function(){t[0].checked=n.$viewValue},n.$isEmpty=function(e){return!1===e},n.$formatters.push(function(e){return G(e,l)}),n.$parsers.push(function(e){return e?l:c})}function fn(e,t){return e="ngClass"+e,["$animate",function(i){function n(e,t){var i=[];e:for(var n=0;n<e.length;n++){for(var r=e[n],o=0;o<t.length;o++)if(r==t[o])continue e;i.push(r)}return i}function r(e){var t=[];return In(e)?(o(e,function(e){t=t.concat(r(e))}),t):x(e)?e.split(" "):b(e)?(o(e,function(e,i){e&&(t=t.concat(i.split(" ")))}),t):e}return{restrict:"AC",link:function(s,a,l){function c(e){var t=d(e,1);l.$addClass(t)}function u(e){var t=d(e,-1);l.$removeClass(t)}function d(e,t){var i=a.data("$classCounts")||me(),n=[];return o(e,function(e){(t>0||i[e])&&(i[e]=(i[e]||0)+t,i[e]===+(t>0)&&n.push(e))}),a.data("$classCounts",i),n.join(" ")}function h(e,t){var r=n(t,e),o=n(e,t);r=d(r,1),o=d(o,-1),r&&r.length&&i.addClass(a,r),o&&o.length&&i.removeClass(a,o)}function p(e){if(!0===t||s.$index%2===t){var i=r(e||[]);if(g){if(!G(e,g)){var n=r(g);h(n,i)}}else c(i)}g=H(e)}var g;s.$watch(l[e],p,!0),l.$observe("class",function(){p(s.$eval(l[e]))}),"ngClass"!==e&&s.$watch("$index",function(i,n){var o=1&i;if(o!==(1&n)){var a=r(s.$eval(l[e]));o===t?c(a):u(a)}})}}}]}function mn(e){function t(e,t,l){w(t)?n("$pending",e,l):r("$pending",e,l),R(t)?t?(d(a.$error,e,l),u(a.$$success,e,l)):(u(a.$error,e,l),d(a.$$success,e,l)):(d(a.$error,e,l),d(a.$$success,e,l)),a.$pending?(o(is,!0),a.$valid=a.$invalid=i,s("",null)):(o(is,!1),a.$valid=vn(a.$error),a.$invalid=!a.$valid,s("",a.$valid));var c;c=a.$pending&&a.$pending[e]?i:!a.$error[e]&&(!!a.$$success[e]||null),s(e,c),a.$$parentForm.$setValidity(e,c,a)}function n(e,t,i){a[e]||(a[e]={}),u(a[e],t,i)}function r(e,t,n){a[e]&&d(a[e],t,n),vn(a[e])&&(a[e]=i)}function o(e,t){t&&!c[e]?(h.addClass(l,e),c[e]=!0):!t&&c[e]&&(h.removeClass(l,e),c[e]=!1)}function s(e,t){e=e?"-"+ce(e,"-"):"",o(Xo+e,!0===t),o(Zo+e,!1===t)}var a=e.ctrl,l=e.$element,c={},u=e.set,d=e.unset,h=e.$animate;c[Zo]=!(c[Xo]=l.hasClass(Xo)),a.$setValidity=t}function vn(e){if(e)for(var t in e)if(e.hasOwnProperty(t))return!1;return!0}var yn=/^\/(.+)\/([a-z]*)$/,wn="validity",Cn=function(e){return x(e)?e.toLowerCase():e},bn=Object.prototype.hasOwnProperty,An=function(e){return x(e)?e.toUpperCase():e},xn=function(e){return x(e)?e.replace(/[A-Z]/g,function(e){return String.fromCharCode(32|e.charCodeAt(0))}):e},Sn=function(e){return x(e)?e.replace(/[a-z]/g,function(e){return String.fromCharCode(-33&e.charCodeAt(0))}):e};"i"!=="I".toLowerCase()&&(Cn=xn,An=Sn);var En,$n,Fn,kn,Dn=[].slice,Tn=[].splice,Mn=[].push,Ln=Object.prototype.toString,Rn=Object.getPrototypeOf,_n=n("ng"),Bn=e.angular||(e.angular={}),Pn=0;En=t.documentMode,f.$inject=[],m.$inject=[];var On,In=Array.isArray,Nn=/^\[object (Uint8(Clamped)?)|(Uint16)|(Uint32)|(Int8)|(Int16)|(Int32)|(Float(32)|(64))Array\]$/,zn=function(e){return x(e)?e.trim():e},Hn=function(e){return e.replace(/([-()\[\]{}+?*.$\^|,:#<!\\])/g,"\\$1").replace(/\x08/g,"\\x08")},Gn=function(){function e(){try{return new Function(""),!1}catch(e){return!0}}if(!C(Gn.rules)){var i=t.querySelector("[ng-csp]")||t.querySelector("[data-ng-csp]");if(i){var n=i.getAttribute("ng-csp")||i.getAttribute("data-ng-csp");Gn.rules={noUnsafeEval:!n||-1!==n.indexOf("no-unsafe-eval"),noInlineStyle:!n||-1!==n.indexOf("no-inline-style")}}else Gn.rules={noUnsafeEval:e(),noInlineStyle:!1}}return Gn.rules},Vn=function(){if(C(Vn.name_))return Vn.name_;var e,i,n,r,o=Wn.length;for(i=0;i<o;++i)if(n=Wn[i],e=t.querySelector("["+n.replace(":","\\:")+"jq]")){r=e.getAttribute(n+"jq");break}return Vn.name_=r},Wn=["ng-","data-ng-","ng:","x-ng-"],jn=/[A-Z]/g,Un=!1,qn=1,Kn=2,Yn=3,Xn=8,Zn=9,Jn=11,Qn={full:"1.4.7",major:1,minor:4,dot:7,codeName:"dark-luminescence"};ke.expando="ng339";var er=ke.cache={},tr=1,ir=function(e,t,i){e.addEventListener(t,i,!1)},nr=function(e,t,i){e.removeEventListener(t,i,!1)};ke._data=function(e){return this.cache[e[this.expando]]||{}};var rr=/([\:\-\_]+(.))/g,or=/^moz([A-Z])/,sr={mouseleave:"mouseout",mouseenter:"mouseover"},ar=n("jqLite"),lr=/^<([\w-]+)\s*\/?>(?:<\/\1>|)$/,cr=/<|&#?\w+;/,ur=/<([\w:-]+)/,dr=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi,hr={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,"",""]};hr.optgroup=hr.option,hr.tbody=hr.tfoot=hr.colgroup=hr.caption=hr.thead,hr.th=hr.td;var pr=ke.prototype={ready:function(i){function n(){r||(r=!0,i())}var r=!1;"complete"===t.readyState?setTimeout(n):(this.on("DOMContentLoaded",n),ke(e).on("load",n))},toString:function(){var e=[];return o(this,function(t){e.push(""+t)}),"["+e.join(", ")+"]"},eq:function(e){return $n(e>=0?this[e]:this[this.length+e])},length:0,push:Mn,sort:[].sort,splice:[].splice},gr={};o("multiple,selected,checked,disabled,readOnly,required,open".split(","),function(e){gr[Cn(e)]=e});var fr={};o("input,select,option,textarea,button,form,details".split(","),function(e){fr[e]=!0});var mr={ngMinlength:"minlength",ngMaxlength:"maxlength",ngMin:"min",ngMax:"max",ngPattern:"pattern"};o({data:_e,removeData:Le,hasData:Ee},function(e,t){ke[t]=e}),o({data:_e,inheritedData:ze,scope:function(e){return $n.data(e,"$scope")||ze(e.parentNode||e,["$isolateScope","$scope"])},isolateScope:function(e){return $n.data(e,"$isolateScope")||$n.data(e,"$isolateScopeNoTemplate")},controller:Ne,injector:function(e){return ze(e,"$injector")},removeAttr:function(e,t){e.removeAttribute(t)},hasClass:Be,css:function(e,t,i){if(t=Ae(t),!C(i))return e.style[t];e.style[t]=i},attr:function(e,t,n){var r=e.nodeType;if(r!==Yn&&r!==Kn&&r!==Xn){var o=Cn(t);if(gr[o]){if(!C(n))return e[t]||(e.attributes.getNamedItem(t)||f).specified?o:i;n?(e[t]=!0,e.setAttribute(t,o)):(e[t]=!1,e.removeAttribute(o))}else if(C(n))e.setAttribute(t,n);else if(e.getAttribute){var s=e.getAttribute(t,2);return null===s?i:s}}},prop:function(e,t,i){if(!C(i))return e[t];e[t]=i},text:function(){function e(e,t){if(w(t)){var i=e.nodeType;return i===qn||i===Yn?e.textContent:""}e.textContent=t}return e.$dv="",e}(),val:function(e,t){if(w(t)){if(e.multiple&&"select"===I(e)){var i=[];return o(e.options,function(e){e.selected&&i.push(e.value||e.text)}),0===i.length?null:i}return e.value}e.value=t},html:function(e,t){if(w(t))return e.innerHTML;Te(e,!0),e.innerHTML=t},empty:He},function(e,t){ke.prototype[t]=function(t,i){var n,r,o=this.length;if(e!==He&&w(2==e.length&&e!==Be&&e!==Ne?t:i)){if(b(t)){for(n=0;n<o;n++)if(e===_e)e(this[n],t);else for(r in t)e(this[n],r,t[r]);return this}for(var s=e.$dv,a=w(s)?Math.min(o,1):o,l=0;l<a;l++){var c=e(this[l],t,i);s=s?s+c:c}return s}for(n=0;n<o;n++)e(this[n],t,i);return this}}),o({removeData:Le,on:function e(t,i,n,r){if(C(r))throw ar("onargs","jqLite#on() does not support the `selector` or `eventData` parameters");if(Se(t)){var o=Re(t,!0),s=o.events,a=o.handle;a||(a=o.handle=Ue(t,s));for(var l=i.indexOf(" ")>=0?i.split(" "):[i],c=l.length;c--;){i=l[c];var u=s[i];u||(s[i]=[],"mouseenter"===i||"mouseleave"===i?e(t,sr[i],function(e){var t=this,n=e.relatedTarget;n&&(n===t||t.contains(n))||a(e,i)}):"$destroy"!==i&&ir(t,i,a),u=s[i]),u.push(n)}}},off:Me,one:function(e,t,i){e=$n(e),e.on(t,function n(){e.off(t,i),e.off(t,n)}),e.on(t,i)},replaceWith:function(e,t){var i,n=e.parentNode;Te(e),o(new ke(t),function(t){i?n.insertBefore(t,i.nextSibling):n.replaceChild(t,e),i=t})},children:function(e){var t=[];return o(e.childNodes,function(e){e.nodeType===qn&&t.push(e)}),t},contents:function(e){return e.contentDocument||e.childNodes||[]},append:function(e,t){var i=e.nodeType;if(i===qn||i===Jn){t=new ke(t);for(var n=0,r=t.length;n<r;n++){var o=t[n];e.appendChild(o)}}},prepend:function(e,t){if(e.nodeType===qn){var i=e.firstChild;o(new ke(t),function(t){e.insertBefore(t,i)})}},wrap:function(e,t){t=$n(t).eq(0).clone()[0];var i=e.parentNode;i&&i.replaceChild(t,e),t.appendChild(e)},remove:Ge,detach:function(e){Ge(e,!0)},after:function(e,t){var i=e,n=e.parentNode;t=new ke(t);for(var r=0,o=t.length;r<o;r++){var s=t[r];n.insertBefore(s,i.nextSibling),i=s}},addClass:Oe,removeClass:Pe,toggleClass:function(e,t,i){t&&o(t.split(" "),function(t){var n=i;w(n)&&(n=!Be(e,t)),(n?Oe:Pe)(e,t)})},parent:function(e){var t=e.parentNode;return t&&t.nodeType!==Jn?t:null},next:function(e){return e.nextElementSibling},find:function(e,t){return e.getElementsByTagName?e.getElementsByTagName(t):[]},clone:De,triggerHandler:function(e,t,i){var n,r,s,a=t.type||t,l=Re(e),c=l&&l.events,u=c&&c[a];u&&(n={preventDefault:function(){this.defaultPrevented=!0},isDefaultPrevented:function(){return!0===this.defaultPrevented},stopImmediatePropagation:function(){this.immediatePropagationStopped=!0},isImmediatePropagationStopped:function(){return!0===this.immediatePropagationStopped},stopPropagation:f,type:a,target:e},t.type&&(n=d(n,t)),r=H(u),s=i?[n].concat(i):[n],o(r,function(t){n.isImmediatePropagationStopped()||t.apply(e,s)}))}},function(e,t){ke.prototype[t]=function(t,i,n){for(var r,o=0,s=this.length;o<s;o++)w(r)?(r=e(this[o],t,i,n),C(r)&&(r=$n(r))):Ie(r,e(this[o],t,i,n));return C(r)?r:this},ke.prototype.bind=ke.prototype.on,ke.prototype.unbind=ke.prototype.off}),Ye.prototype={put:function(e,t){this[Ke(e,this.nextUid)]=t},get:function(e){return this[Ke(e,this.nextUid)]},remove:function(e){var t=this[e=Ke(e,this.nextUid)];return delete this[e],t}};var vr=[function(){this.$get=[function(){return Ye}]}],yr=/^[^\(]*\(\s*([^\)]*)\)/m,wr=/,/,Cr=/^\s*(_?)(\S+?)\1\s*$/,br=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/gm,Ar=n("$injector");Je.$$annotate=Ze;var xr=n("$animate"),Sr=1,Er="ng-animate",$r=function(){this.$get=["$q","$$rAF",function(e,t){function i(){}return i.all=f,i.chain=f,i.prototype={end:f,cancel:f,resume:f,pause:f,complete:f,then:function(i,n){return e(function(e){t(function(){e()})}).then(i,n)}},i}]},Fr=function(){var e=new Ye,t=[];this.$get=["$$AnimateRunner","$rootScope",function(i,n){function r(e,t,i){var n=!1;return t&&(t=x(t)?t.split(" "):In(t)?t:[],o(t,function(t){t&&(n=!0,e[t]=i)})),n}function s(){o(t,function(t){var i=e.get(t);if(i){var n=it(t.attr("class")),r="",s="";o(i,function(e,t){e!==!!n[t]&&(e?r+=(r.length?" ":"")+t:s+=(s.length?" ":"")+t)}),o(t,function(e){r&&Oe(e,r),s&&Pe(e,s)}),e.remove(t)}}),t.length=0}function a(i,o,a){var l=e.get(i)||{},c=r(l,o,!0),u=r(l,a,!1);(c||u)&&(e.put(i,l),t.push(i),1===t.length&&n.$$postDigest(s))}return{enabled:f,on:f,off:f,pin:f,push:function(e,t,n,r){return r&&r(),n=n||{},n.from&&e.css(n.from),n.to&&e.css(n.to),(n.addClass||n.removeClass)&&a(e,n.addClass,n.removeClass),new i}}}]},kr=["$provide",function(e){var t=this;this.$$registeredAnimations=Object.create(null),this.register=function(i,n){if(i&&"."!==i.charAt(0))throw xr("notcsel","Expecting class selector starting with '.' got '{0}'.",i);var r=i+"-animation";t.$$registeredAnimations[i.substr(1)]=r,e.factory(r,n)},this.classNameFilter=function(e){if(1===arguments.length&&(this.$$classNameFilter=e instanceof RegExp?e:null,this.$$classNameFilter)){if(new RegExp("(\\s+|\\/)"+Er+"(\\s+|\\/)").test(this.$$classNameFilter.toString()))throw xr("nongcls",'$animateProvider.classNameFilter(regex) prohibits accepting a regex value which matches/contains the "{0}" CSS class.',Er)}return this.$$classNameFilter},this.$get=["$$animateQueue",function(e){function t(e,t,i){if(i){var n=tt(i);!n||n.parentNode||n.previousElementSibling||(i=null)}i?i.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(i,n,r,o){return n=n&&$n(n),r=r&&$n(r),n=n||r.parent(),t(i,n,r),e.push(i,"enter",nt(o))},move:function(i,n,r,o){return n=n&&$n(n),r=r&&$n(r),n=n||r.parent(),t(i,n,r),e.push(i,"move",nt(o))},leave:function(t,i){return e.push(t,"leave",nt(i),function(){t.remove()})},addClass:function(t,i,n){return n=nt(n),n.addClass=et(n.addclass,i),e.push(t,"addClass",n)},removeClass:function(t,i,n){return n=nt(n),n.removeClass=et(n.removeClass,i),e.push(t,"removeClass",n)},setClass:function(t,i,n,r){return r=nt(r),r.addClass=et(r.addClass,i),r.removeClass=et(r.removeClass,n),e.push(t,"setClass",r)},animate:function(t,i,n,r,o){return o=nt(o),o.from=o.from?d(o.from,i):i,o.to=o.to?d(o.to,n):n,r=r||"ng-inline-animate",o.tempClasses=et(o.tempClasses,r),e.push(t,"animate",o)}}}]}],Dr=function(){this.$get=["$$rAF","$q",function(e,t){var i=function(){};return i.prototype={done:function(e){this.defer&&this.defer[!0===e?"reject":"resolve"]()},end:function(){this.done()},cancel:function(){this.done(!0)},getPromise:function(){return this.defer||(this.defer=t.defer()),this.defer.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)}},function(t,n){function r(){return e(function(){o(),s||a.done(),s=!0}),a}function o(){n.addClass&&(t.addClass(n.addClass),n.addClass=null),n.removeClass&&(t.removeClass(n.removeClass),n.removeClass=null),n.to&&(t.css(n.to),n.to=null)}n.cleanupStyles&&(n.from=n.to=null),n.from&&(t.css(n.from),n.from=null);var s,a=new i;return{start:r,end:r}}}]},Tr=n("$compile");lt.$inject=["$provide","$$sanitizeUriProvider"];var Mr=/^((?:x|data)[\:\-_])/i,Lr=n("$controller"),Rr=/^(\S+)(\s+as\s+(\w+))?$/,_r=function(){this.$get=["$document",function(e){return function(t){return t?!t.nodeType&&t instanceof $n&&(t=t[0]):t=e[0].body,t.offsetWidth+1}}]},Br="application/json",Pr={"Content-Type":Br+";charset=utf-8"},Or=/^\[|^\{(?!\{)/,Ir={"[":/]$/,"{":/}$/},Nr=/^\)\]\}',?\n/,zr=n("$http"),Hr=function(e){return function(){throw zr("legacy","The method `{0}` on the promise returned from `$http` has been disabled.",e)}},Gr=Bn.$interpolateMinErr=n("$interpolate");Gr.throwNoconcat=function(e){throw Gr("noconcat","Error while interpolating: {0}\nStrict Contextual Escaping disallows interpolations that concatenate multiple expressions when a trusted value is required.  See http://docs.angularjs.org/api/ng.$sce",e)},Gr.interr=function(e,t){return Gr("interr","Can't interpolate: {0}\n{1}",e,t.toString())};var Vr=/^([^\?#]*)(\?([^#]*))?(#(.*))?$/,Wr={http:80,https:443,ftp:21},jr=n("$location"),Ur={$$html5:!1,$$replace:!1,absUrl:Gt("$$absUrl"),url:function(e){if(w(e))return this.$$url;var t=Vr.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:Vt("$$path",function(e){return e=null!==e?e.toString():"","/"==e.charAt(0)?e:"/"+e}),search:function(e,t){switch(arguments.length){case 0:return this.$$search;case 1:if(x(e)||S(e))e=e.toString(),this.$$search=ee(e);else{if(!b(e))throw jr("isrcharg","The first argument of the `$location#search()` call must be a string or an object.");e=z(e,{}),o(e,function(t,i){null==t&&delete e[i]}),this.$$search=e}break;default:w(t)||null===t?delete this.$$search[e]:this.$$search[e]=t}return this.$$compose(),this},hash:Vt("$$hash",function(e){return null!==e?e.toString():""}),replace:function(){return this.$$replace=!0,this}};o([Ht,zt,Nt],function(e){e.prototype=Object.create(Ur),e.prototype.state=function(t){if(!arguments.length)return this.$$state;if(e!==Nt||!this.$$html5)throw jr("nostate","History API state support is available only in HTML5 mode and only in browsers supporting HTML5 History API");return this.$$state=w(t)?null:t,this}});var qr=n("$parse"),Kr=Function.prototype.call,Yr=Function.prototype.apply,Xr=Function.prototype.bind,Zr=me();o("+ - * / % === !== == != < > <= >= && || ! = |".split(" "),function(e){Zr[e]=!0});var Jr={n:"\n",f:"\f",r:"\r",t:"\t",v:"\x0B","'":"'",'"':'"'},Qr=function(e){this.options=e};Qr.prototype={constructor:Qr,lex:function(e){for(this.text=e,this.index=0,this.tokens=[];this.index<this.text.length;){var t=this.text.charAt(this.index);if('"'===t||"'"===t)this.readString(t);else if(this.isNumber(t)||"."===t&&this.isNumber(this.peek()))this.readNumber();else if(this.isIdent(t))this.readIdent();else if(this.is(t,"(){}[].,;:?"))this.tokens.push({index:this.index,text:t}),this.index++;else if(this.isWhitespace(t))this.index++;else{var i=t+this.peek(),n=i+this.peek(2),r=Zr[t],o=Zr[i],s=Zr[n];if(r||o||s){var a=s?n:o?i:t;this.tokens.push({index:this.index,text:a,operator:!0}),this.index+=a.length}else 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){var t=e||1;return this.index+t<this.text.length&&this.text.charAt(this.index+t)},isNumber:function(e){return"0"<=e&&e<="9"&&"string"==typeof e},isWhitespace:function(e){return" "===e||"\r"===e||"\t"===e||"\n"===e||"\x0B"===e||"\xa0"===e},isIdent:function(e){return"a"<=e&&e<="z"||"A"<=e&&e<="Z"||"_"===e||"$"===e},isExpOperator:function(e){return"-"===e||"+"===e||this.isNumber(e)},throwError:function(e,t,i){i=i||this.index;var n=C(t)?"s "+t+"-"+this.index+" ["+this.text.substring(t,i)+"]":" "+i;throw qr("lexerr","Lexer Error: {0} at column{1} in expression [{2}].",e,n,this.text)},readNumber:function(){for(var e="",t=this.index;this.index<this.text.length;){var i=Cn(this.text.charAt(this.index));if("."==i||this.isNumber(i))e+=i;else{var n=this.peek();if("e"==i&&this.isExpOperator(n))e+=i;else if(this.isExpOperator(i)&&n&&this.isNumber(n)&&"e"==e.charAt(e.length-1))e+=i;else{if(!this.isExpOperator(i)||n&&this.isNumber(n)||"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(){for(var e=this.index;this.index<this.text.length;){var t=this.text.charAt(this.index);if(!this.isIdent(t)&&!this.isNumber(t))break;this.index++}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 i="",n=e,r=!1;this.index<this.text.length;){var o=this.text.charAt(this.index);if(n+=o,r){if("u"===o){var s=this.text.substring(this.index+1,this.index+5);s.match(/[\da-f]{4}/i)||this.throwError("Invalid unicode escape [\\u"+s+"]"),this.index+=4,i+=String.fromCharCode(parseInt(s,16))}else{i+=Jr[o]||o}r=!1}else if("\\"===o)r=!0;else{if(o===e)return this.index++,void this.tokens.push({index:t,text:n,constant:!0,value:i});i+=o}this.index++}this.throwError("Unterminated quote",t)}};var eo=function(e,t){this.lexer=e,this.options=t};eo.Program="Program",eo.ExpressionStatement="ExpressionStatement",eo.AssignmentExpression="AssignmentExpression",eo.ConditionalExpression="ConditionalExpression",eo.LogicalExpression="LogicalExpression",eo.BinaryExpression="BinaryExpression",eo.UnaryExpression="UnaryExpression",eo.CallExpression="CallExpression",eo.MemberExpression="MemberExpression",eo.Identifier="Identifier",eo.Literal="Literal",eo.ArrayExpression="ArrayExpression",eo.Property="Property",eo.ObjectExpression="ObjectExpression",eo.ThisExpression="ThisExpression",eo.NGValueParameter="NGValueParameter",eo.prototype={ast:function(e){this.text=e,this.tokens=this.lexer.lex(e);var t=this.program();return 0!==this.tokens.length&&this.throwError("is an unexpected token",this.tokens[0]),t},program:function(){for(var e=[];;)if(this.tokens.length>0&&!this.peek("}",")",";","]")&&e.push(this.expressionStatement()),!this.expect(";"))return{type:eo.Program,body:e}},expressionStatement:function(){return{type:eo.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();return this.expect("=")&&(e={type:eo.AssignmentExpression,left:e,right:this.assignment(),operator:"="}),e},ternary:function(){var e,t,i=this.logicalOR();return this.expect("?")&&(e=this.expression(),this.consume(":"))?(t=this.expression(),{type:eo.ConditionalExpression,test:i,alternate:e,consequent:t}):i},logicalOR:function(){for(var e=this.logicalAND();this.expect("||");)e={type:eo.LogicalExpression,operator:"||",left:e,right:this.logicalAND()};return e},logicalAND:function(){for(var e=this.equality();this.expect("&&");)e={type:eo.LogicalExpression,operator:"&&",left:e,right:this.equality()};return e},equality:function(){for(var e,t=this.relational();e=this.expect("==","!=","===","!==");)t={type:eo.BinaryExpression,operator:e.text,left:t,right:this.relational()};return t},relational:function(){for(var e,t=this.additive();e=this.expect("<",">","<=",">=");)t={type:eo.BinaryExpression,operator:e.text,left:t,right:this.additive()};return t},additive:function(){for(var e,t=this.multiplicative();e=this.expect("+","-");)t={type:eo.BinaryExpression,operator:e.text,left:t,right:this.multiplicative()};return t},multiplicative:function(){for(var e,t=this.unary();e=this.expect("*","/","%");)t={type:eo.BinaryExpression,operator:e.text,left:t,right:this.unary()};return t},unary:function(){var e;return(e=this.expect("+","-","!"))?{type:eo.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.constants.hasOwnProperty(this.peek().text)?e=z(this.constants[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:eo.CallExpression,callee:e,arguments:this.parseArguments()},this.consume(")")):"["===t.text?(e={type:eo.MemberExpression,object:e,property:this.expression(),computed:!0},this.consume("]")):"."===t.text?e={type:eo.MemberExpression,object:e,property:this.identifier(),computed:!1}:this.throwError("IMPOSSIBLE");return e},filter:function(e){for(var t=[e],i={type:eo.CallExpression,callee:this.identifier(),arguments:t,filter:!0};this.expect(":");)t.push(this.expression());return i},parseArguments:function(){var e=[];if(")"!==this.peekToken().text)do{e.push(this.expression())}while(this.expect(","));return e},identifier:function(){var e=this.consume();return e.identifier||this.throwError("is not a valid identifier",e),{type:eo.Identifier,name:e.text}},constant:function(){return{type:eo.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:eo.ArrayExpression,elements:e}},object:function(){var e,t=[];if("}"!==this.peekToken().text)do{if(this.peek("}"))break;e={type:eo.Property,kind:"init"},this.peek().constant?e.key=this.constant():this.peek().identifier?e.key=this.identifier():this.throwError("invalid key",this.peek()),this.consume(":"),e.value=this.expression(),t.push(e)}while(this.expect(","));return this.consume("}"),{type:eo.ObjectExpression,properties:t}},throwError:function(e,t){throw qr("syntax","Syntax Error: Token '{0}' {1} at column {2} of the expression [{3}] starting at [{4}].",t.text,e,t.index+1,this.text,this.text.substring(t.index))},consume:function(e){if(0===this.tokens.length)throw qr("ueoe","Unexpected end of expression: {0}",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 qr("ueoe","Unexpected end of expression: {0}",this.text);return this.tokens[0]},peek:function(e,t,i,n){return this.peekAhead(0,e,t,i,n)},peekAhead:function(e,t,i,n,r){if(this.tokens.length>e){var o=this.tokens[e],s=o.text;if(s===t||s===i||s===n||s===r||!t&&!i&&!n&&!r)return o}return!1},expect:function(e,t,i,n){var r=this.peek(e,t,i,n);return!!r&&(this.tokens.shift(),r)},constants:{"true":{type:eo.Literal,value:!0},"false":{type:eo.Literal,value:!1},"null":{type:eo.Literal,value:null},undefined:{type:eo.Literal,value:i},"this":{type:eo.ThisExpression}}},si.prototype={compile:function(e,t){var n=this,r=this.astBuilder.ast(e);this.state={nextId:0,filters:{},expensiveChecks:t,fn:{vars:[],body:[],own:{}},assign:{vars:[],body:[],own:{}},inputs:[]},ei(r,n.$filter);var s,a="";if(this.stage="assign",s=ni(r)){this.state.computing="assign";var l=this.nextId();this.recurse(s,l),this.return_(l),a="fn.assign="+this.generateFunction("assign","s,v,l")}var c=ti(r.body);n.stage="inputs",o(c,function(e,t){var i="fn"+t;n.state[i]={vars:[],body:[],own:{}},n.state.computing=i;var r=n.nextId();n.recurse(e,r),n.return_(r),n.state.inputs.push(i),e.watchId=t}),this.state.computing="fn",this.stage="main",this.recurse(r);var u='"'+this.USE+" "+this.STRICT+'";\n'+this.filterPrefix()+"var fn="+this.generateFunction("fn","s,l,a,i")+a+this.watchFns()+"return fn;",d=new Function("$filter","ensureSafeMemberName","ensureSafeObject","ensureSafeFunction","getStringValue","ensureSafeAssignContext","ifDefined","plus","text",u)(this.$filter,Ut,Kt,Yt,qt,Xt,Zt,Jt,e);return this.state=this.stage=i,d.literal=ri(r),d.constant=oi(r),d},USE:"use",STRICT:"strict",watchFns:function(){var e=[],t=this.state.inputs,i=this;return o(t,function(t){e.push("var "+t+"="+i.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 o(this.state.filters,function(i,n){e.push(i+"=$filter("+t.escape(n)+")")}),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,s,a){var l,c,u,d,h=this;if(r=r||f,!a&&C(e.watchId))return t=t||this.nextId(),void this.if_("i",this.lazyAssign(t,this.computedMember("i",e.watchId)),this.lazyRecurse(e,t,n,r,s,!0));switch(e.type){case eo.Program:o(e.body,function(t,n){h.recurse(t.expression,i,i,function(e){c=e}),n!==e.body.length-1?h.current().body.push(c,";"):h.return_(c)});break;case eo.Literal:d=this.escape(e.value),this.assign(t,d),r(d);break;case eo.UnaryExpression:this.recurse(e.argument,i,i,function(e){c=e}),d=e.operator+"("+this.ifDefined(c,0)+")",this.assign(t,d),r(d);break;case eo.BinaryExpression:this.recurse(e.left,i,i,function(e){l=e}),this.recurse(e.right,i,i,function(e){c=e}),d="+"===e.operator?this.plus(l,c):"-"===e.operator?this.ifDefined(l,0)+e.operator+this.ifDefined(c,0):"("+l+")"+e.operator+"("+c+")",this.assign(t,d),r(d);break;case eo.LogicalExpression:t=t||this.nextId(),h.recurse(e.left,t),h.if_("&&"===e.operator?t:h.not(t),h.lazyRecurse(e.right,t)),r(t);break;case eo.ConditionalExpression:t=t||this.nextId(),h.recurse(e.test,t),h.if_(t,h.lazyRecurse(e.alternate,t),h.lazyRecurse(e.consequent,t)),r(t);break;case eo.Identifier:t=t||this.nextId(),n&&(n.context="inputs"===h.stage?"s":this.assign(this.nextId(),this.getHasOwnProperty("l",e.name)+"?l:s"),n.computed=!1,n.name=e.name),Ut(e.name),h.if_("inputs"===h.stage||h.not(h.getHasOwnProperty("l",e.name)),function(){h.if_("inputs"===h.stage||"s",function(){s&&1!==s&&h.if_(h.not(h.nonComputedMember("s",e.name)),h.lazyAssign(h.nonComputedMember("s",e.name),"{}")),h.assign(t,h.nonComputedMember("s",e.name))})},t&&h.lazyAssign(t,h.nonComputedMember("l",e.name))),(h.state.expensiveChecks||li(e.name))&&h.addEnsureSafeObject(t),r(t);break;case eo.MemberExpression:l=n&&(n.context=this.nextId())||this.nextId(),t=t||this.nextId(),h.recurse(e.object,l,i,function(){h.if_(h.notNull(l),function(){e.computed?(c=h.nextId(),h.recurse(e.property,c),h.getStringValue(c),h.addEnsureSafeMemberName(c),s&&1!==s&&h.if_(h.not(h.computedMember(l,c)),h.lazyAssign(h.computedMember(l,c),"{}")),d=h.ensureSafeObject(h.computedMember(l,c)),h.assign(t,d),n&&(n.computed=!0,n.name=c)):(Ut(e.property.name),s&&1!==s&&h.if_(h.not(h.nonComputedMember(l,e.property.name)),h.lazyAssign(h.nonComputedMember(l,e.property.name),"{}")),d=h.nonComputedMember(l,e.property.name),(h.state.expensiveChecks||li(e.property.name))&&(d=h.ensureSafeObject(d)),h.assign(t,d),n&&(n.computed=!1,n.name=e.property.name))},function(){h.assign(t,"undefined")}),r(t)},!!s);break;case eo.CallExpression:t=t||this.nextId(),e.filter?(c=h.filter(e.callee.name),u=[],o(e.arguments,function(e){var t=h.nextId();h.recurse(e,t),u.push(t)}),d=c+"("+u.join(",")+")",h.assign(t,d),r(t)):(c=h.nextId(),l={},u=[],h.recurse(e.callee,c,l,function(){h.if_(h.notNull(c),function(){h.addEnsureSafeFunction(c),o(e.arguments,function(e){h.recurse(e,h.nextId(),i,function(e){u.push(h.ensureSafeObject(e))})}),l.name?(h.state.expensiveChecks||h.addEnsureSafeObject(l.context),d=h.member(l.context,l.name,l.computed)+"("+u.join(",")+")"):d=c+"("+u.join(",")+")",d=h.ensureSafeObject(d),h.assign(t,d)},function(){h.assign(t,"undefined")}),r(t)}));break;case eo.AssignmentExpression:if(c=this.nextId(),l={},!ii(e.left))throw qr("lval","Trying to assing a value to a non l-value");this.recurse(e.left,i,l,function(){h.if_(h.notNull(l.context),function(){h.recurse(e.right,c),h.addEnsureSafeObject(h.member(l.context,l.name,l.computed)),h.addEnsureSafeAssignContext(l.context),d=h.member(l.context,l.name,l.computed)+e.operator+c,h.assign(t,d),r(t||d)})},1);break;case eo.ArrayExpression:u=[],o(e.elements,function(e){h.recurse(e,h.nextId(),i,function(e){u.push(e)})}),d="["+u.join(",")+"]",this.assign(t,d),r(d);break;case eo.ObjectExpression:u=[],o(e.properties,function(e){h.recurse(e.value,h.nextId(),i,function(t){u.push(h.escape(e.key.type===eo.Identifier?e.key.name:""+e.key.value)+":"+t)})}),d="{"+u.join(",")+"}",this.assign(t,d),r(d);break;case eo.ThisExpression:this.assign(t,"s"),r("s");break;case eo.NGValueParameter:this.assign(t,"v"),r("v")}},getHasOwnProperty:function(e,t){var i=e+"."+t,n=this.current().own;return n.hasOwnProperty(i)||(n[i]=this.nextId(!1,e+"&&("+this.escape(t)+" in "+e+")")),n[i]},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,i){if(!0===e)t();else{var n=this.current().body
;n.push("if(",e,"){"),t(),n.push("}"),i&&(n.push("else{"),i(),n.push("}"))}},not:function(e){return"!("+e+")"},notNull:function(e){return e+"!=null"},nonComputedMember:function(e,t){return e+"."+t},computedMember:function(e,t){return e+"["+t+"]"},member:function(e,t,i){return i?this.computedMember(e,t):this.nonComputedMember(e,t)},addEnsureSafeObject:function(e){this.current().body.push(this.ensureSafeObject(e),";")},addEnsureSafeMemberName:function(e){this.current().body.push(this.ensureSafeMemberName(e),";")},addEnsureSafeFunction:function(e){this.current().body.push(this.ensureSafeFunction(e),";")},addEnsureSafeAssignContext:function(e){this.current().body.push(this.ensureSafeAssignContext(e),";")},ensureSafeObject:function(e){return"ensureSafeObject("+e+",text)"},ensureSafeMemberName:function(e){return"ensureSafeMemberName("+e+",text)"},ensureSafeFunction:function(e){return"ensureSafeFunction("+e+",text)"},getStringValue:function(e){this.assign(e,"getStringValue("+e+",text)")},ensureSafeAssignContext:function(e){return"ensureSafeAssignContext("+e+",text)"},lazyRecurse:function(e,t,i,n,r,o){var s=this;return function(){s.recurse(e,t,i,n,r,o)}},lazyAssign:function(e,t){var i=this;return function(){i.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(x(e))return"'"+e.replace(this.stringEscapeRegex,this.stringEscapeFn)+"'";if(S(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 qr("esc","IMPOSSIBLE")},nextId:function(e,t){var i="v"+this.state.nextId++;return e||this.current().vars.push(i+(t?"="+t:"")),i},current:function(){return this.state[this.state.computing]}},ai.prototype={compile:function(e,t){var i=this,n=this.astBuilder.ast(e);this.expression=e,this.expensiveChecks=t,ei(n,i.$filter);var r,s;(r=ni(n))&&(s=this.recurse(r));var a,l=ti(n.body);l&&(a=[],o(l,function(e,t){var n=i.recurse(e);e.input=n,a.push(n),e.watchId=t}));var c=[];o(n.body,function(e){c.push(i.recurse(e.expression))});var u=0===n.body.length?function(){}:1===n.body.length?c[0]:function(e,t){var i;return o(c,function(n){i=n(e,t)}),i};return s&&(u.assign=function(e,t,i){return s(e,i,t)}),a&&(u.inputs=a),u.literal=ri(n),u.constant=oi(n),u},recurse:function(e,t,n){var r,s,a,l=this;if(e.input)return this.inputs(e.input,e.watchId);switch(e.type){case eo.Literal:return this.value(e.value,t);case eo.UnaryExpression:return s=this.recurse(e.argument),this["unary"+e.operator](s,t);case eo.BinaryExpression:case eo.LogicalExpression:return r=this.recurse(e.left),s=this.recurse(e.right),this["binary"+e.operator](r,s,t);case eo.ConditionalExpression:return this["ternary?:"](this.recurse(e.test),this.recurse(e.alternate),this.recurse(e.consequent),t);case eo.Identifier:return Ut(e.name,l.expression),l.identifier(e.name,l.expensiveChecks||li(e.name),t,n,l.expression);case eo.MemberExpression:return r=this.recurse(e.object,!1,!!n),e.computed||(Ut(e.property.name,l.expression),s=e.property.name),e.computed&&(s=this.recurse(e.property)),e.computed?this.computedMember(r,s,t,n,l.expression):this.nonComputedMember(r,s,l.expensiveChecks,t,n,l.expression);case eo.CallExpression:return a=[],o(e.arguments,function(e){a.push(l.recurse(e))}),e.filter&&(s=this.$filter(e.callee.name)),e.filter||(s=this.recurse(e.callee,!0)),e.filter?function(e,n,r,o){for(var l=[],c=0;c<a.length;++c)l.push(a[c](e,n,r,o));var u=s.apply(i,l,o);return t?{context:i,name:i,value:u}:u}:function(e,i,n,r){var o,c=s(e,i,n,r);if(null!=c.value){Kt(c.context,l.expression),Yt(c.value,l.expression);for(var u=[],d=0;d<a.length;++d)u.push(Kt(a[d](e,i,n,r),l.expression));o=Kt(c.value.apply(c.context,u),l.expression)}return t?{value:o}:o};case eo.AssignmentExpression:return r=this.recurse(e.left,!0,1),s=this.recurse(e.right),function(e,i,n,o){var a=r(e,i,n,o),c=s(e,i,n,o);return Kt(a.value,l.expression),Xt(a.context),a.context[a.name]=c,t?{value:c}:c};case eo.ArrayExpression:return a=[],o(e.elements,function(e){a.push(l.recurse(e))}),function(e,i,n,r){for(var o=[],s=0;s<a.length;++s)o.push(a[s](e,i,n,r));return t?{value:o}:o};case eo.ObjectExpression:return a=[],o(e.properties,function(e){a.push({key:e.key.type===eo.Identifier?e.key.name:""+e.key.value,value:l.recurse(e.value)})}),function(e,i,n,r){for(var o={},s=0;s<a.length;++s)o[a[s].key]=a[s].value(e,i,n,r);return t?{value:o}:o};case eo.ThisExpression:return function(e){return t?{value:e}:e};case eo.NGValueParameter:return function(e,i,n){return t?{value:n}:n}}},"unary+":function(e,t){return function(i,n,r,o){var s=e(i,n,r,o);return s=C(s)?+s:0,t?{value:s}:s}},"unary-":function(e,t){return function(i,n,r,o){var s=e(i,n,r,o);return s=C(s)?-s:0,t?{value:s}:s}},"unary!":function(e,t){return function(i,n,r,o){var s=!e(i,n,r,o);return t?{value:s}:s}},"binary+":function(e,t,i){return function(n,r,o,s){var a=e(n,r,o,s),l=t(n,r,o,s),c=Jt(a,l);return i?{value:c}:c}},"binary-":function(e,t,i){return function(n,r,o,s){var a=e(n,r,o,s),l=t(n,r,o,s),c=(C(a)?a:0)-(C(l)?l:0);return i?{value:c}:c}},"binary*":function(e,t,i){return function(n,r,o,s){var a=e(n,r,o,s)*t(n,r,o,s);return i?{value:a}:a}},"binary/":function(e,t,i){return function(n,r,o,s){var a=e(n,r,o,s)/t(n,r,o,s);return i?{value:a}:a}},"binary%":function(e,t,i){return function(n,r,o,s){var a=e(n,r,o,s)%t(n,r,o,s);return i?{value:a}:a}},"binary===":function(e,t,i){return function(n,r,o,s){var a=e(n,r,o,s)===t(n,r,o,s);return i?{value:a}:a}},"binary!==":function(e,t,i){return function(n,r,o,s){var a=e(n,r,o,s)!==t(n,r,o,s);return i?{value:a}:a}},"binary==":function(e,t,i){return function(n,r,o,s){var a=e(n,r,o,s)==t(n,r,o,s);return i?{value:a}:a}},"binary!=":function(e,t,i){return function(n,r,o,s){var a=e(n,r,o,s)!=t(n,r,o,s);return i?{value:a}:a}},"binary<":function(e,t,i){return function(n,r,o,s){var a=e(n,r,o,s)<t(n,r,o,s);return i?{value:a}:a}},"binary>":function(e,t,i){return function(n,r,o,s){var a=e(n,r,o,s)>t(n,r,o,s);return i?{value:a}:a}},"binary<=":function(e,t,i){return function(n,r,o,s){var a=e(n,r,o,s)<=t(n,r,o,s);return i?{value:a}:a}},"binary>=":function(e,t,i){return function(n,r,o,s){var a=e(n,r,o,s)>=t(n,r,o,s);return i?{value:a}:a}},"binary&&":function(e,t,i){return function(n,r,o,s){var a=e(n,r,o,s)&&t(n,r,o,s);return i?{value:a}:a}},"binary||":function(e,t,i){return function(n,r,o,s){var a=e(n,r,o,s)||t(n,r,o,s);return i?{value:a}:a}},"ternary?:":function(e,t,i,n){return function(r,o,s,a){var l=e(r,o,s,a)?t(r,o,s,a):i(r,o,s,a);return n?{value:l}:l}},value:function(e,t){return function(){return t?{context:i,name:i,value:e}:e}},identifier:function(e,t,n,r,o){return function(s,a){var l=a&&e in a?a:s;r&&1!==r&&l&&!l[e]&&(l[e]={});var c=l?l[e]:i;return t&&Kt(c,o),n?{context:l,name:e,value:c}:c}},computedMember:function(e,t,i,n,r){return function(o,s,a,l){var c,u,d=e(o,s,a,l);return null!=d&&(c=t(o,s,a,l),c=qt(c),Ut(c,r),n&&1!==n&&d&&!d[c]&&(d[c]={}),u=d[c],Kt(u,r)),i?{context:d,name:c,value:u}:u}},nonComputedMember:function(e,t,n,r,o,s){return function(a,l,c,u){var d=e(a,l,c,u);o&&1!==o&&d&&!d[t]&&(d[t]={});var h=null!=d?d[t]:i;return(n||li(t))&&Kt(h,s),r?{context:d,name:t,value:h}:h}},inputs:function(e,t){return function(i,n,r,o){return o?o[t]:e(i,n,r)}}};var to=function(e,t,i){this.lexer=e,this.$filter=t,this.options=i,this.ast=new eo(this.lexer),this.astCompiler=i.csp?new ai(this.ast,t):new si(this.ast,t)};to.prototype={constructor:to,parse:function(e){return this.astCompiler.compile(e,this.options.expensiveChecks)}};var io=(me(),me(),Object.prototype.valueOf),no=n("$sce"),ro={HTML:"html",CSS:"css",URL:"url",RESOURCE_URL:"resourceUrl",JS:"js"},Tr=n("$compile"),oo=t.createElement("a"),so=Ei(e.location.href);ki.$inject=["$document"],Ti.$inject=["$provide"],Bi.$inject=["$locale"],Pi.$inject=["$locale"];var ao=".",lo={yyyy:Ni("FullYear",4),yy:Ni("FullYear",2,0,!0),y:Ni("FullYear",1),MMMM:zi("Month"),MMM:zi("Month",!0),MM:Ni("Month",2,1),M:Ni("Month",1,1),dd:Ni("Date",2),d:Ni("Date",1),HH:Ni("Hours",2),H:Ni("Hours",1),hh:Ni("Hours",2,-12),h:Ni("Hours",1,-12),mm:Ni("Minutes",2),m:Ni("Minutes",1),ss:Ni("Seconds",2),s:Ni("Seconds",1),sss:Ni("Milliseconds",3),EEEE:zi("Day"),EEE:zi("Day",!0),a:ji,Z:Hi,ww:Wi(2),w:Wi(1),G:Ui,GG:Ui,GGG:Ui,GGGG:qi},co=/((?:[^yMdHhmsaZEwG']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|d+|H+|h+|m+|s+|a|Z|G+|w+))(.*)/,uo=/^\-?\d+$/;Ki.$inject=["$locale"];var ho=v(Cn),po=v(An);Zi.$inject=["$parse"];var go=v({restrict:"E",compile:function(e,t){if(!t.href&&!t.xlinkHref)return function(e,t){if("a"===t[0].nodeName.toLowerCase()){var i="[object SVGAnimatedString]"===Ln.call(t.prop("href"))?"xlink:href":"href";t.on("click",function(e){t.attr(i)||e.preventDefault()})}}}}),fo={};o(gr,function(e,t){function i(e,i,r){e.$watch(r[n],function(e){r.$set(t,!!e)})}if("multiple"!=e){var n=ct("ng-"+t),r=i;"checked"===e&&(r=function(e,t,r){r.ngModel!==r[n]&&i(e,t,r)}),fo[n]=function(){return{restrict:"A",priority:100,link:r}}}}),o(mr,function(e,t){fo[t]=function(){return{priority:100,link:function(e,i,n){if("ngPattern"===t&&"/"==n.ngPattern.charAt(0)){var r=n.ngPattern.match(yn);if(r)return void n.$set("ngPattern",new RegExp(r[1],r[2]))}e.$watch(n[t],function(e){n.$set(t,e)})}}}}),o(["src","srcset","href"],function(e){var t=ct("ng-"+e);fo[t]=function(){return{priority:99,link:function(i,n,r){var o=e,s=e;"href"===e&&"[object SVGAnimatedString]"===Ln.call(n.prop("href"))&&(s="xlinkHref",r.$attr[s]="xlink:href",o=null),r.$observe(t,function(t){if(!t)return void("href"===e&&r.$set(s,null));r.$set(s,t),En&&o&&n.prop(o,r[s])})}}}});var mo={$addControl:f,$$renameControl:Qi,$removeControl:f,$setValidity:f,$setDirty:f,$setPristine:f,$setSubmitted:f},vo="ng-submitted";en.$inject=["$element","$attrs","$scope","$animate","$interpolate"];var yo=function(e){return["$timeout","$parse",function(t,n){function r(e){return""===e?n('this[""]').assign:n(e).assign||f}return{name:"form",restrict:e?"EAC":"E",require:["form","^^?form"],controller:en,compile:function(n,o){n.addClass(Jo).addClass(Xo);var s=o.name?"name":!(!e||!o.ngForm)&&"ngForm";return{pre:function(e,n,o,a){var l=a[0];if(!("action"in o)){var c=function(t){e.$apply(function(){l.$commitViewValue(),l.$setSubmitted()}),t.preventDefault()};ir(n[0],"submit",c),n.on("$destroy",function(){t(function(){nr(n[0],"submit",c)},0,!1)})}(a[1]||l.$$parentForm).$addControl(l);var u=s?r(l.$name):f;s&&(u(e,l),o.$observe(s,function(t){l.$name!==t&&(u(e,i),l.$$parentForm.$$renameControl(l,t),(u=r(l.$name))(e,l))})),n.on("$destroy",function(){l.$$parentForm.$removeControl(l),u(e,i),d(l,mo)})}}}}}]},wo=yo(),Co=yo(!0),bo=/\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z)/,Ao=/^(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?$/,xo=/^[a-z0-9!#$%&'*+\/=?^_`{|}~.-]+@[a-z0-9]([a-z0-9-]*[a-z0-9])?(\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*$/i,So=/^\s*(\-|\+)?(\d+|(\d*(\.\d*)))([eE][+-]?\d+)?\s*$/,Eo=/^(\d{4})-(\d{2})-(\d{2})$/,$o=/^(\d{4})-(\d\d)-(\d\d)T(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/,Fo=/^(\d{4})-W(\d\d)$/,ko=/^(\d{4})-(\d\d)$/,Do=/^(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/,To={text:nn,date:an("date",Eo,sn(Eo,["yyyy","MM","dd"]),"yyyy-MM-dd"),"datetime-local":an("datetimelocal",$o,sn($o,["yyyy","MM","dd","HH","mm","ss","sss"]),"yyyy-MM-ddTHH:mm:ss.sss"),time:an("time",Do,sn(Do,["HH","mm","ss","sss"]),"HH:mm:ss.sss"),week:an("week",Fo,on,"yyyy-Www"),month:an("month",ko,sn(ko,["yyyy","MM"]),"yyyy-MM"),number:cn,url:un,email:dn,radio:hn,checkbox:gn,hidden:f,button:f,submit:f,reset:f,file:f},Mo=["$browser","$sniffer","$filter","$parse",function(e,t,i,n){return{restrict:"E",require:["?ngModel"],link:{pre:function(r,o,s,a){a[0]&&(To[Cn(s.type)]||To.text)(r,o,s,a[0],t,e,i,n)}}}}],Lo=/^(true|false|\d+)$/,Ro=function(){return{restrict:"A",priority:100,compile:function(e,t){return Lo.test(t.ngValue)?function(e,t,i){i.$set("value",e.$eval(i.ngValue))}:function(e,t,i){e.$watch(i.ngValue,function(e){i.$set("value",e)})}}}},_o=["$compile",function(e){return{restrict:"AC",compile:function(t){return e.$$addBindingClass(t),function(t,i,n){e.$$addBindingInfo(i,n.ngBind),i=i[0],t.$watch(n.ngBind,function(e){i.textContent=w(e)?"":e})}}}}],Bo=["$interpolate","$compile",function(e,t){return{compile:function(i){return t.$$addBindingClass(i),function(i,n,r){var o=e(n.attr(r.$attr.ngBindTemplate));t.$$addBindingInfo(n,o.expressions),n=n[0],r.$observe("ngBindTemplate",function(e){n.textContent=w(e)?"":e})}}}}],Po=["$sce","$parse","$compile",function(e,t,i){return{restrict:"A",compile:function(n,r){var o=t(r.ngBindHtml),s=t(r.ngBindHtml,function(e){return(e||"").toString()});return i.$$addBindingClass(n),function(t,n,r){i.$$addBindingInfo(n,r.ngBindHtml),t.$watch(s,function(){n.html(e.getTrustedHtml(o(t))||"")})}}}}],Oo=v({restrict:"A",require:"ngModel",link:function(e,t,i,n){n.$viewChangeListeners.push(function(){e.$eval(i.ngChange)})}}),Io=fn("",!0),No=fn("Odd",0),zo=fn("Even",1),Ho=Ji({compile:function(e,t){t.$set("ngCloak",i),e.removeClass("ng-cloak")}}),Go=[function(){return{restrict:"A",scope:!0,controller:"@",priority:500}}],Vo={},Wo={blur:!0,focus:!0};o("click dblclick mousedown mouseup mouseover mouseout mousemove mouseenter mouseleave keydown keyup keypress submit focus blur copy cut paste".split(" "),function(e){var t=ct("ng-"+e);Vo[t]=["$parse","$rootScope",function(i,n){return{restrict:"A",compile:function(r,o){var s=i(o[t],null,!0);return function(t,i){i.on(e,function(i){var r=function(){s(t,{$event:i})};Wo[e]&&n.$$phase?t.$evalAsync(r):t.$apply(r)})}}}}]});var jo=["$animate",function(e){return{multiElement:!0,transclude:"element",priority:600,terminal:!0,restrict:"A",$$tlb:!0,link:function(i,n,r,o,s){var a,l,c;i.$watch(r.ngIf,function(i){i?l||s(function(i,o){l=o,i[i.length++]=t.createComment(" end ngIf: "+r.ngIf+" "),a={clone:i},e.enter(i,n.parent(),n)}):(c&&(c.remove(),c=null),l&&(l.$destroy(),l=null),a&&(c=fe(a.clone),e.leave(c).then(function(){c=null}),a=null))})}}}],Uo=["$templateRequest","$anchorScroll","$animate",function(e,t,i){return{restrict:"ECA",priority:400,terminal:!0,transclude:"element",controller:Bn.noop,compile:function(n,r){var o=r.ngInclude||r.src,s=r.onload||"",a=r.autoscroll;return function(n,r,l,c,u){var d,h,p,g=0,f=function(){h&&(h.remove(),h=null),d&&(d.$destroy(),d=null),p&&(i.leave(p).then(function(){h=null}),h=p,p=null)};n.$watch(o,function(o){var l=function(){!C(a)||a&&!n.$eval(a)||t()},h=++g;o?(e(o,!0).then(function(e){if(h===g){var t=n.$new();c.template=e;var a=u(t,function(e){f(),i.enter(e,null,r).then(l)});d=t,p=a,d.$emit("$includeContentLoaded",o),n.$eval(s)}},function(){h===g&&(f(),n.$emit("$includeContentError",o))}),n.$emit("$includeContentRequested",o)):(f(),c.template=null)})}}}}],qo=["$compile",function(e){return{restrict:"ECA",priority:-400,require:"ngInclude",link:function(i,n,r,o){if(/SVG/.test(n[0].toString()))return n.empty(),void e($e(o.template,t).childNodes)(i,function(e){n.append(e)},{futureParentElement:n});n.html(o.template),e(n.contents())(i)}}}],Ko=Ji({priority:450,compile:function(){return{pre:function(e,t,i){e.$eval(i.ngInit)}}}}),Yo=function(){return{restrict:"A",priority:100,require:"ngModel",link:function(e,t,n,r){var s=t.attr(n.$attr.ngList)||", ",a="false"!==n.ngTrim,l=a?zn(s):s,c=function(e){if(!w(e)){var t=[];return e&&o(e.split(l),function(e){e&&t.push(a?zn(e):e)}),t}};r.$parsers.push(c),r.$formatters.push(function(e){return In(e)?e.join(s):i}),r.$isEmpty=function(e){return!e||!e.length}}}},Xo="ng-valid",Zo="ng-invalid",Jo="ng-pristine",Qo="ng-dirty",es="ng-untouched",ts="ng-touched",is="ng-pending",ns=n("ngModel"),rs=["$scope","$exceptionHandler","$attrs","$element","$parse","$animate","$timeout","$rootScope","$q","$interpolate",function(e,t,n,r,s,a,l,c,u,d){this.$viewValue=Number.NaN,this.$modelValue=Number.NaN,this.$$rawModelValue=i,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=i,this.$name=d(n.name||"",!1)(e),this.$$parentForm=mo;var h,p=s(n.ngModel),g=p.assign,m=p,v=g,y=null,b=this;this.$$setOptions=function(e){if(b.$options=e,e&&e.getterSetter){var t=s(n.ngModel+"()"),i=s(n.ngModel+"($$$p)");m=function(e){var i=p(e);return $(i)&&(i=t(e)),i},v=function(e){$(p(e))?i(e,{$$$p:b.$modelValue}):g(e,b.$modelValue)}}else if(!p.assign)throw ns("nonassign","Expression '{0}' is non-assignable. Element: {1}",n.ngModel,J(r))},this.$render=f,this.$isEmpty=function(e){return w(e)||""===e||null===e||e!==e};var A=0;mn({ctrl:this,$element:r,set:function(e,t){e[t]=!0},unset:function(e,t){delete e[t]},$animate:a}),this.$setPristine=function(){b.$dirty=!1,b.$pristine=!0,a.removeClass(r,Qo),a.addClass(r,Jo)},this.$setDirty=function(){b.$dirty=!0,b.$pristine=!1,a.removeClass(r,Jo),a.addClass(r,Qo),b.$$parentForm.$setDirty()},this.$setUntouched=function(){b.$touched=!1,b.$untouched=!0,a.setClass(r,es,ts)},this.$setTouched=function(){b.$touched=!0,b.$untouched=!1,a.setClass(r,ts,es)},this.$rollbackViewValue=function(){l.cancel(y),b.$viewValue=b.$$lastCommittedViewValue,b.$render()},this.$validate=function(){if(!S(b.$modelValue)||!isNaN(b.$modelValue)){var e=b.$$lastCommittedViewValue,t=b.$$rawModelValue,n=b.$valid,r=b.$modelValue,o=b.$options&&b.$options.allowInvalid;b.$$runValidators(t,e,function(e){o||n===e||(b.$modelValue=e?t:i,b.$modelValue!==r&&b.$$writeModelToScope())})}},this.$$runValidators=function(e,t,n){function r(){var e=b.$$parserName||"parse";return w(h)?(l(e,null),!0):(h||(o(b.$validators,function(e,t){l(t,null)}),o(b.$asyncValidators,function(e,t){l(t,null)})),l(e,h),h)}function s(){var i=!0;return o(b.$validators,function(n,r){var o=n(e,t);i=i&&o,l(r,o)}),!!i||(o(b.$asyncValidators,function(e,t){l(t,null)}),!1)}function a(){var n=[],r=!0;o(b.$asyncValidators,function(o,s){var a=o(e,t);if(!_(a))throw ns("$asyncValidators","Expected asynchronous validator to return a promise but got '{0}' instead.",a);l(s,i),n.push(a.then(function(){l(s,!0)},function(){r=!1,l(s,!1)}))}),n.length?u.all(n).then(function(){c(r)},f):c(!0)}function l(e,t){d===A&&b.$setValidity(e,t)}function c(e){d===A&&n(e)}A++;var d=A;return r()&&s()?void a():void c(!1)},this.$commitViewValue=function(){var e=b.$viewValue;l.cancel(y),(b.$$lastCommittedViewValue!==e||""===e&&b.$$hasNativeValidators)&&(b.$$lastCommittedViewValue=e,b.$pristine&&this.$setDirty(),this.$$parseAndValidate())},this.$$parseAndValidate=function(){function t(){b.$modelValue!==s&&b.$$writeModelToScope()}var n=b.$$lastCommittedViewValue,r=n;if(h=!w(r)||i)for(var o=0;o<b.$parsers.length;o++)if(r=b.$parsers[o](r),w(r)){h=!1;break}S(b.$modelValue)&&isNaN(b.$modelValue)&&(b.$modelValue=m(e));var s=b.$modelValue,a=b.$options&&b.$options.allowInvalid;b.$$rawModelValue=r,a&&(b.$modelValue=r,t()),b.$$runValidators(r,b.$$lastCommittedViewValue,function(e){a||(b.$modelValue=e?r:i,t())})},this.$$writeModelToScope=function(){v(e,b.$modelValue),o(b.$viewChangeListeners,function(e){try{e()}catch(e){t(e)}})},this.$setViewValue=function(e,t){b.$viewValue=e,b.$options&&!b.$options.updateOnDefault||b.$$debounceViewValueCommit(t)},this.$$debounceViewValueCommit=function(t){var i,n=0,r=b.$options;r&&C(r.debounce)&&(i=r.debounce,S(i)?n=i:S(i[t])?n=i[t]:S(i["default"])&&(n=i["default"])),l.cancel(y),n?y=l(function(){b.$commitViewValue()},n):c.$$phase?b.$commitViewValue():e.$apply(function(){b.$commitViewValue()})},e.$watch(function(){var t=m(e);if(t!==b.$modelValue&&(b.$modelValue===b.$modelValue||t===t)){b.$modelValue=b.$$rawModelValue=t,h=i;for(var n=b.$formatters,r=n.length,o=t;r--;)o=n[r](o);b.$viewValue!==o&&(b.$viewValue=b.$$lastCommittedViewValue=o,b.$render(),b.$$runValidators(t,o,f))}return t})}],os=["$rootScope",function(e){return{restrict:"A",require:["ngModel","^?form","^?ngModelOptions"],controller:rs,priority:1,compile:function(t){return t.addClass(Jo).addClass(es).addClass(Xo),{pre:function(e,t,i,n){var r=n[0],o=n[1]||r.$$parentForm;r.$$setOptions(n[2]&&n[2].$options),o.$addControl(r),i.$observe("name",function(e){r.$name!==e&&r.$$parentForm.$$renameControl(r,e)}),e.$on("$destroy",function(){r.$$parentForm.$removeControl(r)})},post:function(t,i,n,r){var o=r[0];o.$options&&o.$options.updateOn&&i.on(o.$options.updateOn,function(e){o.$$debounceViewValueCommit(e&&e.type)}),i.on("blur",function(){o.$touched||(e.$$phase?t.$evalAsync(o.$setTouched):t.$apply(o.$setTouched))})}}}}}],ss=/(\s+|^)default(\s+|$)/,as=function(){return{restrict:"A",controller:["$scope","$attrs",function(e,t){var i=this;this.$options=z(e.$eval(t.ngModelOptions)),C(this.$options.updateOn)?(this.$options.updateOnDefault=!1,this.$options.updateOn=zn(this.$options.updateOn.replace(ss,function(){return i.$options.updateOnDefault=!0," "}))):this.$options.updateOnDefault=!0}]}},ls=Ji({terminal:!0,priority:1e3}),cs=n("ngOptions"),us=/^\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]+?))?$/,ds=["$compile","$parse",function(e,i){function n(e,t,n){function o(e,t,i,n,r){this.selectValue=e,this.viewValue=t,this.label=i,this.group=n,this.disabled=r}function s(e){var t;if(!c&&r(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(us);if(!a)throw cs("iexp","Expected expression in form of '_select_ (as _label_)? for (_key_,)?_value_ in _collection_' but got '{0}'. Element: {1}",e,J(t));var l=a[5]||a[7],c=a[6],u=/ as /.test(a[0])&&a[1],d=a[9],h=i(a[2]?a[1]:l),p=u&&i(u),g=p||h,f=d&&i(d),m=d?function(e,t){return f(n,t)}:function(e){return Ke(e)},v=function(e,t){return m(e,x(e,t))},y=i(a[2]||a[1]),w=i(a[3]||""),C=i(a[4]||""),b=i(a[8]),A={},x=c?function(e,t){return A[c]=t,A[l]=e,A}:function(e){return A[l]=e,A};return{trackBy:d,getTrackByValue:v,getWatchables:i(b,function(e){var t=[];e=e||[];for(var i=s(e),r=i.length,o=0;o<r;o++){var l=e===i?o:i[o],c=(e[l],x(e[l],l)),u=m(e[l],c);if(t.push(u),a[2]||a[1]){var d=y(n,c);t.push(d)}if(a[4]){var h=C(n,c);t.push(h)}}return t}),getOptions:function(){for(var e=[],t={},i=b(n)||[],r=s(i),a=r.length,l=0;l<a;l++){var c=i===r?l:r[l],u=i[c],h=x(u,c),p=g(n,h),f=m(p,h),A=y(n,h),S=w(n,h),E=C(n,h),$=new o(f,p,A,S,E);e.push($),t[f]=$}return{items:e,selectValueMap:t,getOptionFromViewValue:function(e){return t[v(e)]},getViewValueFromOption:function(e){return d?Bn.copy(e.viewValue):e.viewValue}}}}}var s=t.createElement("option"),a=t.createElement("optgroup");return{restrict:"A",terminal:!0,require:["select","?ngModel"],link:function(t,i,r,l){function c(e,t){e.element=t,t.disabled=e.disabled,e.label!==t.label&&(t.label=e.label,t.textContent=e.label),e.value!==t.value&&(t.value=e.selectValue)}function u(e,t,i,n){var r;return t&&Cn(t.nodeName)===i?r=t:(r=n.cloneNode(!1),t?e.insertBefore(r,t):e.appendChild(r)),r}function d(e){for(var t;e;)t=e.nextSibling,Ge(e),e=t}function h(e){var t=f&&f[0],i=A&&A[0];if(t||i)for(;e&&(e===t||e===i||t&&t.nodeType===Xn);)e=e.nextSibling;return e}function p(){var e=x&&m.readValue();x=S.getOptions();var t={},n=i[0].firstChild;if(b&&i.prepend(f),n=h(n),x.items.forEach(function(e){var r,o,l;e.group?(r=t[e.group],r||(o=u(i[0],n,"optgroup",a),n=o.nextSibling,o.label=e.group,r=t[e.group]={groupElement:o,currentOptionElement:o.firstChild}),l=u(r.groupElement,r.currentOptionElement,"option",s),c(e,l),r.currentOptionElement=l.nextSibling):(l=u(i[0],n,"option",s),c(e,l),n=l.nextSibling)}),Object.keys(t).forEach(function(e){d(t[e].currentOptionElement)}),d(n),g.$render(),!g.$isEmpty(e)){var r=m.readValue();(S.trackBy?G(e,r):e===r)||(g.$setViewValue(r),g.$render())}}var g=l[1];if(g){for(var f,m=l[0],v=r.multiple,y=0,w=i.children(),C=w.length;y<C;y++)if(""===w[y].value){f=w.eq(y);break}var b=!!f,A=$n(s.cloneNode(!1));A.val("?");var x,S=n(r.ngOptions,i,t),E=function(){b||i.prepend(f),i.val(""),f.prop("selected",!0),f.attr("selected",!0)},$=function(){b||f.remove()},F=function(){i.prepend(A),i.val("?"),A.prop("selected",!0),A.attr("selected",!0)},k=function(){A.remove()};v?(g.$isEmpty=function(e){return!e||0===e.length},m.writeValue=function(e){x.items.forEach(function(e){e.element.selected=!1}),e&&e.forEach(function(e){var t=x.getOptionFromViewValue(e);t&&!t.disabled&&(t.element.selected=!0)})},m.readValue=function(){var e=i.val()||[],t=[];return o(e,function(e){var i=x.selectValueMap[e];i&&!i.disabled&&t.push(x.getViewValueFromOption(i))}),t},S.trackBy&&t.$watchCollection(function(){if(In(g.$viewValue))return g.$viewValue.map(function(e){return S.getTrackByValue(e)})},function(){g.$render()})):(m.writeValue=function(e){var t=x.getOptionFromViewValue(e);t&&!t.disabled?i[0].value!==t.selectValue&&(k(),$(),i[0].value=t.selectValue,t.element.selected=!0,t.element.setAttribute("selected","selected")):null===e||b?(k(),E()):($(),F())},m.readValue=function(){var e=x.selectValueMap[i.val()];return e&&!e.disabled?($(),k(),x.getViewValueFromOption(e)):null},S.trackBy&&t.$watch(function(){return S.getTrackByValue(g.$viewValue)},function(){g.$render()})),b?(f.remove(),e(f)(t),f.removeClass("ng-scope")):f=$n(s.cloneNode(!1)),p(),t.$watchCollection(S.getWatchables,p)}}}}],hs=["$locale","$interpolate","$log",function(e,t,i){var n=/{}/g,r=/^when(Minus)?(.+)$/;return{link:function(s,a,l){function c(e){a.text(e||"")}var u,d=l.count,h=l.$attr.when&&a.attr(l.$attr.when),p=l.offset||0,g=s.$eval(h)||{},m={},v=t.startSymbol(),y=t.endSymbol(),C=v+d+"-"+p+y,b=Bn.noop;o(l,function(e,t){var i=r.exec(t);if(i){var n=(i[1]?"-":"")+Cn(i[2]);g[n]=a.attr(l.$attr[t])}}),o(g,function(e,i){m[i]=t(e.replace(n,C))}),s.$watch(d,function(t){var n=parseFloat(t),r=isNaN(n);if(r||n in g||(n=e.pluralCat(n-p)),n!==u&&!(r&&S(u)&&isNaN(u))){b();var o=m[n];w(o)?(null!=t&&i.debug("ngPluralize: no rule defined for '"+n+"' in "+h),b=f,c()):b=s.$watch(o,c),u=n}})}}}],ps=["$parse","$animate",function(e,s){var a="$$NG_REMOVED",l=n("ngRepeat"),c=function(e,t,i,n,r,o,s){e[i]=n,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))},u=function(e){return e.clone[0]},d=function(e){return e.clone[e.clone.length-1]};return{restrict:"A",multiElement:!0,transclude:"element",priority:1e3,terminal:!0,$$tlb:!0,compile:function(n,h){var p=h.ngRepeat,g=t.createComment(" end ngRepeat: "+p+" "),f=p.match(/^\s*([\s\S]+?)\s+in\s+([\s\S]+?)(?:\s+as\s+([\s\S]+?))?(?:\s+track\s+by\s+([\s\S]+?))?\s*$/);if(!f)throw l("iexp","Expected expression in form of '_item_ in _collection_[ track by _id_]' but got '{0}'.",p);var m=f[1],v=f[2],y=f[3],w=f[4];if(!(f=m.match(/^(?:(\s*[\$\w]+)|\(\s*([\$\w]+)\s*,\s*([\$\w]+)\s*\))$/)))throw l("iidexp","'_item_' in '_item_ in _collection_' should be an identifier or '(_key_, _value_)' expression, but got '{0}'.",m);var C=f[3]||f[1],b=f[2];if(y&&(!/^[$a-zA-Z_][$a-zA-Z0-9_]*$/.test(y)||/^(null|undefined|this|\$index|\$first|\$middle|\$last|\$even|\$odd|\$parent|\$root|\$id)$/.test(y)))throw l("badident","alias '{0}' is invalid --- must be a valid JS identifier which is not a reserved name.",y);var A,x,S,E,$={$id:Ke};return w?A=e(w):(S=function(e,t){return Ke(t)},E=function(e){return e}),function(e,t,n,h,f){A&&(x=function(t,i,n){return b&&($[b]=t),$[C]=i,$.$index=n,A(e,$)});var m=me();e.$watchCollection(v,function(n){var h,v,w,A,$,F,k,D,T,M,L,R,_=t[0],B=me();if(y&&(e[y]=n),r(n))T=n,D=x||S;else{D=x||E,T=[];for(var P in n)bn.call(n,P)&&"$"!==P.charAt(0)&&T.push(P)}for(A=T.length,L=new Array(A),h=0;h<A;h++)if($=n===T?h:T[h],F=n[$],k=D($,F,h),m[k])M=m[k],delete m[k],B[k]=M,L[h]=M;else{if(B[k])throw o(L,function(e){e&&e.scope&&(m[e.id]=e)}),l("dupes","Duplicates in a repeater are not allowed. Use 'track by' expression to specify unique keys. Repeater: {0}, Duplicate key: {1}, Duplicate value: {2}",p,k,F);L[h]={id:k,scope:i,clone:i},B[k]=!0}for(var O in m){if(M=m[O],R=fe(M.clone),s.leave(R),R[0].parentNode)for(h=0,v=R.length;h<v;h++)R[h][a]=!0;M.scope.$destroy()}for(h=0;h<A;h++)if($=n===T?h:T[h],F=n[$],M=L[h],M.scope){w=_;do{w=w.nextSibling}while(w&&w[a]);u(M)!=w&&s.move(fe(M.clone),null,$n(_)),_=d(M),c(M.scope,h,C,F,b,$,A)}else f(function(e,t){M.scope=t;var i=g.cloneNode(!1);e[e.length++]=i,s.enter(e,null,$n(_)),_=i,M.clone=e,B[M.id]=M,c(M.scope,h,C,F,b,$,A)});m=B})}}}}],gs="ng-hide",fs="ng-hide-animate",ms=["$animate",function(e){return{restrict:"A",multiElement:!0,link:function(t,i,n){t.$watch(n.ngShow,function(t){e[t?"removeClass":"addClass"](i,gs,{tempClasses:fs})})}}}],vs=["$animate",function(e){return{restrict:"A",multiElement:!0,link:function(t,i,n){t.$watch(n.ngHide,function(t){e[t?"addClass":"removeClass"](i,gs,{tempClasses:fs})})}}}],ys=Ji(function(e,t,i){e.$watch(i.ngStyle,function(e,i){i&&e!==i&&o(i,function(e,i){t.css(i,"")}),e&&t.css(e)},!0)}),ws=["$animate",function(e){return{require:"ngSwitch",controller:["$scope",function(){this.cases={}}],link:function(i,n,r,s){var a=r.ngSwitch||r.on,l=[],c=[],u=[],d=[],h=function(e,t){return function(){e.splice(t,1)}};i.$watch(a,function(i){var n,r;for(n=0,r=u.length;n<r;++n)e.cancel(u[n]);for(u.length=0,n=0,r=d.length;n<r;++n){var a=fe(c[n].clone);d[n].$destroy();(u[n]=e.leave(a)).then(h(u,n))}c.length=0,d.length=0,(l=s.cases["!"+i]||s.cases["?"])&&o(l,function(i){i.transclude(function(n,r){d.push(r);var o=i.element;n[n.length++]=t.createComment(" end ngSwitchWhen: ");var s={clone:n};c.push(s),e.enter(n,o.parent(),o)})})})}}}],Cs=Ji({transclude:"element",priority:1200,require:"^ngSwitch",multiElement:!0,link:function(e,t,i,n,r){n.cases["!"+i.ngSwitchWhen]=n.cases["!"+i.ngSwitchWhen]||[],n.cases["!"+i.ngSwitchWhen].push({transclude:r,element:t})}}),bs=Ji({transclude:"element",priority:1200,require:"^ngSwitch",multiElement:!0,link:function(e,t,i,n,r){n.cases["?"]=n.cases["?"]||[],n.cases["?"].push({transclude:r,element:t})}}),As=Ji({restrict:"EAC",link:function(e,t,i,r,o){if(!o)throw n("ngTransclude")("orphan","Illegal use of ngTransclude directive in the template! No parent directive that requires a transclusion found. Element: {0}",J(t));o(function(e){t.empty(),t.append(e)})}}),xs=["$templateCache",function(e){return{restrict:"E",terminal:!0,compile:function(t,i){if("text/ng-template"==i.type){var n=i.id,r=t[0].text;e.put(n,r)}}}}],Ss={$setViewValue:f,$render:f},Es=["$element","$scope","$attrs",function(e,n){var r=this,o=new Ye;r.ngModelCtrl=Ss,r.unknownOption=$n(t.createElement("option")),r.renderUnknownOption=function(t){var i="? "+Ke(t)+" ?";r.unknownOption.val(i),e.prepend(r.unknownOption),e.val(i)},n.$on("$destroy",function(){r.renderUnknownOption=f}),r.removeUnknownOption=function(){r.unknownOption.parent()&&r.unknownOption.remove()},r.readValue=function(){return r.removeUnknownOption(),e.val()},r.writeValue=function(t){r.hasOption(t)?(r.removeUnknownOption(),e.val(t),""===t&&r.emptyOption.prop("selected",!0)):null==t&&r.emptyOption?(r.removeUnknownOption(),e.val("")):r.renderUnknownOption(t)},r.addOption=function(e,t){pe(e,'"option value"'),""===e&&(r.emptyOption=t);var i=o.get(e)||0;o.put(e,i+1)},r.removeOption=function(e){var t=o.get(e);t&&(1===t?(o.remove(e),""===e&&(r.emptyOption=i)):o.put(e,t-1))},r.hasOption=function(e){return!!o.get(e)}}],$s=function(){return{restrict:"E",require:["select","?ngModel"],controller:Es,link:function(e,t,i,n){var r=n[1];if(r){var s=n[0];if(s.ngModelCtrl=r,r.$render=function(){s.writeValue(r.$viewValue)},t.on("change",function(){e.$apply(function(){r.$setViewValue(s.readValue())})}),i.multiple){s.readValue=function(){var e=[];return o(t.find("option"),function(t){t.selected&&e.push(t.value)}),e},s.writeValue=function(e){var i=new Ye(e);o(t.find("option"),function(e){e.selected=C(i.get(e.value))})};var a,l=NaN;e.$watch(function(){l!==r.$viewValue||G(a,r.$viewValue)||(a=H(r.$viewValue),r.$render()),l=r.$viewValue}),r.$isEmpty=function(e){return!e||0===e.length}}}}}},Fs=["$interpolate",function(e){function t(e){e[0].hasAttribute("selected")&&(e[0].selected=!0)}return{restrict:"E",priority:100,compile:function(i,n){if(C(n.value))var r=e(n.value,!0);else{var o=e(i.text(),!0);o||n.$set("value",i.text())}return function(e,i,n){function s(e){c.addOption(e,i),c.ngModelCtrl.$render(),t(i)}var a="$selectController",l=i.parent(),c=l.data(a)||l.parent().data(a);if(c&&c.ngModelCtrl){if(r){var u;n.$observe("value",function(e){C(u)&&c.removeOption(u),u=e,s(e)})}else o?e.$watch(o,function(e,t){n.$set("value",e),t!==e&&c.removeOption(t),s(e)}):s(n.value);i.on("$destroy",function(){c.removeOption(n.value),c.ngModelCtrl.$render()})}}}}}],ks=v({restrict:"E",terminal:!1}),Ds=function(){return{restrict:"A",require:"?ngModel",link:function(e,t,i,n){n&&(i.required=!0,n.$validators.required=function(e,t){
return!i.required||!n.$isEmpty(t)},i.$observe("required",function(){n.$validate()}))}}},Ts=function(){return{restrict:"A",require:"?ngModel",link:function(e,t,r,o){if(o){var s,a=r.ngPattern||r.pattern;r.$observe("pattern",function(e){if(x(e)&&e.length>0&&(e=new RegExp("^"+e+"$")),e&&!e.test)throw n("ngPattern")("noregexp","Expected {0} to be a RegExp but was {1}. Element: {2}",a,e,J(t));s=e||i,o.$validate()}),o.$validators.pattern=function(e,t){return o.$isEmpty(t)||w(s)||s.test(t)}}}}},Ms=function(){return{restrict:"A",require:"?ngModel",link:function(e,t,i,n){if(n){var r=-1;i.$observe("maxlength",function(e){var t=p(e);r=isNaN(t)?-1:t,n.$validate()}),n.$validators.maxlength=function(e,t){return r<0||n.$isEmpty(t)||t.length<=r}}}}},Ls=function(){return{restrict:"A",require:"?ngModel",link:function(e,t,i,n){if(n){var r=0;i.$observe("minlength",function(e){r=p(e)||0,n.$validate()}),n.$validators.minlength=function(e,t){return n.$isEmpty(t)||t.length>=r}}}}};if(e.angular.bootstrap)return void console.log("WARNING: Tried to load angular more than once.");ue(),Ce(Bn),Bn.module("ngLocale",[],["$provide",function(e){function t(e){e+="";var t=e.indexOf(".");return-1==t?0:e.length-t-1}function n(e,n){var r=n;i===r&&(r=Math.min(t(e),3));var o=Math.pow(10,r);return{v:r,f:(e*o|0)%o}}var r={ZERO:"zero",ONE:"one",TWO:"two",FEW:"few",MANY:"many",OTHER:"other"};e.value("$locale",{DATETIME_FORMATS:{AMPMS:["AM","PM"],DAY:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],ERANAMES:["Before Christ","Anno Domini"],ERAS:["BC","AD"],FIRSTDAYOFWEEK:6,MONTH:["January","February","March","April","May","June","July","August","September","October","November","December"],SHORTDAY:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],SHORTMONTH:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],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:"-\xa4",negSuf:"",posPre:"\xa4",posSuf:""}]},id:"en-us",pluralCat:function(e,t){var i=0|e,o=n(e,t);return 1==i&&0==o.v?r.ONE:r.OTHER}})}]),$n(t).ready(function(){oe(t,se)})}(window,document),!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>'),/*!
 * ui-grid - v4.0.4 - 2017-04-04
 * Copyright (c) 2017 ; License: MIT 
 */
function(){"use strict";angular.module("ui.grid.i18n",[]),angular.module("ui.grid",["ui.grid.i18n"])}(),function(){"use strict";angular.module("ui.grid").constant("uiGridConstants",{LOG_DEBUG_MESSAGES:!0,LOG_WARN_MESSAGES:!0,LOG_ERROR_MESSAGES:!0,CUSTOM_FILTERS:/CUSTOM_FILTERS/g,COL_FIELD:/COL_FIELD/g,MODEL_COL_FIELD:/MODEL_COL_FIELD/g,TOOLTIP:/title=\"TOOLTIP\"/g,DISPLAY_CELL_TEMPLATE:/DISPLAY_CELL_TEMPLATE/g,TEMPLATE_REGEXP:/<.+>/,FUNC_REGEXP:/(\([^)]*\))?$/,DOT_REGEXP:/\./g,APOS_REGEXP:/'/g,BRACKET_REGEXP:/^(.*)((?:\s*\[\s*\d+\s*\]\s*)|(?:\s*\[\s*"(?:[^"\\]|\\.)*"\s*\]\s*)|(?:\s*\[\s*'(?:[^'\\]|\\.)*'\s*\]\s*))(.*)$/,COL_CLASS_PREFIX:"ui-grid-col",ENTITY_BINDING:"$$this",events:{GRID_SCROLL:"uiGridScroll",COLUMN_MENU_SHOWN:"uiGridColMenuShown",ITEM_DRAGGING:"uiGridItemDragStart",COLUMN_HEADER_CLICK:"uiGridColumnHeaderClick"},keymap:{TAB:9,STRG:17,CAPSLOCK:20,CTRL:17,CTRLRIGHT:18,CTRLR:18,SHIFT:16,RETURN:13,ENTER:13,BACKSPACE:8,BCKSP:8,ALT:18,ALTR:17,ALTRIGHT:17,SPACE:32,WIN:91,MAC:91,FN:null,PG_UP:33,PG_DOWN:34,UP:38,DOWN:40,LEFT:37,RIGHT:39,ESC:27,DEL:46,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123},ASC:"asc",DESC:"desc",filter:{STARTS_WITH:2,ENDS_WITH:4,EXACT:8,CONTAINS:16,GREATER_THAN:32,GREATER_THAN_OR_EQUAL:64,LESS_THAN:128,LESS_THAN_OR_EQUAL:256,NOT_EQUAL:512,SELECT:"select",INPUT:"input"},aggregationTypes:{sum:2,count:4,avg:8,min:16,max:32},CURRENCY_SYMBOLS:["\xa4","\u060b","Ar","\u0243","\u0e3f","B/.","Br","Bs.","Bs.F.","GH\u20b5","\xa2","c","Ch.","\u20a1","C$","D","\u0434\u0435\u043d","\u062f\u062c",".\u062f.\u0628","\u062f.\u0639","JD","\u062f.\u0643","\u0644.\u062f","\u0434\u0438\u043d","\u062f.\u062a","\u062f.\u0645.","\u062f.\u0625","Db","$","\u20ab","Esc","\u20ac","\u0192","Ft","FBu","FCFA","CFA","Fr","FRw","G","gr","\u20b2","h","\u20b4","\u20ad","K\u010d","kr","kn","MK","ZK","Kz","K","L","Le","\u043b\u0432","E","lp","M","KM","MT","\u20a5","Nfk","\u20a6","Nu.","UM","T$","MOP$","\u20b1","Pt.","\xa3","\u062c.\u0645.","LL","LS","P","Q","q","R","R$","\u0631.\u0639.","\u0631.\u0642","\u0631.\u0633","\u17db","RM","p","Rf.","\u20b9","\u20a8","SRe","Rp","\u20aa","Ksh","Sh.So.","USh","S/","SDR","\u0441\u043e\u043c","\u09f3\t","WS$","\u20ae","VT","\u20a9","\xa5","z\u0142"],scrollDirection:{UP:"up",DOWN:"down",LEFT:"left",RIGHT:"right",NONE:"none"},dataChange:{ALL:"all",EDIT:"edit",ROW:"row",COLUMN:"column",OPTIONS:"options"},scrollbars:{NEVER:0,ALWAYS:1}})}(),angular.module("ui.grid").directive("uiGridCell",["$compile","$parse","gridUtil","uiGridConstants",function(e,t,i,n){return{priority:0,scope:!1,require:"?^uiGrid",compile:function(){return{pre:function(t,r,o,s){function a(){(0,t.col.compiledElementFn)(t,function(e){r.append(e)})}if(s&&t.col.compiledElementFn)a();else if(s&&!t.col.compiledElementFn)t.col.getCompiledElementFn().then(function(e){e(t,function(e){r.append(e)})})["catch"](angular.noop);else{var l=t.col.cellTemplate.replace(n.MODEL_COL_FIELD,"row.entity."+i.preEval(t.col.field)).replace(n.COL_FIELD,"grid.getCellValue(row, col)"),c=e(l)(t);r.append(c)}},post:function(e,t){var i=e.col.getColClass(!1);t.addClass(i);var r,o=function(){var i=t;r&&(i.removeClass(r),r=null),r=angular.isFunction(e.col.cellClass)?e.col.cellClass(e.grid,e.row,e.col,e.rowRenderIndex,e.colRenderIndex):e.col.cellClass,i.addClass(r)};e.col.cellClass&&o();var s=e.grid.registerDataChangeCallback(o,[n.dataChange.COLUMN,n.dataChange.EDIT]),a=function(n,s){if(n!==s){(r||e.col.cellClass)&&o();var a=e.col.getColClass(!1);a!==i&&(t.removeClass(i),t.addClass(a),i=a)}},l=e.$watch("row",a),c=function(){s(),l()};e.$on("$destroy",c),t.on("$destroy",c)}}}}}]),function(){angular.module("ui.grid").service("uiGridColumnMenuService",["i18nService","uiGridConstants","gridUtil",function(e,t,i){var n={initialize:function(e,t){e.grid=t.grid,t.columnMenuScope=e,e.menuShown=!1},setColMenuItemWatch:function(e){var t=e.$watch("col.menuItems",function(t){void 0!==t&&t&&angular.isArray(t)?(t.forEach(function(t){"undefined"!=typeof t.context&&t.context||(t.context={}),t.context.col=e.col}),e.menuItems=e.defaultMenuItems.concat(t)):e.menuItems=e.defaultMenuItems});e.$on("$destroy",t)},sortable:function(e){return!!(e.grid.options.enableSorting&&"undefined"!=typeof e.col&&e.col&&e.col.enableSorting)},isActiveSort:function(e,t){return"undefined"!=typeof e.col&&"undefined"!=typeof e.col.sort&&"undefined"!=typeof e.col.sort.direction&&e.col.sort.direction===t},suppressRemoveSort:function(e){return!(!e.col||!e.col.suppressRemoveSort)},hideable:function(e){return"undefined"==typeof e.col||!e.col||!e.col.colDef||!1!==e.col.colDef.enableHiding},getDefaultMenuItems:function(i){return[{title:e.getSafeText("sort.ascending"),icon:"ui-grid-icon-sort-alt-up",action:function(e){e.stopPropagation(),i.sortColumn(e,t.ASC)},shown:function(){return n.sortable(i)},active:function(){return n.isActiveSort(i,t.ASC)}},{title:e.getSafeText("sort.descending"),icon:"ui-grid-icon-sort-alt-down",action:function(e){e.stopPropagation(),i.sortColumn(e,t.DESC)},shown:function(){return n.sortable(i)},active:function(){return n.isActiveSort(i,t.DESC)}},{title:e.getSafeText("sort.remove"),icon:"ui-grid-icon-cancel",action:function(e){e.stopPropagation(),i.unsortColumn()},shown:function(){return n.sortable(i)&&"undefined"!=typeof i.col&&"undefined"!=typeof i.col.sort&&"undefined"!=typeof i.col.sort.direction&&null!==i.col.sort.direction&&!n.suppressRemoveSort(i)}},{title:e.getSafeText("column.hide"),icon:"ui-grid-icon-cancel",shown:function(){return n.hideable(i)},action:function(e){e.stopPropagation(),i.hideColumn()}}]},getColumnElementPosition:function(e,t,n){var r={};return r.left=n[0].offsetLeft,r.top=n[0].offsetTop,r.parentLeft=n[0].offsetParent.offsetLeft,r.offset=0,t.grid.options.offsetLeft&&(r.offset=t.grid.options.offsetLeft),r.height=i.elementHeight(n,!0),r.width=i.elementWidth(n,!0),r},repositionMenu:function(e,t,n,r,o){var s=r[0].querySelectorAll(".ui-grid-menu"),a=i.closestElm(o,".ui-grid-render-container"),l=a.getBoundingClientRect().left-e.grid.element[0].getBoundingClientRect().left,c=a.querySelectorAll(".ui-grid-viewport")[0].scrollLeft,u=t.lastMenuWidth?t.lastMenuWidth:e.lastMenuWidth?e.lastMenuWidth:170,d=t.lastMenuPaddingRight?t.lastMenuPaddingRight:e.lastMenuPaddingRight?e.lastMenuPaddingRight:10;if(0!==s.length){var h=s[0].querySelectorAll(".ui-grid-menu-mid");0===h.length||angular.element(h).hasClass("ng-hide")||(u=i.elementWidth(s,!0),e.lastMenuWidth=u,t.lastMenuWidth=u,d=parseInt(i.getStyles(angular.element(s)[0]).paddingRight,10),e.lastMenuPaddingRight=d,t.lastMenuPaddingRight=d)}var p=n.left+l-c+n.parentLeft+n.width-u+d;p<n.offset&&(p=n.offset),r.css("left",p+"px"),r.css("top",n.top+n.height+"px")}};return n}]).directive("uiGridColumnMenu",["$timeout","gridUtil","uiGridConstants","uiGridColumnMenuService","$document",function(e,t,i,n,r){return{priority:0,scope:!0,require:"^uiGrid",templateUrl:"ui-grid/uiGridColumnMenu",replace:!0,link:function(o,s,a,l){n.initialize(o,l),o.defaultMenuItems=n.getDefaultMenuItems(o),o.menuItems=o.defaultMenuItems,n.setColMenuItemWatch(o),o.showMenu=function(e,t,i){o.col=e;var r=n.getColumnElementPosition(o,e,t);o.menuShown?(o.colElement=t,o.colElementPosition=r,o.hideThenShow=!0,o.$broadcast("hide-menu",{originalEvent:i})):(o.menuShown=!0,n.repositionMenu(o,e,r,s,t),o.colElement=t,o.colElementPosition=r,o.$broadcast("show-menu",{originalEvent:i}))},o.hideMenu=function(e){o.menuShown=!1,e||o.$broadcast("hide-menu")},o.$on("menu-hidden",function(){o.hideThenShow?(delete o.hideThenShow,n.repositionMenu(o,o.col,o.colElementPosition,s,o.colElement),o.$broadcast("show-menu"),o.menuShown=!0):(o.hideMenu(!0),o.col&&t.focus.bySelector(r,".ui-grid-header-cell."+o.col.getColClass()+" .ui-grid-column-menu-button",o.col.grid,!1))}),o.$on("menu-shown",function(){e(function(){n.repositionMenu(o,o.col,o.colElementPosition,s,o.colElement),t.focus.bySelector(r,".ui-grid-menu-items .ui-grid-menu-item",!0),delete o.colElementPosition,delete o.columnElement},200)}),o.sortColumn=function(e,t){e.stopPropagation(),o.grid.sortColumn(o.col,t,!0).then(function(){o.grid.refresh(),o.hideMenu()})["catch"](angular.noop)},o.unsortColumn=function(){o.col.unsort(),o.grid.refresh(),o.hideMenu()};var c=function(){e(function(){var e,i=function(){return t.focus.byId("grid-menu",o.grid)};o.grid.columns.some(function(t,i){if(angular.equals(t,o.col))return e=i,!0});var n;if(o.grid.columns.some(function(t,i){if(!t.visible)return!1;if(i<e)n=t;else{if(i>e&&!n)return n=t,!0;if(i>e&&n)return!0}}),n){var s=n.getColClass();t.focus.bySelector(r,".ui-grid-header-cell."+s+" .ui-grid-header-cell-primary-focus",!0).then(angular.noop,function(e){if("canceled"!==e)return i()})["catch"](angular.noop)}else i()})};o.hideColumn=function(){o.col.colDef.visible=!1,o.col.visible=!1,o.grid.queueGridRefresh(),o.hideMenu(),o.grid.api.core.notifyDataChange(i.dataChange.COLUMN),o.grid.api.core.raise.columnVisibilityChanged(o.col),c()}},controller:["$scope",function(e){var t=this;e.$watch("menuItems",function(e){t.menuItems=e})}]}}])}(),function(){"use strict";angular.module("ui.grid").directive("uiGridFilter",["$compile","$templateCache","i18nService","gridUtil",function(e,t,i,n){return{compile:function(){return{pre:function(t,i){t.col.updateFilters=function(n){if(i.children().remove(),n){var r=t.col.filterHeaderTemplate;i.append(e(r)(t))}},t.$on("$destroy",function(){delete t.col.updateFilters})},post:function(e,t){e.aria=i.getSafeText("headerCell.aria"),e.removeFilter=function(e,i){e.term=null,n.focus.bySelector(t,".ui-grid-filter-input-"+i)}}}}}}])}(),function(){"use strict";angular.module("ui.grid").directive("uiGridFooterCell",["$timeout","gridUtil","uiGridConstants","$compile",function(e,t,i,n){return{priority:0,scope:{col:"=",row:"=",renderIndex:"="},replace:!0,require:"^uiGrid",compile:function(){return{pre:function(e,t){var i=n(e.col.footerCellTemplate)(e);t.append(i)},post:function(e,t,n,r){e.grid=r.grid;var o=e.col.getColClass(!1);t.addClass(o);var s,a=function(){var i=t;s&&(i.removeClass(s),s=null),s=angular.isFunction(e.col.footerCellClass)?e.col.footerCellClass(e.grid,e.row,e.col,e.rowRenderIndex,e.colRenderIndex):e.col.footerCellClass,i.addClass(s)};e.col.footerCellClass&&a(),e.col.updateAggregationValue();var l=e.grid.registerDataChangeCallback(a,[i.dataChange.COLUMN]);e.grid.api.core.on.rowsRendered(e,e.col.updateAggregationValue),e.grid.api.core.on.rowsRendered(e,a),e.$on("$destroy",l)}}}}}])}(),function(){"use strict";angular.module("ui.grid").directive("uiGridFooter",["$templateCache","$compile","uiGridConstants","gridUtil","$timeout",function(e,t,i,n){return{restrict:"EA",replace:!0,require:["^uiGrid","^uiGridRenderContainer"],scope:!0,compile:function(){return{pre:function(e,i,r,o){var s=o[0],a=o[1];e.grid=s.grid,e.colContainer=a.colContainer,a.footer=i;var l=e.grid.options.footerTemplate;n.getTemplate(l).then(function(n){var r=angular.element(n),o=t(r)(e);if(i.append(o),a){var s=i[0].getElementsByClassName("ui-grid-footer-viewport")[0];s&&(a.footerViewport=s)}})["catch"](angular.noop)},post:function(e,t,i,r){var o=r[0],s=r[1];o.grid;n.disableAnimations(t),s.footer=t;var a=t[0].getElementsByClassName("ui-grid-footer-viewport")[0];a&&(s.footerViewport=a)}}}}}])}(),function(){"use strict";angular.module("ui.grid").directive("uiGridGridFooter",["$templateCache","$compile","uiGridConstants","gridUtil","$timeout",function(e,t,i,n){return{restrict:"EA",replace:!0,require:"^uiGrid",scope:!0,compile:function(){return{pre:function(e,i,r,o){e.grid=o.grid;var s=e.grid.options.gridFooterTemplate;n.getTemplate(s).then(function(n){var r=angular.element(n),o=t(r)(e);i.append(o)})["catch"](angular.noop)},post:function(){}}}}}])}(),function(){"use strict";angular.module("ui.grid").directive("uiGridGroupPanel",["$compile","uiGridConstants","gridUtil",function(e,t,i){return{restrict:"EA",replace:!0,require:"?^uiGrid",scope:!1,compile:function(){return{pre:function(t,n){var r=t.grid.options.groupPanelTemplate||"ui-grid/ui-grid-group-panel";i.getTemplate(r).then(function(i){var r=angular.element(i),o=e(r)(t);n.append(o)})["catch"](angular.noop)},post:function(e,t){t.bind("$destroy",function(){})}}}}}])}(),function(){"use strict";angular.module("ui.grid").directive("uiGridHeaderCell",["$compile","$timeout","$window","$document","gridUtil","uiGridConstants","ScrollEvent","i18nService",function(e,t,i,n,r,o,s,a){var l=500,c=500;return{priority:0,scope:{col:"=",row:"=",renderIndex:"="},require:["^uiGrid","^uiGridRenderContainer"],replace:!0,compile:function(){return{pre:function(t,i){var n=e(t.col.headerCellTemplate)(t);i.append(n)},post:function(e,i,r,s){var u=s[0],d=s[1];e.i18n={headerCell:a.getSafeText("headerCell"),sort:a.getSafeText("sort")},e.isSortPriorityVisible=function(){return angular.isNumber(e.col.sort.priority)&&e.grid.columns.some(function(t){return angular.isNumber(t.sort.priority)&&t!==e.col})},e.getSortDirectionAriaLabel=function(){var t=e.col,i=t.sort.direction===o.ASC?e.i18n.sort.ascending:t.sort.direction===o.DESC?e.i18n.sort.descending:e.i18n.sort.none,n=i;return e.isSortPriorityVisible()&&(n=n+". "+e.i18n.headerCell.priority+" "+t.sort.priority),n},e.grid=u.grid,e.renderContainer=u.grid.renderContainers[d.containerId];var h=e.col.getColClass(!1);i.addClass(h),e.menuShown=!1,e.asc=o.ASC,e.desc=o.DESC;var p,g,f=(angular.element(i[0].querySelectorAll(".ui-grid-header-cell-menu")),angular.element(i[0].querySelectorAll(".ui-grid-cell-contents"))),m=[];e.downFn=function(r){r.stopPropagation(),"undefined"!=typeof r.originalEvent&&r.originalEvent!==undefined&&(r=r.originalEvent),r.button&&0!==r.button||(g=r.pageX,e.mousedownStartTime=(new Date).getTime(),e.mousedownTimeout=t(function(){},l),e.mousedownTimeout.then(function(){e.colMenu&&u.columnMenuScope.showMenu(e.col,i,r)})["catch"](angular.noop),u.fireEvent(o.events.COLUMN_HEADER_CLICK,{event:r,columnName:e.col.colDef.name}),e.offAllEvents(),"touchstart"===r.type?(n.on("touchend",e.upFn),n.on("touchmove",e.moveFn)):"mousedown"===r.type&&(n.on("mouseup",e.upFn),n.on("mousemove",e.moveFn)))},e.upFn=function(i){i.stopPropagation(),t.cancel(e.mousedownTimeout),e.offAllEvents(),e.onDownEvents(i.type),(new Date).getTime()-e.mousedownStartTime>l||e.sortable&&e.handleClick(i)},e.moveFn=function(i){0!=i.pageX-g&&(t.cancel(e.mousedownTimeout),e.offAllEvents(),e.onDownEvents(i.type))},e.clickFn=function(t){t.stopPropagation(),f.off("click",e.clickFn)},e.offAllEvents=function(){f.off("touchstart",e.downFn),f.off("mousedown",e.downFn),n.off("touchend",e.upFn),n.off("mouseup",e.upFn),n.off("touchmove",e.moveFn),n.off("mousemove",e.moveFn),f.off("click",e.clickFn)},e.onDownEvents=function(i){switch(i){case"touchmove":case"touchend":f.on("click",e.clickFn),f.on("touchstart",e.downFn),t(function(){f.on("mousedown",e.downFn)},c);break;case"mousemove":case"mouseup":f.on("click",e.clickFn),f.on("mousedown",e.downFn),t(function(){f.on("touchstart",e.downFn)},c);break;default:f.on("click",e.clickFn),f.on("touchstart",e.downFn),f.on("mousedown",e.downFn)}};var v=function(){var n=i;p&&(n.removeClass(p),p=null),p=angular.isFunction(e.col.headerCellClass)?e.col.headerCellClass(e.grid,e.row,e.col,e.rowRenderIndex,e.colRenderIndex):e.col.headerCellClass,n.addClass(p),t(function(){var t=e.grid.renderContainers.right?e.grid.renderContainers.right:e.grid.renderContainers.body;e.isLastCol=e.col===t.visibleColumnCache[t.visibleColumnCache.length-1]}),e.col.enableSorting?e.sortable=!0:e.sortable=!1;var r=e.filterable;u.grid.options.enableFiltering&&e.col.enableFiltering?e.filterable=!0:e.filterable=!1,r!==e.filterable&&("undefined"!=typeof e.col.updateFilters&&e.col.updateFilters(e.filterable),e.filterable?(e.col.filters.forEach(function(t,i){m.push(e.$watch("col.filters["+i+"].term",function(e,t){e!==t&&(u.grid.api.core.raise.filterChanged(),u.grid.api.core.notifyDataChange(o.dataChange.COLUMN),u.grid.queueGridRefresh())}))}),e.$on("$destroy",function(){m.forEach(function(e){e()})})):m.forEach(function(e){e()})),e.col.grid.options&&!1!==e.col.grid.options.enableColumnMenus&&e.col.colDef&&!1!==e.col.colDef.enableColumnMenu?e.colMenu=!0:e.colMenu=!1,e.offAllEvents(),(e.sortable||e.colMenu)&&(e.onDownEvents(),e.$on("$destroy",function(){e.offAllEvents()}))};v();var y=e.grid.registerDataChangeCallback(v,[o.dataChange.COLUMN]);e.$on("$destroy",y),e.handleClick=function(t){var i=!1;t.shiftKey&&(i=!0),u.grid.sortColumn(e.col,i).then(function(){u.columnMenuScope&&u.columnMenuScope.hideMenu(),u.grid.refresh()})["catch"](angular.noop)},e.toggleMenu=function(t){t.stopPropagation(),u.columnMenuScope.menuShown&&u.columnMenuScope.col===e.col?u.columnMenuScope.hideMenu():u.columnMenuScope.showMenu(e.col,i)}}}}}}])}(),function(){"use strict";angular.module("ui.grid").directive("uiGridHeader",["$templateCache","$compile","uiGridConstants","gridUtil","$timeout","ScrollEvent",function(e,t,i,n,r,o){return{restrict:"EA",replace:!0,require:["^uiGrid","^uiGridRenderContainer"],scope:!0,compile:function(){return{pre:function(e,i,r,s){function a(){u.header=u.colContainer.header=i;var e=i[0].getElementsByClassName("ui-grid-header-canvas");e.length>0?u.headerCanvas=u.colContainer.headerCanvas=e[0]:u.headerCanvas=null}function l(){if(!c.grid.isScrollingHorizontally){var e=n.normalizeScrollLeft(u.headerViewport,c.grid),t=u.colContainer.scrollHorizontal(e),i=new o(c.grid,null,u.colContainer,o.Sources.ViewPortScroll);i.newScrollLeft=e,t>-1&&(i.x={percentage:t}),c.grid.scrollContainers(null,i)}}var c=s[0],u=s[1];e.grid=c.grid,e.colContainer=u.colContainer,a();var d;d=e.grid.options.showHeader?e.grid.options.headerTemplate?e.grid.options.headerTemplate:"ui-grid/ui-grid-header":"ui-grid/ui-grid-no-header",n.getTemplate(d).then(function(n){var r=angular.element(n),o=t(r)(e);if(i.replaceWith(o),i=o,a(),u){var s=i[0].getElementsByClassName("ui-grid-header-viewport")[0];s&&(u.headerViewport=s,angular.element(s).on("scroll",l),e.$on("$destroy",function(){angular.element(s).off("scroll",l)}))}e.grid.queueRefresh()})["catch"](angular.noop)},post:function(e,t,i,r){function o(){var e=a.colContainer.visibleColumnCache,t="",i=0;return e.forEach(function(e){t+=e.getColClassDefinition(),i+=e.drawnWidth}),a.colContainer.canvasWidth=i,t}var s=r[0],a=r[1];s.grid,n.disableAnimations(t),a.header=t;var l=t[0].getElementsByClassName("ui-grid-header-viewport")[0];l&&(a.headerViewport=l),s&&s.grid.registerStyleComputation({priority:15,func:o})}}}}}])}(),function(){angular.module("ui.grid").service("uiGridGridMenuService",["gridUtil","i18nService","uiGridConstants",function(e,t,i){var n={initialize:function(e,t){t.gridMenuScope=e,e.grid=t,e.registeredMenuItems=[],e.$on("$destroy",function(){e.grid&&e.grid.gridMenuScope&&(e.grid.gridMenuScope=null),e.grid&&(e.grid=null),e.registeredMenuItems&&(e.registeredMenuItems=null)}),e.registeredMenuItems=[],t.api.registerMethod("core","addToGridMenu",n.addToGridMenu),t.api.registerMethod("core","removeFromGridMenu",n.removeFromGridMenu)},addToGridMenu:function(t,i){angular.isArray(i)?t.gridMenuScope?(t.gridMenuScope.registeredMenuItems=t.gridMenuScope.registeredMenuItems?t.gridMenuScope.registeredMenuItems:[],t.gridMenuScope.registeredMenuItems=t.gridMenuScope.registeredMenuItems.concat(i)):e.logError("Asked to addToGridMenu, but gridMenuScope not present.  Timing issue?  Please log issue with ui-grid"):e.logError("addToGridMenu: menuItems must be an array, and is not, not adding any items")},removeFromGridMenu:function(t,i){var n=-1;t&&t.gridMenuScope&&t.gridMenuScope.registeredMenuItems.forEach(function(t,r){t.id===i&&(n>-1?e.logError("removeFromGridMenu: found multiple items with the same id, removing only the last"):n=r)}),n>-1&&t.gridMenuScope.registeredMenuItems.splice(n,1)},getMenuItems:function(i){var r=[];i.grid.options.gridMenuCustomItems&&(angular.isArray(i.grid.options.gridMenuCustomItems)?r=r.concat(i.grid.options.gridMenuCustomItems):e.logError("gridOptions.gridMenuCustomItems must be an array, and is not"));var o=[{title:t.getSafeText("gridMenu.clearAllFilters"),action:function(){i.grid.clearAllFilters()},shown:function(){return i.grid.options.enableFiltering},order:100}];return r=r.concat(o),r=r.concat(i.registeredMenuItems),!1!==i.grid.options.gridMenuShowHideColumns&&(r=r.concat(n.showHideColumns(i))),r.sort(function(e,t){return e.order-t.order}),r},showHideColumns:function(e){var i=[];return e.grid.options.columnDefs&&0!==e.grid.options.columnDefs.length&&0!==e.grid.columns.length?(i.push({title:t.getSafeText("gridMenu.columns"),order:300}),e.grid.options.gridMenuTitleFilter=e.grid.options.gridMenuTitleFilter?e.grid.options.gridMenuTitleFilter:function(e){return e},e.grid.options.columnDefs.forEach(function(t,r){if(!1!==t.enableHiding){var o={icon:"ui-grid-icon-ok",action:function(e){e.stopPropagation(),n.toggleColumnVisibility(this.context.gridCol)},shown:function(){return!0===this.context.gridCol.colDef.visible||this.context.gridCol.colDef.visible===undefined},context:{gridCol:e.grid.getColumn(t.name||t.field)},leaveOpen:!0,order:301+2*r};n.setMenuItemTitle(o,t,e.grid),i.push(o),o={icon:"ui-grid-icon-cancel",action:function(e){e.stopPropagation(),n.toggleColumnVisibility(this.context.gridCol)},shown:function(){return!(!0===this.context.gridCol.colDef.visible||this.context.gridCol.colDef.visible===undefined)},context:{gridCol:e.grid.getColumn(t.name||t.field)},leaveOpen:!0,order:301+2*r+1},n.setMenuItemTitle(o,t,e.grid),i.push(o)}}),i):i},setMenuItemTitle:function(t,i,n){var r=n.options.gridMenuTitleFilter(i.displayName||e.readableColumnName(i.name)||i.field);"string"==typeof r?t.title=r:r.then?(t.title="",r.then(function(e){t.title=e},function(e){t.title=e})["catch"](angular.noop)):(e.logError("Expected gridMenuTitleFilter to return a string or a promise, it has returned neither, bad config"),t.title="badconfig")},toggleColumnVisibility:function(e){e.colDef.visible=!(!0===e.colDef.visible||e.colDef.visible===undefined),e.grid.refresh(),e.grid.api.core.notifyDataChange(i.dataChange.COLUMN),e.grid.api.core.raise.columnVisibilityChanged(e)}};return n}]).directive("uiGridMenuButton",["gridUtil","uiGridConstants","uiGridGridMenuService","i18nService",function(e,t,i,n){return{priority:0,scope:!0,require:["^uiGrid"],templateUrl:"ui-grid/ui-grid-menu-button",replace:!0,link:function(t,r,o,s){var a=s[0];t.i18n={aria:n.getSafeText("gridMenu.aria")},i.initialize(t,a.grid),t.shown=!1,t.toggleMenu=function(){t.shown?(t.$broadcast("hide-menu"),t.shown=!1):(t.menuItems=i.getMenuItems(t),t.$broadcast("show-menu"),t.shown=!0)},t.$on("menu-hidden",function(){t.shown=!1,e.focus.bySelector(r,".ui-grid-icon-container")})}}}])}(),function(){angular.module("ui.grid").directive("uiGridMenu",["$compile","$timeout","$window","$document","gridUtil","uiGridConstants","i18nService",function(e,t,i,n,r,o,s){return{priority:0,scope:{menuItems:"=",autoHide:"=?"},require:"?^uiGrid",templateUrl:"ui-grid/uiGridMenu",replace:!1,link:function(n,a,l,c){if(n.dynamicStyles="",c&&c.grid&&c.grid.options&&c.grid.options.gridMenuTemplate){var u=c.grid.options.gridMenuTemplate;r.getTemplate(u).then(function(t){var i=angular.element(t),r=e(i)(n);a.replaceWith(r)})["catch"](angular.noop)}var d=function(e){var t=e-c.grid.headerHeight-20;n.dynamicStyles=[".grid"+c.grid.id+" .ui-grid-menu-mid {","max-height: "+t+"px;","}"].join(" ")};c&&(d(c.grid.gridHeight),c.grid.api.core.on.gridDimensionChanged(n,function(e,t,i){d(i)})),n.i18n={close:s.getSafeText("columnMenu.close")},n.showMenu=function(e,i){n.shown?n.shownMid||(n.shownMid=!0,n.$emit("menu-shown")):(n.shown=!0,t(function(){n.shownMid=!0,n.$emit("menu-shown")}));var o="click";i&&i.originalEvent&&i.originalEvent.type&&"touchstart"===i.originalEvent.type&&(o=i.originalEvent.type),angular.element(document).off("click touchstart",h),a.off("keyup",p),a.off("keydown",g),t(function(){angular.element(document).on(o,h),a.on("keyup",p),a.on("keydown",g)}),r.focus.bySelector(a,"button[type=button]",!0)},n.hideMenu=function(){n.shown&&(n.shownMid=!1,t(function(){n.shownMid||(n.shown=!1,n.$emit("menu-hidden"))},200)),angular.element(document).off("click touchstart",h),a.off("keyup",p),a.off("keydown",g)},n.$on("hide-menu",function(e,t){n.hideMenu(e,t)}),n.$on("show-menu",function(e,t){n.showMenu(e,t)});var h=function(){n.shown&&n.$apply(function(){n.hideMenu()})},p=function(e){27===e.keyCode&&n.hideMenu()},g=function(e){var t=function(t){return t.focus(),e.preventDefault(),!1};if(9===e.keyCode){var i,n,r=a[0].querySelectorAll("button:not(.ng-hide)");r.length>0&&(i=r[0],n=r[r.length-1],e.target!==n||e.shiftKey?e.target===i&&e.shiftKey&&t(n):t(i))}};"undefined"!=typeof n.autoHide&&n.autoHide!==undefined||(n.autoHide=!0),n.autoHide&&angular.element(i).on("resize",h),n.$on("$destroy",function(){angular.element(i).off("resize",h),angular.element(document).off("click touchstart",h),a.off("keyup",p),a.off("keydown",g)}),c&&n.$on("$destroy",c.grid.api.core.on.scrollBegin(n,h)),n.$on("$destroy",n.$on(o.events.ITEM_DRAGGING,h))}}}]).directive("uiGridMenuItem",["gridUtil","$compile","i18nService",function(e,t,i){return{priority:0,scope:{name:"=",active:"=",action:"=",icon:"=",shown:"=",context:"=",templateUrl:"=",leaveOpen:"=",screenReaderOnly:"="},require:["?^uiGrid"],templateUrl:"ui-grid/uiGridMenuItem",replace:!1,compile:function(){return{pre:function(i,n){i.templateUrl&&e.getTemplate(i.templateUrl).then(function(e){var r=angular.element(e),o=t(r)(i);n.replaceWith(o)})["catch"](angular.noop)},post:function(t,n,r,o){var s=o[0];"undefined"!=typeof t.shown&&null!==t.shown||(t.shown=function(){return!0}),t.itemShown=function(){var e={};return t.context&&(e.context=t.context),void 0!==s&&s&&(e.grid=s.grid),t.shown.call(e)},t.itemAction=function(i,n){if(i.stopPropagation(),"function"==typeof t.action){var r={};t.context&&(r.context=t.context),void 0!==s&&s&&(r.grid=s.grid),t.action.call(r,i,n),t.leaveOpen?e.focus.bySelector(angular.element(i.target.parentElement),"button[type=button]",!0):t.$emit("hide-menu")}},t.i18n=i.get()}}}}}])}(),function(){"use strict";var e=angular.module("ui.grid");angular.forEach([{tag:"Src",method:"attr"},{tag:"Text",method:"text"},{tag:"Href",method:"attr"},{tag:"Class",method:"addClass"},{tag:"Html",method:"html"},{tag:"Alt",method:"attr"},{tag:"Style",method:"css"},{tag:"Value",method:"attr"},{tag:"Id",method:"attr"},{tag:"Id",directiveName:"IdGrid",method:"attr",appendGridId:!0},{tag:"Title",method:"attr"},{tag:"Label",method:"attr",aria:!0},{tag:"Labelledby",method:"attr",aria:!0},{tag:"Labelledby",directiveName:"LabelledbyGrid",appendGridId:!0,method:"attr",aria:!0},{tag:"Describedby",method:"attr",aria:!0},{tag:"Describedby",directiveName:"DescribedbyGrid",appendGridId:!0,method:"attr",aria:!0}],function(t){var i="uiGridOneBind",n=(t.aria?i+"Aria":i)+(t.directiveName?t.directiveName:t.tag);e.directive(n,["gridUtil",function(e){return{restrict:"A",require:["?uiGrid","?^uiGrid"],link:function(i,r,o,s){var a=function(t){var r;if(i.grid)r=i.grid;else if(i.col&&i.col.grid)r=i.col.grid;else if(!s.some(function(e){if(e&&e.grid)return r=e.grid,!0}))throw e.logError("["+n+"] A valid grid could not be found to bind id. Are you using this directive within the correct scope? Trying to generate id: [gridID]-"+t),new Error("No valid grid could be found");if(r){new RegExp(r.id.toString()).test(t)||(t=r.id.toString()+"-"+t)}return t},l=i.$watch(o[n],function(e){if(e){if(t.appendGridId){var i=null;angular.forEach(e.split(" "),function(e){i=(i?i+" ":"")+a(e)}),e=i}switch(t.method){case"attr":t.aria?r[t.method]("aria-"+t.tag.toLowerCase(),e):r[t.method](t.tag.toLowerCase(),e);break;case"addClass":if(angular.isObject(e)&&!angular.isArray(e)){var n=[],o=!1;if(angular.forEach(e,function(e,t){null!==e&&void 0!==e&&(o=!0,e&&n.push(t))}),!o)return;e=n}if(!e)return;r.addClass(angular.isArray(e)?e.join(" "):e);break;default:r[t.method](e)}l()}},!0)}}}])})}(),function(){"use strict";var e=angular.module("ui.grid");e.directive("uiGridRenderContainer",["$timeout","$document","uiGridConstants","gridUtil","ScrollEvent",function(e,t,i,n,r){return{replace:!0,transclude:!0,templateUrl:"ui-grid/uiGridRenderContainer",require:["^uiGrid","uiGridRenderContainer"],scope:{containerId:"=",rowContainerName:"=",colContainerName:"=",bindScrollHorizontal:"=",bindScrollVertical:"=",enableVerticalScrollbar:"=",enableHorizontalScrollbar:"="},controller:"uiGridRenderContainer as RenderContainer",compile:function(){return{pre:function(e,t,i,n){var r=n[0],o=n[1],s=e.grid=r.grid;if(!e.rowContainerName)throw"No row render container name specified";if(!e.colContainerName)throw"No column render container name specified";if(!s.renderContainers[e.rowContainerName])throw"Row render container '"+e.rowContainerName+"' is not registered.";if(!s.renderContainers[e.colContainerName])throw"Column render container '"+e.colContainerName+"' is not registered.";var a=e.rowContainer=s.renderContainers[e.rowContainerName],l=e.colContainer=s.renderContainers[e.colContainerName];o.containerId=e.containerId,o.rowContainer=a,o.colContainer=l},post:function(e,t,i,o){function s(){var t="",i=d.canvasWidth,n=d.getViewportWidth(),r=u.getCanvasHeight(),o=u.getViewportHeight();d.needsHScrollbarPlaceholder()&&(o-=c.scrollbarHeight);var s,l;return s=l=d.getHeaderViewportWidth(),t+="\n .grid"+a.grid.id+" .ui-grid-render-container-"+e.containerId+" .ui-grid-canvas { width: "+i+"px; height: "+r+"px; }",t+="\n .grid"+a.grid.id+" .ui-grid-render-container-"+e.containerId+" .ui-grid-header-canvas { width: "+(i+c.scrollbarWidth)+"px; }",g.explicitHeaderCanvasHeight?t+="\n .grid"+a.grid.id+" .ui-grid-render-container-"+e.containerId+" .ui-grid-header-canvas { height: "+g.explicitHeaderCanvasHeight+"px; }":t+="\n .grid"+a.grid.id+" .ui-grid-render-container-"+e.containerId+" .ui-grid-header-canvas { height: inherit; }",t+="\n .grid"+a.grid.id+" .ui-grid-render-container-"+e.containerId+" .ui-grid-viewport { width: "+n+"px; height: "+o+"px; }",t+="\n .grid"+a.grid.id+" .ui-grid-render-container-"+e.containerId+" .ui-grid-header-viewport { width: "+s+"px; }",t+="\n .grid"+a.grid.id+" .ui-grid-render-container-"+e.containerId+" .ui-grid-footer-canvas { width: "+(i+c.scrollbarWidth)+"px; }",t+="\n .grid"+a.grid.id+" .ui-grid-render-container-"+e.containerId+" .ui-grid-footer-viewport { width: "+l+"px; }"}var a=o[0],l=o[1],c=a.grid,u=l.rowContainer,d=l.colContainer,h=null,p=null,g=c.renderContainers[e.containerId];t.addClass("ui-grid-render-container-"+e.containerId),n.on.mousewheel(t,function(e){var t=new r(c,u,d,r.Sources.RenderContainerMouseWheel);if(0!==e.deltaY){var i=-1*e.deltaY*e.deltaFactor;h=l.viewport[0].scrollTop,t.verticalScrollLength=u.getVerticalScrollLength();var o=(h+i)/t.verticalScrollLength;o>=1&&h<t.verticalScrollLength&&(l.viewport[0].scrollTop=t.verticalScrollLength),o<0?o=0:o>1&&(o=1),t.y={percentage:o,pixels:i}}if(0!==e.deltaX){var s=e.deltaX*e.deltaFactor;p=n.normalizeScrollLeft(l.viewport,c),t.horizontalScrollLength=d.getCanvasWidth()-d.getViewportWidth();var a=(p+s)/t.horizontalScrollLength;a<0?a=0:a>1&&(a=1),t.x={percentage:a,pixels:s}}0!==e.deltaY&&(t.atTop(h)||t.atBottom(h))||0!==e.deltaX&&(t.atLeft(p)||t.atRight(p))||(e.preventDefault(),e.stopPropagation(),t.fireThrottledScrollingEvent("",t))}),t.bind("$destroy",function(){t.unbind("keydown"),["touchstart","touchmove","touchend","keydown","wheel","mousewheel","DomMouseScroll","MozMousePixelScroll"].forEach(function(e){t.unbind(e)})}),a.grid.registerStyleComputation({priority:6,func:s})}}}}}]),e.controller("uiGridRenderContainer",["$scope","gridUtil",function(){}])}(),function(){"use strict";angular.module("ui.grid").directive("uiGridRow",["gridUtil",function(){return{replace:!0,require:["^uiGrid","^uiGridRenderContainer"],scope:{row:"=uiGridRow",rowRenderIndex:"="},compile:function(){return{pre:function(e,t,i,n){function r(){e.row.getRowTemplateFn.then(function(i){var n=e.$new();i(n,function(e){a&&(a.remove(),l.$destroy()),t.empty().append(e),a=e,l=n})})["catch"](angular.noop)}var o=n[0],s=n[1];o.grid;e.grid=o.grid,e.colContainer=s.colContainer;var a,l;r(),e.$watch("row.getRowTemplateFn",function(e,t){e!==t&&r()})},post:function(){}}}}}])}(),function(){angular.module("ui.grid").directive("uiGridStyle",["gridUtil","$interpolate",function(e,t){return{link:function(e,i){var n=t(i.text(),!0);n&&e.$watch(n,function(e){i.text(e)})}}}])}(),function(){"use strict";angular.module("ui.grid").directive("uiGridViewport",["gridUtil","ScrollEvent","uiGridConstants","$log",function(e,t){return{replace:!0,scope:{},controllerAs:"Viewport",templateUrl:"ui-grid/uiGridViewport",require:["^uiGrid","^uiGridRenderContainer"],link:function(i,n,r,o){function s(){
var r=n[0].scrollTop,o=e.normalizeScrollLeft(n,f),s=p.scrollVertical(r),a=g.scrollHorizontal(o),l=new t(f,p,g,t.Sources.ViewPortScroll);l.newScrollLeft=o,l.newScrollTop=r,a>-1&&(l.x={percentage:a}),s>-1&&(l.y={percentage:s}),f.scrollContainers(i.$parent.containerId,l)}function a(e){h.prevScrollArgs=e;var t=e.getNewScrollTop(p,h.viewport);n[0].scrollTop=t}function l(t){h.prevScrollArgs=t;var i=t.getNewScrollLeft(g,h.viewport);n[0].scrollLeft=e.denormalizeScrollLeft(h.viewport,i,f)}function c(t){var i=t.getNewScrollLeft(g,h.viewport);h.headerViewport&&(h.headerViewport.scrollLeft=e.denormalizeScrollLeft(h.viewport,i,f))}function u(t){var i=t.getNewScrollLeft(g,h.viewport);h.footerViewport&&(h.footerViewport.scrollLeft=e.denormalizeScrollLeft(h.viewport,i,f))}var d=o[0],h=o[1];i.containerCtrl=h;var p=h.rowContainer,g=h.colContainer,f=d.grid;i.grid=d.grid,i.rowContainer=h.rowContainer,i.colContainer=h.colContainer,h.viewport=n,f&&f.options&&f.options.customScroller?f.options.customScroller(n,s):n.on("scroll",s);i.$parent.bindScrollVertical&&f.addVerticalScrollSync(i.$parent.containerId,a),i.$parent.bindScrollHorizontal&&(f.addHorizontalScrollSync(i.$parent.containerId,l),f.addHorizontalScrollSync(i.$parent.containerId+"header",c),f.addHorizontalScrollSync(i.$parent.containerId+"footer",u)),i.$on("$destroy",function(){n.off()})},controller:["$scope",function(e){this.rowStyle=function(){var t=e.rowContainer,i=e.colContainer,n={};if(0!==t.currentTopRow){var r="translateY("+t.currentTopRow*t.grid.options.rowHeight+"px)";n.transform=r,n["-webkit-transform"]=r,n["-ms-transform"]=r}return 0!==i.currentFirstColumn&&(i.grid.isRTL()?n["margin-right"]=i.columnOffset+"px":n["margin-left"]=i.columnOffset+"px"),n}}]}}])}(),function(){angular.module("ui.grid").directive("uiGridVisible",function(){return function(e,t,i){e.$watch(i.uiGridVisible,function(e){t[e?"removeClass":"addClass"]("ui-grid-invisible")})}})}(),function(){"use strict";function e(e,t,i){return{templateUrl:"ui-grid/ui-grid",scope:{uiGrid:"="},replace:!0,transclude:!0,controller:"uiGridController",compile:function(){return{post:function(n,r,o,s){function a(){r[0].offsetWidth<=0&&f<g?(setTimeout(a,p),f++):n.$applyAsync(c)}function l(){var t,i;angular.element(e).on("resize",d),r.on("$destroy",function(){angular.element(e).off("resize",d),t(),i()}),t=n.$watch(function(){return h.hasLeftContainer()},function(e,t){e!==t&&h.refreshCanvas(!0)}),i=n.$watch(function(){return h.hasRightContainer()},function(e,t){e!==t&&h.refreshCanvas(!0)})}function c(){h.gridWidth=n.gridWidth=t.elementWidth(r),h.canvasWidth=s.grid.gridWidth,h.gridHeight=n.gridHeight=t.elementHeight(r),h.gridHeight<=h.options.rowHeight&&h.options.enableMinHeightCheck&&u(),h.refreshCanvas(!0)}function u(){var e=h.options.minRowsToShow*h.options.rowHeight,o=h.options.showHeader?h.options.headerRowHeight:0,s=h.calcFooterHeight(),a=0;h.options.enableHorizontalScrollbar===i.scrollbars.ALWAYS&&(a=t.getScrollbarWidth());var l=0;if(angular.forEach(h.options.columnDefs,function(e){e.hasOwnProperty("filter")?l<1&&(l=1):e.hasOwnProperty("filters")&&l<e.filters.length&&(l=e.filters.length)}),h.options.enableFiltering&&!l){h.options.columnDefs.length&&h.options.columnDefs.every(function(e){return!1===e.enableFiltering})||(l=1)}var c=l*o,u=o+e+s+a+c;r.css("height",u+"px"),h.gridHeight=n.gridHeight=t.elementHeight(r)}function d(){h.gridWidth=n.gridWidth=t.elementWidth(r),h.gridHeight=n.gridHeight=t.elementHeight(r),h.refreshCanvas(!0)}var h=s.grid;s.scrollbars=[],h.element=r;var p=100,g=20,f=0;l(),c(),h.renderingComplete(),a()}}}}}angular.module("ui.grid").controller("uiGridController",["$scope","$element","$attrs","gridUtil","$q","uiGridConstants","gridClassFactory","$parse","$compile",function(e,t,i,n,r,o,s,a,l){function c(e){return e?e.length:0}function u(t,i){t&&t!==i&&(h.grid.options.columnDefs=e.uiGrid.columnDefs,h.grid.callDataChangeCallbacks(o.dataChange.COLUMN,{orderByColumnDefs:!0,preCompileCellTemplates:!0}))}function d(t){var n=[];if(t=angular.isString(e.uiGrid.data)?h.grid.appScope[e.uiGrid.data]:e.uiGrid.data,g=t,t){var s=h.grid.columns.length>(h.grid.rowHeaderColumns?h.grid.rowHeaderColumns.length:0);!s&&!i.uiGridColumns&&0===h.grid.options.columnDefs.length&&t.length>0&&h.grid.buildColumnDefsFromData(t),!s&&(h.grid.options.columnDefs.length>0||t.length>0)&&n.push(h.grid.buildColumns().then(function(){h.grid.preCompileCellTemplates()})["catch"](angular.noop)),r.all(n).then(function(){h.grid.modifyRows(g).then(function(){h.grid.redrawInPlace(!0),e.$evalAsync(function(){h.grid.refreshCanvas(!0),h.grid.callDataChangeCallbacks(o.dataChange.ROW)})})["catch"](angular.noop)})["catch"](angular.noop)}}var h=this,p=[];h.grid=s.createGrid(e.uiGrid),h.grid.appScope=h.grid.appScope||e.$parent,t.addClass("grid"+h.grid.id),h.grid.rtl="rtl"===n.getStyles(t[0]).direction,e.grid=h.grid,i.uiGridColumns&&p.push(i.$observe("uiGridColumns",function(e){h.grid.options.columnDefs=angular.isString(e)?angular.fromJson(e):e,h.grid.buildColumns().then(function(){h.grid.preCompileCellTemplates(),h.grid.refreshCanvas(!0)})["catch"](angular.noop)})),h.grid.options.fastWatch?(h.uiGrid=e.uiGrid,angular.isString(e.uiGrid.data)?(p.push(e.$parent.$watch(e.uiGrid.data,d)),p.push(e.$parent.$watch(function(){return h.grid.appScope[e.uiGrid.data]?h.grid.appScope[e.uiGrid.data].length:undefined},d))):(p.push(e.$parent.$watch(function(){return e.uiGrid.data},d)),p.push(e.$parent.$watch(function(){return c(e.uiGrid.data)},function(){d(e.uiGrid.data)}))),p.push(e.$parent.$watch(function(){return e.uiGrid.columnDefs},u)),p.push(e.$parent.$watch(function(){return c(e.uiGrid.columnDefs)},function(){u(e.uiGrid.columnDefs)}))):(angular.isString(e.uiGrid.data)?p.push(e.$parent.$watchCollection(e.uiGrid.data,d)):p.push(e.$parent.$watchCollection(function(){return e.uiGrid.data},d)),p.push(e.$parent.$watchCollection(function(){return e.uiGrid.columnDefs},u)));var g,f=e.$watch(function(){return h.grid.styleComputations},function(){h.grid.refreshCanvas(!0)});e.$on("$destroy",function(){p.forEach(function(e){e()}),f()}),h.fireEvent=function(t,i){i=i||{},angular.isUndefined(i.grid)&&(i.grid=h.grid),e.$broadcast(t,i)},h.innerCompile=function(t){l(t)(e)}}]),angular.module("ui.grid").directive("uiGrid",e),e.$inject=["$window","gridUtil","uiGridConstants"]}(),function(){"use strict";angular.module("ui.grid").directive("uiGridPinnedContainer",["gridUtil",function(){return{restrict:"EA",replace:!0,template:'<div class="ui-grid-pinned-container"><div ui-grid-render-container container-id="side" row-container-name="\'body\'" col-container-name="side" bind-scroll-vertical="true" class="{{ side }} ui-grid-render-container-{{ side }}"></div></div>',scope:{side:"=uiGridPinnedContainer"},require:"^uiGrid",compile:function(){return{post:function(e,t,i,n){function r(){var e=this,t=0;e.visibleColumnCache.forEach(function(e){t+=e.drawnWidth});var i=e.getViewportAdjustment();return t+=i.width}function o(){if("left"===e.side||"right"===e.side){for(var t=a.renderContainers[e.side].visibleColumnCache,i=0,n=0;n<t.length;n++){var r=t[n];i+=r.drawnWidth||r.width||0}return i}}function s(){var i="";return"left"!==e.side&&"right"!==e.side||(l=o(),t.attr("style",null),i+=".grid"+a.id+" .ui-grid-pinned-container-"+e.side+", .grid"+a.id+" .ui-grid-pinned-container-"+e.side+" .ui-grid-render-container-"+e.side+" .ui-grid-viewport { width: "+l+"px; } "),i}var a=n.grid,l=0;t.addClass("ui-grid-pinned-container-"+e.side),"left"!==e.side&&"right"!==e.side||(a.renderContainers[e.side].getViewportWidth=r),a.renderContainers.body.registerViewportAdjuster(function(t){return l=o(),t.width-=l,t.side=e.side,t}),a.registerStyleComputation({priority:15,func:s})}}}}}])}(),function(){angular.module("ui.grid").factory("Grid",["$q","$compile","$parse","gridUtil","uiGridConstants","GridOptions","GridColumn","GridRow","GridApi","rowSorter","rowSearcher","GridRenderContainer","$timeout","ScrollEvent",function(e,t,i,n,r,o,s,a,l,c,u,d,h,p){function g(){}var f=function(e){function t(e){s.isScrollingVertically=!1,s.api.core.raise.scrollEnd(e),s.scrollDirection=r.scrollDirection.NONE}function i(e){s.isScrollingHorizontally=!1,s.api.core.raise.scrollEnd(e),s.scrollDirection=r.scrollDirection.NONE}var s=this;if(e===undefined||"undefined"==typeof e.id||!e.id)throw new Error("No ID provided. An ID must be given when creating a grid.");if(!/^[_a-zA-Z0-9-]+$/.test(e.id))throw new Error("Grid id '"+e.id+'" is invalid. It must follow CSS selector syntax rules.');s.id=e.id,delete e.id,s.options=o.initialize(e),s.appScope=s.options.appScopeProvider,s.headerHeight=s.options.headerRowHeight,s.footerHeight=s.calcFooterHeight(),s.columnFooterHeight=s.calcColumnFooterHeight(),s.rtl=!1,s.gridHeight=0,s.gridWidth=0,s.columnBuilders=[],s.rowBuilders=[],s.rowsProcessors=[],s.columnsProcessors=[],s.styleComputations=[],s.viewportAdjusters=[],s.rowHeaderColumns=[],s.dataChangeCallbacks={},s.verticalScrollSyncCallBackFns={},s.horizontalScrollSyncCallBackFns={},s.renderContainers={},s.renderContainers.body=new d("body",s),s.cellValueGetterCache={},s.getRowTemplateFn=null,s.rows=[],s.columns=[],s.isScrollingVertically=!1,s.isScrollingHorizontally=!1,s.scrollDirection=r.scrollDirection.NONE,s.disableScrolling=!1;var a=n.debounce(t,s.options.scrollDebounce),u=n.debounce(t,0),h=n.debounce(i,s.options.scrollDebounce),p=n.debounce(i,0);s.flagScrollingVertically=function(e){s.isScrollingVertically||s.isScrollingHorizontally||s.api.core.raise.scrollBegin(e),s.isScrollingVertically=!0,0!==s.options.scrollDebounce&&e.withDelay?a(e):u(e)},s.flagScrollingHorizontally=function(e){s.isScrollingVertically||s.isScrollingHorizontally||s.api.core.raise.scrollBegin(e),s.isScrollingHorizontally=!0,0!==s.options.scrollDebounce&&e.withDelay?h(e):p(e)},s.scrollbarHeight=0,s.scrollbarWidth=0,s.options.enableHorizontalScrollbar===r.scrollbars.ALWAYS&&(s.scrollbarHeight=n.getScrollbarWidth()),s.options.enableVerticalScrollbar===r.scrollbars.ALWAYS&&(s.scrollbarWidth=n.getScrollbarWidth()),s.api=new l(s),s.api.registerMethod("core","refresh",this.refresh),s.api.registerMethod("core","queueGridRefresh",this.queueGridRefresh),s.api.registerMethod("core","refreshRows",this.refreshRows),s.api.registerMethod("core","queueRefresh",this.queueRefresh),s.api.registerMethod("core","handleWindowResize",this.handleWindowResize),s.api.registerMethod("core","addRowHeaderColumn",this.addRowHeaderColumn),s.api.registerMethod("core","scrollToIfNecessary",function(e,t){return s.scrollToIfNecessary(e,t)}),s.api.registerMethod("core","scrollTo",function(e,t){return s.scrollTo(e,t)}),s.api.registerMethod("core","registerRowsProcessor",this.registerRowsProcessor),s.api.registerMethod("core","registerColumnsProcessor",this.registerColumnsProcessor),s.api.registerMethod("core","sortHandleNulls",c.handleNulls),s.api.registerEvent("core","sortChanged"),s.api.registerEvent("core","columnVisibilityChanged"),s.api.registerMethod("core","notifyDataChange",this.notifyDataChange),s.api.registerMethod("core","clearAllFilters",this.clearAllFilters),s.registerDataChangeCallback(s.columnRefreshCallback,[r.dataChange.COLUMN]),s.registerDataChangeCallback(s.processRowsCallback,[r.dataChange.EDIT]),s.registerDataChangeCallback(s.updateFooterHeightCallback,[r.dataChange.OPTIONS]),s.registerStyleComputation({priority:10,func:s.getFooterStyles})};f.prototype.calcFooterHeight=function(){if(!this.hasFooter())return 0;var e=0;return this.options.showGridFooter&&(e+=this.options.gridFooterHeight),e+=this.calcColumnFooterHeight()},f.prototype.calcColumnFooterHeight=function(){var e=0;return this.options.showColumnFooter&&(e+=this.options.columnFooterHeight),e},f.prototype.getFooterStyles=function(){var e=".grid"+this.id+" .ui-grid-footer-aggregates-row { height: "+this.options.columnFooterHeight+"px; }";return e+=" .grid"+this.id+" .ui-grid-footer-info { height: "+this.options.gridFooterHeight+"px; }"},f.prototype.hasFooter=function(){return this.options.showGridFooter||this.options.showColumnFooter},f.prototype.isRTL=function(){return this.rtl},f.prototype.registerColumnBuilder=function(e){this.columnBuilders.push(e)},f.prototype.buildColumnDefsFromData=function(e){this.options.columnDefs=n.getColumnsFromData(e,this.options.excludeProperties)},f.prototype.registerRowBuilder=function(e){this.rowBuilders.push(e)},f.prototype.registerDataChangeCallback=function(e,t,i){var o=n.nextUid();t||(t=[r.dataChange.ALL]),Array.isArray(t)||n.logError("Expected types to be an array or null in registerDataChangeCallback, value passed was: "+t),this.dataChangeCallbacks[o]={callback:e,types:t,_this:i};var s=this;return function(){delete s.dataChangeCallbacks[o]}},f.prototype.callDataChangeCallbacks=function(e,t){angular.forEach(this.dataChangeCallbacks,function(i){-1===i.types.indexOf(r.dataChange.ALL)&&-1===i.types.indexOf(e)&&e!==r.dataChange.ALL||(i._this?i.callback.apply(i._this,this,t):i.callback(this,t))},this)},f.prototype.notifyDataChange=function(e){var t=r.dataChange;e===t.ALL||e===t.COLUMN||e===t.EDIT||e===t.ROW||e===t.OPTIONS?this.callDataChangeCallbacks(e):n.logError("Notified of a data change, but the type was not recognised, so no action taken, type was: "+e)},f.prototype.columnRefreshCallback=function(e,t){e.buildColumns(t),e.queueGridRefresh()},f.prototype.processRowsCallback=function(e){e.queueGridRefresh()},f.prototype.updateFooterHeightCallback=function(e){e.footerHeight=e.calcFooterHeight(),e.columnFooterHeight=e.calcColumnFooterHeight()},f.prototype.getColumn=function(e){var t=this.columns.filter(function(t){return t.colDef.name===e});return t.length>0?t[0]:null},f.prototype.getColDef=function(e){var t=this.options.columnDefs.filter(function(t){return t.name===e});return t.length>0?t[0]:null},f.prototype.assignTypes=function(){var e=this;e.options.columnDefs.forEach(function(t,i){if(!t.type){var r=new s(t,i,e),o=e.rows.length>0?e.rows[0]:null;t.type=o?n.guessType(e.getCellValue(o,r)):"string"}})},f.prototype.isRowHeaderColumn=function(e){return-1!==this.rowHeaderColumns.indexOf(e)},f.prototype.addRowHeaderColumn=function(e,t,i){var r=this;t===undefined&&(t=0);var o=new s(e,n.nextUid(),r);o.isRowHeader=!0,r.isRTL()?(r.createRightContainer(),o.renderContainer="right"):(r.createLeftContainer(),o.renderContainer="left"),r.columnBuilders[0](e,o,r.options).then(function(){o.enableFiltering=!1,o.enableSorting=!1,o.enableHiding=!1,o.headerPriority=t,r.rowHeaderColumns.push(o),r.rowHeaderColumns=r.rowHeaderColumns.sort(function(e,t){return e.headerPriority-t.headerPriority}),i||r.buildColumns().then(function(){r.preCompileCellTemplates(),r.queueGridRefresh()})["catch"](angular.noop)})["catch"](angular.noop)},f.prototype.getOnlyDataColumns=function(){var e=this,t=[];return e.columns.forEach(function(i){-1===e.rowHeaderColumns.indexOf(i)&&t.push(i)}),t},f.prototype.buildColumns=function(t){var i={orderByColumnDefs:!1};angular.extend(i,t);var r,o=this,a=[],l=o.rowHeaderColumns.length;for(r=0;r<o.columns.length;r++)o.getColDef(o.columns[r].name)||(o.columns.splice(r,1),r--);for(var c=o.rowHeaderColumns.length-1;c>=0;c--)o.columns.unshift(o.rowHeaderColumns[c]);if(o.options.columnDefs.forEach(function(e,t){o.preprocessColDef(e);var i=o.getColumn(e.name);i?i.updateColumnDef(e,!1):(i=new s(e,n.nextUid(),o),o.columns.splice(t+l,0,i)),o.columnBuilders.forEach(function(t){a.push(t.call(o,e,i,o.options))})}),i.orderByColumnDefs){var u=o.columns.slice(0),d=Math.min(o.options.columnDefs.length,o.columns.length);for(r=0;r<d;r++)o.columns[r+l].name!==o.options.columnDefs[r].name?u[r+l]=o.getColumn(o.options.columnDefs[r].name):u[r+l]=o.columns[r+l];o.columns.length=0,Array.prototype.splice.apply(o.columns,[0,0].concat(u))}return e.all(a).then(function(){o.rows.length>0&&o.assignTypes(),i.preCompileCellTemplates&&o.preCompileCellTemplates()})["catch"](angular.noop)},f.prototype.preCompileCellTemplate=function(e){var i=this,n=e.cellTemplate.replace(r.MODEL_COL_FIELD,i.getQualifiedColField(e));n=n.replace(r.COL_FIELD,"grid.getCellValue(row, col)");var o=t(n);e.compiledElementFn=o,e.compiledElementFnDefer&&e.compiledElementFnDefer.resolve(e.compiledElementFn)},f.prototype.preCompileCellTemplates=function(){var e=this;e.columns.forEach(function(t){t.cellTemplate?e.preCompileCellTemplate(t):t.cellTemplatePromise&&t.cellTemplatePromise.then(function(){e.preCompileCellTemplate(t)})["catch"](angular.noop)})},f.prototype.getQualifiedColField=function(e){var t="row.entity";return e.field===r.ENTITY_BINDING?t:n.preEval(t+"."+e.field)},f.prototype.createLeftContainer=function(){this.hasLeftContainer()||(this.renderContainers.left=new d("left",this,{disableColumnOffset:!0}))},f.prototype.createRightContainer=function(){this.hasRightContainer()||(this.renderContainers.right=new d("right",this,{disableColumnOffset:!0}))},f.prototype.hasLeftContainer=function(){return this.renderContainers.left!==undefined},f.prototype.hasRightContainer=function(){return this.renderContainers.right!==undefined},f.prototype.preprocessColDef=function(e){var t=this;if(!e.field&&!e.name)throw new Error("colDef.name or colDef.field property is required");if(e.name===undefined&&e.field!==undefined){for(var i=e.field,n=2;t.getColumn(i);)i=e.field+n.toString(),n++;e.name=i}},f.prototype.newInN=function(e,t,i,n){for(var r=this,o=[],s=0;s<t.length;s++){for(var a=n?t[s][n]:t[s],l=!1,c=0;c<e.length;c++){var u=i?e[c][i]:e[c];if(r.options.rowEquality(a,u)){l=!0;break}}l||o.push(a)}return o},f.prototype.getRow=function(e,t){var i=this;t=void 0===t?i.rows:t;var n=t.filter(function(t){return i.options.rowEquality(t.entity,e)});return n.length>0?n[0]:null},f.prototype.modifyRows=function(t){var i=this,n=i.rows.slice(0),r=i.rowHashMap||i.createRowHashMap();i.rowHashMap=i.createRowHashMap(),i.rows.length=0,t.forEach(function(e,t){var o,s;s=i.options.enableRowHashing?r.get(e):i.getRow(e,n),s&&(o=s,o.entity=e),o||(o=i.processRowBuilders(new a(e,t,i))),i.rows.push(o),i.rowHashMap.put(e,o)}),i.assignTypes();var o=e.when(i.processRowsProcessors(i.rows)).then(function(e){return i.setVisibleRows(e)})["catch"](angular.noop),s=e.when(i.processColumnsProcessors(i.columns)).then(function(e){return i.setVisibleColumns(e)})["catch"](angular.noop);return e.all([o,s])},f.prototype.addRows=function(e){for(var t=this,i=t.rows.length,n=0;n<e.length;n++){var r=t.processRowBuilders(new a(e[n],n+i,t));if(t.options.enableRowHashing){var o=t.rowHashMap.get(r.entity);o&&(o.row=r)}t.rows.push(r)}},f.prototype.processRowBuilders=function(e){var t=this;return t.rowBuilders.forEach(function(i){i.call(t,e,t.options)}),e},f.prototype.registerStyleComputation=function(e){this.styleComputations.push(e)},f.prototype.registerRowsProcessor=function(e,t){if(!angular.isFunction(e))throw"Attempt to register non-function rows processor: "+e;this.rowsProcessors.push({processor:e,priority:t}),this.rowsProcessors.sort(function(e,t){return e.priority-t.priority})},f.prototype.removeRowsProcessor=function(e){var t=-1;this.rowsProcessors.forEach(function(i,n){i.processor===e&&(t=n)}),-1!==t&&this.rowsProcessors.splice(t,1)},f.prototype.processRowsProcessors=function(t){function i(t,r){var s=n.rowsProcessors[t].processor;return e.when(s.call(n,r,n.columns)).then(function(e){if(!e)throw"Processor at index "+t+" did not return a set of renderable rows";if(!angular.isArray(e))throw"Processor at index "+t+" did not return an array";if(++t<=n.rowsProcessors.length-1)return i(t,e);o.resolve(e)})["catch"](angular.noop)}var n=this,r=t.slice(0);if(0===n.rowsProcessors.length)return e.when(r);var o=e.defer();return i(0,r),o.promise},f.prototype.setVisibleRows=function(e){var t=this;for(var i in t.renderContainers){var n=t.renderContainers[i];n.canvasHeightShouldUpdate=!0,"undefined"==typeof n.visibleRowCache?n.visibleRowCache=[]:n.visibleRowCache.length=0}for(var r=0;r<e.length;r++){var o=e[r],s="undefined"!=typeof o.renderContainer&&o.renderContainer?o.renderContainer:"body";o.visible&&t.renderContainers[s].visibleRowCache.push(o)}t.api.core.raise.rowsVisibleChanged(this.api),t.api.core.raise.rowsRendered(this.api)},f.prototype.registerColumnsProcessor=function(e,t){if(!angular.isFunction(e))throw"Attempt to register non-function rows processor: "+e;this.columnsProcessors.push({processor:e,priority:t}),this.columnsProcessors.sort(function(e,t){return e.priority-t.priority})},f.prototype.removeColumnsProcessor=function(e){var t=this.columnsProcessors.indexOf(e);void 0!==t&&t!==undefined&&this.columnsProcessors.splice(t,1)},f.prototype.processColumnsProcessors=function(t){function i(t,s){var a=n.columnsProcessors[t].processor;return e.when(a.call(n,s,n.rows)).then(function(e){if(!e)throw"Processor at index "+t+" did not return a set of renderable rows";if(!angular.isArray(e))throw"Processor at index "+t+" did not return an array";if(++t<=n.columnsProcessors.length-1)return i(t,r);o.resolve(r)})["catch"](angular.noop)}var n=this,r=t.slice(0);if(0===n.columnsProcessors.length)return e.when(r);var o=e.defer();return i(0,r),o.promise},f.prototype.setVisibleColumns=function(e){var t=this;for(var i in t.renderContainers){t.renderContainers[i].visibleColumnCache.length=0}for(var n=0;n<e.length;n++){var r=e[n];r.visible&&("undefined"!=typeof r.renderContainer&&r.renderContainer?t.renderContainers[r.renderContainer].visibleColumnCache.push(r):t.renderContainers.body.visibleColumnCache.push(r))}},f.prototype.handleWindowResize=function(){var e=this;return e.gridWidth=n.elementWidth(e.element),e.gridHeight=n.elementHeight(e.element),e.queueRefresh()},f.prototype.queueRefresh=function(){var e=this;return e.refreshCanceller&&h.cancel(e.refreshCanceller),e.refreshCanceller=h(function(){e.refreshCanvas(!0)}),e.refreshCanceller.then(function(){e.refreshCanceller=null})["catch"](angular.noop),e.refreshCanceller},f.prototype.queueGridRefresh=function(){var e=this;return e.gridRefreshCanceller&&h.cancel(e.gridRefreshCanceller),e.gridRefreshCanceller=h(function(){e.refresh(!0)}),e.gridRefreshCanceller.then(function(){e.gridRefreshCanceller=null})["catch"](angular.noop),e.gridRefreshCanceller},f.prototype.updateCanvasHeight=function(){var e=this;for(var t in e.renderContainers)if(e.renderContainers.hasOwnProperty(t)){var i=e.renderContainers[t];i.canvasHeightShouldUpdate=!0}},f.prototype.buildStyles=function(){var e=this;e.customStyles="",e.styleComputations.sort(function(e,t){return null===e.priority?1:null===t.priority?-1:null===e.priority&&null===t.priority?0:e.priority-t.priority}).forEach(function(t){var i=t.func.call(e);angular.isString(i)&&(e.customStyles+="\n"+i)})},f.prototype.minColumnsToRender=function(){var e=this,t=this.getViewportWidth(),i=0,n=0;return e.columns.forEach(function(r,o){if(n<t)n+=r.drawnWidth,i++;else{for(var s=0,a=o;a>=o-i;a--)s+=e.columns[a].drawnWidth;s<t&&i++}}),i},f.prototype.getBodyHeight=function(){return this.getViewportHeight()},f.prototype.getViewportHeight=function(){var e=this,t=this.gridHeight-this.headerHeight-this.footerHeight;return t+=e.getViewportAdjustment().height},f.prototype.getViewportWidth=function(){var e=this,t=this.gridWidth;return t+=e.getViewportAdjustment().width},f.prototype.getHeaderViewportWidth=function(){return this.getViewportWidth()},f.prototype.addVerticalScrollSync=function(e,t){this.verticalScrollSyncCallBackFns[e]=t},f.prototype.addHorizontalScrollSync=function(e,t){this.horizontalScrollSyncCallBackFns[e]=t},f.prototype.scrollContainers=function(e,t){if(t.y){var i=["body","left","right"];this.flagScrollingVertically(t),"body"===e?i=["left","right"]:"left"===e?i=["body","right"]:"right"===e&&(i=["body","left"]);for(var n=0;n<i.length;n++){var r=i[n];this.verticalScrollSyncCallBackFns[r]&&this.verticalScrollSyncCallBackFns[r](t)}}if(t.x){var o=["body","bodyheader","bodyfooter"];this.flagScrollingHorizontally(t),"body"===e&&(o=["bodyheader","bodyfooter"]);for(var s=0;s<o.length;s++){var a=o[s];this.horizontalScrollSyncCallBackFns[a]&&this.horizontalScrollSyncCallBackFns[a](t)}}},f.prototype.registerViewportAdjuster=function(e){this.viewportAdjusters.push(e)},f.prototype.removeViewportAdjuster=function(e){var t=this.viewportAdjusters.indexOf(e);void 0!==t&&t!==undefined&&this.viewportAdjusters.splice(t,1)},f.prototype.getViewportAdjustment=function(){var e=this,t={height:0,width:0};return e.viewportAdjusters.forEach(function(e){t=e.call(this,t)}),t},f.prototype.getVisibleRowCount=function(){return this.renderContainers.body.visibleRowCache.length},f.prototype.getVisibleRows=function(){return this.renderContainers.body.visibleRowCache},f.prototype.getVisibleColumnCount=function(){return this.renderContainers.body.visibleColumnCache.length},f.prototype.searchRows=function(e){return u.search(this,e,this.columns)},f.prototype.sortByColumn=function(e){return c.sort(this,e,this.columns)},f.prototype.getCellValue=function(e,t){return"undefined"!=typeof e.entity["$$"+t.uid]?e.entity["$$"+t.uid].rendered:this.options.flatEntityAccess&&"undefined"!=typeof t.field?e.entity[t.field]:(t.cellValueGetterCache||(t.cellValueGetterCache=i(e.getEntityQualifiedColField(t))),t.cellValueGetterCache(e))},f.prototype.getCellDisplayValue=function(e,t){if(!t.cellDisplayGetterCache){var n=t.cellFilter?" | "+t.cellFilter:"";"undefined"!=typeof e.entity["$$"+t.uid]?t.cellDisplayGetterCache=i(e.entity["$$"+t.uid].rendered+n):this.options.flatEntityAccess&&"undefined"!=typeof t.field?t.cellDisplayGetterCache=i("entity."+t.field+n):t.cellDisplayGetterCache=i(e.getEntityQualifiedColField(t)+n)}return t.cellDisplayGetterCache(e)},f.prototype.getNextColumnSortPriority=function(){var e=this,t=0;return e.columns.forEach(function(e){e.sort&&e.sort.priority!==undefined&&e.sort.priority>=t&&(t=e.sort.priority+1)}),t},f.prototype.resetColumnSorting=function(e){this.columns.forEach(function(t){t===e||t.suppressRemoveSort||(t.sort={})})},f.prototype.getColumnSorting=function(){var e,t=this,i=[];return e=t.columns.slice(0),e.sort(c.prioritySort).forEach(function(e){e.sort&&"undefined"!=typeof e.sort.direction&&e.sort.direction&&(e.sort.direction===r.ASC||e.sort.direction===r.DESC)&&i.push(e)}),i},f.prototype.sortColumn=function(t,i,n){var r=this,o=null;if(void 0===t||!t)throw new Error("No column parameter provided");if("boolean"==typeof i?n=i:o=i,n?t.sort.priority===undefined&&(t.sort.priority=r.getNextColumnSortPriority()):(r.resetColumnSorting(t),t.sort.priority=undefined,t.sort.priority=r.getNextColumnSortPriority()),o)t.sort.direction=o;else{var s=t.sortDirectionCycle.indexOf(t.sort.direction?t.sort.direction:null);s=(s+1)%t.sortDirectionCycle.length,t.colDef&&t.suppressRemoveSort&&!t.sortDirectionCycle[s]&&(s=(s+1)%t.sortDirectionCycle.length),t.sortDirectionCycle[s]?t.sort.direction=t.sortDirectionCycle[s]:m(t,r)}return r.api.core.raise.sortChanged(r,r.getColumnSorting()),e.when(t)};var m=function(e,t){t.columns.forEach(function(t){t.sort&&t.sort.priority!==undefined&&t.sort.priority>e.sort.priority&&(t.sort.priority-=1)}),e.sort={}};return f.prototype.renderingComplete=function(){angular.isFunction(this.options.onRegisterApi)&&this.options.onRegisterApi(this.api),this.api.core.raise.renderingComplete(this.api)},f.prototype.createRowHashMap=function(){var e=this,t=new g;return t.grid=e,t},f.prototype.refresh=function(t){var i=this,n=i.processRowsProcessors(i.rows).then(function(e){i.setVisibleRows(e)})["catch"](angular.noop),r=i.processColumnsProcessors(i.columns).then(function(e){i.setVisibleColumns(e)})["catch"](angular.noop);return e.all([n,r]).then(function(){i.refreshCanvas(!0),i.redrawInPlace(t)})["catch"](angular.noop)},f.prototype.refreshRows=function(){var e=this;return e.processRowsProcessors(e.rows).then(function(t){e.setVisibleRows(t),e.redrawInPlace(),e.refreshCanvas(!0)})["catch"](angular.noop)},f.prototype.refreshCanvas=function(t){var i=this,r=e.defer(),o=[];for(var s in i.renderContainers)if(i.renderContainers.hasOwnProperty(s)){var a=i.renderContainers[s];if(null===a.canvasWidth||isNaN(a.canvasWidth))continue;(a.header||a.headerCanvas)&&(a.explicitHeaderHeight=a.explicitHeaderHeight||null,a.explicitHeaderCanvasHeight=a.explicitHeaderCanvasHeight||null,o.push(a))}return t&&i.buildStyles(),h(o.length>0?function(){var e,s,a=!1,l=0,c=0,u=function(e,t){return e!==t&&(a=!0),t};for(e=0;e<o.length;e++)if(s=o[e],null!==s.canvasWidth&&!isNaN(s.canvasWidth)){if(s.header){var d=s.headerHeight=u(s.headerHeight,parseInt(n.outerElementHeight(s.header),10)),h=n.getBorderSize(s.header,"top"),p=n.getBorderSize(s.header,"bottom"),g=parseInt(d-h-p,10);g=g<0?0:g,s.innerHeaderHeight=g,!s.explicitHeaderHeight&&g>l&&(l=g)}if(s.headerCanvas){var f=s.headerCanvasHeight=u(s.headerCanvasHeight,parseInt(n.outerElementHeight(s.headerCanvas),10));!s.explicitHeaderCanvasHeight&&f>c&&(c=f)}}for(e=0;e<o.length;e++)s=o[e],l>0&&"undefined"!=typeof s.headerHeight&&null!==s.headerHeight&&(s.explicitHeaderHeight||s.headerHeight<l)&&(s.explicitHeaderHeight=u(s.explicitHeaderHeight,l)),c>0&&"undefined"!=typeof s.headerCanvasHeight&&null!==s.headerCanvasHeight&&(s.explicitHeaderCanvasHeight||s.headerCanvasHeight<c)&&(s.explicitHeaderCanvasHeight=u(s.explicitHeaderCanvasHeight,c));t&&a&&i.buildStyles(),r.resolve()}:function(){r.resolve()}),r.promise},f.prototype.redrawInPlace=function(e){var t=this;for(var i in t.renderContainers){var n=t.renderContainers[i];e?(n.adjustRows(n.prevScrollTop,null),n.adjustColumns(n.prevScrollLeft,null)):(n.adjustRows(null,n.prevScrolltopPercentage),n.adjustColumns(null,n.prevScrollleftPercentage))}},f.prototype.hasLeftContainerColumns=function(){return this.hasLeftContainer()&&this.renderContainers.left.renderedColumns.length>0},f.prototype.hasRightContainerColumns=function(){return this.hasRightContainer()&&this.renderContainers.right.renderedColumns.length>0},f.prototype.scrollToIfNecessary=function(t,i){var n=this,r=new p(n,"uiGrid.scrollToIfNecessary"),o=n.renderContainers.body.visibleRowCache,s=n.renderContainers.body.visibleColumnCache,a=n.renderContainers.body.prevScrollTop+n.headerHeight;a=a<0?0:a;var l=n.renderContainers.body.prevScrollLeft,c=n.renderContainers.body.prevScrollTop+n.gridHeight-n.renderContainers.body.headerHeight-n.footerHeight-n.scrollbarWidth,u=n.renderContainers.body.prevScrollLeft+Math.ceil(n.renderContainers.body.getViewportWidth());if(null!==t){var d=o.indexOf(t),h=n.renderContainers.body.getCanvasHeight()-n.renderContainers.body.getViewportHeight(),g=d*n.options.rowHeight+n.headerHeight;g=g<0?0:g;var f,m;g<a?(f=n.renderContainers.body.prevScrollTop-(a-g),m=f/h,r.y={percentage:m}):g>c&&(f=g-c+n.renderContainers.body.prevScrollTop,m=f/h,r.y={percentage:m})}if(null!==i){for(var v=s.indexOf(i),y=n.renderContainers.body.getCanvasWidth()-n.renderContainers.body.getViewportWidth(),w=0,C=0;C<v;C++){w+=s[C].drawnWidth}w=w<0?0:w;var b=w+i.drawnWidth;b=b<0?0:b;var A,x;w<l?(A=n.renderContainers.body.prevScrollLeft-(l-w),x=A/y,x=x>1?1:x,r.x={percentage:x}):b>u&&(A=b-u+n.renderContainers.body.prevScrollLeft,x=A/y,x=x>1?1:x,r.x={percentage:x})}var S=e.defer();if(r.y||r.x){r.withDelay=!1,n.scrollContainers("",r);var E=n.api.core.on.scrollEnd(null,function(){S.resolve(r),E()})}else S.resolve();return S.promise},f.prototype.scrollTo=function(e,t){var i=null,n=null;return null!==e&&void 0!==e&&(i=this.getRow(e)),null!==t&&void 0!==t&&(n=this.getColumn(t.name?t.name:t.field)),this.scrollToIfNecessary(i,n)},f.prototype.clearAllFilters=function(e,t,i){if(e===undefined&&(e=!0),t===undefined&&(t=!1),i===undefined&&(i=!1),this.columns.forEach(function(e){e.filters.forEach(function(e){e.term=undefined,t&&(e.condition=undefined),i&&(e.flags=undefined)})}),e)return this.refreshRows()},g.prototype={put:function(e,t){this[this.grid.options.rowIdentity(e)]=t},get:function(e){return this[this.grid.options.rowIdentity(e)]},remove:function(e){var t=this[e=this.grid.options.rowIdentity(e)];return delete this[e],t}},f}])}(),function(){angular.module("ui.grid").factory("GridApi",["$q","$rootScope","gridUtil","uiGridConstants","GridRow","uiGridGridMenuService",function(e,t,i,n,r){function o(e,i,n,r){return t.$on(e,function(){var e=Array.prototype.slice.call(arguments);e.splice(0,1),i.apply(r||n.api,e)})}var s=function(e){this.grid=e,this.listeners=[],this.registerEvent("core","renderingComplete"),this.registerEvent("core","filterChanged"),this.registerMethod("core","setRowInvisible",r.prototype.setRowInvisible),this.registerMethod("core","clearRowInvisible",r.prototype.clearRowInvisible),this.registerMethod("core","getVisibleRows",this.grid.getVisibleRows),this.registerEvent("core","rowsVisibleChanged"),this.registerEvent("core","rowsRendered"),this.registerEvent("core","scrollBegin"),this.registerEvent("core","scrollEnd"),this.registerEvent("core","canvasHeightChanged"),this.registerEvent("core","gridDimensionChanged")}
;return s.prototype.suppressEvents=function(e,t){var i=this,n=angular.isArray(e)?e:[e],r=i.listeners.filter(function(e){return n.some(function(t){return e.handler===t})});r.forEach(function(e){e.dereg()}),t(),r.forEach(function(e){e.dereg=o(e.eventId,e.handler,i.grid,e._this)})},s.prototype.registerEvent=function(e,n){var r=this;r[e]||(r[e]={});var s=r[e];s.on||(s.on={},s.raise={});var a=r.grid.id+e+n;s.raise[n]=function(){t.$emit.apply(t,[a].concat(Array.prototype.slice.call(arguments)))},s.on[n]=function(t,s,l){if(null!==t&&"undefined"==typeof t.$on)return void i.logError("asked to listen on "+e+".on."+n+" but scope wasn't passed in the input parameters.  It is legitimate to pass null, but you've passed something else, so you probably forgot to provide scope rather than did it deliberately, not registering");var c=o(a,s,r.grid,l),u={handler:s,dereg:c,eventId:a,scope:t,_this:l};r.listeners.push(u);var d=function(){u.dereg();var e=r.listeners.indexOf(u);r.listeners.splice(e,1)};return t&&t.$on("$destroy",function(){d()}),d}},s.prototype.registerEventsFromObject=function(e){var t=this,i=[];angular.forEach(e,function(e,t){var n={name:t,events:[]};angular.forEach(e,function(e,t){n.events.push(t)}),i.push(n)}),i.forEach(function(e){e.events.forEach(function(i){t.registerEvent(e.name,i)})})},s.prototype.registerMethod=function(e,t,n,r){this[e]||(this[e]={}),this[e][t]=i.createBoundedWrapper(r||this.grid,n)},s.prototype.registerMethodsFromObject=function(e,t){var i=this,n=[];angular.forEach(e,function(e,t){var i={name:t,methods:[]};angular.forEach(e,function(e,t){i.methods.push({name:t,fn:e})}),n.push(i)}),n.forEach(function(e){e.methods.forEach(function(n){i.registerMethod(e.name,n.name,n.fn,t)})})},s}])}(),function(){angular.module("ui.grid").factory("GridColumn",["gridUtil","uiGridConstants","i18nService",function(e,t,i){function n(e,i,n){var r=this;r.grid=n,r.uid=i,r.updateColumnDef(e,!0),r.aggregationValue=undefined,r.updateAggregationValue=function(){if(!r.aggregationType)return void(r.aggregationValue=undefined);var e=0,i=r.grid.getVisibleRows(),n=function(){var e=[];return i.forEach(function(t){var i=r.grid.getCellValue(t,r),n=Number(i);isNaN(n)||e.push(n)}),e};angular.isFunction(r.aggregationType)?r.aggregationValue=r.aggregationType(i,r):r.aggregationType===t.aggregationTypes.count?r.aggregationValue=r.grid.getVisibleRowCount():r.aggregationType===t.aggregationTypes.sum?(n().forEach(function(t){e+=t}),r.aggregationValue=e):r.aggregationType===t.aggregationTypes.avg?(n().forEach(function(t){e+=t}),e/=n().length,r.aggregationValue=e):r.aggregationType===t.aggregationTypes.min?r.aggregationValue=Math.min.apply(null,n()):r.aggregationType===t.aggregationTypes.max?r.aggregationValue=Math.max.apply(null,n()):r.aggregationValue="\xa0"},this.getAggregationValue=function(){return r.aggregationValue}}return n.prototype.hideColumn=function(){this.colDef.visible=!1},n.prototype.setPropertyOrDefault=function(e,t,i){var n=this;"undefined"!=typeof e[t]&&e[t]?n[t]=e[t]:"undefined"!=typeof n[t]?n[t]=n[t]:n[t]=i||{}},n.prototype.updateColumnDef=function(i,n){var r=this;if(r.colDef=i,i.name===undefined)throw new Error("colDef.name is required for column at index "+r.grid.options.columnDefs.indexOf(i));if(r.displayName=i.displayName===undefined?e.readableColumnName(i.name):i.displayName,!angular.isNumber(r.width)||!r.hasCustomWidth||i.allowCustomWidthOverride){var o=i.width,s="Cannot parse column width '"+o+"' for column named '"+i.name+"'";if(r.hasCustomWidth=!1,angular.isString(o)||angular.isNumber(o))if(angular.isString(o))if(e.endsWith(o,"%")){var a=o.replace(/%/g,""),l=parseInt(a,10);if(isNaN(l))throw new Error(s);r.width=o}else if(o.match(/^(\d+)$/))r.width=parseInt(o.match(/^(\d+)$/)[1],10);else{if(!o.match(/^\*+$/))throw new Error(s);r.width=o}else r.width=o;else r.width="*"}["minWidth","maxWidth"].forEach(function(e){var t=i[e],n="Cannot parse column "+e+" '"+t+"' for column named '"+i.name+"'";if(angular.isString(t)||angular.isNumber(t))if(angular.isString(t)){if(!t.match(/^(\d+)$/))throw new Error(n);r[e]=parseInt(t.match(/^(\d+)$/)[1],10)}else r[e]=t;else r[e]="minWidth"===e?30:9e3}),r.field=i.field===undefined?i.name:i.field,"string"!=typeof r.field&&e.logError("Field is not a string, this is likely to break the code, Field is: "+r.field),r.name=i.name,r.displayName=i.displayName===undefined?e.readableColumnName(i.name):i.displayName,r.aggregationType=angular.isDefined(i.aggregationType)?i.aggregationType:null,r.footerCellTemplate=angular.isDefined(i.footerCellTemplate)?i.footerCellTemplate:null,"undefined"==typeof i.cellTooltip||!1===i.cellTooltip?r.cellTooltip=!1:!0===i.cellTooltip?r.cellTooltip=function(e,t){return r.grid.getCellValue(e,t)}:"function"==typeof i.cellTooltip?r.cellTooltip=i.cellTooltip:r.cellTooltip=function(e,t){return t.colDef.cellTooltip},"undefined"==typeof i.headerTooltip||!1===i.headerTooltip?r.headerTooltip=!1:!0===i.headerTooltip?r.headerTooltip=function(e){return e.displayName}:"function"==typeof i.headerTooltip?r.headerTooltip=i.headerTooltip:r.headerTooltip=function(e){return e.colDef.headerTooltip},r.footerCellClass=i.footerCellClass,r.cellClass=i.cellClass,r.headerCellClass=i.headerCellClass,r.cellFilter=i.cellFilter?i.cellFilter:"",r.sortCellFiltered=!!i.sortCellFiltered,r.filterCellFiltered=!!i.filterCellFiltered,r.headerCellFilter=i.headerCellFilter?i.headerCellFilter:"",r.footerCellFilter=i.footerCellFilter?i.footerCellFilter:"",r.visible=e.isNullOrUndefined(i.visible)||i.visible,r.headerClass=i.headerClass,r.enableSorting="undefined"!=typeof i.enableSorting?i.enableSorting:r.grid.options.enableSorting,r.sortingAlgorithm=i.sortingAlgorithm,r.sortDirectionCycle="undefined"!=typeof i.sortDirectionCycle?i.sortDirectionCycle:[null,t.ASC,t.DESC],"undefined"==typeof r.suppressRemoveSort&&(r.suppressRemoveSort="undefined"!=typeof i.suppressRemoveSort&&i.suppressRemoveSort),r.enableFiltering="undefined"==typeof i.enableFiltering||i.enableFiltering,r.setPropertyOrDefault(i,"menuItems",[]),n&&r.setPropertyOrDefault(i,"sort");var c=[];i.filter?c.push(i.filter):i.filters?c=i.filters:c.push({}),n?(r.setPropertyOrDefault(i,"filter"),r.setPropertyOrDefault(i,"extraStyle"),r.setPropertyOrDefault(i,"filters",c)):r.filters.length===c.length&&r.filters.forEach(function(e,t){"undefined"!=typeof c[t].placeholder&&(e.placeholder=c[t].placeholder),"undefined"!=typeof c[t].ariaLabel&&(e.ariaLabel=c[t].ariaLabel),"undefined"!=typeof c[t].flags&&(e.flags=c[t].flags),"undefined"!=typeof c[t].type&&(e.type=c[t].type),"undefined"!=typeof c[t].selectOptions&&(e.selectOptions=c[t].selectOptions)})},n.prototype.unsort=function(){this.sort={},this.grid.api.core.raise.sortChanged(this.grid,this.grid.getColumnSorting())},n.prototype.getColClass=function(e){var i=t.COL_CLASS_PREFIX+this.uid;return e?"."+i:i},n.prototype.isPinnedLeft=function(){return"left"===this.renderContainer},n.prototype.isPinnedRight=function(){return"right"===this.renderContainer},n.prototype.getColClassDefinition=function(){return" .grid"+this.grid.id+" "+this.getColClass(!0)+" { min-width: "+this.drawnWidth+"px; max-width: "+this.drawnWidth+"px; }"},n.prototype.getRenderContainer=function(){var e=this,t=e.renderContainer;return null!==t&&""!==t&&t!==undefined||(t="body"),e.grid.renderContainers[t]},n.prototype.showColumn=function(){this.colDef.visible=!0},n.prototype.getAggregationText=function(){var e=this;if(e.colDef.aggregationHideLabel)return"";if(e.colDef.aggregationLabel)return e.colDef.aggregationLabel;switch(e.colDef.aggregationType){case t.aggregationTypes.count:return i.getSafeText("aggregation.count");case t.aggregationTypes.sum:return i.getSafeText("aggregation.sum");case t.aggregationTypes.avg:return i.getSafeText("aggregation.avg");case t.aggregationTypes.min:return i.getSafeText("aggregation.min");case t.aggregationTypes.max:return i.getSafeText("aggregation.max");default:return""}},n.prototype.getCellTemplate=function(){return this.cellTemplatePromise},n.prototype.getCompiledElementFn=function(){return this.compiledElementFnDefer.promise},n}])}(),function(){angular.module("ui.grid").factory("GridOptions",["gridUtil","uiGridConstants",function(e,t){return{initialize:function(i){return i.onRegisterApi=i.onRegisterApi||angular.noop(),i.data=i.data||[],i.columnDefs=i.columnDefs||[],i.excludeProperties=i.excludeProperties||["$$hashKey"],i.enableRowHashing=!1!==i.enableRowHashing,i.rowIdentity=i.rowIdentity||function(t){return e.hashKey(t)},i.getRowIdentity=i.getRowIdentity||function(e){return e.$$hashKey},i.flatEntityAccess=!0===i.flatEntityAccess,i.showHeader="undefined"==typeof i.showHeader||i.showHeader,i.showHeader?i.headerRowHeight="undefined"!=typeof i.headerRowHeight?i.headerRowHeight:30:i.headerRowHeight=0,"string"==typeof i.rowHeight?i.rowHeight=parseInt(i.rowHeight)||30:i.rowHeight=i.rowHeight||30,i.minRowsToShow="undefined"!=typeof i.minRowsToShow?i.minRowsToShow:10,i.showGridFooter=!0===i.showGridFooter,i.showColumnFooter=!0===i.showColumnFooter,i.columnFooterHeight="undefined"!=typeof i.columnFooterHeight?i.columnFooterHeight:30,i.gridFooterHeight="undefined"!=typeof i.gridFooterHeight?i.gridFooterHeight:30,i.columnWidth="undefined"!=typeof i.columnWidth?i.columnWidth:50,i.maxVisibleColumnCount="undefined"!=typeof i.maxVisibleColumnCount?i.maxVisibleColumnCount:200,i.virtualizationThreshold="undefined"!=typeof i.virtualizationThreshold?i.virtualizationThreshold:20,i.columnVirtualizationThreshold="undefined"!=typeof i.columnVirtualizationThreshold?i.columnVirtualizationThreshold:10,i.excessRows="undefined"!=typeof i.excessRows?i.excessRows:4,i.scrollThreshold="undefined"!=typeof i.scrollThreshold?i.scrollThreshold:4,i.excessColumns="undefined"!=typeof i.excessColumns?i.excessColumns:4,i.horizontalScrollThreshold="undefined"!=typeof i.horizontalScrollThreshold?i.horizontalScrollThreshold:2,i.aggregationCalcThrottle="undefined"!=typeof i.aggregationCalcThrottle?i.aggregationCalcThrottle:500,i.wheelScrollThrottle="undefined"!=typeof i.wheelScrollThrottle?i.wheelScrollThrottle:70,i.scrollDebounce="undefined"!=typeof i.scrollDebounce?i.scrollDebounce:300,i.enableSorting=!1!==i.enableSorting,i.enableFiltering=!0===i.enableFiltering,i.enableColumnMenus=!1!==i.enableColumnMenus,i.enableVerticalScrollbar="undefined"!=typeof i.enableVerticalScrollbar?i.enableVerticalScrollbar:t.scrollbars.ALWAYS,i.enableHorizontalScrollbar="undefined"!=typeof i.enableHorizontalScrollbar?i.enableHorizontalScrollbar:t.scrollbars.ALWAYS,i.enableMinHeightCheck=!1!==i.enableMinHeightCheck,i.minimumColumnSize="undefined"!=typeof i.minimumColumnSize?i.minimumColumnSize:10,i.rowEquality=i.rowEquality||function(e,t){return e===t},i.headerTemplate=i.headerTemplate||null,i.footerTemplate=i.footerTemplate||"ui-grid/ui-grid-footer",i.gridFooterTemplate=i.gridFooterTemplate||"ui-grid/ui-grid-grid-footer",i.rowTemplate=i.rowTemplate||"ui-grid/ui-grid-row",i.gridMenuTemplate=i.gridMenuTemplate||"ui-grid/uiGridMenu",i.appScopeProvider=i.appScopeProvider||null,i}}}])}(),function(){angular.module("ui.grid").factory("GridRenderContainer",["gridUtil","uiGridConstants",function(e,t){function i(e,t,i){var n=this;n.name=e,n.grid=t,n.visibleRowCache=[],n.visibleColumnCache=[],n.renderedRows=[],n.renderedColumns=[],n.prevScrollTop=0,n.prevScrolltopPercentage=0,n.prevRowScrollIndex=0,n.prevScrollLeft=0,n.prevScrollleftPercentage=0,n.prevColumnScrollIndex=0,n.columnStyles="",n.viewportAdjusters=[],n.hasHScrollbar=!1,n.hasVScrollbar=!1,n.canvasHeightShouldUpdate=!0,n.$$canvasHeight=0,i&&angular.isObject(i)&&angular.extend(n,i),t.registerStyleComputation({priority:5,func:function(){return n.updateColumnWidths(),n.columnStyles}})}return i.prototype.reset=function(){this.visibleColumnCache.length=0,this.visibleRowCache.length=0,this.renderedRows.length=0,this.renderedColumns.length=0},i.prototype.containsColumn=function(e){return-1!==this.visibleColumnCache.indexOf(e)},i.prototype.minRowsToRender=function(){for(var e=this,t=0,i=0,n=e.getViewportHeight(),r=e.visibleRowCache.length-1;i<n&&r>=0;r--)i+=e.visibleRowCache[r].height,t++;return t},i.prototype.minColumnsToRender=function(){for(var e=this,t=this.getViewportWidth(),i=0,n=0,r=0;r<e.visibleColumnCache.length;r++){var o=e.visibleColumnCache[r];if(n<t)n+=o.drawnWidth?o.drawnWidth:0,i++;else{for(var s=0,a=r;a>=r-i;a--)s+=e.visibleColumnCache[a].drawnWidth?e.visibleColumnCache[a].drawnWidth:0;s<t&&i++}}return i},i.prototype.getVisibleRowCount=function(){return this.visibleRowCache.length},i.prototype.registerViewportAdjuster=function(e){this.viewportAdjusters.push(e)},i.prototype.removeViewportAdjuster=function(e){var t=this.viewportAdjusters.indexOf(e);t>-1&&this.viewportAdjusters.splice(t,1)},i.prototype.getViewportAdjustment=function(){var e=this,t={height:0,width:0};return e.viewportAdjusters.forEach(function(e){t=e.call(this,t)}),t},i.prototype.getMargin=function(e){var t=this,i=0;return t.viewportAdjusters.forEach(function(t){var n=t.call(this,{height:0,width:0});n.side&&n.side===e&&(i+=-1*n.width)}),i},i.prototype.getViewportHeight=function(){var e=this,t=e.headerHeight?e.headerHeight:e.grid.headerHeight,i=e.grid.gridHeight-t-e.grid.footerHeight;return i+=e.getViewportAdjustment().height},i.prototype.getViewportWidth=function(){var e=this,t=e.grid.gridWidth;return t+=e.getViewportAdjustment().width},i.prototype.getHeaderViewportWidth=function(){return this.getViewportWidth()},i.prototype.getCanvasHeight=function(){var e=this;if(!e.canvasHeightShouldUpdate)return e.$$canvasHeight;var t=e.$$canvasHeight;return e.$$canvasHeight=0,e.visibleRowCache.forEach(function(t){e.$$canvasHeight+=t.height}),e.canvasHeightShouldUpdate=!1,e.grid.api.core.raise.canvasHeightChanged(t,e.$$canvasHeight),e.$$canvasHeight},i.prototype.getVerticalScrollLength=function(){return this.getCanvasHeight()-this.getViewportHeight()+this.grid.scrollbarHeight!==0?this.getCanvasHeight()-this.getViewportHeight()+this.grid.scrollbarHeight:-1},i.prototype.getHorizontalScrollLength=function(){return this.getCanvasWidth()-this.getViewportWidth()+this.grid.scrollbarWidth!==0?this.getCanvasWidth()-this.getViewportWidth()+this.grid.scrollbarWidth:-1},i.prototype.getCanvasWidth=function(){return this.canvasWidth},i.prototype.setRenderedRows=function(e){this.renderedRows.length=e.length;for(var t=0;t<e.length;t++)this.renderedRows[t]=e[t]},i.prototype.setRenderedColumns=function(e){this.renderedColumns.length=e.length;for(var t=0;t<e.length;t++)this.renderedColumns[t]=e[t];this.updateColumnOffset()},i.prototype.updateColumnOffset=function(){for(var e=0,t=0;t<this.currentFirstColumn;t++)e+=this.visibleColumnCache[t].drawnWidth;this.columnOffset=e},i.prototype.scrollVertical=function(e){var i=-1;if(e!==this.prevScrollTop){var n=e-this.prevScrollTop;n>0&&(this.grid.scrollDirection=t.scrollDirection.DOWN),n<0&&(this.grid.scrollDirection=t.scrollDirection.UP);return i=e/this.getVerticalScrollLength(),i>1&&(i=1),i<0&&(i=0),this.adjustScrollVertical(e,i),i}},i.prototype.scrollHorizontal=function(e){var i=-1;if(e!==this.prevScrollLeft){var n=e-this.prevScrollLeft;n>0&&(this.grid.scrollDirection=t.scrollDirection.RIGHT),n<0&&(this.grid.scrollDirection=t.scrollDirection.LEFT);var r=this.getHorizontalScrollLength();return i=0!==r?e/r:0,this.adjustScrollHorizontal(e,i),i}},i.prototype.adjustScrollVertical=function(e,t,i){(this.prevScrollTop!==e||i)&&(void 0!==e&&e!==undefined&&null!==e||(e=(this.getCanvasHeight()-this.getViewportHeight())*t),this.adjustRows(e,t,!1),this.prevScrollTop=e,this.prevScrolltopPercentage=t,this.grid.queueRefresh())},i.prototype.adjustScrollHorizontal=function(e,t,i){(this.prevScrollLeft!==e||i)&&(void 0!==e&&e!==undefined&&null!==e||(e=(this.getCanvasWidth()-this.getViewportWidth())*t),this.adjustColumns(e,t),this.prevScrollLeft=e,this.prevScrollleftPercentage=t,this.grid.queueRefresh())},i.prototype.adjustRows=function(e,t){var i=this,n=i.minRowsToRender(),r=i.visibleRowCache,o=r.length-n;void 0!==t&&null!==t||!e||(t=e/i.getVerticalScrollLength());var s=Math.ceil(Math.min(o,o*t));s>o&&(s=o);var a=[];if(r.length>i.grid.options.virtualizationThreshold){if(void 0!==e&&null!==e){if(!i.grid.suppressParentScrollDown&&i.prevScrollTop<e&&s<i.prevRowScrollIndex+i.grid.options.scrollThreshold&&s<o)return;if(!i.grid.suppressParentScrollUp&&i.prevScrollTop>e&&s>i.prevRowScrollIndex-i.grid.options.scrollThreshold&&s<o)return}var l={},c={};l=Math.max(0,s-i.grid.options.excessRows),c=Math.min(r.length,s+n+i.grid.options.excessRows),a=[l,c]}else{var u=i.visibleRowCache.length;a=[0,Math.max(u,n+i.grid.options.excessRows)]}i.updateViewableRowRange(a),i.prevRowScrollIndex=s},i.prototype.adjustColumns=function(e,t){var i=this,n=i.minColumnsToRender(),r=i.visibleColumnCache,o=r.length-n;void 0!==t&&null!==t||!e||(t=e/i.getHorizontalScrollLength());var s=Math.ceil(Math.min(o,o*t));s>o&&(s=o);var a=[];if(r.length>i.grid.options.columnVirtualizationThreshold&&i.getCanvasWidth()>i.getViewportWidth()){a=[Math.max(0,s-i.grid.options.excessColumns),Math.min(r.length,s+n+i.grid.options.excessColumns)]}else{var l=i.visibleColumnCache.length;a=[0,Math.max(l,n+i.grid.options.excessColumns)]}i.updateViewableColumnRange(a),i.prevColumnScrollIndex=s},i.prototype.updateViewableRowRange=function(e){var t=this.visibleRowCache.slice(e[0],e[1]);this.currentTopRow=e[0],this.setRenderedRows(t)},i.prototype.updateViewableColumnRange=function(e){var t=this.visibleColumnCache.slice(e[0],e[1]);this.currentFirstColumn=e[0],this.setRenderedColumns(t)},i.prototype.headerCellWrapperStyle=function(){var e=this;if(0!==e.currentFirstColumn){var t=e.columnOffset;return e.grid.isRTL()?{"margin-right":t+"px"}:{"margin-left":t+"px"}}return null},i.prototype.updateColumnWidths=function(){var t=this,i=[],n=0,r=0,o="",s=t.grid.getViewportWidth()-t.grid.scrollbarWidth,a=[];angular.forEach(t.grid.renderContainers,function(e){a=a.concat(e.visibleColumnCache)}),a.forEach(function(t){var o=0;t.visible&&(angular.isNumber(t.width)?(o=parseInt(t.width,10),r+=o,t.drawnWidth=o):e.endsWith(t.width,"%")?(o=parseInt(parseInt(t.width.replace(/%/g,""),10)/100*s),o>t.maxWidth&&(o=t.maxWidth),o<t.minWidth&&(o=t.minWidth),r+=o,t.drawnWidth=o):angular.isString(t.width)&&-1!==t.width.indexOf("*")&&(n+=t.width.length,i.push(t)))});var l=s-r;if(i.length>0){var c=l/n;i.forEach(function(e){var t=parseInt(e.width.length*c,10);t>e.maxWidth&&(t=e.maxWidth),t<e.minWidth&&(t=e.minWidth),r+=t,e.drawnWidth=t})}for(var u=function(e){e.drawnWidth<e.maxWidth&&d>0&&(e.drawnWidth++,r++,d--,h=!0)},d=s-r,h=!0;d>0&&h;)h=!1,i.forEach(u);var p=function(e){e.drawnWidth>e.minWidth&&g>0&&(e.drawnWidth--,r--,g--,h=!0)},g=r-s;for(h=!0;g>0&&h;)h=!1,i.forEach(p);var f=0;t.visibleColumnCache.forEach(function(e){e.visible&&(f+=e.drawnWidth)}),a.forEach(function(e){o+=e.getColClassDefinition()}),t.canvasWidth=f,this.columnStyles=o},i.prototype.needsHScrollbarPlaceholder=function(){return this.grid.options.enableHorizontalScrollbar&&!this.hasHScrollbar&&!this.grid.disableScrolling},i.prototype.getViewportStyle=function(){var e=this,i={};return e.hasHScrollbar=!1,e.hasVScrollbar=!1,e.grid.disableScrolling?(i["overflow-x"]="hidden",i["overflow-y"]="hidden",i):("body"===e.name?(e.hasHScrollbar=e.grid.options.enableHorizontalScrollbar!==t.scrollbars.NEVER,e.grid.isRTL()?e.grid.hasLeftContainerColumns()||(e.hasVScrollbar=e.grid.options.enableVerticalScrollbar!==t.scrollbars.NEVER):e.grid.hasRightContainerColumns()||(e.hasVScrollbar=e.grid.options.enableVerticalScrollbar!==t.scrollbars.NEVER)):"left"===e.name?e.hasVScrollbar=!!e.grid.isRTL()&&e.grid.options.enableVerticalScrollbar!==t.scrollbars.NEVER:e.hasVScrollbar=!e.grid.isRTL()&&e.grid.options.enableVerticalScrollbar!==t.scrollbars.NEVER,i["overflow-x"]=e.hasHScrollbar?"scroll":"hidden",i["overflow-y"]=e.hasVScrollbar?"scroll":"hidden",i)},i}])}(),function(){angular.module("ui.grid").factory("GridRow",["gridUtil","uiGridConstants",function(e,t){function i(t,i,n){this.grid=n,this.entity=t,this.uid=e.nextUid(),this.visible=!0,this.$$height=n.options.rowHeight}return Object.defineProperty(i.prototype,"height",{get:function(){return this.$$height},set:function(e){e!==this.$$height&&(this.grid.updateCanvasHeight(),this.$$height=e)}}),i.prototype.getQualifiedColField=function(e){return"row."+this.getEntityQualifiedColField(e)},i.prototype.getEntityQualifiedColField=function(i){var n="entity";return i.field===t.ENTITY_BINDING?n:e.preEval(n+"."+i.field)},i.prototype.setRowInvisible=function(e){e&&e.setThisRowInvisible&&e.setThisRowInvisible("user")},i.prototype.clearRowInvisible=function(e){e&&e.clearThisRowInvisible&&e.clearThisRowInvisible("user")},i.prototype.setThisRowInvisible=function(e,t){this.invisibleReason||(this.invisibleReason={}),this.invisibleReason[e]=!0,this.evaluateRowVisibility(t)},i.prototype.clearThisRowInvisible=function(e,t){"undefined"!=typeof this.invisibleReason&&delete this.invisibleReason[e],this.evaluateRowVisibility(t)},i.prototype.evaluateRowVisibility=function(e){var t=!0;"undefined"!=typeof this.invisibleReason&&angular.forEach(this.invisibleReason,function(e){e&&(t=!1)}),"undefined"!=typeof this.visible&&this.visible===t||(this.visible=t,e||(this.grid.queueGridRefresh(),this.grid.api.core.raise.rowsVisibleChanged(this)))},i}])}(),function(){"use strict";angular.module("ui.grid").factory("GridRowColumn",["$parse","$filter",function(e){var t=function e(t,i){if(!(this instanceof e))throw"Using GridRowColumn as a function insead of as a constructor. Must be called with `new` keyword";this.row=t,this.col=i};return t.prototype.getIntersectionValueRaw=function(){return e(this.row.getEntityQualifiedColField(this.col))(this.row)},t}])}(),function(){angular.module("ui.grid").factory("ScrollEvent",["gridUtil",function(e){function t(t,i,n,r){var o=this;if(!t)throw new Error("grid argument is required");o.grid=t,o.source=r,o.withDelay=!0,o.sourceRowContainer=i,o.sourceColContainer=n,o.newScrollLeft=null,o.newScrollTop=null,o.x=null,o.y=null,o.verticalScrollLength=-9999999,o.horizontalScrollLength=-999999,o.fireThrottledScrollingEvent=e.throttle(function(e){o.grid.scrollContainers(e,o)},o.grid.options.wheelScrollThrottle,{trailing:!0})}return t.prototype.getNewScrollLeft=function(t,i){var n=this;if(!n.newScrollLeft){var r,o=t.getCanvasWidth()-t.getViewportWidth(),s=e.normalizeScrollLeft(i,n.grid);if("undefined"!=typeof n.x.percentage&&n.x.percentage!==undefined)r=n.x.percentage;else{if("undefined"==typeof n.x.pixels||n.x.pixels===undefined)throw new Error("No percentage or pixel value provided for scroll event X axis");r=n.x.percentage=(s+n.x.pixels)/o}return Math.max(0,r*o)}return n.newScrollLeft},t.prototype.getNewScrollTop=function(e,t){var i=this;if(!i.newScrollTop){var n,r=e.getVerticalScrollLength(),o=t[0].scrollTop;if("undefined"!=typeof i.y.percentage&&i.y.percentage!==undefined)n=i.y.percentage;else{if("undefined"==typeof i.y.pixels||i.y.pixels===undefined)throw new Error("No percentage or pixel value provided for scroll event Y axis");n=i.y.percentage=(o+i.y.pixels)/r}return Math.max(0,n*r)}return i.newScrollTop},t.prototype.atTop=function(e){return this.y&&(0===this.y.percentage||this.verticalScrollLength<0)&&0===e},t.prototype.atBottom=function(e){return this.y&&(1===this.y.percentage||0===this.verticalScrollLength)&&e>0},t.prototype.atLeft=function(e){return this.x&&(0===this.x.percentage||this.horizontalScrollLength<0)&&0===e},t.prototype.atRight=function(e){return this.x&&(1===this.x.percentage||0===this.horizontalScrollLength)&&e>0},t.Sources={ViewPortScroll:"ViewPortScroll",RenderContainerMouseWheel:"RenderContainerMouseWheel",RenderContainerTouchMove:"RenderContainerTouchMove",Other:99},t}])}(),function(){"use strict";angular.module("ui.grid").service("gridClassFactory",["gridUtil","$q","$compile","$templateCache","uiGridConstants","Grid","GridColumn","GridRow",function(e,t,i,n,r,o){var s={createGrid:function(n){n=void 0!==n?n:{},n.id=e.newId();var r=new o(n);if(r.options.rowTemplate){var a=t.defer();r.getRowTemplateFn=a.promise,e.getTemplate(r.options.rowTemplate).then(function(e){var t=i(e);a.resolve(t)},function(){throw new Error("Couldn't fetch/use row template '"+r.options.rowTemplate+"'")})["catch"](angular.noop)}return r.registerColumnBuilder(s.defaultColumnBuilder),r.registerRowBuilder(s.rowTemplateAssigner),r.registerRowsProcessor(function(e){return e.forEach(function(e){e.evaluateRowVisibility(!0)},50),e}),r.registerColumnsProcessor(function(e){return e.forEach(function(e){e.visible=!angular.isDefined(e.colDef.visible)||e.colDef.visible}),e},50),r.registerRowsProcessor(r.searchRows,100),r.options.externalSort&&angular.isFunction(r.options.externalSort)?r.registerRowsProcessor(r.options.externalSort,200):r.registerRowsProcessor(r.sortByColumn,200),r},defaultColumnBuilder:function(i,n){var o=[],s=function(t,s,a,l,c){i[t]?n[s]=i[t]:n[s]=a,o.push(e.getTemplate(n[s]).then(function(e){angular.isFunction(e)&&(e=e());var i="cellTooltip"===c?"col.cellTooltip(row,col)":"col.headerTooltip(col)";c&&!1===n[c]?e=e.replace(r.TOOLTIP,""):c&&n[c]&&(e=e.replace(r.TOOLTIP,'title="{{'+i+' CUSTOM_FILTERS }}"')),n[t]=l?e.replace(r.CUSTOM_FILTERS,function(){return n[l]?"|"+n[l]:""}):e},function(){throw new Error("Couldn't fetch/use colDef."+t+" '"+i[t]+"'")})["catch"](angular.noop))};return s("cellTemplate","providedCellTemplate","ui-grid/uiGridCell","cellFilter","cellTooltip"),n.cellTemplatePromise=o[0],s("headerCellTemplate","providedHeaderCellTemplate","ui-grid/uiGridHeaderCell","headerCellFilter","headerTooltip"),s("footerCellTemplate","providedFooterCellTemplate","ui-grid/uiGridFooterCell","footerCellFilter"),s("filterHeaderTemplate","providedFilterHeaderTemplate","ui-grid/ui-grid-filter"),n.compiledElementFnDefer=t.defer(),t.all(o)},rowTemplateAssigner:function(n){var r=this;if(n.rowTemplate){var o=t.defer();n.getRowTemplateFn=o.promise,e.getTemplate(n.rowTemplate).then(function(e){var t=i(e);o.resolve(t)},function(){throw new Error("Couldn't fetch/use row template '"+n.rowTemplate+"'")})}else n.rowTemplate=r.options.rowTemplate,n.getRowTemplateFn=r.getRowTemplateFn;return n.getRowTemplateFn}};return s}])}(),function(){function e(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}angular.module("ui.grid").service("rowSearcher",["gridUtil","uiGridConstants",function(t,i){var n=i.filter.CONTAINS,r={};return r.getTerm=function(e){if("undefined"==typeof e.term)return e.term;var t=e.term;return"string"==typeof t&&(t=t.trim()),t},r.stripTerm=function(t){var i=r.getTerm(t);return"string"==typeof i?e(i.replace(/(^\*|\*$)/g,"")):i},r.guessCondition=function(e){if("undefined"==typeof e.term||!e.term)return n;var t=r.getTerm(e);if(/\*/.test(t)){var i="";e.flags&&e.flags.caseSensitive||(i+="i");var o=t.replace(/(\\)?\*/g,function(e,t){return t?e:"[\\s\\S]*?"});return new RegExp("^"+o+"$",i)}return n},r.setupFilters=function(e){for(var n=[],o=e.length,s=0;s<o;s++){var a=e[s];if(a.noTerm||!t.isNullOrUndefined(a.term)){var l={},c="";a.flags&&a.flags.caseSensitive||(c+="i"),t.isNullOrUndefined(a.term)||(a.rawTerm?l.term=a.term:l.term=r.stripTerm(a)),l.noTerm=a.noTerm,a.condition?l.condition=a.condition:l.condition=r.guessCondition(a),l.flags=angular.extend({caseSensitive:!1,date:!1},a.flags),l.condition===i.filter.STARTS_WITH&&(l.startswithRE=new RegExp("^"+l.term,c)),l.condition===i.filter.ENDS_WITH&&(l.endswithRE=new RegExp(l.term+"$",c)),l.condition===i.filter.CONTAINS&&(l.containsRE=new RegExp(l.term,c)),l.condition===i.filter.EXACT&&(l.exactRE=new RegExp("^"+l.term+"$",c)),n.push(l)}}return n},r.runColumnFilter=function(e,t,n,r){var o,s=typeof r.condition,a=r.term;if(o=n.filterCellFiltered?e.getCellDisplayValue(t,n):e.getCellValue(t,n),r.condition instanceof RegExp)return r.condition.test(o);if("function"===s)return r.condition(a,o,t,n);if(r.startswithRE)return r.startswithRE.test(o);if(r.endswithRE)return r.endswithRE.test(o);if(r.containsRE)return r.containsRE.test(o);if(r.exactRE)return r.exactRE.test(o);if(r.condition===i.filter.NOT_EQUAL)return!new RegExp("^"+a+"$").exec(o);if("number"==typeof o&&"string"==typeof a){var l=parseFloat(a.replace(/\\\./,".").replace(/\\\-/,"-"));isNaN(l)||(a=l)}return!0===r.flags.date&&(o=new Date(o),a=new Date(a.replace(/\\/g,""))),r.condition===i.filter.GREATER_THAN?o>a:r.condition===i.filter.GREATER_THAN_OR_EQUAL?o>=a:r.condition===i.filter.LESS_THAN?o<a:r.condition!==i.filter.LESS_THAN_OR_EQUAL||o<=a},r.searchColumn=function(e,i,n,o){if(e.options.useExternalFiltering)return!0;for(var s=o.length,a=0;a<s;a++){var l=o[a];if((!t.isNullOrUndefined(l.term)&&""!==l.term||l.noTerm)&&!r.runColumnFilter(e,i,n,l))return!1}return!0},r.search=function(e,i,n){if(i){if(!e.options.enableFiltering)return i;for(var o=[],s=n.length,a=function(e){var i=!1;return e.forEach(function(e){(!t.isNullOrUndefined(e.term)&&""!==e.term||e.noTerm)&&(i=!0)}),i},l=0;l<s;l++){var c=n[l];"undefined"!=typeof c.filters&&a(c.filters)&&o.push({col:c,filters:r.setupFilters(c.filters)})}if(o.length>0){for(var u=function(e,t,i,n){t.visible&&!r.searchColumn(e,t,i,n)&&(t.visible=!1)},d=function(e,t){for(var n=i.length,r=0;r<n;r++)u(e,i[r],t.col,t.filters)},h=o.length,p=0;p<h;p++)d(e,o[p]);e.api.core.raise.rowsVisibleChanged&&e.api.core.raise.rowsVisibleChanged()}return i}},r}])}(),function(){angular.module("ui.grid").service("rowSorter",["$parse","uiGridConstants",function(e,t){var i="("+t.CURRENCY_SYMBOLS.map(function(e){return"\\"+e}).join("|")+")?",n=(new RegExp("^[-+]?"+i+"[\\d,.]+"+i+"%?$"),{colSortFnCache:{}});return n.guessSortFn=function(e){switch(e){case"number":return n.sortNumber;case"numberStr":return n.sortNumberStr;case"boolean":return n.sortBool;case"string":return n.sortAlpha;case"date":return n.sortDate;case"object":return n.basicSort;default:throw new Error("No sorting function found for type:"+e)}},n.handleNulls=function(e,t){if(!e&&0!==e&&!1!==e||!t&&0!==t&&!1!==t){if(!e&&0!==e&&!1!==e&&!t&&0!==t&&!1!==t)return 0;if(!e&&0!==e&&!1!==e)return 1;if(!t&&0!==t&&!1!==t)return-1}return null},n.basicSort=function(e,t){var i=n.handleNulls(e,t);return null!==i?i:e===t?0:e<t?-1:1},n.sortNumber=function(e,t){var i=n.handleNulls(e,t);return null!==i?i:e-t},n.sortNumberStr=function(e,t){var i=n.handleNulls(e,t);if(null!==i)return i;var r,o,s=!1,a=!1;return r=parseFloat(e.replace(/[^0-9.-]/g,"")),isNaN(r)&&(s=!0),o=parseFloat(t.replace(/[^0-9.-]/g,"")),isNaN(o)&&(a=!0),s&&a?0:s?1:a?-1:r-o},n.sortAlpha=function(e,t){var i=n.handleNulls(e,t);if(null!==i)return i;var r=e.toString().toLowerCase(),o=t.toString().toLowerCase();return r===o?0:r.localeCompare(o)},n.sortDate=function(e,t){var i=n.handleNulls(e,t);if(null!==i)return i;e instanceof Date||(e=new Date(e)),t instanceof Date||(t=new Date(t));var r=e.getTime(),o=t.getTime();return r===o?0:r<o?-1:1},n.sortBool=function(e,t){var i=n.handleNulls(e,t);return null!==i?i:e&&t?0:e||t?e?1:-1:0},n.getSortFn=function(e,t){var i;return n.colSortFnCache[t.colDef.name]?i=n.colSortFnCache[t.colDef.name]:t.sortingAlgorithm!==undefined?(i=t.sortingAlgorithm,n.colSortFnCache[t.colDef.name]=t.sortingAlgorithm):t.sortCellFiltered&&t.cellFilter?(i=n.sortAlpha,n.colSortFnCache[t.colDef.name]=i):(i=n.guessSortFn(t.colDef.type),i?n.colSortFnCache[t.colDef.name]=i:i=n.sortAlpha),i},n.prioritySort=function(e,t){return e.sort.priority!==undefined&&t.sort.priority!==undefined?e.sort.priority<t.sort.priority?-1:e.sort.priority===t.sort.priority?0:1:e.sort.priority!==undefined?-1:t.sort.priority!==undefined?1:0},n.sort=function(e,i,r){if(i){if(e.options.useExternalSorting)return i;var o=[];if(r.forEach(function(e){!e.sort||e.sort.ignoreSort||!e.sort.direction||e.sort.direction!==t.ASC&&e.sort.direction!==t.DESC||o.push(e)}),o=o.sort(n.prioritySort),0===o.length)return i;var s,a,l=function(e,t){e.entity.$$uiGridIndex=t};i.forEach(l);var c=i.slice(0),u=function(i,r){for(var l,u=0,d=0;0===u&&d<o.length;){s=o[d],a=o[d].sort.direction,l=n.getSortFn(e,s,c);var h,p;s.sortCellFiltered?(h=e.getCellDisplayValue(i,s),p=e.getCellDisplayValue(r,s)):(h=e.getCellValue(i,s),p=e.getCellValue(r,s)),u=l(h,p,i,r,a,s),d++}return 0===u?i.entity.$$uiGridIndex-r.entity.$$uiGridIndex:a===t.ASC?u:0-u},d=i.sort(u),h=function(e){delete e.entity.$$uiGridIndex};return i.forEach(h),d}},n}])}(),function(){function e(e){var t=e;return"undefined"!=typeof t.length&&t.length&&(t=e[0]),t.ownerDocument.defaultView.getComputedStyle(t,null)}function t(e,t,i,n,r){for(var o=i===(n?"border":"content")?4:"width"===t?1:0,s=0,a=["Top","Right","Bottom","Left"];o<4;o+=2){var l=a[o];if("margin"===i){var c=parseFloat(r[i+l]);isNaN(c)||(s+=c)}if(n){if("content"===i){var u=parseFloat(r["padding"+l]);isNaN(u)||(s-=u)}if("margin"!==i){var d=parseFloat(r["border"+l+"Width"]);isNaN(d)||(s-=d)}}else{var h=parseFloat(r["padding"+l])
;if(isNaN(h)||(s+=h),"padding"!==i){var p=parseFloat(r["border"+l+"Width"]);isNaN(p)||(s+=p)}}}return s}function i(i,n,r){var o,a=!0,l=e(i),c="border-box"===l.boxSizing;if(o<=0||null==o){if(o=l[n],(o<0||null==o)&&(o=i.style[n]),s.test(o))return o;a=c&&!0,o=parseFloat(o)||0}return o+t(i,n,r||(c?"border":"content"),a,l)}function n(t){t=angular.element(t)[0];var i=t.parentElement;return i||(i=document.getElementsByTagName("body")[0]),parseInt(e(i).fontSize)||parseInt(e(t).fontSize)||16}var r,o=angular.module("ui.grid");"function"!=typeof Function.prototype.bind&&(r=function(){var e=Array.prototype.slice;return function(t){var i=this,n=e.call(arguments,1);return n.length?function(){return arguments.length?i.apply(t,n.concat(e.call(arguments))):i.apply(t,n)}:function(){return arguments.length?i.apply(t,arguments):i.call(t)}}});var s=new RegExp("^("+/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source+")(?!px)[a-z%]+$","i"),a=/^(block|none|table(?!-c[ea]).+)/,l={position:"absolute",visibility:"hidden",display:"block"},c=["0","0","0","0"],u="uiGrid-";o.service("gridUtil",["$log","$window","$document","$http","$templateCache","$timeout","$interval","$injector","$q","$interpolate","uiGridConstants",function(o,s,d,h,p,g,f,m,v,y,w){function C(e,t){var i=angular.element(this),n=0,r=0,o=0,s=0;if(t.originalEvent&&(t=t.originalEvent),"detail"in t&&(o=-1*t.detail),"wheelDelta"in t&&(o=t.wheelDelta),"wheelDeltaY"in t&&(o=t.wheelDeltaY),"wheelDeltaX"in t&&(r=-1*t.wheelDeltaX),"axis"in t&&t.axis===t.HORIZONTAL_AXIS&&(r=-1*o,o=0),n=0===o?r:o,"deltaY"in t&&(o=-1*t.deltaY,n=o),"deltaX"in t&&(r=t.deltaX,0===o&&(n=-1*r)),0!==o||0!==r){if(1===t.deltaMode){var a=i.data("mousewheel-line-height");n*=a,o*=a,r*=a}else if(2===t.deltaMode){var l=i.data("mousewheel-page-height");n*=l,o*=l,r*=l}s=Math.max(Math.abs(o),Math.abs(r)),(!E||s<E)&&(E=s,A(t,s)&&(E/=40)),n=Math[n>=1?"floor":"ceil"](n/E),r=Math[r>=1?"floor":"ceil"](r/E),o=Math[o>=1?"floor":"ceil"](o/E);var c={originalEvent:t,deltaX:r,deltaY:o,deltaFactor:E,preventDefault:function(){t.preventDefault()},stopPropagation:function(){t.stopPropagation()}};S&&clearTimeout(S),S=setTimeout(b,200),e.call(i[0],c)}}function b(){E=null}function A(e,t){return"mousewheel"===e.type&&t%120==0}var x={augmentWidthOrHeight:t,getStyles:e,createBoundedWrapper:function(e,t){return function(){return t.apply(e,arguments)}},readableColumnName:function(e){return void 0===e||e===undefined||null===e?e:("string"!=typeof e&&(e=String(e)),e.replace(/_+/g," ").replace(/^[A-Z]+$/,function(e){return angular.lowercase(angular.uppercase(e.charAt(0))+e.slice(1))}).replace(/([\w\u00C0-\u017F]+)/g,function(e){return angular.uppercase(e.charAt(0))+e.slice(1)}).replace(/(\w+?(?=[A-Z]))/g,"$1 "))},getColumnsFromData:function(e,t){var i=[];if(!e||"undefined"==typeof e[0]||e[0]===undefined)return[];angular.isUndefined(t)&&(t=[]);var n=e[0];return angular.forEach(n,function(e,n){-1===t.indexOf(n)&&i.push({name:n})}),i},newId:function(){var e=(new Date).getTime();return function(){return e+=1}}(),getTemplate:function(e){if(p.get(e))return x.postProcessTemplate(p.get(e));if(angular.isFunction(e.then))return e.then(x.postProcessTemplate)["catch"](angular.noop);try{if(angular.element(e).length>0)return v.when(e).then(x.postProcessTemplate)["catch"](angular.noop)}catch(e){}return x.logDebug("fetching url",e),h({method:"GET",url:e}).then(function(t){var i=t.data.trim();return p.put(e,i),i},function(t){throw new Error("Could not get template "+e+": "+t)}).then(x.postProcessTemplate)["catch"](angular.noop)},postProcessTemplate:function(e){var t=y.startSymbol(),i=y.endSymbol();return"{{"===t&&"}}"===i||(e=e.replace(/\{\{/g,t),e=e.replace(/\}\}/g,i)),v.when(e)},guessType:function(e){var t=typeof e;switch(t){case"number":case"boolean":case"string":return t;default:return angular.isDate(e)?"date":"object"}},elementWidth:function(){},elementHeight:function(){},getScrollbarWidth:function(){var e=document.createElement("div");e.style.visibility="hidden",e.style.width="100px",e.style.msOverflowStyle="scrollbar",document.body.appendChild(e);var t=e.offsetWidth;e.style.overflow="scroll";var i=document.createElement("div");i.style.width="100%",e.appendChild(i);var n=i.offsetWidth;return e.parentNode.removeChild(e),t-n},swap:function(e,t,i,n){var r,o,s={};for(o in t)s[o]=e.style[o],e.style[o]=t[o];r=i.apply(e,n||[]);for(o in t)e.style[o]=s[o];return r},fakeElement:function(e,t,i){var n,r,o=angular.element(e).clone()[0];for(r in t)o.style[r]=t[r];return angular.element(document.body).append(o),n=i.call(o,o),angular.element(o).remove(),n},normalizeWheelEvent:function(e){var t,i,n,r=e||window.event,o=([].slice.call(arguments,1),0),s=0,a=0,l=0,c=0;return r.originalEvent&&(r=r.originalEvent),r.wheelDelta&&(o=r.wheelDelta),r.detail&&(o=-1*r.detail),a=o,r.axis!==undefined&&r.axis===r.HORIZONTAL_AXIS&&(a=0,s=-1*o),r.deltaY&&(a=-1*r.deltaY,o=a),r.deltaX&&(s=r.deltaX,o=-1*s),r.wheelDeltaY!==undefined&&(a=r.wheelDeltaY),r.wheelDeltaX!==undefined&&(s=r.wheelDeltaX),l=Math.abs(o),(!t||l<t)&&(t=l),c=Math.max(Math.abs(a),Math.abs(s)),(!i||c<i)&&(i=c),n=o>0?"floor":"ceil",o=Math[n](o/t),s=Math[n](s/i),a=Math[n](a/i),{delta:o,deltaX:s,deltaY:a}},isTouchEnabled:function(){var e;return("ontouchstart"in s||s.DocumentTouch&&d instanceof DocumentTouch)&&(e=!0),e},isNullOrUndefined:function(e){return e===undefined||null===e},endsWith:function(e,t){return!(!e||!t||"string"!=typeof e)&&-1!==e.indexOf(t,e.length-t.length)},arrayContainsObjectWithProperty:function(e,t,i){var n=!1;return angular.forEach(e,function(e){e[t]===i&&(n=!0)}),n},numericAndNullSort:function(e,t){return null===e?1:null===t?-1:null===e&&null===t?0:e-t},disableAnimations:function(e){var t;try{t=m.get("$animate"),angular.version.major>1||1===angular.version.major&&angular.version.minor>=4?t.enabled(e,!1):t.enabled(!1,e)}catch(e){}},enableAnimations:function(e){var t;try{return t=m.get("$animate"),angular.version.major>1||1===angular.version.major&&angular.version.minor>=4?t.enabled(e,!0):t.enabled(!0,e),t}catch(e){}},nextUid:function(){for(var e,t=c.length;t;){if(t--,57===(e=c[t].charCodeAt(0)))return c[t]="A",u+c.join("");if(90!==e)return c[t]=String.fromCharCode(e+1),u+c.join("");c[t]="0"}return c.unshift("0"),u+c.join("")},hashKey:function(e){var t,i=typeof e;return"object"===i&&null!==e?"function"==typeof(t=e.$$hashKey)?t=e.$$hashKey():"undefined"!=typeof e.$$hashKey&&e.$$hashKey?t=e.$$hashKey:t===undefined&&(t=e.$$hashKey=x.nextUid()):t=e,i+":"+t},resetUids:function(){c=["0","0","0"]},logError:function(e){w.LOG_ERROR_MESSAGES&&o.error(e)},logWarn:function(e){w.LOG_WARN_MESSAGES&&o.warn(e)},logDebug:function(){w.LOG_DEBUG_MESSAGES&&o.debug.apply(o,arguments)}};x.focus={queue:[],byId:function(e,t){this._purgeQueue();var i=g(function(){var i=(t&&t.id?t.id+"-":"")+e,n=s.document.getElementById(i);n?n.focus():x.logWarn("[focus.byId] Element id "+i+" was not found.")},0,!1);return this.queue.push(i),i},byElement:function(e){if(!angular.isElement(e))return x.logWarn("Trying to focus on an element that isn't an element."),v.reject("not-element");e=angular.element(e),this._purgeQueue();var t=g(function(){e&&e[0].focus()},0,!1);return this.queue.push(t),t},bySelector:function(e,t,i){var n=this;if(!angular.isElement(e))throw new Error("The parent element is not an element.");e=angular.element(e);var r=function(){var i=e[0].querySelector(t);return n.byElement(i)};if(this._purgeQueue(),i){var o=g(r,0,!1);return this.queue.push(o),o}return r()},_purgeQueue:function(){this.queue.forEach(function(e){g.cancel(e)}),this.queue=[]}},["width","height"].forEach(function(t){var n=angular.uppercase(t.charAt(0))+t.substr(1);x["element"+n]=function(n,r){var o=n;if(o&&"undefined"!=typeof o.length&&o.length&&(o=n[0]),o&&null!==o){var s=e(o);return 0===o.offsetWidth&&a.test(s.display)?x.swap(o,l,function(){return i(o,t,r)}):i(o,t,r)}return null},x["outerElement"+n]=function(e,t){return e?x["element"+n].call(this,e,t?"margin":"border"):null}}),x.closestElm=function(e,t){"undefined"!=typeof e.length&&e.length&&(e=e[0]);var i;["matches","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector"].some(function(e){return"function"==typeof document.body[e]&&(i=e,!0)});for(var n;null!==e;){if(null!==(n=e.parentElement)&&n[i](t))return n;e=n}return null},x.type=function(e){return Function.prototype.toString.call(e.constructor).match(/function (.*?)\(/)[1]},x.getBorderSize=function(t,i){"undefined"!=typeof t.length&&t.length&&(t=t[0]);var n=e(t);i=i?"border"+i.charAt(0).toUpperCase()+i.slice(1):"border",i+="Width";var r=parseInt(n[i],10);return isNaN(r)?0:r},x.detectBrowser=function(){var e=s.navigator.userAgent,t={chrome:/chrome/i,safari:/safari/i,firefox:/firefox/i,ie:/internet explorer|trident\//i};for(var i in t)if(t[i].test(e))return i;return"unknown"},x.rtlScrollType=function e(){if(e.type)return e.type;var t=angular.element('<div dir="rtl" style="font-size: 14px; width: 1px; height: 1px; position: absolute; top: -1000px; overflow: scroll">A</div>')[0],i="reverse";return document.body.appendChild(t),t.scrollLeft>0?i="default":(t.scrollLeft=1,0===t.scrollLeft&&(i="negative")),angular.element(t).remove(),e.type=i,i},x.normalizeScrollLeft=function(e,t){"undefined"!=typeof e.length&&e.length&&(e=e[0]);var i=e.scrollLeft;if(t.isRTL())switch(x.rtlScrollType()){case"default":return e.scrollWidth-i-e.clientWidth;case"negative":return Math.abs(i);case"reverse":return i}return i},x.denormalizeScrollLeft=function(e,t,i){if("undefined"!=typeof e.length&&e.length&&(e=e[0]),i.isRTL())switch(x.rtlScrollType()){case"default":return e.scrollWidth-e.clientWidth-t;case"negative":return-1*t;case"reverse":return t}return t},x.preEval=function(e){var t=w.BRACKET_REGEXP.exec(e);if(t)return(t[1]?x.preEval(t[1]):t[1])+t[2]+(t[3]?x.preEval(t[3]):t[3]);e=e.replace(w.APOS_REGEXP,"\\'");var i=e.split(w.DOT_REGEXP),n=[i.shift()];return angular.forEach(i,function(e){n.push(e.replace(w.FUNC_REGEXP,"']$1"))}),n.join("['")},x.debounce=function(e,t,i){function n(){s=this,o=arguments;var n=function(){r=null,i||(a=e.apply(s,o))},l=i&&!r;return r&&g.cancel(r),r=g(n,t,!1),l&&(a=e.apply(s,o)),a}var r,o,s,a;return n.cancel=function(){g.cancel(r),r=null},n},x.throttle=function(e,t,i){function n(){s=+new Date,e.apply(r,o),f(function(){a=null},0,1,!1)}i=i||{};var r,o,s=0,a=null;return function(){if(r=this,o=arguments,null===a){var e=+new Date-s;e>t?n():i.trailing&&(a=f(n,t-e,1,!1))}}},x.on={},x.off={},x._events={},x.addOff=function(e){x.off[e]=function(t,i){var n=x._events[e].indexOf(i);n>0&&x._events[e].removeAt(n)}};var S,E,$="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"];return x.on.mousewheel=function(e,t){if(e&&t){var i=angular.element(e);i.data("mousewheel-line-height",n(i)),i.data("mousewheel-page-height",x.elementHeight(i)),i.data("mousewheel-callbacks")||i.data("mousewheel-callbacks",{});var o=i.data("mousewheel-callbacks");o[t]=(Function.prototype.bind||r).call(C,i[0],t);for(var s=$.length;s;)i.on($[--s],o[t]);i.on("$destroy",function(){for(var e=$.length;e;)i.off($[--e],o[t])})}},x.off.mousewheel=function(e,t){var i=angular.element(e),n=i.data("mousewheel-callbacks"),r=n[t];if(r)for(var o=$.length;o;)i.off($[--o],r);delete n[t],0===Object.keys(n).length&&(i.removeData("mousewheel-line-height"),i.removeData("mousewheel-page-height"),i.removeData("mousewheel-callbacks"))},x}]),o.filter("px",function(){return function(e){return e.match(/^[\d\.]+$/)?e+"px":e}})}(),function(){angular.module("ui.grid").config(["$provide",function(e){e.decorator("i18nService",["$delegate",function(e){return e.add("bg",{headerCell:{aria:{defaultFilterLabel:"\u0424\u0438\u043b\u0442\u0442\u044a\u0440 \u0437\u0430 \u043a\u043e\u043b\u043e\u043d\u0430\u0442\u0430",removeFilter:"\u041f\u0440\u0435\u043c\u0430\u0445\u043d\u0438 \u0444\u0438\u043b\u0442\u044a\u0440",columnMenuButtonLabel:"\u041c\u0435\u043d\u044e \u043d\u0430 \u043a\u043e\u043b\u043e\u043d\u0430\u0442\u0430"},priority:"\u041f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0442:",filterLabel:"\u0424\u0438\u043b\u0442\u044a\u0440 \u0437\u0430 \u043a\u043e\u043b\u043e\u043d\u0430\u0442\u0430: "},aggregate:{label:"\u043e\u0431\u0435\u043a\u0442\u0438"},search:{placeholder:"\u0422\u044a\u0440\u0441\u0435\u043d\u0435...",showingItems:"\u041f\u043e\u043a\u0430\u0437\u0430\u043d\u0438 \u043e\u0431\u0435\u043a\u0442\u0438:",selectedItems:"\u0438\u0437\u0431\u0440\u0430\u043d\u0438 \u043e\u0431\u0435\u043a\u0442\u0438:",totalItems:"\u041e\u0431\u0449\u043e:",size:"\u0420\u0430\u0437\u043c\u0435\u0440 \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430\u0442\u0430:",first:"\u041f\u044a\u0440\u0432\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430",next:"\u0421\u043b\u0435\u0434\u0432\u0430\u0449\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430",previous:"\u041f\u0440\u0435\u0434\u0438\u0448\u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430",last:"\u041f\u043e\u0441\u043b\u0435\u0434\u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430"},menu:{text:"\u0418\u0437\u0431\u0435\u0440\u0438 \u043a\u043e\u043b\u043e\u043d\u0438:"},sort:{ascending:"\u0421\u043e\u0440\u0442\u0438\u0440\u0430\u043d\u0435 \u043f\u043e \u0432\u044a\u0437\u0445\u043e\u0434\u044f\u0449 \u0440\u0435\u0434",descending:"\u0421\u043e\u0440\u0442\u0438\u0440\u0430\u043d\u0435 \u043f\u043e \u043d\u0438\u0437\u0445\u043e\u0434\u044f\u0449 \u0440\u0435\u0434",none:"\u0411\u0435\u0437 \u0441\u043e\u0440\u0442\u0438\u0440\u0430\u043d\u0435",remove:"\u041f\u0440\u0435\u043c\u0430\u0445\u043d\u0438 \u0441\u043e\u0440\u0442\u0438\u0440\u0430\u043d\u0435\u0442\u043e"},column:{hide:"\u0421\u043a\u0440\u0438\u0439 \u043a\u043e\u043b\u043e\u043d\u0430\u0442\u0430"},aggregation:{count:"\u041e\u0431\u0449\u043e \u0440\u0435\u0434\u043e\u0432\u0435: ",sum:"\u043e\u0431\u0449\u043e: ",avg:"\u0441\u0440\u0435\u0434\u043d\u043e: ",min:"\u043d\u0430\u0439-\u043c\u0430\u043b\u043a\u043e: ",max:"\u043d\u0430\u0439-\u043c\u043d\u043e\u0433\u043e: "},pinning:{pinLeft:"\u041f\u0440\u0438\u043a\u0440\u0435\u043f\u0438 \u0432\u043b\u044f\u0432\u043e",pinRight:"\u041f\u0440\u0438\u043a\u0440\u0435\u043f\u0438 \u0432\u0434\u044f\u0441\u043d\u043e",unpin:"\u041f\u0440\u0435\u043c\u0430\u0445\u0432\u0430\u043d\u0435"},columnMenu:{close:"\u0417\u0430\u0442\u0432\u043e\u0440\u0438"},gridMenu:{aria:{buttonLabel:"\u041c\u0435\u043d\u044e \u043d\u0430 \u0442\u0430\u0431\u043b\u0438\u0446\u0430\u0442\u0430"},columns:"\u041a\u043e\u043b\u043e\u043d\u0438:",importerTitle:"\u0418\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u0430\u043d\u0435 \u043d\u0430 \u0444\u0430\u0439\u043b",exporterAllAsCsv:"\u0415\u043a\u0441\u043f\u043e\u0440\u0442\u0438\u0440\u0430\u043d\u0435 \u043d\u0430 \u0434\u0430\u043d\u043d\u0438\u0442\u0435 \u043a\u0430\u0442\u043e csv",exporterVisibleAsCsv:"\u0415\u043a\u0441\u043f\u043e\u0440\u0442\u0438\u0440\u0430\u043d\u0435 \u043d\u0430 \u0432\u0438\u0434\u0438\u043c\u0438\u0442\u0435 \u0434\u0430\u043d\u043d\u0438 \u043a\u0430\u0442\u043e csv",exporterSelectedAsCsv:"\u0415\u043a\u0441\u043f\u043e\u0440\u0442\u0438\u0440\u0430\u043d\u0435 \u043d\u0430 \u0438\u0437\u0431\u0440\u0430\u043d\u0438\u0442\u0435 \u0434\u0430\u043d\u043d\u0438 \u043a\u0430\u0442\u043e csv",exporterAllAsPdf:"\u0415\u043a\u0441\u043f\u043e\u0440\u0442\u0438\u0440\u0430\u043d\u0435 \u043d\u0430 \u0434\u0430\u043d\u043d\u0438\u0442\u0435 \u043a\u0430\u0442\u043e pdf",exporterVisibleAsPdf:"\u0415\u043a\u0441\u043f\u043e\u0440\u0442\u0438\u0440\u0430\u043d\u0435 \u043d\u0430 \u0432\u0438\u0434\u0438\u043c\u0438\u0442\u0435 \u0434\u0430\u043d\u043d\u0438 \u043a\u0430\u0442\u043e pdf",exporterSelectedAsPdf:"\u0415\u043a\u0441\u043f\u043e\u0440\u0442\u0438\u0440\u0430\u043d\u0435 \u043d\u0430 \u0438\u0437\u0431\u0440\u0430\u043d\u0438\u0442\u0435 \u0434\u0430\u043d\u043d\u0438 \u043a\u0430\u0442\u043e pdf",clearAllFilters:"\u041f\u0440\u0435\u043c\u0430\u0445\u043d\u0438 \u0432\u0441\u0438\u0447\u043a\u0438 \u0444\u0438\u043b\u0442\u0440\u0438"},importer:{noHeaders:"\u0418\u043c\u0435\u043d\u0430\u0442\u0430 \u043d\u0430 \u043a\u043e\u043b\u043e\u043d\u0438\u0442\u0435 \u043d\u0435 \u0443\u0441\u043f\u044f\u0445\u0430 \u0434\u0430 \u0431\u044a\u0434\u0430\u0442 \u0438\u0437\u0432\u043b\u0435\u0447\u0435\u043d\u0438, \u0444\u0430\u0439\u043b\u044a\u0442 \u0438\u043c\u0430 \u043b\u0438 \u0445\u0435\u0434\u044a\u0440?",noObjects:"\u041e\u0431\u0435\u043a\u0442\u0438\u0442\u0435 \u043d\u0435 \u0443\u0441\u043f\u044f\u0445\u0430 \u0434\u0430 \u0431\u044a\u0434\u0430\u0442 \u0438\u0437\u0432\u043b\u0435\u0447\u0435\u043d\u0438, \u0444\u0430\u0439\u043b\u044a\u0442 \u0441\u044a\u0434\u044a\u0440\u0436\u0430 \u043b\u0438 \u0434\u0430\u043d\u043d\u0438, \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u0438 \u043e\u0442 \u0445\u0435\u0434\u044a\u0440?",invalidCsv:"\u0424\u0430\u0439\u043b\u044a\u0442 \u043d\u0435 \u043c\u043e\u0436\u0435 \u0434\u0430 \u0431\u044a\u0434\u0435 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0435\u0431, \u0443\u0432\u0435\u0440\u0435\u0442\u0435 \u0441\u0435, \u0447\u0435 \u0435 \u0432\u0430\u043b\u0438\u0434\u0435\u043d CSV \u0444\u0430\u0439\u043b",invalidJson:"\u0424\u0430\u0439\u043b\u044a\u0442 \u043d\u0435 \u043c\u043e\u0436\u0435 \u0434\u0430 \u0431\u044a\u0434\u0435 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0435\u0431, \u0443\u0432\u0435\u0440\u0435\u0442\u0435 \u0441\u0435, \u0447\u0435 \u0435 \u0432\u0430\u043b\u0438\u0434\u0435\u043d JSON \u0444\u0430\u0439\u043b",jsonNotArray:"\u0418\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u0430\u043d\u0438\u044f\u0442 JSON \u0444\u0430\u0439\u043b \u0442\u0440\u044f\u0431\u0432\u0430 \u0434\u0430 \u0441\u044a\u0434\u044a\u0440\u0436\u0430 \u043c\u0430\u0441\u0438\u0432, \u043f\u0440\u0435\u043a\u0440\u0430\u0442\u044f\u0432\u0430\u043d\u0435."},pagination:{aria:{pageToFirst:"\u041a\u044a\u043c \u043f\u044a\u0440\u0432\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430",pageBack:"\u0421\u0442\u0440\u0430\u043d\u0438\u0446\u0430 \u043d\u0430\u0437\u0430\u0434",pageSelected:"\u0418\u0437\u0431\u0440\u0430\u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430",pageForward:"\u0421\u0442\u0440\u0430\u043d\u0438\u0446\u0430 \u043d\u0430\u043f\u0440\u0435\u0434",pageToLast:"\u041a\u044a\u043c \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430"},sizes:"\u043e\u0431\u0435\u043a\u0442\u0430 \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430",totalItems:"\u043e\u0431\u0435\u043a\u0442\u0430",through:"\u0434\u043e",of:"\u043e\u0442"},grouping:{group:"\u0413\u0440\u0443\u043f\u0438\u0440\u0430\u043d\u0435",ungroup:"\u041f\u0440\u0435\u043c\u0430\u0445\u0432\u0430\u043d\u0435 \u043d\u0430 \u0433\u0440\u0443\u043f\u0438\u0440\u0430\u043d\u0435\u0442\u043e",aggregate_count:"\u0421\u0431\u043e\u0440: \u0411\u0440\u043e\u0439",aggregate_sum:"\u0421\u0431\u043e\u0440: \u0421\u0443\u043c\u0430",aggregate_max:"\u0421\u0431\u043e\u0440: \u041c\u0430\u043a\u0441\u0438\u043c\u0443\u043c",aggregate_min:"\u0421\u0431\u043e\u0440: \u041c\u0438\u043d\u0438\u043c\u0443\u043c",aggregate_avg:"\u0421\u0431\u043e\u0440: \u0421\u0440\u0435\u0434\u043d\u043e",aggregate_remove:"\u0421\u0431\u043e\u0440: \u041f\u0440\u0435\u043c\u0430\u0445\u0432\u0430\u043d\u0435"},validate:{error:"\u0413\u0440\u0435\u0448\u043a\u0430:",minLength:"\u0421\u0442\u043e\u0439\u043d\u043e\u0441\u0442\u0442\u0430 \u0442\u0440\u044f\u0431\u0432\u0430 \u0434\u0430 \u0441\u044a\u0434\u044a\u0440\u0436\u0430 \u043f\u043e\u043d\u0435 THRESHOLD \u0441\u0438\u043c\u0432\u043e\u043b\u0430.",maxLength:"\u0421\u0442\u043e\u0439\u043d\u043e\u0441\u0442\u0442\u0430 \u043d\u0435 \u0442\u0440\u044f\u0431\u0432\u0430 \u0434\u0430 \u0441\u044a\u0434\u044a\u0440\u0436\u0430 \u043f\u043e\u0432\u0435\u0447\u0435 \u043e\u0442 THRESHOLD \u0441\u0438\u043c\u0432\u043e\u043b\u0430.",required:"\u041d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u0430 \u0435 \u0441\u0442\u043e\u0439\u043d\u043e\u0441\u0442."}}),e}])}])}(),function(){angular.module("ui.grid").config(["$provide",function(e){e.decorator("i18nService",["$delegate",function(e){var t={aggregate:{label:"polo\u017eky"},groupPanel:{description:"P\u0159esu\u0148te z\xe1hlav\xed zde pro vytvo\u0159en\xed skupiny dle sloupce."},search:{placeholder:"Hledat...",showingItems:"Zobrazuji polo\u017eky:",selectedItems:"Vybran\xe9 polo\u017eky:",totalItems:"Celkem polo\u017eek:",size:"Velikost strany:",first:"Prvn\xed strana",next:"Dal\u0161\xed strana",previous:"P\u0159edchoz\xed strana",last:"Posledn\xed strana"},menu:{text:"Vyberte sloupec:"},sort:{ascending:"Se\u0159adit od A-Z",descending:"Se\u0159adit od Z-A",remove:"Odebrat se\u0159azen\xed"},column:{hide:"Schovat sloupec"},aggregation:{count:"celkem \u0159\xe1dk\u016f: ",sum:"celkem: ",avg:"avg: ",min:"min.: ",max:"max.: "},pinning:{pinLeft:"Zamknout vlevo",pinRight:"Zamknout vpravo",unpin:"Odemknout"},gridMenu:{columns:"Sloupce:",importerTitle:"Importovat soubor",exporterAllAsCsv:"Exportovat v\u0161echna data do csv",exporterVisibleAsCsv:"Exportovat viditeln\xe1 data do csv",exporterSelectedAsCsv:"Exportovat vybran\xe1 data do csv",exporterAllAsPdf:"Exportovat v\u0161echna data do pdf",exporterVisibleAsPdf:"Exportovat viditeln\xe1 data do pdf",exporterSelectedAsPdf:"Exportovat vybran\xe1 data do pdf",clearAllFilters:"Odstranit v\u0161echny filtry"},importer:{noHeaders:"N\xe1zvy sloupc\u016f se nepoda\u0159ilo z\xedskat, obsahuje soubor z\xe1hlav\xed?",noObjects:"Data se nepoda\u0159ilo zpracovat, obsahuje soubor \u0159\xe1dky mimo z\xe1hlav\xed?",invalidCsv:"Soubor nelze zpracovat, jedn\xe1 se o CSV?",invalidJson:"Soubor nelze zpracovat, je to JSON?",jsonNotArray:"Soubor mus\xed obsahovat json. Ukon\u010duji.."},pagination:{sizes:"polo\u017eek na str\xe1nku",totalItems:"polo\u017eek"},grouping:{group:"Seskupit",ungroup:"Odebrat seskupen\xed",aggregate_count:"Agregace: Count",aggregate_sum:"Agregace: Sum",aggregate_max:"Agregace: Max",aggregate_min:"Agregace: Min",aggregate_avg:"Agregace: Avg",aggregate_remove:"Agregace: Odebrat"}};return e.add("cs",t),e.add("cz",t),e.add("cs-cz",t),e.add("cs-CZ",t),e}])}])}(),function(){angular.module("ui.grid").config(["$provide",function(e){e.decorator("i18nService",["$delegate",function(e){return e.add("da",{aggregate:{label:"artikler"},groupPanel:{description:"Grup\xe9r r\xe6kker udfra en kolonne ved at tr\xe6kke dens overskift hertil."},search:{placeholder:"S\xf8g...",showingItems:"Viste r\xe6kker:",selectedItems:"Valgte r\xe6kker:",totalItems:"R\xe6kker totalt:",size:"Side st\xf8rrelse:",first:"F\xf8rste side",next:"N\xe6ste side",previous:"Forrige side",last:"Sidste side"},menu:{text:"V\xe6lg kolonner:"},sort:{ascending:"Sorter stigende",descending:"Sorter faldende",none:"Sorter ingen",remove:"Fjern sortering"},column:{hide:"Skjul kolonne"},aggregation:{count:"antal r\xe6kker: ",sum:"sum: ",avg:"gns: ",min:"min: ",max:"max: "},gridMenu:{columns:"Kolonner:",importerTitle:"Importer fil",exporterAllAsCsv:"Eksporter alle data som csv",exporterVisibleAsCsv:"Eksporter synlige data som csv",exporterSelectedAsCsv:"Eksporter markerede data som csv",exporterAllAsPdf:"Eksporter alle data som pdf",exporterVisibleAsPdf:"Eksporter synlige data som pdf",exporterSelectedAsPdf:"Eksporter markerede data som pdf",clearAllFilters:"Clear all filters"},importer:{noHeaders:"Column names were unable to be derived, does the file have a header?",noObjects:"Objects were not able to be derived, was there data in the file other than headers?",invalidCsv:"File was unable to be processed, is it valid CSV?",invalidJson:"File was unable to be processed, is it valid Json?",jsonNotArray:"Imported json file must contain an array, aborting."},pagination:{aria:{pageToFirst:"G\xe5 til f\xf8rste",pageBack:"G\xe5 tilbage",pageSelected:"Valgte side",pageForward:"G\xe5 frem",pageToLast:"G\xe5 til sidste"},sizes:"genstande per side",totalItems:"genstande",through:"gennem",of:"af"}}),e}])}])}(),function(){angular.module("ui.grid").config(["$provide",function(e){e.decorator("i18nService",["$delegate",function(e){return e.add("de",{headerCell:{aria:{defaultFilterLabel:"Filter f\xfcr Spalte",removeFilter:"Filter l\xf6schen",columnMenuButtonLabel:"Spaltenmen\xfc"},priority:"Priorit\xe4t:",filterLabel:"Filter f\xfcr Spalte: "},aggregate:{label:"Eintrag"},groupPanel:{description:"Ziehen Sie eine Spalten\xfcberschrift hierhin, um nach dieser Spalte zu gruppieren."},search:{placeholder:"Suche...",showingItems:"Zeige Eintr\xe4ge:",selectedItems:"Ausgew\xe4hlte Eintr\xe4ge:",totalItems:"Eintr\xe4ge gesamt:",size:"Eintr\xe4ge pro Seite:",first:"Erste Seite",next:"N\xe4chste Seite",previous:"Vorherige Seite",last:"Letzte Seite"},menu:{text:"Spalten ausw\xe4hlen:"},sort:{ascending:"aufsteigend sortieren",descending:"absteigend sortieren",none:"keine Sortierung",remove:"Sortierung zur\xfccksetzen"},column:{hide:"Spalte ausblenden"},aggregation:{count:"Zeilen insgesamt: ",sum:"gesamt: ",avg:"Durchschnitt: ",min:"min: ",max:"max: "},pinning:{pinLeft:"Links anheften",pinRight:"Rechts anheften",unpin:"L\xf6sen"},columnMenu:{close:"Schlie\xdfen"},gridMenu:{aria:{buttonLabel:"Tabellenmen\xfc"},columns:"Spalten:",importerTitle:"Datei importieren",exporterAllAsCsv:"Alle Daten als CSV exportieren",exporterVisibleAsCsv:"sichtbare Daten als CSV exportieren",exporterSelectedAsCsv:"markierte Daten als CSV exportieren",exporterAllAsPdf:"Alle Daten als PDF exportieren",exporterVisibleAsPdf:"sichtbare Daten als PDF exportieren",exporterSelectedAsPdf:"markierte Daten als PDF exportieren",clearAllFilters:"Alle Filter zur\xfccksetzen"},importer:{noHeaders:"Es konnten keine Spaltennamen ermittelt werden. Sind in der Datei Spaltendefinitionen enthalten?",noObjects:"Es konnten keine Zeileninformationen gelesen werden, Sind in der Datei au\xdfer den Spaltendefinitionen auch Daten enthalten?",invalidCsv:"Die Datei konnte nicht eingelesen werden, ist es eine g\xfcltige CSV-Datei?",invalidJson:"Die Datei konnte nicht eingelesen werden. Enth\xe4lt sie g\xfcltiges JSON?",jsonNotArray:"Die importierte JSON-Datei mu\xdf ein Array enthalten. Breche Import ab."},pagination:{aria:{pageToFirst:"Zum Anfang",pageBack:"Seite zur\xfcck",pageSelected:"Ausgw\xe4hlte Seite",pageForward:"Seite vor",pageToLast:"Zum Ende"},sizes:"Eintr\xe4ge pro Seite",totalItems:"Eintr\xe4ge",through:"bis",of:"von"},grouping:{group:"Gruppieren",ungroup:"Gruppierung aufheben",aggregate_count:"Agg: Anzahl",aggregate_sum:"Agg: Summe",aggregate_max:"Agg: Maximum",aggregate_min:"Agg: Minimum",aggregate_avg:"Agg: Mittelwert",aggregate_remove:"Aggregation entfernen"}}),e}])}])}(),function(){angular.module("ui.grid").config(["$provide",function(e){e.decorator("i18nService",["$delegate",function(e){return e.add("en",{headerCell:{aria:{defaultFilterLabel:"Filter for column",removeFilter:"Remove Filter",columnMenuButtonLabel:"Column Menu"},priority:"Priority:",filterLabel:"Filter for column: "},aggregate:{label:"items"},groupPanel:{description:"Drag a column header here and drop it to group by that column."},search:{placeholder:"Search...",showingItems:"Showing Items:",selectedItems:"Selected Items:",totalItems:"Total Items:",size:"Page Size:",first:"First Page",next:"Next Page",previous:"Previous Page",last:"Last Page"},menu:{text:"Choose Columns:"},sort:{ascending:"Sort Ascending",descending:"Sort Descending",none:"Sort None",remove:"Remove Sort"},column:{hide:"Hide Column"},aggregation:{count:"total rows: ",sum:"total: ",avg:"avg: ",min:"min: ",max:"max: "},pinning:{pinLeft:"Pin Left",pinRight:"Pin Right",unpin:"Unpin"},columnMenu:{close:"Close"},gridMenu:{aria:{buttonLabel:"Grid Menu"},columns:"Columns:",importerTitle:"Import file",exporterAllAsCsv:"Export all data as csv",exporterVisibleAsCsv:"Export visible data as csv",exporterSelectedAsCsv:"Export selected data as csv",exporterAllAsPdf:"Export all data as pdf",exporterVisibleAsPdf:"Export visible data as pdf",exporterSelectedAsPdf:"Export selected data as pdf",clearAllFilters:"Clear all filters"},importer:{noHeaders:"Column names were unable to be derived, does the file have a header?",noObjects:"Objects were not able to be derived, was there data in the file other than headers?",invalidCsv:"File was unable to be processed, is it valid CSV?",invalidJson:"File was unable to be processed, is it valid Json?",jsonNotArray:"Imported json file must contain an array, aborting."},pagination:{aria:{pageToFirst:"Page to first",pageBack:"Page back",pageSelected:"Selected page",pageForward:"Page forward",pageToLast:"Page to last"},sizes:"items per page",totalItems:"items",through:"through",of:"of"},grouping:{group:"Group",ungroup:"Ungroup",aggregate_count:"Agg: Count",aggregate_sum:"Agg: Sum",aggregate_max:"Agg: Max",aggregate_min:"Agg: Min",aggregate_avg:"Agg: Avg",aggregate_remove:"Agg: Remove"},validate:{error:"Error:",minLength:"Value should be at least THRESHOLD characters long.",maxLength:"Value should be at most THRESHOLD characters long.",required:"A value is needed."}}),e}])}])}(),function(){angular.module("ui.grid").config(["$provide",function(e){e.decorator("i18nService",["$delegate",function(e){return e.add("es",{aggregate:{label:"Art\xedculos"},groupPanel:{description:"Arrastre un encabezado de columna aqu\xed y su\xe9ltelo para agrupar por esa columna."},search:{placeholder:"Buscar...",showingItems:"Art\xedculos Mostrados:",selectedItems:"Art\xedculos Seleccionados:",totalItems:"Art\xedculos Totales:",size:"Tama\xf1o de P\xe1gina:",first:"Primera P\xe1gina",next:"P\xe1gina Siguiente",previous:"P\xe1gina Anterior",last:"\xdaltima P\xe1gina"},menu:{text:"Elegir columnas:"},sort:{ascending:"Orden Ascendente",descending:"Orden Descendente",remove:"Sin Ordenar"},column:{hide:"Ocultar la columna"},aggregation:{count:"filas totales: ",sum:"total: ",avg:"media: ",min:"min: ",max:"max: "},pinning:{pinLeft:"Fijar a la Izquierda",pinRight:"Fijar a la Derecha",unpin:"Quitar Fijaci\xf3n"},gridMenu:{columns:"Columnas:",importerTitle:"Importar archivo",exporterAllAsCsv:"Exportar todo como csv",exporterVisibleAsCsv:"Exportar vista como csv",exporterSelectedAsCsv:"Exportar selecci\xf3n como csv",exporterAllAsPdf:"Exportar todo como pdf",exporterVisibleAsPdf:"Exportar vista como pdf",exporterSelectedAsPdf:"Exportar selecci\xf3n como pdf",clearAllFilters:"Limpiar todos los filtros"},importer:{noHeaders:"No fue posible derivar los nombres de las columnas, \xbftiene encabezados el archivo?",noObjects:"No fue posible obtener registros, \xbfcontiene datos el archivo, aparte de los encabezados?",invalidCsv:"No fue posible procesar el archivo, \xbfes un CSV v\xe1lido?",invalidJson:"No fue posible procesar el archivo, \xbfes un Json v\xe1lido?",jsonNotArray:"El archivo json importado debe contener un array, abortando."},pagination:{sizes:"registros por p\xe1gina",totalItems:"registros",of:"de"},grouping:{group:"Agrupar",ungroup:"Desagrupar",aggregate_count:"Agr: Cont",aggregate_sum:"Agr: Sum",aggregate_max:"Agr: M\xe1x",aggregate_min:"Agr: Min",aggregate_avg:"Agr: Prom",aggregate_remove:"Agr: Quitar"}}),e}])}])}(),function(){angular.module("ui.grid").config(["$provide",function(e){e.decorator("i18nService",["$delegate",function(e){return e.add("fa",{aggregate:{label:"\u0642\u0644\u0645"},groupPanel:{description:"\u0639\u0646\u0648\u0627\u0646 \u06cc\u06a9 \u0633\u062a\u0648\u0646 \u0631\u0627 \u0628\u06af\u06cc\u0631 \u0648 \u0628\u0647 \u06af\u0631\u0648\u0647\u06cc \u0627\u0632 \u0622\u0646 \u0633\u062a\u0648\u0646 \u0631\u0647\u0627 \u06a9\u0646."},search:{placeholder:"\u062c\u0633\u062a\u062c\u0648...",showingItems:"\u0646\u0645\u0627\u06cc\u0634 \u0627\u0642\u0644\u0627\u0645:",selectedItems:"\u0642\u0644\u0645\u200c\u0647\u0627\u06cc \u0627\u0646\u062a\u062e\u0627\u0628 \u0634\u062f\u0647:",totalItems:"\u0645\u062c\u0645\u0648\u0639 \u0627\u0642\u0644\u0627\u0645:",size:"\u0627\u0646\u062f\u0627\u0632\u0647\u200c\u06cc \u0635\u0641\u062d\u0647:",first:"\u0627\u0648\u0644\u06cc\u0646 \u0635\u0641\u062d\u0647",next:"\u0635\u0641\u062d\u0647\u200c\u06cc\u200c\u0628\u0639\u062f\u06cc",previous:"\u0635\u0641\u062d\u0647\u200c\u06cc\u200c \u0642\u0628\u0644\u06cc",last:"\u0622\u062e\u0631\u06cc\u0646 \u0635\u0641\u062d\u0647"},menu:{text:"\u0633\u062a\u0648\u0646\u200c\u0647\u0627\u06cc \u0627\u0646\u062a\u062e\u0627\u0628\u06cc:"},sort:{ascending:"\u062a\u0631\u062a\u06cc\u0628 \u0635\u0639\u0648\u062f\u06cc",descending:"\u062a\u0631\u062a\u06cc\u0628 \u0646\u0632\u0648\u0644\u06cc",remove:"\u062d\u0630\u0641 \u0645\u0631\u062a\u0628 \u06a9\u0631\u062f\u0646"},column:{hide:"\u067e\u0646\u0647\u0627\u0646\u200c\u06a9\u0631\u062f\u0646 \u0633\u062a\u0648\u0646"},aggregation:{count:"\u062a\u0639\u062f\u0627\u062f: ",
sum:"\u0645\u062c\u0645\u0648\u0639: ",avg:"\u0645\u06cc\u0627\u0646\u06af\u06cc\u0646: ",min:"\u06a9\u0645\u062a\u0631\u06cc\u0646: ",max:"\u0628\u06cc\u0634\u062a\u0631\u06cc\u0646: "},pinning:{pinLeft:"\u067e\u06cc\u0646 \u06a9\u0631\u062f\u0646 \u0633\u0645\u062a \u0686\u067e",pinRight:"\u067e\u06cc\u0646 \u06a9\u0631\u062f\u0646 \u0633\u0645\u062a \u0631\u0627\u0633\u062a",unpin:"\u062d\u0630\u0641 \u067e\u06cc\u0646"},gridMenu:{columns:"\u0633\u062a\u0648\u0646\u200c\u0647\u0627:",importerTitle:"\u0648\u0627\u0631\u062f \u06a9\u0631\u062f\u0646 \u0641\u0627\u06cc\u0644",exporterAllAsCsv:"\u062e\u0631\u0648\u062c\u06cc \u062a\u0645\u0627\u0645 \u062f\u0627\u062f\u0647\u200c\u0647\u0627 \u062f\u0631 \u0641\u0627\u06cc\u0644 csv",exporterVisibleAsCsv:"\u062e\u0631\u0648\u062c\u06cc \u062f\u0627\u062f\u0647\u200c\u0647\u0627\u06cc \u0642\u0627\u0628\u0644 \u0645\u0634\u0627\u0647\u062f\u0647 \u062f\u0631 \u0641\u0627\u06cc\u0644 csv",exporterSelectedAsCsv:"\u062e\u0631\u0648\u062c\u06cc \u062f\u0627\u062f\u0647\u200c\u0647\u0627\u06cc \u0627\u0646\u062a\u062e\u0627\u0628\u200c\u0634\u062f\u0647 \u062f\u0631 \u0641\u0627\u06cc\u0644 csv",exporterAllAsPdf:"\u062e\u0631\u0648\u062c\u06cc \u062a\u0645\u0627\u0645 \u062f\u0627\u062f\u0647\u200c\u0647\u0627 \u062f\u0631 \u0641\u0627\u06cc\u0644 pdf",exporterVisibleAsPdf:"\u062e\u0631\u0648\u062c\u06cc \u062f\u0627\u062f\u0647\u200c\u0647\u0627\u06cc \u0642\u0627\u0628\u0644 \u0645\u0634\u0627\u0647\u062f\u0647 \u062f\u0631 \u0641\u0627\u06cc\u0644 pdf",exporterSelectedAsPdf:"\u062e\u0631\u0648\u062c\u06cc \u062f\u0627\u062f\u0647\u200c\u0647\u0627\u06cc \u0627\u0646\u062a\u062e\u0627\u0628\u200c\u0634\u062f\u0647 \u062f\u0631 \u0641\u0627\u06cc\u0644 pdf",clearAllFilters:"\u067e\u0627\u06a9 \u06a9\u0631\u062f\u0646 \u062a\u0645\u0627\u0645 \u0641\u06cc\u0644\u062a\u0631"},importer:{noHeaders:"\u0646\u0627\u0645 \u0633\u062a\u0648\u0646 \u0642\u0627\u0628\u0644 \u0627\u0633\u062a\u062e\u0631\u0627\u062c \u0646\u06cc\u0633\u062a. \u0622\u06cc\u0627 \u0641\u0627\u06cc\u0644 \u0639\u0646\u0648\u0627\u0646 \u062f\u0627\u0631\u062f\u061f",noObjects:"\u0627\u0634\u06cc\u0627 \u0642\u0627\u0628\u0644 \u0627\u0633\u062a\u062e\u0631\u0627\u062c \u0646\u06cc\u0633\u062a\u0646\u062f. \u0622\u06cc\u0627 \u0628\u0647 \u062c\u0632 \u0639\u0646\u0648\u0627\u0646\u200c\u0647\u0627 \u062f\u0631 \u0641\u0627\u06cc\u0644 \u062f\u0627\u062f\u0647 \u0648\u062c\u0648\u062f \u062f\u0627\u0631\u062f\u061f",invalidCsv:"\u0641\u0627\u06cc\u0644 \u0642\u0627\u0628\u0644 \u067e\u0631\u062f\u0627\u0632\u0634 \u0646\u06cc\u0633\u062a. \u0622\u06cc\u0627 \u0641\u0631\u0645\u062a  csv  \u0645\u0639\u062a\u0628\u0631 \u0627\u0633\u062a\u061f",invalidJson:"\u0641\u0627\u06cc\u0644 \u0642\u0627\u0628\u0644 \u067e\u0631\u062f\u0627\u0632\u0634 \u0646\u06cc\u0633\u062a. \u0622\u06cc\u0627 \u0641\u0631\u0645\u062a json   \u0645\u0639\u062a\u0628\u0631 \u0627\u0633\u062a\u061f",jsonNotArray:"\u0641\u0627\u06cc\u0644 json \u0648\u0627\u0631\u062f \u0634\u062f\u0647 \u0628\u0627\u06cc\u062f \u062d\u0627\u0648\u06cc \u0622\u0631\u0627\u06cc\u0647 \u0628\u0627\u0634\u062f. \u0639\u0645\u0644\u06cc\u0627\u062a \u0633\u0627\u0642\u0637 \u0634\u062f."},pagination:{sizes:"\u0627\u0642\u0644\u0627\u0645 \u062f\u0631 \u0647\u0631 \u0635\u0641\u062d\u0647",totalItems:"\u0627\u0642\u0644\u0627\u0645",of:"\u0627\u0632"},grouping:{group:"\u06af\u0631\u0648\u0647\u200c\u0628\u0646\u062f\u06cc",ungroup:"\u062d\u0630\u0641 \u06af\u0631\u0648\u0647\u200c\u0628\u0646\u062f\u06cc",aggregate_count:"Agg: \u062a\u0639\u062f\u0627\u062f",aggregate_sum:"Agg: \u062c\u0645\u0639",aggregate_max:"Agg: \u0628\u06cc\u0634\u06cc\u0646\u0647",aggregate_min:"Agg: \u06a9\u0645\u06cc\u0646\u0647",aggregate_avg:"Agg: \u0645\u06cc\u0627\u0646\u06af\u06cc\u0646",aggregate_remove:"Agg: \u062d\u0630\u0641"}}),e}])}])}(),function(){angular.module("ui.grid").config(["$provide",function(e){e.decorator("i18nService",["$delegate",function(e){return e.add("fi",{aggregate:{label:"rivit"},groupPanel:{description:"Raahaa ja pudota otsikko t\xe4h\xe4n ryhmitt\xe4\xe4ksesi sarakkeen mukaan."},search:{placeholder:"Hae...",showingItems:"N\xe4ytet\xe4\xe4n rivej\xe4:",selectedItems:"Valitut rivit:",totalItems:"Rivej\xe4 yht.:",size:"N\xe4yt\xe4:",first:"Ensimm\xe4inen sivu",next:"Seuraava sivu",previous:"Edellinen sivu",last:"Viimeinen sivu"},menu:{text:"Valitse sarakkeet:"},sort:{ascending:"J\xe4rjest\xe4 nouseva",descending:"J\xe4rjest\xe4 laskeva",remove:"Poista j\xe4rjestys"},column:{hide:"Piilota sarake"},aggregation:{count:"Rivej\xe4 yht.: ",sum:"Summa: ",avg:"K.a.: ",min:"Min: ",max:"Max: "},pinning:{pinLeft:"Lukitse vasemmalle",pinRight:"Lukitse oikealle",unpin:"Poista lukitus"},gridMenu:{columns:"Sarakkeet:",importerTitle:"Tuo tiedosto",exporterAllAsCsv:"Vie tiedot csv-muodossa",exporterVisibleAsCsv:"Vie n\xe4kyv\xe4 tieto csv-muodossa",exporterSelectedAsCsv:"Vie valittu tieto csv-muodossa",exporterAllAsPdf:"Vie tiedot pdf-muodossa",exporterVisibleAsPdf:"Vie n\xe4kyv\xe4 tieto pdf-muodossa",exporterSelectedAsPdf:"Vie valittu tieto pdf-muodossa",clearAllFilters:"Puhdista kaikki suodattimet"},importer:{noHeaders:"Sarakkeen nimi\xe4 ei voitu p\xe4\xe4tell\xe4, onko tiedostossa otsikkorivi\xe4?",noObjects:"Tietoja ei voitu lukea, onko tiedostossa muuta kuin otsikkot?",invalidCsv:"Tiedostoa ei voitu k\xe4sitell\xe4, oliko se CSV-muodossa?",invalidJson:"Tiedostoa ei voitu k\xe4sitell\xe4, oliko se JSON-muodossa?",jsonNotArray:"Tiedosto ei sis\xe4lt\xe4nyt taulukkoa, lopetetaan."}}),e}])}])}(),function(){angular.module("ui.grid").config(["$provide",function(e){e.decorator("i18nService",["$delegate",function(e){return e.add("fr",{headerCell:{aria:{defaultFilterLabel:"Filtre de la colonne",removeFilter:"Supprimer le filtre",columnMenuButtonLabel:"Menu de la colonne"},priority:"Priorit\xe9:",filterLabel:"Filtre de la colonne: "},aggregate:{label:"\xe9l\xe9ments"},groupPanel:{description:"Faites glisser une en-t\xeate de colonne ici pour cr\xe9er un groupe de colonnes."},search:{placeholder:"Recherche...",showingItems:"Affichage des \xe9l\xe9ments :",selectedItems:"\xc9l\xe9ments s\xe9lectionn\xe9s :",totalItems:"Nombre total d'\xe9l\xe9ments:",size:"Taille de page:",first:"Premi\xe8re page",next:"Page Suivante",previous:"Page pr\xe9c\xe9dente",last:"Derni\xe8re page"},menu:{text:"Choisir des colonnes :"},sort:{ascending:"Trier par ordre croissant",descending:"Trier par ordre d\xe9croissant",none:"Aucun tri",remove:"Enlever le tri"},column:{hide:"Cacher la colonne"},aggregation:{count:"lignes totales: ",sum:"total: ",avg:"moy: ",min:"min: ",max:"max: "},pinning:{pinLeft:"\xc9pingler \xe0 gauche",pinRight:"\xc9pingler \xe0 droite",unpin:"D\xe9tacher"},columnMenu:{close:"Fermer"},gridMenu:{aria:{buttonLabel:"Menu du tableau"},columns:"Colonnes:",importerTitle:"Importer un fichier",exporterAllAsCsv:"Exporter toutes les donn\xe9es en CSV",exporterVisibleAsCsv:"Exporter les donn\xe9es visibles en CSV",exporterSelectedAsCsv:"Exporter les donn\xe9es s\xe9lectionn\xe9es en CSV",exporterAllAsPdf:"Exporter toutes les donn\xe9es en PDF",exporterVisibleAsPdf:"Exporter les donn\xe9es visibles en PDF",exporterSelectedAsPdf:"Exporter les donn\xe9es s\xe9lectionn\xe9es en PDF",clearAllFilters:"Nettoyez tous les filtres"},importer:{noHeaders:"Impossible de d\xe9terminer le nom des colonnes, le fichier poss\xe8de-t-il une en-t\xeate ?",noObjects:"Aucun objet trouv\xe9, le fichier poss\xe8de-t-il des donn\xe9es autres que l'en-t\xeate ?",invalidCsv:"Le fichier n'a pas pu \xeatre trait\xe9, le CSV est-il valide ?",invalidJson:"Le fichier n'a pas pu \xeatre trait\xe9, le JSON est-il valide ?",jsonNotArray:"Le fichier JSON import\xe9 doit contenir un tableau, abandon."},pagination:{aria:{pageToFirst:"Aller \xe0 la premi\xe8re page",pageBack:"Page pr\xe9c\xe9dente",pageSelected:"Page s\xe9lectionn\xe9e",pageForward:"Page suivante",pageToLast:"Aller \xe0 la derni\xe8re page"},sizes:"\xe9l\xe9ments par page",totalItems:"\xe9l\xe9ments",through:"\xe0",of:"sur"},grouping:{group:"Grouper",ungroup:"D\xe9grouper",aggregate_count:"Agg: Compter",aggregate_sum:"Agg: Somme",aggregate_max:"Agg: Max",aggregate_min:"Agg: Min",aggregate_avg:"Agg: Moy",aggregate_remove:"Agg: Retirer"},validate:{error:"Erreur:",minLength:"La valeur doit \xeatre sup\xe9rieure ou \xe9gale \xe0 THRESHOLD caract\xe8res.",maxLength:"La valeur doit \xeatre inf\xe9rieure ou \xe9gale \xe0 THRESHOLD caract\xe8res.",required:"Une valeur est n\xe9c\xe9ssaire."}}),e}])}])}(),function(){angular.module("ui.grid").config(["$provide",function(e){e.decorator("i18nService",["$delegate",function(e){return e.add("he",{aggregate:{label:"items"},groupPanel:{description:"\u05d2\u05e8\u05d5\u05e8 \u05e2\u05de\u05d5\u05d3\u05d4 \u05dc\u05db\u05d0\u05df \u05d5\u05e9\u05d7\u05e8\u05e8 \u05d1\u05db\u05d3\u05d9 \u05dc\u05e7\u05d1\u05e5 \u05e2\u05de\u05d5\u05d3\u05d4 \u05d6\u05d5."},search:{placeholder:"\u05d7\u05e4\u05e9...",showingItems:"\u05de\u05e6\u05d9\u05d2:",selectedItems:'\u05e1\u05d4"\u05db \u05e0\u05d1\u05d7\u05e8\u05d5:',totalItems:'\u05e1\u05d4"\u05db \u05e8\u05e9\u05d5\u05de\u05d5\u05ea:',size:"\u05ea\u05d5\u05e6\u05d0\u05d5\u05ea \u05d1\u05d3\u05e3:",first:"\u05d3\u05e3 \u05e8\u05d0\u05e9\u05d5\u05df",next:"\u05d3\u05e3 \u05d4\u05d1\u05d0",previous:"\u05d3\u05e3 \u05e7\u05d5\u05d3\u05dd",last:"\u05d3\u05e3 \u05d0\u05d7\u05e8\u05d5\u05df"},menu:{text:"\u05d1\u05d7\u05e8 \u05e2\u05de\u05d5\u05d3\u05d5\u05ea:"},sort:{ascending:"\u05e1\u05d3\u05e8 \u05e2\u05d5\u05dc\u05d4",descending:"\u05e1\u05d3\u05e8 \u05d9\u05d5\u05e8\u05d3",remove:"\u05d1\u05d8\u05dc"},column:{hide:"\u05d8\u05d5\u05e8 \u05d4\u05e1\u05ea\u05e8"},aggregation:{count:"total rows: ",sum:"total: ",avg:"avg: ",min:"min: ",max:"max: "},gridMenu:{columns:"Columns:",importerTitle:"Import file",exporterAllAsCsv:"Export all data as csv",exporterVisibleAsCsv:"Export visible data as csv",exporterSelectedAsCsv:"Export selected data as csv",exporterAllAsPdf:"Export all data as pdf",exporterVisibleAsPdf:"Export visible data as pdf",exporterSelectedAsPdf:"Export selected data as pdf",clearAllFilters:"Clean all filters"},importer:{noHeaders:"Column names were unable to be derived, does the file have a header?",noObjects:"Objects were not able to be derived, was there data in the file other than headers?",invalidCsv:"File was unable to be processed, is it valid CSV?",invalidJson:"File was unable to be processed, is it valid Json?",jsonNotArray:"Imported json file must contain an array, aborting."}}),e}])}])}(),function(){angular.module("ui.grid").config(["$provide",function(e){e.decorator("i18nService",["$delegate",function(e){return e.add("hy",{aggregate:{label:"\u057f\u057e\u0575\u0561\u056c\u0576\u0565\u0580"},groupPanel:{description:"\u0538\u057d\u057f \u057d\u0575\u0561\u0576 \u056d\u0574\u0562\u0561\u057e\u0578\u0580\u0565\u056c\u0578\u0582 \u0570\u0561\u0574\u0561\u0580 \u0584\u0561\u0577\u0565\u0584 \u0587 \u0563\u0581\u0565\u0584 \u057e\u0565\u0580\u0576\u0561\u0563\u056b\u0580\u0576 \u0561\u0575\u057d\u057f\u0565\u0572\u0589"},search:{placeholder:"\u0553\u0576\u057f\u0580\u0578\u0582\u0574...",showingItems:"\u0551\u0578\u0582\u0581\u0561\u0564\u0580\u057e\u0561\u056e \u057f\u057e\u0575\u0561\u056c\u0576\u0565\u0580\u055d",selectedItems:"\u0538\u0576\u057f\u0580\u057e\u0561\u056e:",totalItems:"\u0538\u0576\u0564\u0561\u0574\u0565\u0576\u0568\u055d",size:"\u054f\u0578\u0572\u0565\u0580\u056b \u0584\u0561\u0576\u0561\u056f\u0568 \u0567\u057b\u0578\u0582\u0574\u055d",first:"\u0531\u057c\u0561\u057b\u056b\u0576 \u0567\u057b",next:"\u0540\u0561\u057b\u0578\u0580\u0564 \u0567\u057b",previous:"\u0546\u0561\u056d\u0578\u0580\u0564 \u0567\u057b",last:"\u054e\u0565\u0580\u057b\u056b\u0576 \u0567\u057b"},menu:{text:"\u0538\u0576\u057f\u0580\u0565\u056c \u057d\u0575\u0578\u0582\u0576\u0565\u0580\u0568:"},sort:{ascending:"\u0531\u0573\u0574\u0561\u0576 \u056f\u0561\u0580\u0563\u0578\u057e",descending:"\u0546\u057e\u0561\u0566\u0574\u0561\u0576 \u056f\u0561\u0580\u0563\u0578\u057e",remove:"\u0540\u0561\u0576\u0565\u056c "},column:{hide:"\u0539\u0561\u0584\u0581\u0576\u0565\u056c \u057d\u0575\u0578\u0582\u0576\u0568"},aggregation:{count:"\u0568\u0576\u0564\u0561\u0574\u0565\u0576\u0568 \u057f\u0578\u0572\u055d ",sum:"\u0568\u0576\u0564\u0561\u0574\u0565\u0576\u0568\u055d ",avg:"\u0574\u056b\u057b\u056b\u0576\u055d ",min:"\u0574\u056b\u0576\u055d ",max:"\u0574\u0561\u0584\u057d\u055d "},pinning:{pinLeft:"\u053f\u057a\u0581\u0576\u0565\u056c \u0571\u0561\u056d \u056f\u0578\u0572\u0574\u0578\u0582\u0574",pinRight:"\u053f\u057a\u0581\u0576\u0565\u056c \u0561\u057b \u056f\u0578\u0572\u0574\u0578\u0582\u0574",unpin:"\u0531\u0580\u0571\u0561\u056f\u0565\u056c"},gridMenu:{columns:"\u054d\u0575\u0578\u0582\u0576\u0565\u0580:",importerTitle:"\u0546\u0565\u0580\u0574\u0578\u0582\u056e\u0565\u056c \u0586\u0561\u0575\u056c",exporterAllAsCsv:"\u0531\u0580\u057f\u0561\u0570\u0561\u0576\u0565\u056c \u0561\u0574\u0562\u0578\u0572\u057b\u0568 CSV",exporterVisibleAsCsv:"\u0531\u0580\u057f\u0561\u0570\u0561\u0576\u0565\u056c \u0565\u0580\u0587\u0561\u0581\u0578\u0572 \u057f\u057e\u0575\u0561\u056c\u0576\u0565\u0580\u0568 CSV",exporterSelectedAsCsv:"\u0531\u0580\u057f\u0561\u0570\u0561\u0576\u0565\u056c \u0568\u0576\u057f\u0580\u057e\u0561\u056e \u057f\u057e\u0575\u0561\u056c\u0576\u0565\u0580\u0568 CSV",exporterAllAsPdf:"\u0531\u0580\u057f\u0561\u0570\u0561\u0576\u0565\u056c PDF",exporterVisibleAsPdf:"\u0531\u0580\u057f\u0561\u0570\u0561\u0576\u0565\u056c \u0565\u0580\u0587\u0561\u0581\u0578\u0572 \u057f\u057e\u0575\u0561\u056c\u0576\u0565\u0580\u0568 PDF",exporterSelectedAsPdf:"\u0531\u0580\u057f\u0561\u0570\u0561\u0576\u0565\u056c \u0568\u0576\u057f\u0580\u057e\u0561\u056e \u057f\u057e\u0575\u0561\u056c\u0576\u0565\u0580\u0568 PDF",clearAllFilters:"\u0544\u0561\u0584\u0580\u0565\u056c \u0562\u0578\u056c\u0578\u0580 \u0586\u056b\u056c\u057f\u0580\u0565\u0580\u0568"},importer:{noHeaders:"\u0540\u0576\u0561\u0580\u0561\u057e\u0578\u0580 \u0579\u0565\u0572\u0561\u057e \u0578\u0580\u0578\u0577\u0565\u056c \u057d\u0575\u0561\u0576 \u057e\u0565\u0580\u0576\u0561\u0563\u0580\u0565\u0580\u0568\u0589 \u0531\u0580\u0564\u0575\u0578\u055e\u0584 \u0586\u0561\u0575\u056c\u0568 \u0578\u0582\u0576\u056b \u057e\u0565\u0580\u0576\u0561\u0563\u0580\u0565\u0580\u0589",noObjects:"\u0540\u0576\u0561\u0580\u0561\u057e\u0578\u0580 \u0579\u0565\u0572\u0561\u057e \u056f\u0561\u0580\u0564\u0561\u056c \u057f\u057e\u0575\u0561\u056c\u0576\u0565\u0580\u0568\u0589 \u0531\u0580\u0564\u0575\u0578\u055e\u0584 \u0586\u0561\u0575\u056c\u0578\u0582\u0574 \u056f\u0561\u0576 \u057f\u057e\u0575\u0561\u056c\u0576\u0565\u0580\u0589",invalidCsv:"\u0540\u0576\u0561\u0580\u0561\u057e\u0578\u0580 \u0579\u0565\u0572\u0561\u057e \u0574\u0577\u0561\u056f\u0565\u056c \u0586\u0561\u0575\u056c\u0568\u0589 \u0531\u0580\u0564\u0575\u0578\u055e\u0584 \u0561\u0575\u0576 \u057e\u0561\u057e\u0565\u0580 CSV \u0567\u0589",invalidJson:"\u0540\u0576\u0561\u0580\u0561\u057e\u0578\u0580 \u0579\u0565\u0572\u0561\u057e \u0574\u0577\u0561\u056f\u0565\u056c \u0586\u0561\u0575\u056c\u0568\u0589 \u0531\u0580\u0564\u0575\u0578\u055e\u0584 \u0561\u0575\u0576 \u057e\u0561\u057e\u0565\u0580 Json \u0567\u0589",jsonNotArray:"\u0546\u0565\u0580\u0574\u0578\u0582\u056e\u057e\u0561\u056e json \u0586\u0561\u0575\u056c\u0568 \u057a\u0565\u057f\u0584 \u0567 \u057a\u0561\u0580\u0578\u0582\u0576\u0561\u056f\u056b \u0566\u0561\u0576\u0563\u057e\u0561\u056e, \u056f\u0561\u057d\u0565\u0581\u057e\u0578\u0582\u0574 \u0567\u0589"}}),e}])}])}(),function(){angular.module("ui.grid").config(["$provide",function(e){e.decorator("i18nService",["$delegate",function(e){return e.add("is",{headerCell:{aria:{defaultFilterLabel:"S\xeda fyrir d\xe1lk",removeFilter:"Fjarl\xe6gja s\xedu",columnMenuButtonLabel:"D\xe1lkavalmynd"},priority:"Forgangsr\xf6\xf0un:",filterLabel:"S\xeda fyrir d\xe1lka: "},aggregate:{label:"hlutir"},groupPanel:{description:"Drag\xf0u d\xe1lkhaus hinga\xf0 til a\xf0 flokka saman eftir \xfeeim d\xe1lki."},search:{placeholder:"Leita...",showingItems:"S\xfdni hluti:",selectedItems:"Valdir hlutir:",totalItems:"Hlutir alls:",size:"St\xe6r\xf0 s\xed\xf0u:",first:"Fyrsta s\xed\xf0a",next:"N\xe6sta s\xed\xf0a",previous:"Fyrri s\xed\xf0a",last:"S\xed\xf0asta s\xed\xf0a"},menu:{text:"Veldu d\xe1lka:"},sort:{ascending:"Ra\xf0a h\xe6kkandi",descending:"Ra\xf0a l\xe6kkandi",none:"Engin r\xf6\xf0un",remove:"Fjarl\xe6gja r\xf6\xf0un"},column:{hide:"Fela d\xe1lk"},aggregation:{count:"fj\xf6ldi ra\xf0a: ",sum:"summa: ",avg:"me\xf0altal: ",min:"l\xe1gmark: ",max:"h\xe1mark: "},pinning:{pinLeft:"Festa til vinstri",pinRight:"Festa til h\xe6gri",unpin:"Losa"},columnMenu:{close:"Loka"},gridMenu:{aria:{buttonLabel:"T\xf6flu valmynd"},columns:"D\xe1lkar:",importerTitle:"Flytja inn skjal",exporterAllAsCsv:"Flytja \xfat g\xf6gn sem csv",exporterVisibleAsCsv:"Flytja \xfat s\xfdnileg g\xf6gn sem csv",exporterSelectedAsCsv:"Flytja \xfat valin g\xf6gn sem csv",exporterAllAsPdf:"Flytja \xfat \xf6ll g\xf6gn sem pdf",exporterVisibleAsPdf:"Flytja \xfat s\xfdnileg g\xf6gn sem pdf",exporterSelectedAsPdf:"Flytja \xfat valin g\xf6gn sem pdf",clearAllFilters:"Hreinsa allar s\xedur"},importer:{noHeaders:"Ekki h\xe6gt a\xf0 vinna d\xe1lkan\xf6fn \xfar skjalinu, er skjali\xf0 \xf6rugglega me\xf0 haus?",noObjects:"Ekki h\xe6gt a\xf0 vinna hluti \xfar skjalinu, voru \xf6rugglega g\xf6gn \xed skjalinu \xf6nnur en hausinn?",invalidCsv:"T\xf3kst ekki a\xf0 vinna skjal, er \xfea\xf0 \xf6rggulega gilt CSV?",invalidJson:"T\xf3kst ekki a\xf0 vinna skjal, er \xfea\xf0 \xf6rugglega gilt Json?",jsonNotArray:"Innflutt json skjal ver\xf0ur a\xf0 innihalda fylki, h\xe6tti vi\xf0."},pagination:{aria:{pageToFirst:"Fletta a\xf0 fyrstu",pageBack:"Fletta til baka",pageSelected:"Valin s\xed\xf0a",pageForward:"Fletta \xe1fram",pageToLast:"Fletta a\xf0 s\xed\xf0ustu"},sizes:"hlutir \xe1 s\xed\xf0u",totalItems:"hlutir",through:"gegnum",of:"af"},grouping:{group:"Flokka",ungroup:"Sundurli\xf0a",aggregate_count:"Fj\xf6ldi: ",aggregate_sum:"Summa: ",aggregate_max:"H\xe1mark: ",aggregate_min:"L\xe1gmark: ",aggregate_avg:"Me\xf0altal: ",aggregate_remove:"Fjarl\xe6gja: "},validate:{error:"Villa:",minLength:"Gildi \xe6tti a\xf0 vera a.m.k. THRESHOLD stafa langt.",maxLength:"Gildi \xe6tti a\xf0 vera \xed mesta lagi THRESHOLD stafa langt.",required:"\xdearf a\xf0 hafa gildi."}}),e}])}])}(),function(){angular.module("ui.grid").config(["$provide",function(e){e.decorator("i18nService",["$delegate",function(e){return e.add("it",{aggregate:{label:"elementi"},groupPanel:{description:"Trascina un'intestazione all'interno del gruppo della colonna."},search:{placeholder:"Ricerca...",showingItems:"Mostra:",selectedItems:"Selezionati:",totalItems:"Totali:",size:"Tot Pagine:",first:"Prima",next:"Prossima",previous:"Precedente",last:"Ultima"},menu:{text:"Scegli le colonne:"},sort:{ascending:"Asc.",descending:"Desc.",remove:"Annulla ordinamento"},column:{hide:"Nascondi"},aggregation:{count:"righe totali: ",sum:"tot: ",avg:"media: ",min:"minimo: ",max:"massimo: "},pinning:{pinLeft:"Blocca a sx",pinRight:"Blocca a dx",unpin:"Blocca in alto"},gridMenu:{columns:"Colonne:",importerTitle:"Importa",exporterAllAsCsv:"Esporta tutti i dati in CSV",exporterVisibleAsCsv:"Esporta i dati visibili in CSV",exporterSelectedAsCsv:"Esporta i dati selezionati in CSV",exporterAllAsPdf:"Esporta tutti i dati in PDF",exporterVisibleAsPdf:"Esporta i dati visibili in PDF",exporterSelectedAsPdf:"Esporta i dati selezionati in PDF",clearAllFilters:"Pulire tutti i filtri"},importer:{noHeaders:"Impossibile reperire i nomi delle colonne, sicuro che siano indicati all'interno del file?",noObjects:"Impossibile reperire gli oggetti, sicuro che siano indicati all'interno del file?",invalidCsv:"Impossibile elaborare il file, sicuro che sia un CSV?",invalidJson:"Impossibile elaborare il file, sicuro che sia un JSON valido?",jsonNotArray:"Errore! Il file JSON da importare deve contenere un array."},pagination:{aria:{pageToFirst:"Prima",pageBack:"Indietro",pageSelected:"Pagina selezionata",pageForward:"Avanti",pageToLast:"Ultima"},sizes:"elementi per pagina",totalItems:"elementi",through:"a",of:"di"},grouping:{group:"Raggruppa",ungroup:"Separa",aggregate_count:"Agg: N. Elem.",aggregate_sum:"Agg: Somma",aggregate_max:"Agg: Massimo",aggregate_min:"Agg: Minimo",aggregate_avg:"Agg: Media",aggregate_remove:"Agg: Rimuovi"},validate:{error:"Errore:",minLength:"Lunghezza minima pari a THRESHOLD caratteri.",maxLength:"Lunghezza massima pari a THRESHOLD caratteri.",required:"Necessario inserire un valore."}}),e}])}])}(),function(){angular.module("ui.grid").config(["$provide",function(e){e.decorator("i18nService",["$delegate",function(e){return e.add("ja",{headerCell:{aria:{defaultFilterLabel:"\u5217\u306e\u30d5\u30a3\u30eb\u30bf\u30fc",removeFilter:"\u30d5\u30a3\u30eb\u30bf\u30fc\u306e\u89e3\u9664",columnMenuButtonLabel:"\u5217\u306e\u30e1\u30cb\u30e5\u30fc"},priority:"\u512a\u5148\u5ea6:",filterLabel:"\u5217\u30d5\u30a3\u30eb\u30bf\u30fc: "},aggregate:{label:"\u9805\u76ee"},groupPanel:{description:"\u3053\u3053\u306b\u5217\u30d8\u30c3\u30c0\u3092\u30c9\u30e9\u30c3\u30b0\u30a2\u30f3\u30c9\u30c9\u30ed\u30c3\u30d7\u3057\u3066\u3001\u305d\u306e\u5217\u3067\u30b0\u30eb\u30fc\u30d7\u5316\u3057\u307e\u3059\u3002"},search:{placeholder:"\u691c\u7d22...",showingItems:"\u8868\u793a\u4e2d\u306e\u9805\u76ee:",selectedItems:"\u9078\u629e\u3057\u305f\u9805\u76ee:",totalItems:"\u9805\u76ee\u306e\u7dcf\u6570:",size:"\u30da\u30fc\u30b8\u30b5\u30a4\u30ba:",first:"\u6700\u521d\u306e\u30da\u30fc\u30b8",next:"\u6b21\u306e\u30da\u30fc\u30b8",previous:"\u524d\u306e\u30da\u30fc\u30b8",last:"\u524d\u306e\u30da\u30fc\u30b8"},menu:{text:"\u5217\u306e\u9078\u629e:"},sort:{ascending:"\u6607\u9806\u306b\u4e26\u3079\u66ff\u3048",descending:"\u964d\u9806\u306b\u4e26\u3079\u66ff\u3048",none:"\u4e26\u3079\u66ff\u3048\u7121\u3057",remove:"\u4e26\u3079\u66ff\u3048\u306e\u89e3\u9664"},column:{hide:"\u5217\u306e\u975e\u8868\u793a"},aggregation:{count:"\u884c\u6570: ",sum:"\u5408\u8a08: ",avg:"\u5e73\u5747: ",min:"\u6700\u5c0f: ",max:"\u6700\u5927: "},pinning:{pinLeft:"\u5de6\u306b\u56fa\u5b9a",pinRight:"\u53f3\u306b\u56fa\u5b9a",unpin:"\u56fa\u5b9a\u89e3\u9664"},columnMenu:{close:"\u9589\u3058\u308b"},gridMenu:{aria:{buttonLabel:"\u30b0\u30ea\u30c3\u30c9\u30e1\u30cb\u30e5\u30fc"},columns:"\u5217\u306e\u8868\u793a/\u975e\u8868\u793a:",importerTitle:"\u30d5\u30a1\u30a4\u30eb\u306e\u30a4\u30f3\u30dd\u30fc\u30c8",exporterAllAsCsv:"\u3059\u3079\u3066\u306e\u30c7\u30fc\u30bf\u3092CSV\u5f62\u5f0f\u3067\u30a8\u30af\u30b9\u30dd\u30fc\u30c8",exporterVisibleAsCsv:"\u8868\u793a\u4e2d\u306e\u30c7\u30fc\u30bf\u3092CSV\u5f62\u5f0f\u3067\u30a8\u30af\u30b9\u30dd\u30fc\u30c8",exporterSelectedAsCsv:"\u9078\u629e\u3057\u305f\u30c7\u30fc\u30bf\u3092CSV\u5f62\u5f0f\u3067\u30a8\u30af\u30b9\u30dd\u30fc\u30c8",exporterAllAsPdf:"\u3059\u3079\u3066\u306e\u30c7\u30fc\u30bf\u3092PDF\u5f62\u5f0f\u3067\u30a8\u30af\u30b9\u30dd\u30fc\u30c8",exporterVisibleAsPdf:"\u8868\u793a\u4e2d\u306e\u30c7\u30fc\u30bf\u3092PDF\u5f62\u5f0f\u3067\u30a8\u30af\u30b9\u30dd\u30fc\u30c8",exporterSelectedAsPdf:"\u9078\u629e\u3057\u305f\u30c7\u30fc\u30bf\u3092PDF\u5f62\u5f0f\u3067\u30a8\u30af\u30b9\u30dd\u30fc\u30c8",clearAllFilters:"\u3059\u3079\u3066\u306e\u30d5\u30a3\u30eb\u30bf\u3092\u30af\u30ea\u30a2"},importer:{noHeaders:"\u5217\u540d\u3092\u53d6\u5f97\u3067\u304d\u307e\u305b\u3093\u3002\u30d5\u30a1\u30a4\u30eb\u306b\u30d8\u30c3\u30c0\u304c\u542b\u307e\u308c\u3066\u3044\u308b\u3053\u3068\u3092\u78ba\u8a8d\u3057\u3066\u304f\u3060\u3055\u3044\u3002",noObjects:"\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u53d6\u5f97\u3067\u304d\u307e\u305b\u3093\u3002\u30d5\u30a1\u30a4\u30eb\u306b\u30d8\u30c3\u30c0\u4ee5\u5916\u306e\u30c7\u30fc\u30bf\u304c\u542b\u307e\u308c\u3066\u3044\u308b\u3053\u3068\u3092\u78ba\u8a8d\u3057\u3066\u304f\u3060\u3055\u3044\u3002",invalidCsv:"\u30d5\u30a1\u30a4\u30eb\u3092\u51e6\u7406\u3067\u304d\u307e\u305b\u3093\u3002\u30d5\u30a1\u30a4\u30eb\u304c\u6709\u52b9\u306aCSV\u5f62\u5f0f\u3067\u3042\u308b\u3053\u3068\u3092\u78ba\u8a8d\u3057\u3066\u304f\u3060\u3055\u3044\u3002",invalidJson:"\u30d5\u30a1\u30a4\u30eb\u3092\u51e6\u7406\u3067\u304d\u307e\u305b\u3093\u3002\u30d5\u30a1\u30a4\u30eb\u304c\u6709\u52b9\u306aJSON\u5f62\u5f0f\u3067\u3042\u308b\u3053\u3068\u3092\u78ba\u8a8d\u3057\u3066\u304f\u3060\u3055\u3044\u3002",jsonNotArray:"\u30a4\u30f3\u30dd\u30fc\u30c8\u3057\u305fJSON\u30d5\u30a1\u30a4\u30eb\u306b\u306f\u914d\u5217\u304c\u542b\u307e\u308c\u3066\u3044\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\u51e6\u7406\u3092\u4e2d\u6b62\u3057\u307e\u3059\u3002"},pagination:{aria:{pageToFirst:"\u6700\u521d\u306e\u30da\u30fc\u30b8",pageBack:"\u524d\u306e\u30da\u30fc\u30b8",pageSelected:"\u73fe\u5728\u306e\u30da\u30fc\u30b8",pageForward:"\u6b21\u306e\u30da\u30fc\u30b8",pageToLast:"\u6700\u5f8c\u306e\u30da\u30fc\u30b8"},sizes:"\u9805\u76ee/\u30da\u30fc\u30b8",totalItems:"\u9805\u76ee",through:"\u304b\u3089",of:"\u9805\u76ee/\u5168"},grouping:{group:"\u30b0\u30eb\u30fc\u30d7\u5316",ungroup:"\u30b0\u30eb\u30fc\u30d7\u5316\u306e\u89e3\u9664",aggregate_count:"\u96c6\u8a08\u8868\u793a: \u884c\u6570",aggregate_sum:"\u96c6\u8a08\u8868\u793a: \u5408\u8a08",aggregate_max:"\u96c6\u8a08\u8868\u793a: \u6700\u5927",aggregate_min:"\u96c6\u8a08\u8868\u793a: \u6700\u5c0f",aggregate_avg:"\u96c6\u8a08\u8868\u793a: \u5e73\u5747",aggregate_remove:"\u96c6\u8a08\u8868\u793a: \u89e3\u9664"},validate:{error:"Error:",minLength:"THRESHOLD \u6587\u5b57\u4ee5\u4e0a\u3067\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044\u3002",maxLength:"THRESHOLD \u6587\u5b57\u4ee5\u4e0b\u3067\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044\u3002",required:"\u5024\u304c\u5fc5\u8981\u3067\u3059\u3002"}}),e}])}])}(),function(){angular.module("ui.grid").config(["$provide",function(e){e.decorator("i18nService",["$delegate",function(e){return e.add("ko",{aggregate:{label:"\uc544\uc774\ud15c"},groupPanel:{description:"\uceec\ub7fc\uc73c\ub85c \uadf8\ub8f9\ud551\ud558\uae30 \uc704\ud574\uc11c\ub294 \uceec\ub7fc \ud5e4\ub354\ub97c \ub04c\uc5b4 \ub5a8\uc5b4\ub728\ub824 \uc8fc\uc138\uc694."},search:{placeholder:"\uac80\uc0c9...",showingItems:"\ud56d\ubaa9 \ubcf4\uc5ec\uc8fc\uae30:",selectedItems:"\uc120\ud0dd \ud56d\ubaa9:",totalItems:"\uc804\uccb4 \ud56d\ubaa9:",size:"\ud398\uc774\uc9c0 \ud06c\uae30:",first:"\uccab\ubc88\uc9f8 \ud398\uc774\uc9c0",next:"\ub2e4\uc74c \ud398\uc774\uc9c0",previous:"\uc774\uc804 \ud398\uc774\uc9c0",last:"\ub9c8\uc9c0\ub9c9 \ud398\uc774\uc9c0"},menu:{text:"\uceec\ub7fc\uc744 \uc120\ud0dd\ud558\uc138\uc694:"},sort:{ascending:"\uc624\ub984\ucc28\uc21c \uc815\ub82c",descending:"\ub0b4\ub9bc\ucc28\uc21c \uc815\ub82c",remove:"\uc18c\ud305 \uc81c\uac70"},column:{hide:"\uceec\ub7fc \uc81c\uac70"},aggregation:{count:"\uc804\uccb4 \uac2f\uc218: ",sum:"\uc804\uccb4: ",avg:"\ud3c9\uade0: ",min:"\ucd5c\uc18c: ",max:"\ucd5c\ub300: "},pinning:{pinLeft:"\uc67c\ucabd \ud540",pinRight:"\uc624\ub978\ucabd \ud540",unpin:"\ud540 \uc81c\uac70"},gridMenu:{columns:"\uceec\ub7fc:",importerTitle:"\ud30c\uc77c \uac00\uc838\uc624\uae30",exporterAllAsCsv:"csv\ub85c \ubaa8\ub4e0 \ub370\uc774\ud130 \ub0b4\ubcf4\ub0b4\uae30",exporterVisibleAsCsv:"csv\ub85c \ubcf4\uc774\ub294 \ub370\uc774\ud130 \ub0b4\ubcf4\ub0b4\uae30",exporterSelectedAsCsv:"csv\ub85c \uc120\ud0dd\ub41c \ub370\uc774\ud130 \ub0b4\ubcf4\ub0b4\uae30",exporterAllAsPdf:"pdf\ub85c \ubaa8\ub4e0 \ub370\uc774\ud130 \ub0b4\ubcf4\ub0b4\uae30",exporterVisibleAsPdf:"pdf\ub85c \ubcf4\uc774\ub294 \ub370\uc774\ud130 \ub0b4\ubcf4\ub0b4\uae30",exporterSelectedAsPdf:"pdf\ub85c \uc120\ud0dd \ub370\uc774\ud130 \ub0b4\ubcf4\ub0b4\uae30",clearAllFilters:"\ubaa8\ub4e0 \ud544\ud130\ub97c \uccad\uc18c"},importer:{noHeaders:"\uceec\ub7fc\uba85\uc774 \uc9c0\uc815\ub418\uc5b4 \uc788\uc9c0 \uc54a\uc2b5\ub2c8\ub2e4. \ud30c\uc77c\uc5d0 \ud5e4\ub354\uac00 \uba85\uc2dc\ub418\uc5b4 \uc788\ub294\uc9c0 \ud655\uc778\ud574 \uc8fc\uc138\uc694.",noObjects:"\ub370\uc774\ud130\uac00 \uc9c0\uc815\ub418\uc5b4 \uc788\uc9c0 \uc54a\uc2b5\ub2c8\ub2e4. \ub370\uc774\ud130\uac00 \ud30c\uc77c\uc5d0 \uc788\ub294\uc9c0 \ud655\uc778\ud574 \uc8fc\uc138\uc694.",invalidCsv:"\ud30c\uc77c\uc744 \ucc98\ub9ac\ud560 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4. \uc62c\ubc14\ub978 csv\uc778\uc9c0 \ud655\uc778\ud574 \uc8fc\uc138\uc694.",invalidJson:"\ud30c\uc77c\uc744 \ucc98\ub9ac\ud560 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4. \uc62c\ubc14\ub978 json\uc778\uc9c0 \ud655\uc778\ud574 \uc8fc\uc138\uc694.",jsonNotArray:"json \ud30c\uc77c\uc740 \ubc30\uc5f4\uc744 \ud3ec\ud568\ud574\uc57c \ud569\ub2c8\ub2e4."},pagination:{sizes:"\ud398\uc774\uc9c0\ub2f9 \ud56d\ubaa9",totalItems:"\uc804\uccb4 \ud56d\ubaa9"}}),e}])}])}(),function(){angular.module("ui.grid").config(["$provide",function(e){e.decorator("i18nService",["$delegate",function(e){return e.add("nl",{aggregate:{label:"items"},groupPanel:{description:"Sleep hier een kolomnaam heen om op te groeperen."},search:{placeholder:"Zoeken...",showingItems:"Getoonde items:",selectedItems:"Geselecteerde items:",totalItems:"Totaal aantal items:",size:"Items per pagina:",first:"Eerste pagina",next:"Volgende pagina",previous:"Vorige pagina",last:"Laatste pagina"},menu:{text:"Kies kolommen:"},sort:{ascending:"Sorteer oplopend",descending:"Sorteer aflopend",remove:"Verwijder sortering"},column:{hide:"Verberg kolom"},aggregation:{count:"Aantal rijen: ",sum:"Som: ",avg:"Gemiddelde: ",min:"Min: ",max:"Max: "},pinning:{pinLeft:"Zet links vast",pinRight:"Zet rechts vast",unpin:"Maak los"},gridMenu:{columns:"Kolommen:",importerTitle:"Importeer bestand",exporterAllAsCsv:"Exporteer alle data als csv",exporterVisibleAsCsv:"Exporteer zichtbare data als csv",exporterSelectedAsCsv:"Exporteer geselecteerde data als csv",exporterAllAsPdf:"Exporteer alle data als pdf",exporterVisibleAsPdf:"Exporteer zichtbare data als pdf",exporterSelectedAsPdf:"Exporteer geselecteerde data als pdf",clearAllFilters:"Reinig alle filters"},importer:{noHeaders:"Kolomnamen kunnen niet worden afgeleid. Heeft het bestand een header?",noObjects:"Objecten kunnen niet worden afgeleid. Bevat het bestand data naast de headers?",invalidCsv:"Het bestand kan niet verwerkt worden. Is het een valide csv bestand?",invalidJson:"Het bestand kan niet verwerkt worden. Is het valide json?",jsonNotArray:"Het json bestand moet een array bevatten. De actie wordt geannuleerd."},pagination:{sizes:"items per pagina",totalItems:"items",of:"van de"},grouping:{group:"Groepeer",ungroup:"Groepering opheffen",aggregate_count:"Agg: Aantal",aggregate_sum:"Agg: Som",aggregate_max:"Agg: Max",aggregate_min:"Agg: Min",aggregate_avg:"Agg: Gem",aggregate_remove:"Agg: Verwijder"}}),e}])}])}(),function(){angular.module("ui.grid").config(["$provide",function(e){e.decorator("i18nService",["$delegate",function(e){return e.add("no",{headerCell:{aria:{defaultFilterLabel:"Filter for kolonne",removeFilter:"Fjern filter",columnMenuButtonLabel:"Kolonnemeny"},priority:"Prioritet:",filterLabel:"Filter for kolonne: "},aggregate:{label:"elementer"},groupPanel:{description:"Trekk en kolonneoverskrift hit og slipp den for \xe5 gruppere etter den kolonnen."},search:{placeholder:"S\xf8k...",showingItems:"Viste elementer:",selectedItems:"Valgte elementer:",totalItems:"Antall elementer:",size:"Sidest\xf8rrelse:",first:"F\xf8rste side",next:"Neste side",previous:"Forrige side",last:"Siste side"},menu:{text:"Velg kolonner:"},sort:{ascending:"Sortere stigende",descending:"Sortere fallende",none:"Ingen sortering",remove:"Fjern sortering"},column:{hide:"Skjul kolonne"},aggregation:{count:"antall rader: ",sum:"total: ",avg:"gjennomsnitt: ",min:"minimum: ",max:"maksimum: "},pinning:{pinLeft:"Fest til venstre",pinRight:"Fest til h\xf8yre",unpin:"L\xf8sne"},columnMenu:{close:"Lukk"},gridMenu:{aria:{buttonLabel:"Grid Menu"},columns:"Kolonner:",importerTitle:"Importer fil",exporterAllAsCsv:"Eksporter alle data som csv",exporterVisibleAsCsv:"Eksporter synlige data som csv",exporterSelectedAsCsv:"Eksporter utvalgte data som csv",exporterAllAsPdf:"Eksporter alle data som pdf",exporterVisibleAsPdf:"Eksporter synlige data som pdf",exporterSelectedAsPdf:"Eksporter utvalgte data som pdf",clearAllFilters:"Clear all filters"},importer:{noHeaders:"Kolonnenavn kunne ikke avledes. Har filen en overskrift?",noObjects:"Objekter kunne ikke avledes. Er der andre data i filen enn overskriften?",invalidCsv:"Filen kunne ikke behandles. Er den gyldig CSV?",invalidJson:"Filen kunne ikke behandles. Er den gyldig JSON?",jsonNotArray:"Importert JSON-fil m\xe5 inneholde en liste. Avbryter."},pagination:{aria:{pageToFirst:"G\xe5 til f\xf8rste side",pageBack:"G\xe5 til forrige side",pageSelected:"Valgte side",pageForward:"G\xe5 til neste side",pageToLast:"G\xe5 til siste side"},
sizes:"elementer per side",totalItems:"elementer",through:"til",of:"av"},grouping:{group:"Gruppere",ungroup:"Fjerne gruppering",aggregate_count:"Agr: Antall",aggregate_sum:"Agr: Sum",aggregate_max:"Agr: Maksimum",aggregate_min:"Agr: Minimum",aggregate_avg:"Agr: Gjennomsnitt",aggregate_remove:"Agr: Fjern"}}),e}])}])}(),function(){angular.module("ui.grid").config(["$provide",function(e){e.decorator("i18nService",["$delegate",function(e){return e.add("pl",{headerCell:{aria:{defaultFilterLabel:"Filtr dla kolumny",removeFilter:"Usu\u0144 filtr",columnMenuButtonLabel:"Menu kolumny"},priority:"Prioritet:",filterLabel:"Filtr dla kolumny: "},aggregate:{label:"pozycji"},groupPanel:{description:"Przeci\u0105gnij nag\u0142\xf3wek kolumny tutaj, aby pogrupowa\u0107 wed\u0142ug niej."},search:{placeholder:"Szukaj...",showingItems:"Widoczne pozycje:",selectedItems:"Zaznaczone pozycje:",totalItems:"Wszystkich pozycji:",size:"Rozmiar strony:",first:"Pierwsza strona",next:"Nast\u0119pna strona",previous:"Poprzednia strona",last:"Ostatnia strona"},menu:{text:"Wybierz kolumny:"},sort:{ascending:"Sortuj rosn\u0105co",descending:"Sortuj malej\u0105co",none:"Brak sortowania",remove:"Wy\u0142\u0105cz sortowanie"},column:{hide:"Ukryj kolumn\u0119"},aggregation:{count:"Razem pozycji: ",sum:"Razem: ",avg:"\u015arednia: ",min:"Min: ",max:"Max: "},pinning:{pinLeft:"Przypnij do lewej",pinRight:"Przypnij do prawej",unpin:"Odepnij"},columnMenu:{close:"Zamknij"},gridMenu:{aria:{buttonLabel:"Opcje tabeli"},columns:"Kolumny:",importerTitle:"Importuj plik",exporterAllAsCsv:"Eksportuj wszystkie dane do csv",exporterVisibleAsCsv:"Eksportuj widoczne dane do csv",exporterSelectedAsCsv:"Eksportuj zaznaczone dane do csv",exporterAllAsPdf:"Eksportuj wszystkie dane do pdf",exporterVisibleAsPdf:"Eksportuj widoczne dane do pdf",exporterSelectedAsPdf:"Eksportuj zaznaczone dane do pdf",clearAllFilters:"Wyczy\u015b\u0107 filtry"},importer:{noHeaders:"Nie uda\u0142o si\u0119 wczyta\u0107 nazw kolumn. Czy plik posiada nag\u0142\xf3wek?",noObjects:"Nie udalo si\u0119 wczyta\u0107 pozycji. Czy plik zawiera dane??",invalidCsv:"Nie uda\u0142o si\u0119 przetworzy\u0107 pliku, jest to prawidlowy plik CSV??",invalidJson:"Nie uda\u0142o si\u0119 przetworzy\u0107 pliku, jest to prawidlowy plik Json?",jsonNotArray:"Importowany plik json musi zawiera\u0107 tablic\u0119, importowanie przerwane."},pagination:{aria:{pageToFirst:"Pierwsza strona",pageBack:"Poprzednia strona",pageSelected:"Wybrana strona",pageForward:"Nast\u0119pna strona",pageToLast:"Ostatnia strona"},sizes:"pozycji na stron\u0119",totalItems:"pozycji",through:"do",of:"z"},grouping:{group:"Grupuj",ungroup:"Rozgrupuj",aggregate_count:"Zbiorczo: Razem",aggregate_sum:"Zbiorczo: Suma",aggregate_max:"Zbiorczo: Max",aggregate_min:"Zbiorczo: Min",aggregate_avg:"Zbiorczo: \u015arednia",aggregate_remove:"Zbiorczo: Usu\u0144"},validate:{error:"B\u0142\u0105d:",minLength:"Warto\u015b\u0107 powinna sk\u0142ada\u0107 si\u0119 z co najmniej THRESHOLD znak\xf3w.",maxLength:"Warto\u015b\u0107 powinna sk\u0142ada\u0107 si\u0119 z przynajmniej THRESHOLD znak\xf3w.",required:"Warto\u015b\u0107 jest wymagana."}}),e}])}])}(),function(){angular.module("ui.grid").config(["$provide",function(e){e.decorator("i18nService",["$delegate",function(e){return e.add("pt-br",{headerCell:{aria:{defaultFilterLabel:"Filtro por coluna",removeFilter:"Remover filtro",columnMenuButtonLabel:"Menu coluna"},priority:"Prioridade:",filterLabel:"Filtro por coluna: "},aggregate:{label:"itens"},groupPanel:{description:"Arraste e solte uma coluna aqui para agrupar por essa coluna"},search:{placeholder:"Procurar...",showingItems:"Mostrando os Itens:",selectedItems:"Items Selecionados:",totalItems:"Total de Itens:",size:"Tamanho da P\xe1gina:",first:"Primeira P\xe1gina",next:"Pr\xf3xima P\xe1gina",previous:"P\xe1gina Anterior",last:"\xdaltima P\xe1gina"},menu:{text:"Selecione as colunas:"},sort:{ascending:"Ordenar Ascendente",descending:"Ordenar Descendente",none:"Nenhuma Ordem",remove:"Remover Ordena\xe7\xe3o"},column:{hide:"Esconder coluna"},aggregation:{count:"total de linhas: ",sum:"total: ",avg:"med: ",min:"min: ",max:"max: "},pinning:{pinLeft:"Fixar Esquerda",pinRight:"Fixar Direita",unpin:"Desprender"},columnMenu:{close:"Fechar"},gridMenu:{aria:{buttonLabel:"Menu Grid"},columns:"Colunas:",importerTitle:"Importar arquivo",exporterAllAsCsv:"Exportar todos os dados como csv",exporterVisibleAsCsv:"Exportar dados vis\xedveis como csv",exporterSelectedAsCsv:"Exportar dados selecionados como csv",exporterAllAsPdf:"Exportar todos os dados como pdf",exporterVisibleAsPdf:"Exportar dados vis\xedveis como pdf",exporterSelectedAsPdf:"Exportar dados selecionados como pdf",clearAllFilters:"Limpar todos os filtros"},importer:{noHeaders:"Nomes de colunas n\xe3o puderam ser derivados. O arquivo tem um cabe\xe7alho?",noObjects:"Objetos n\xe3o puderam ser derivados. Havia dados no arquivo, al\xe9m dos cabe\xe7alhos?",invalidCsv:"Arquivo n\xe3o pode ser processado. \xc9 um CSV v\xe1lido?",invalidJson:"Arquivo n\xe3o pode ser processado. \xc9 um Json v\xe1lido?",jsonNotArray:"Arquivo json importado tem que conter um array. Abortando."},pagination:{aria:{pageToFirst:"Primeira p\xe1gina",pageBack:"P\xe1gina anterior",pageSelected:"P\xe1gina Selecionada",pageForward:"Proxima",pageToLast:"Anterior"},sizes:"itens por p\xe1gina",totalItems:"itens",through:"atrav\xe9s dos",of:"de"},grouping:{group:"Agrupar",ungroup:"Desagrupar",aggregate_count:"Agr: Contar",aggregate_sum:"Agr: Soma",aggregate_max:"Agr: Max",aggregate_min:"Agr: Min",aggregate_avg:"Agr: Med",aggregate_remove:"Agr: Remover"}}),e}])}])}(),function(){angular.module("ui.grid").config(["$provide",function(e){e.decorator("i18nService",["$delegate",function(e){return e.add("pt",{headerCell:{aria:{defaultFilterLabel:"Filtro por coluna",removeFilter:"Remover filtro",columnMenuButtonLabel:"Menu coluna"},priority:"Prioridade:",filterLabel:"Filtro por coluna: "},aggregate:{label:"itens"},groupPanel:{description:"Arraste e solte uma coluna aqui para agrupar por essa coluna"},search:{placeholder:"Procurar...",showingItems:"Mostrando os Itens:",selectedItems:"Itens Selecionados:",totalItems:"Total de Itens:",size:"Tamanho da P\xe1gina:",first:"Primeira P\xe1gina",next:"Pr\xf3xima P\xe1gina",previous:"P\xe1gina Anterior",last:"\xdaltima P\xe1gina"},menu:{text:"Selecione as colunas:"},sort:{ascending:"Ordenar Ascendente",descending:"Ordenar Descendente",none:"Nenhuma Ordem",remove:"Remover Ordena\xe7\xe3o"},column:{hide:"Esconder coluna"},aggregation:{count:"total de linhas: ",sum:"total: ",avg:"med: ",min:"min: ",max:"max: "},pinning:{pinLeft:"Fixar Esquerda",pinRight:"Fixar Direita",unpin:"Desprender"},columnMenu:{close:"Fechar"},gridMenu:{aria:{buttonLabel:"Menu Grid"},columns:"Colunas:",importerTitle:"Importar ficheiro",exporterAllAsCsv:"Exportar todos os dados como csv",exporterVisibleAsCsv:"Exportar dados vis\xedveis como csv",exporterSelectedAsCsv:"Exportar dados selecionados como csv",exporterAllAsPdf:"Exportar todos os dados como pdf",exporterVisibleAsPdf:"Exportar dados vis\xedveis como pdf",exporterSelectedAsPdf:"Exportar dados selecionados como pdf",clearAllFilters:"Limpar todos os filtros"},importer:{noHeaders:"Nomes de colunas n\xe3o puderam ser derivados. O ficheiro tem um cabe\xe7alho?",noObjects:"Objetos n\xe3o puderam ser derivados. Havia dados no ficheiro, al\xe9m dos cabe\xe7alhos?",invalidCsv:"Ficheiro n\xe3o pode ser processado. \xc9 um CSV v\xe1lido?",invalidJson:"Ficheiro n\xe3o pode ser processado. \xc9 um Json v\xe1lido?",jsonNotArray:"Ficheiro json importado tem que conter um array. Interrompendo."},pagination:{aria:{pageToFirst:"Primeira p\xe1gina",pageBack:"P\xe1gina anterior",pageSelected:"P\xe1gina Selecionada",pageForward:"Pr\xf3xima",pageToLast:"Anterior"},sizes:"itens por p\xe1gina",totalItems:"itens",through:"a",of:"de"},grouping:{group:"Agrupar",ungroup:"Desagrupar",aggregate_count:"Agr: Contar",aggregate_sum:"Agr: Soma",aggregate_max:"Agr: Max",aggregate_min:"Agr: Min",aggregate_avg:"Agr: Med",aggregate_remove:"Agr: Remover"}}),e}])}])}(),function(){angular.module("ui.grid").config(["$provide",function(e){e.decorator("i18nService",["$delegate",function(e){return e.add("ro",{headerCell:{aria:{defaultFilterLabel:"Filtru pentru coloana",removeFilter:"Sterge filtru",columnMenuButtonLabel:"Column Menu"},priority:"Prioritate:",filterLabel:"Filtru pentru coloana:"},aggregate:{label:"Elemente"},groupPanel:{description:"Trage un cap de coloana aici pentru a grupa elementele dupa coloana respectiva"},search:{placeholder:"Cauta...",showingItems:"Arata elementele:",selectedItems:"Elementele selectate:",totalItems:"Total elemente:",size:"Marime pagina:",first:"Prima pagina",next:"Pagina urmatoare",previous:"Pagina anterioara",last:"Ultima pagina"},menu:{text:"Alege coloane:"},sort:{ascending:"Ordoneaza crescator",descending:"Ordoneaza descrescator",none:"Fara ordonare",remove:"Sterge ordonarea"},column:{hide:"Ascunde coloana"},aggregation:{count:"total linii: ",sum:"total: ",avg:"medie: ",min:"min: ",max:"max: "},pinning:{pinLeft:"Pin la stanga",pinRight:"Pin la dreapta",unpin:"Sterge pinul"},columnMenu:{close:"Inchide"},gridMenu:{aria:{buttonLabel:"Grid Menu"},columns:"Coloane:",importerTitle:"Incarca fisier",exporterAllAsCsv:"Exporta toate datele ca csv",exporterVisibleAsCsv:"Exporta datele vizibile ca csv",exporterSelectedAsCsv:"Exporta datele selectate ca csv",exporterAllAsPdf:"Exporta toate datele ca pdf",exporterVisibleAsPdf:"Exporta datele vizibile ca pdf",exporterSelectedAsPdf:"Exporta datele selectate ca csv pdf",clearAllFilters:"Sterge toate filtrele"},importer:{noHeaders:"Numele coloanelor nu a putut fi incarcat, acest fisier are un header?",noObjects:"Datele nu au putut fi incarcate, exista date in fisier in afara numelor de coloane?",invalidCsv:"Fisierul nu a putut fi procesat, ati incarcat un CSV valid ?",invalidJson:"Fisierul nu a putut fi procesat, ati incarcat un Json valid?",jsonNotArray:"Json-ul incarcat trebuie sa contina un array, inchidere."},pagination:{aria:{pageToFirst:"Prima pagina",pageBack:"O pagina inapoi",pageSelected:"Pagina selectata",pageForward:"O pagina inainte",pageToLast:"Ultima pagina"},sizes:"Elemente per pagina",totalItems:"elemente",through:"prin",of:"of"},grouping:{group:"Grupeaza",ungroup:"Opreste gruparea",aggregate_count:"Agg: Count",aggregate_sum:"Agg: Sum",aggregate_max:"Agg: Max",aggregate_min:"Agg: Min",aggregate_avg:"Agg: Avg",aggregate_remove:"Agg: Remove"}}),e}])}])}(),function(){angular.module("ui.grid").config(["$provide",function(e){e.decorator("i18nService",["$delegate",function(e){return e.add("ru",{headerCell:{aria:{defaultFilterLabel:"\u0424\u0438\u043b\u044c\u0442\u0440 \u0441\u0442\u043e\u043b\u0431\u0446\u0430",removeFilter:"\u0423\u0434\u0430\u043b\u0438\u0442\u044c \u0444\u0438\u043b\u044c\u0442\u0440",columnMenuButtonLabel:"\u041c\u0435\u043d\u044e \u0441\u0442\u043e\u043b\u0431\u0446\u0430"},priority:"\u041f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0442:",filterLabel:"\u0424\u0438\u043b\u044c\u0442\u0440 \u0441\u0442\u043e\u043b\u0431\u0446\u0430: "},aggregate:{label:"\u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b"},groupPanel:{description:"\u0414\u043b\u044f \u0433\u0440\u0443\u043f\u043f\u0438\u0440\u043e\u0432\u043a\u0438 \u043f\u043e \u0441\u0442\u043e\u043b\u0431\u0446\u0443 \u043f\u0435\u0440\u0435\u0442\u0430\u0449\u0438\u0442\u0435 \u0441\u044e\u0434\u0430 \u0435\u0433\u043e \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435."},search:{placeholder:"\u041f\u043e\u0438\u0441\u043a...",showingItems:"\u041f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b:",selectedItems:"\u0412\u044b\u0431\u0440\u0430\u043d\u043d\u044b\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b:",totalItems:"\u0412\u0441\u0435\u0433\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432:",size:"\u0420\u0430\u0437\u043c\u0435\u0440 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b:",first:"\u041f\u0435\u0440\u0432\u0430\u044f \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430",next:"\u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0430\u044f \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430",previous:"\u041f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0430\u044f \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430",last:"\u041f\u043e\u0441\u043b\u0435\u0434\u043d\u044f\u044f \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430"},menu:{text:"\u0412\u044b\u0431\u0440\u0430\u0442\u044c \u0441\u0442\u043e\u043b\u0431\u0446\u044b:"},sort:{ascending:"\u041f\u043e \u0432\u043e\u0437\u0440\u0430\u0441\u0442\u0430\u043d\u0438\u044e",descending:"\u041f\u043e \u0443\u0431\u044b\u0432\u0430\u043d\u0438\u044e",none:"\u0411\u0435\u0437 \u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u043a\u0438",remove:"\u0423\u0431\u0440\u0430\u0442\u044c \u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u043a\u0443"},column:{hide:"\u0421\u043f\u0440\u044f\u0442\u0430\u0442\u044c \u0441\u0442\u043e\u043b\u0431\u0435\u0446"},aggregation:{count:"\u0432\u0441\u0435\u0433\u043e \u0441\u0442\u0440\u043e\u043a: ",sum:"\u0438\u0442\u043e\u0433\u043e: ",avg:"\u0441\u0440\u0435\u0434\u043d\u0435\u0435: ",min:"\u043c\u0438\u043d: ",max:"\u043c\u0430\u043a\u0441: "},pinning:{pinLeft:"\u0417\u0430\u043a\u0440\u0435\u043f\u0438\u0442\u044c \u0441\u043b\u0435\u0432\u0430",pinRight:"\u0417\u0430\u043a\u0440\u0435\u043f\u0438\u0442\u044c \u0441\u043f\u0440\u0430\u0432\u0430",unpin:"\u041e\u0442\u043a\u0440\u0435\u043f\u0438\u0442\u044c"},columnMenu:{close:"\u0417\u0430\u043a\u0440\u044b\u0442\u044c"},gridMenu:{aria:{buttonLabel:"\u041c\u0435\u043d\u044e"},columns:"\u0421\u0442\u043e\u043b\u0431\u0446\u044b:",importerTitle:"\u0418\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0444\u0430\u0439\u043b",exporterAllAsCsv:"\u042d\u043a\u0441\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u0441\u0451 \u0432 CSV",exporterVisibleAsCsv:"\u042d\u043a\u0441\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u0438\u0434\u0438\u043c\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 CSV",exporterSelectedAsCsv:"\u042d\u043a\u0441\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 CSV",exporterAllAsPdf:"\u042d\u043a\u0441\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u0441\u0451 \u0432 PDF",exporterVisibleAsPdf:"\u042d\u043a\u0441\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u0438\u0434\u0438\u043c\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 PDF",exporterSelectedAsPdf:"\u042d\u043a\u0441\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 PDF",clearAllFilters:"\u041e\u0447\u0438\u0441\u0442\u0438\u0442\u0435 \u0432\u0441\u0435 \u0444\u0438\u043b\u044c\u0442\u0440\u044b"},importer:{noHeaders:"\u041d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f \u0441\u0442\u043e\u043b\u0431\u0446\u043e\u0432, \u0435\u0441\u0442\u044c \u043b\u0438 \u0432 \u0444\u0430\u0439\u043b\u0435 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a?",noObjects:"\u041d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435, \u0435\u0441\u0442\u044c \u043b\u0438 \u0432 \u0444\u0430\u0439\u043b\u0435 \u0441\u0442\u0440\u043e\u043a\u0438 \u043a\u0440\u043e\u043c\u0435 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0430?",invalidCsv:"\u041d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0444\u0430\u0439\u043b, \u044d\u0442\u043e \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0439 CSV-\u0444\u0430\u0439\u043b?",invalidJson:"\u041d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0444\u0430\u0439\u043b, \u044d\u0442\u043e \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0439 JSON?",jsonNotArray:"\u0418\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u043c\u044b\u0439 JSON-\u0444\u0430\u0439\u043b \u0434\u043e\u043b\u0436\u0435\u043d \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u043c\u0430\u0441\u0441\u0438\u0432, \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044f \u043e\u0442\u043c\u0435\u043d\u0435\u043d\u0430."},pagination:{aria:{pageToFirst:"\u041f\u0435\u0440\u0432\u0430\u044f \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430",pageBack:"\u041f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0430\u044f \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430",pageSelected:"\u0412\u044b\u0431\u0440\u0430\u043d\u043d\u0430\u044f \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430",pageForward:"\u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0430\u044f \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430",pageToLast:"\u041f\u043e\u0441\u043b\u0435\u0434\u043d\u044f\u044f \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430"},sizes:"\u0441\u0442\u0440\u043e\u043a \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443",totalItems:"\u0441\u0442\u0440\u043e\u043a",through:"\u043f\u043e",of:"\u0438\u0437"},grouping:{group:"\u0413\u0440\u0443\u043f\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c",ungroup:"\u0420\u0430\u0437\u0433\u0440\u0443\u043f\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c",aggregate_count:"\u0413\u0440\u0443\u043f\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c: Count",aggregate_sum:"\u0414\u043b\u044f \u0433\u0440\u0443\u043f\u043f\u044b: \u0421\u0443\u043c\u043c\u0430",aggregate_max:"\u0414\u043b\u044f \u0433\u0440\u0443\u043f\u043f\u044b: \u041c\u0430\u043a\u0441\u0438\u043c\u0443\u043c",aggregate_min:"\u0414\u043b\u044f \u0433\u0440\u0443\u043f\u043f\u044b: \u041c\u0438\u043d\u0438\u043c\u0443\u043c",aggregate_avg:"\u0414\u043b\u044f \u0433\u0440\u0443\u043f\u043f\u044b: \u0421\u0440\u0435\u0434\u043d\u0435\u0435",aggregate_remove:"\u0414\u043b\u044f \u0433\u0440\u0443\u043f\u043f\u044b: \u041f\u0443\u0441\u0442\u043e"}}),e}])}])}(),function(){angular.module("ui.grid").config(["$provide",function(e){e.decorator("i18nService",["$delegate",function(e){return e.add("sk",{aggregate:{label:"items"},groupPanel:{description:"Pretiahni sem n\xe1zov st\u013apca pre zoskupenie pod\u013ea toho st\u013apca."},search:{placeholder:"H\u013eadaj...",showingItems:"Zobrazujem polo\u017eky:",selectedItems:"Vybrat\xe9 polo\u017eky:",totalItems:"Po\u010det polo\u017eiek:",size:"Po\u010det:",first:"Prv\xe1 strana",next:"\u010eal\u0161ia strana",previous:"Predch\xe1dzaj\xfaca strana",last:"Posledn\xe1 strana"},menu:{text:"Vyberte st\u013apce:"},sort:{ascending:"Zotriedi\u0165 vzostupne",descending:"Zotriedi\u0165 zostupne",remove:"Vymaza\u0165 triedenie"},aggregation:{count:"total rows: ",sum:"total: ",avg:"avg: ",min:"min: ",max:"max: "},gridMenu:{columns:"Columns:",importerTitle:"Import file",exporterAllAsCsv:"Export all data as csv",exporterVisibleAsCsv:"Export visible data as csv",exporterSelectedAsCsv:"Export selected data as csv",exporterAllAsPdf:"Export all data as pdf",exporterVisibleAsPdf:"Export visible data as pdf",exporterSelectedAsPdf:"Export selected data as pdf",clearAllFilters:"Clear all filters"},importer:{noHeaders:"Column names were unable to be derived, does the file have a header?",noObjects:"Objects were not able to be derived, was there data in the file other than headers?",invalidCsv:"File was unable to be processed, is it valid CSV?",invalidJson:"File was unable to be processed, is it valid Json?",jsonNotArray:"Imported json file must contain an array, aborting."}}),e}])}])}(),function(){angular.module("ui.grid").config(["$provide",function(e){e.decorator("i18nService",["$delegate",function(e){return e.add("sv",{aggregate:{label:"Artiklar"},groupPanel:{description:"Dra en kolumnrubrik hit och sl\xe4pp den f\xf6r att gruppera efter den kolumnen."},search:{placeholder:"S\xf6k...",showingItems:"Visar artiklar:",selectedItems:"Valda artiklar:",totalItems:"Antal artiklar:",size:"Sidstorlek:",first:"F\xf6rsta sidan",next:"N\xe4sta sida",previous:"F\xf6reg\xe5ende sida",last:"Sista sidan"},menu:{text:"V\xe4lj kolumner:"},sort:{ascending:"Sortera stigande",descending:"Sortera fallande",remove:"Inaktivera sortering"},column:{hide:"G\xf6m kolumn"},aggregation:{count:"Antal rader: ",sum:"Summa: ",avg:"Genomsnitt: ",min:"Min: ",max:"Max: "},pinning:{pinLeft:"F\xe4st v\xe4nster",pinRight:"F\xe4st h\xf6ger",unpin:"L\xf6sg\xf6r"},gridMenu:{columns:"Kolumner:",importerTitle:"Importera fil",exporterAllAsCsv:"Exportera all data som CSV",exporterVisibleAsCsv:"Exportera synlig data som CSV",exporterSelectedAsCsv:"Exportera markerad data som CSV",exporterAllAsPdf:"Exportera all data som PDF",exporterVisibleAsPdf:"Exportera synlig data som PDF",exporterSelectedAsPdf:"Exportera markerad data som PDF",clearAllFilters:"Reng\xf6r alla filter"},importer:{noHeaders:"Kolumnnamn kunde inte h\xe4rledas. Har filen ett sidhuvud?",noObjects:"Objekt kunde inte h\xe4rledas. Har filen data undantaget sidhuvud?",invalidCsv:"Filen kunde inte behandlas, \xe4r den en giltig CSV?",invalidJson:"Filen kunde inte behandlas, \xe4r den en giltig JSON?",jsonNotArray:"Importerad JSON-fil m\xe5ste inneh\xe5lla ett f\xe4lt. Import avbruten."},pagination:{sizes:"Artiklar per sida",totalItems:"Artiklar"}}),e}])}])}(),function(){angular.module("ui.grid").config(["$provide",function(e){e.decorator("i18nService",["$delegate",function(e){return e.add("ta",{aggregate:{label:"\u0b89\u0bb0\u0bc1\u0baa\u0bcd\u0baa\u0b9f\u0bbf\u0b95\u0bb3\u0bcd"},groupPanel:{description:"\u0b92\u0bb0\u0bc1 \u0baa\u0ba4\u0bcd\u0ba4\u0bbf\u0baf\u0bc8 \u0b95\u0bc1\u0bb4\u0bc1\u0bb5\u0bbe\u0b95 \u0b85\u0bae\u0bc8\u0b95\u0bcd\u0b95 \u0b85\u0baa\u0bcd\u0baa\u0ba4\u0bcd\u0ba4\u0bbf\u0baf\u0bbf\u0ba9\u0bcd \u0ba4\u0bb2\u0bc8\u0baa\u0bcd\u0baa\u0bc8 \u0b87\u0b99\u0bcd\u0b95\u0bc7  \u0b87\u0bb4\u0bc1\u0ba4\u0bcd\u0ba4\u0bc1 \u0bb5\u0bb0\u0bb5\u0bc1\u0bae\u0bcd "},search:{placeholder:"\u0ba4\u0bc7\u0b9f\u0bb2\u0bcd ...",showingItems:"\u0b89\u0bb0\u0bc1\u0baa\u0bcd\u0baa\u0b9f\u0bbf\u0b95\u0bb3\u0bc8 \u0b95\u0bbe\u0ba3\u0bcd\u0baa\u0bbf\u0ba4\u0bcd\u0ba4\u0bb2\u0bcd:",selectedItems:"\u0ba4\u0bc7\u0bb0\u0bcd\u0ba8\u0bcd\u0ba4\u0bc6\u0b9f\u0bc1\u0b95\u0bcd\u0b95\u0baa\u0bcd\u0baa\u0b9f\u0bcd\u0b9f  \u0b89\u0bb0\u0bc1\u0baa\u0bcd\u0baa\u0b9f\u0bbf\u0b95\u0bb3\u0bcd:",totalItems:"\u0bae\u0bca\u0ba4\u0bcd\u0ba4 \u0b89\u0bb0\u0bc1\u0baa\u0bcd\u0baa\u0b9f\u0bbf\u0b95\u0bb3\u0bcd:",size:"\u0baa\u0b95\u0bcd\u0b95 \u0b85\u0bb3\u0bb5\u0bc1: ",first:"\u0bae\u0bc1\u0ba4\u0bb2\u0bcd \u0baa\u0b95\u0bcd\u0b95\u0bae\u0bcd",next:"\u0b85\u0b9f\u0bc1\u0ba4\u0bcd\u0ba4 \u0baa\u0b95\u0bcd\u0b95\u0bae\u0bcd",previous:"\u0bae\u0bc1\u0ba8\u0bcd\u0ba4\u0bc8\u0baf \u0baa\u0b95\u0bcd\u0b95\u0bae\u0bcd ",last:"\u0b87\u0bb1\u0bc1\u0ba4\u0bbf \u0baa\u0b95\u0bcd\u0b95\u0bae\u0bcd"},menu:{text:"\u0baa\u0ba4\u0bcd\u0ba4\u0bbf\u0b95\u0bb3\u0bc8 \u0ba4\u0bc7\u0bb0\u0bcd\u0ba8\u0bcd\u0ba4\u0bc6\u0b9f\u0bc1:"},sort:{ascending:"\u0bae\u0bc7\u0bb2\u0bbf\u0bb0\u0bc1\u0ba8\u0bcd\u0ba4\u0bc1 \u0b95\u0bc0\u0bb4\u0bbe\u0b95",descending:"\u0b95\u0bc0\u0bb4\u0bbf\u0bb0\u0bc1\u0ba8\u0bcd\u0ba4\u0bc1 \u0bae\u0bc7\u0bb2\u0bbe\u0b95",remove:"\u0bb5\u0bb0\u0bbf\u0b9a\u0bc8\u0baf\u0bc8 \u0ba8\u0bc0\u0b95\u0bcd\u0b95\u0bc1"},column:{hide:"\u0baa\u0ba4\u0bcd\u0ba4\u0bbf\u0baf\u0bc8 \u0bae\u0bb1\u0bc8\u0ba4\u0bcd\u0ba4\u0bc1 \u0bb5\u0bc8 "},aggregation:{count:"\u0bae\u0bca\u0ba4\u0bcd\u0ba4 \u0bb5\u0bb0\u0bbf\u0b95\u0bb3\u0bcd:",sum:"\u0bae\u0bca\u0ba4\u0bcd\u0ba4\u0bae\u0bcd: ",avg:"\u0b9a\u0bb0\u0bbe\u0b9a\u0bb0\u0bbf: ",min:"\u0b95\u0bc1\u0bb1\u0bc8\u0ba8\u0bcd\u0ba4\u0baa\u0b9f\u0bcd\u0b9a: ",max:"\u0b85\u0ba4\u0bbf\u0b95\u0baa\u0b9f\u0bcd\u0b9a: "},pinning:{pinLeft:"\u0b87\u0b9f\u0ba4\u0bc1\u0baa\u0bc1\u0bb1\u0bae\u0bbe\u0b95 \u0ba4\u0bc8\u0b95\u0bcd\u0b95 ",pinRight:"\u0bb5\u0bb2\u0ba4\u0bc1\u0baa\u0bc1\u0bb1\u0bae\u0bbe\u0b95 \u0ba4\u0bc8\u0b95\u0bcd\u0b95",unpin:"\u0baa\u0bbf\u0bb0\u0bbf"},gridMenu:{columns:"\u0baa\u0ba4\u0bcd\u0ba4\u0bbf\u0b95\u0bb3\u0bcd:",importerTitle:"\u0b95\u0bcb\u0baa\u0bcd\u0baa\u0bc1 : \u0baa\u0b9f\u0bbf\u0ba4\u0bcd\u0ba4\u0bb2\u0bcd",exporterAllAsCsv:"\u0b8e\u0bb2\u0bcd\u0bb2\u0bbe \u0ba4\u0bb0\u0bb5\u0bc1\u0b95\u0bb3\u0bc8\u0baf\u0bc1\u0bae\u0bcd \u0b95\u0bcb\u0baa\u0bcd\u0baa\u0bbe\u0b95\u0bcd\u0b95\u0bc1: csv",exporterVisibleAsCsv:"\u0b87\u0bb0\u0bc1\u0b95\u0bcd\u0b95\u0bc1\u0bae\u0bcd \u0ba4\u0bb0\u0bb5\u0bc1\u0b95\u0bb3\u0bc8 \u0b95\u0bcb\u0baa\u0bcd\u0baa\u0bbe\u0b95\u0bcd\u0b95\u0bc1: csv",exporterSelectedAsCsv:"\u0ba4\u0bc7\u0bb0\u0bcd\u0ba8\u0bcd\u0ba4\u0bc6\u0b9f\u0bc1\u0ba4\u0bcd\u0ba4 \u0ba4\u0bb0\u0bb5\u0bc1\u0b95\u0bb3\u0bc8 \u0b95\u0bcb\u0baa\u0bcd\u0baa\u0bbe\u0b95\u0bcd\u0b95\u0bc1: csv",exporterAllAsPdf:"\u0b8e\u0bb2\u0bcd\u0bb2\u0bbe \u0ba4\u0bb0\u0bb5\u0bc1\u0b95\u0bb3\u0bc8\u0baf\u0bc1\u0bae\u0bcd \u0b95\u0bcb\u0baa\u0bcd\u0baa\u0bbe\u0b95\u0bcd\u0b95\u0bc1: pdf",exporterVisibleAsPdf:"\u0b87\u0bb0\u0bc1\u0b95\u0bcd\u0b95\u0bc1\u0bae\u0bcd \u0ba4\u0bb0\u0bb5\u0bc1\u0b95\u0bb3\u0bc8 \u0b95\u0bcb\u0baa\u0bcd\u0baa\u0bbe\u0b95\u0bcd\u0b95\u0bc1: pdf",exporterSelectedAsPdf:"\u0ba4\u0bc7\u0bb0\u0bcd\u0ba8\u0bcd\u0ba4\u0bc6\u0b9f\u0bc1\u0ba4\u0bcd\u0ba4 \u0ba4\u0bb0\u0bb5\u0bc1\u0b95\u0bb3\u0bc8 \u0b95\u0bcb\u0baa\u0bcd\u0baa\u0bbe\u0b95\u0bcd\u0b95\u0bc1: pdf",clearAllFilters:"Clear all filters"},importer:{noHeaders:"\u0baa\u0ba4\u0bcd\u0ba4\u0bbf\u0baf\u0bbf\u0ba9\u0bcd \u0ba4\u0bb2\u0bc8\u0baa\u0bcd\u0baa\u0bc1\u0b95\u0bb3\u0bc8 \u0baa\u0bc6\u0bb1 \u0b87\u0baf\u0bb2\u0bb5\u0bbf\u0bb2\u0bcd\u0bb2\u0bc8, \u0b95\u0bcb\u0baa\u0bcd\u0baa\u0bbf\u0bb1\u0bcd\u0b95\u0bc1 \u0ba4\u0bb2\u0bc8\u0baa\u0bcd\u0baa\u0bc1 \u0b89\u0bb3\u0bcd\u0bb3\u0ba4\u0bbe?",noObjects:"\u0b87\u0bb2\u0b95\u0bcd\u0b95\u0bc1\u0b95\u0bb3\u0bc8 \u0b89\u0bb0\u0bc1\u0bb5\u0bbe\u0b95\u0bcd\u0b95 \u0bae\u0bc1\u0b9f\u0bbf\u0baf\u0bb5\u0bbf\u0bb2\u0bcd\u0bb2\u0bc8, \u0b95\u0bcb\u0baa\u0bcd\u0baa\u0bbf\u0bb2\u0bcd \u0ba4\u0bb2\u0bc8\u0baa\u0bcd\u0baa\u0bc1\u0b95\u0bb3\u0bc8 \u0ba4\u0bb5\u0bbf\u0bb0 \u0ba4\u0bb0\u0bb5\u0bc1 \u0b8f\u0ba4\u0bc7\u0ba9\u0bc1\u0bae\u0bcd \u0b89\u0bb3\u0bcd\u0bb3\u0ba4\u0bbe? ",invalidCsv:"\u0b9a\u0bb0\u0bbf\u0bb5\u0bb0 \u0ba8\u0b9f\u0bc8\u0bae\u0bc1\u0bb1\u0bc8 \u0baa\u0b9f\u0bc1\u0ba4\u0bcd\u0ba4 \u0b87\u0baf\u0bb2\u0bb5\u0bbf\u0bb2\u0bcd\u0bb2\u0bc8, \u0b95\u0bcb\u0baa\u0bcd\u0baa\u0bc1 \u0b9a\u0bb0\u0bbf\u0ba4\u0bbe\u0ba9\u0bbe? - csv",invalidJson:"\u0b9a\u0bb0\u0bbf\u0bb5\u0bb0 \u0ba8\u0b9f\u0bc8\u0bae\u0bc1\u0bb1\u0bc8 \u0baa\u0b9f\u0bc1\u0ba4\u0bcd\u0ba4 \u0b87\u0baf\u0bb2\u0bb5\u0bbf\u0bb2\u0bcd\u0bb2\u0bc8, \u0b95\u0bcb\u0baa\u0bcd\u0baa\u0bc1 \u0b9a\u0bb0\u0bbf\u0ba4\u0bbe\u0ba9\u0bbe? - json",jsonNotArray:"\u0baa\u0b9f\u0bbf\u0ba4\u0bcd\u0ba4 \u0b95\u0bcb\u0baa\u0bcd\u0baa\u0bbf\u0bb2\u0bcd \u0bb5\u0bb0\u0bbf\u0b9a\u0bc8\u0b95\u0bb3\u0bcd \u0b89\u0bb3\u0bcd\u0bb3\u0ba4\u0bc1, \u0ba8\u0b9f\u0bc8\u0bae\u0bc1\u0bb1\u0bc8 \u0bb0\u0ba4\u0bcd\u0ba4\u0bc1 \u0b9a\u0bc6\u0baf\u0bcd : json"},pagination:{sizes:"\u0b89\u0bb0\u0bc1\u0baa\u0bcd\u0baa\u0b9f\u0bbf\u0b95\u0bb3\u0bcd / \u0baa\u0b95\u0bcd\u0b95\u0bae\u0bcd",totalItems:"\u0b89\u0bb0\u0bc1\u0baa\u0bcd\u0baa\u0b9f\u0bbf\u0b95\u0bb3\u0bcd "},grouping:{group:"\u0b95\u0bc1\u0bb4\u0bc1",ungroup:"\u0baa\u0bbf\u0bb0\u0bbf",aggregate_count:"\u0bae\u0ba4\u0bbf\u0baa\u0bcd\u0baa\u0bc0\u0b9f\u0bcd\u0b9f\u0bc1 : \u0b8e\u0ba3\u0bcd\u0ba3\u0bc1",aggregate_sum:"\u0bae\u0ba4\u0bbf\u0baa\u0bcd\u0baa\u0bc0\u0b9f\u0bcd\u0b9f\u0bc1 : \u0b95\u0bc2\u0b9f\u0bcd\u0b9f\u0bb2\u0bcd",aggregate_max:"\u0bae\u0ba4\u0bbf\u0baa\u0bcd\u0baa\u0bc0\u0b9f\u0bcd\u0b9f\u0bc1 : \u0b85\u0ba4\u0bbf\u0b95\u0baa\u0b9f\u0bcd\u0b9a\u0bae\u0bcd",aggregate_min:"\u0bae\u0ba4\u0bbf\u0baa\u0bcd\u0baa\u0bc0\u0b9f\u0bcd\u0b9f\u0bc1 : \u0b95\u0bc1\u0bb1\u0bc8\u0ba8\u0bcd\u0ba4\u0baa\u0b9f\u0bcd\u0b9a\u0bae\u0bcd",aggregate_avg:"\u0bae\u0ba4\u0bbf\u0baa\u0bcd\u0baa\u0bc0\u0b9f\u0bcd\u0b9f\u0bc1 : \u0b9a\u0bb0\u0bbe\u0b9a\u0bb0\u0bbf",aggregate_remove:"\u0bae\u0ba4\u0bbf\u0baa\u0bcd\u0baa\u0bc0\u0b9f\u0bcd\u0b9f\u0bc1 : \u0ba8\u0bc0\u0b95\u0bcd\u0b95\u0bc1"}}),e}])}])}(),function(){angular.module("ui.grid").config(["$provide",function(e){e.decorator("i18nService",["$delegate",function(e){return e.add("tr",{headerCell:{aria:{defaultFilterLabel:"S\xfctun i\xe7in filtre",removeFilter:"Filtreyi Kald\u0131r",columnMenuButtonLabel:"S\xfctun Men\xfcs\xfc"},priority:"\xd6ncelik:",filterLabel:"S\xfctun i\xe7in filtre: "},aggregate:{label:"kay\u0131tlar"},groupPanel:{description:"S\xfctuna g\xf6re gruplamak i\xe7in s\xfctun ba\u015fl\u0131\u011f\u0131n\u0131 buraya s\xfcr\xfckleyin ve b\u0131rak\u0131n."},search:{placeholder:"Arama...",showingItems:"G\xf6sterilen Kay\u0131t:",selectedItems:"Se\xe7ili Kay\u0131t:",totalItems:"Toplam Kay\u0131t:",size:"Sayfa Boyutu:",first:"\u0130lk Sayfa",next:"Sonraki Sayfa",previous:"\xd6nceki Sayfa",last:"Son Sayfa"},menu:{text:"S\xfctunlar\u0131 Se\xe7:"},sort:{ascending:"Artan S\u0131rada S\u0131rala",descending:"Azalan S\u0131rada S\u0131rala",none:"S\u0131ralama Yapma",remove:"S\u0131ralamay\u0131 Kald\u0131r"},column:{hide:"S\xfctunu Gizle"},aggregation:{count:"toplam sat\u0131r: ",sum:"toplam: ",avg:"ort: ",min:"min: ",max:"maks: "},pinning:{pinLeft:"Sola Sabitle",pinRight:"Sa\u011fa Sabitle",unpin:"Sabitlemeyi Kald\u0131r"},columnMenu:{close:"Kapat"},gridMenu:{aria:{buttonLabel:"Tablo Men\xfc"},columns:"S\xfctunlar:",importerTitle:"Dosya i\xe7eri aktar",exporterAllAsCsv:"B\xfct\xfcn veriyi CSV olarak d\u0131\u015far\u0131 aktar",exporterVisibleAsCsv:"G\xf6r\xfcnen veriyi CSV olarak d\u0131\u015far\u0131 aktar",exporterSelectedAsCsv:"Se\xe7ili veriyi CSV olarak d\u0131\u015far\u0131 aktar",exporterAllAsPdf:"B\xfct\xfcn veriyi PDF olarak d\u0131\u015far\u0131 aktar",exporterVisibleAsPdf:"G\xf6r\xfcnen veriyi PDF olarak d\u0131\u015far\u0131 aktar",exporterSelectedAsPdf:"Se\xe7ili veriyi PDF olarak d\u0131\u015far\u0131 aktar",clearAllFilters:"B\xfct\xfcn filtreleri kald\u0131r"},importer:{noHeaders:"S\xfctun isimleri \xfcretilemiyor, dosyan\u0131n bir ba\u015fl\u0131\u011f\u0131 var m\u0131?",noObjects:"Nesneler \xfcretilemiyor, dosyada ba\u015fl\u0131ktan ba\u015fka bir veri var m\u0131?",invalidCsv:"Dosya i\u015flenemedi, ge\xe7erli bir CSV dosyas\u0131 m\u0131?",invalidJson:"Dosya i\u015flenemedi, ge\xe7erli bir Json dosyas\u0131 m\u0131?",jsonNotArray:"Al\u0131nan Json dosyas\u0131nda bir dizi bulunmal\u0131d\u0131r, i\u015flem iptal ediliyor."},pagination:{aria:{pageToFirst:"\u0130lk sayfaya",pageBack:"Geri git",pageSelected:"Se\xe7ili sayfa",pageForward:"\u0130leri git",pageToLast:"Sona git"},sizes:"Sayfadaki nesne say\u0131s\u0131",totalItems:"kay\u0131tlar",through:"",of:""},grouping:{group:"Grupla",ungroup:"Gruplama",aggregate_count:"Yekun: Say\u0131",aggregate_sum:"Yekun: Toplam",aggregate_max:"Yekun: Maks",aggregate_min:"Yekun: Min",aggregate_avg:"Yekun: Ort",aggregate_remove:"Yekun: Sil"}}),e}])}])}(),function(){angular.module("ui.grid").config(["$provide",function(e){e.decorator("i18nService",["$delegate",function(e){return e.add("ua",{headerCell:{aria:{defaultFilterLabel:"\u0424\u0456\u043b\u044c\u0442\u0440 \u0441\u0442\u043e\u0432\u043f\u0447\u0438\u043a\u0430",removeFilter:"\u0412\u0438\u0434\u0430\u043b\u0438\u0442\u0438 \u0444\u0456\u043b\u044c\u0442\u0440",columnMenuButtonLabel:"\u041c\u0435\u043d\u044e \u0441\u0442\u0432\u043f\u0447\u0438\u043a\u0430"},priority:"\u041f\u0440\u0456\u043e\u0440\u0438\u0442\u0435\u0442:",filterLabel:"\u0424\u0456\u043b\u044c\u0442\u0440 \u0441\u0442\u043e\u0432\u043f\u0447\u0438\u043a\u0430: "},aggregate:{label:"\u0435\u043b\u0435\u043c\u0435\u043d\u0442\u0438"},groupPanel:{description:"\u0414\u043b\u044f \u0433\u0440\u0443\u043f\u0443\u0432\u0430\u043d\u043d\u044f \u0437\u0430 \u0441\u0442\u043e\u0432\u043f\u0447\u0438\u043a\u043e\u043c \u043f\u0435\u0440\u0435\u0442\u044f\u0433\u043d\u0456\u0442\u044c \u0441\u044e\u0434\u0438 \u0439\u043e\u0433\u043e \u043d\u0430\u0437\u0432\u0443."},search:{placeholder:"\u041f\u043e\u0448\u0443\u043a...",showingItems:"\u041f\u043e\u043a\u0430\u0437\u0430\u0442\u0438 \u0435\u043b\u0435\u043c\u0435\u043d\u0442\u0438:",selectedItems:"\u041e\u0431\u0440\u0430\u043d\u0456 \u0435\u043b\u0435\u043c\u0435\u043d\u0442\u0438:",totalItems:"\u0423\u0441\u044c\u043e\u0433\u043e \u0435\u043b\u0435\u043c\u0435\u043d\u0442\u0456\u0432:",size:"\u0420\u043e\u0437\u043c\u0456\u0440 \u0441\u0442\u043e\u0440\u0456\u043d\u043a\u0438:",first:"\u041f\u0435\u0440\u0448\u0430 \u0441\u0442\u043e\u0440\u0456\u043d\u043a\u0430",
next:"\u041d\u0430\u0441\u0442\u0443\u043f\u043d\u0430 \u0441\u0442\u043e\u0440\u0456\u043d\u043a\u0430",previous:"\u041f\u043e\u043f\u0435\u0440\u0435\u0434\u043d\u044f \u0441\u0442\u043e\u0440\u0456\u043d\u043a\u0430",last:"\u041e\u0441\u0442\u0430\u043d\u043d\u044f \u0441\u0442\u043e\u0440\u0456\u043d\u043a\u0430"},menu:{text:"\u041e\u0431\u0440\u0430\u0442\u0438 \u0441\u0442\u0432\u043f\u0447\u0438\u043a\u0438:"},sort:{ascending:"\u0417\u0430 \u0437\u0440\u043e\u0441\u0442\u0430\u043d\u043d\u044f\u043c",descending:"\u0417\u0430 \u0441\u043f\u0430\u0434\u0430\u043d\u043d\u044f\u043c",none:"\u0411\u0435\u0437 \u0441\u043e\u0440\u0442\u0443\u0432\u0430\u043d\u043d\u044f",remove:"\u041f\u0440\u0438\u0431\u0440\u0430\u0442\u0438 \u0441\u043e\u0440\u0442\u0443\u0432\u0430\u043d\u043d\u044f"},column:{hide:"\u041f\u0440\u0438\u0445\u043e\u0432\u0430\u0442\u0438 \u0441\u0442\u043e\u0432\u043f\u0447\u0438\u043a"},aggregation:{count:"\u0443\u0441\u044c\u043e\u0433\u043e \u0440\u044f\u0434\u043a\u0456\u0432: ",sum:"\u0456\u0442\u043e\u0433\u043e: ",avg:"\u0441\u0435\u0440\u0435\u0434\u043d\u0454: ",min:"\u043c\u0456\u043d: ",max:"\u043c\u0430\u043a\u0441: "},pinning:{pinLeft:"\u0417\u0430\u043a\u0440\u0456\u043f\u0438\u0442\u0438 \u043b\u0456\u0432\u043e\u0440\u0443\u0447",pinRight:"\u0417\u0430\u043a\u0440\u0456\u043f\u0438\u0442\u0438 \u043f\u0440\u0430\u0432\u043e\u0440\u0443\u0447",unpin:"\u0412\u0456\u0434\u043a\u0440\u0456\u043f\u0438\u0442\u0438"},columnMenu:{close:"\u0417\u0430\u043a\u0440\u0438\u0442\u0438"},gridMenu:{aria:{buttonLabel:"\u041c\u0435\u043d\u044e"},columns:"\u0421\u0442\u043e\u0432\u043f\u0447\u0438\u043a\u0438:",importerTitle:"\u0406\u043c\u043f\u043e\u0440\u0442\u0443\u0432\u0430\u0442\u0438 \u0444\u0430\u0439\u043b",exporterAllAsCsv:"\u0415\u043a\u0441\u043f\u043e\u0440\u0442\u0443\u0432\u0430\u0442\u0438 \u0432\u0441\u0435 \u0432 CSV",exporterVisibleAsCsv:"\u0415\u043a\u0441\u043f\u043e\u0440\u0442\u0443\u0432\u0430\u0442\u0438 \u0432\u0438\u0434\u0438\u043c\u0456 \u0434\u0430\u043d\u0456 \u0432 CSV",exporterSelectedAsCsv:"\u0415\u043a\u0441\u043f\u043e\u0440\u0442\u0443\u0432\u0430\u0442\u0438 \u043e\u0431\u0440\u0430\u043d\u0456 \u0434\u0430\u043d\u0456 \u0432 CSV",exporterAllAsPdf:"\u0415\u043a\u0441\u043f\u043e\u0440\u0442\u0443\u0432\u0430\u0442\u0438 \u0432\u0441\u0435 \u0432 PDF",exporterVisibleAsPdf:"\u0415\u043a\u0441\u043f\u043e\u0440\u0442\u0443\u0432\u0430\u0442\u0438 \u0432\u0438\u0434\u0438\u043c\u0456 \u0434\u0430\u043d\u0456 \u0432 PDF",exporterSelectedAsPdf:"\u0415\u043a\u0441\u043f\u043e\u0440\u0442\u0443\u0432\u0430\u0442\u0438 \u043e\u0431\u0440\u0430\u043d\u0456 \u0434\u0430\u043d\u0456 \u0432 PDF",clearAllFilters:"\u041e\u0447\u0438\u0441\u0442\u0438\u0442\u0438 \u0432\u0441\u0456 \u0444\u0456\u043b\u044c\u0442\u0440\u0438"},importer:{noHeaders:"\u041d\u0435 \u0432\u0434\u0430\u043b\u043e\u0441\u044f \u043e\u0442\u0440\u0438\u043c\u0430\u0442\u0438 \u043d\u0430\u0437\u0432\u0438 \u0441\u0442\u043e\u0432\u043f\u0447\u0438\u043a\u0456\u0432, \u0447\u0438 \u0454 \u0432 \u0444\u0430\u0439\u043b\u0456 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a?",noObjects:"\u041d\u0435 \u0432\u0434\u0430\u043b\u043e\u0441\u044f \u043e\u0442\u0440\u0438\u043c\u0430\u0442\u0438 \u0434\u0430\u043d\u0456, \u0447\u0438 \u0454 \u0432 \u0444\u0430\u0439\u043b\u0456 \u0440\u044f\u0434\u043a\u0438 \u043e\u043a\u0440\u0456\u043c \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0430?",invalidCsv:"\u041d\u0435 \u0432\u0434\u0430\u043b\u043e\u0441\u044f \u043e\u0431\u0440\u043e\u0431\u0438\u0442\u0438 \u0444\u0430\u0439\u043b, \u0447\u0438 \u0446\u0435 \u043a\u043e\u0440\u0435\u043a\u0442\u043d\u0438\u0439 CSV-\u0444\u0430\u0439\u043b?",invalidJson:"\u041d\u0435 \u0432\u0434\u0430\u043b\u043e\u0441\u044f \u043e\u0431\u0440\u043e\u0431\u0438\u0442\u0438 \u0444\u0430\u0439\u043b, \u0447\u0438 \u0446\u0435 \u043a\u043e\u0440\u0435\u043a\u0442\u043d\u0438\u0439 JSON?",jsonNotArray:"JSON-\u0444\u0430\u0439\u043b \u0449\u043e \u0456\u043c\u043f\u043e\u0440\u0442\u0443\u0454\u0442\u044c\u0441\u044f \u043f\u043e\u0432\u0438\u043d\u0435\u043d \u043c\u0456\u0441\u0442\u0438\u0442\u0438 \u043c\u0430\u0441\u0438\u0432, \u043e\u043f\u0435\u0440\u0430\u0446\u0456\u044e \u0441\u043a\u0430\u0441\u043e\u0432\u0430\u043d\u043e."},pagination:{aria:{pageToFirst:"\u041f\u0435\u0440\u0448\u0430 \u0441\u0442\u043e\u0440\u0456\u043d\u043a\u0430",pageBack:"\u041f\u043e\u043f\u0435\u0440\u0435\u0434\u043d\u044f \u0441\u0442\u043e\u0440\u0456\u043d\u043a\u0430",pageSelected:"\u041e\u0431\u0440\u0430\u043d\u0430 \u0441\u0442\u043e\u0440\u0456\u043d\u043a\u0430",pageForward:"\u041d\u0430\u0441\u0442\u0443\u043f\u043d\u0430 \u0441\u0442\u043e\u0440\u0456\u043d\u043a\u0430",pageToLast:"\u041e\u0441\u0442\u0430\u043d\u043d\u044f \u0441\u0442\u043e\u0440\u0456\u043d\u043a\u0430"},sizes:"\u0440\u044f\u0434\u043a\u0456\u0432 \u043d\u0430 \u0441\u0442\u043e\u0440\u0456\u043d\u043a\u0443",totalItems:"\u0440\u044f\u0434\u043a\u0456\u0432",through:"\u043f\u043e",of:"\u0437"},grouping:{group:"\u0413\u0440\u0443\u043f\u0443\u0432\u0430\u0442\u0438",ungroup:"\u0420\u043e\u0437\u0433\u0440\u0443\u043f\u0443\u0432\u0430\u0442\u0438",aggregate_count:"\u0413\u0440\u0443\u043f\u0443\u0432\u0430\u0442\u0438: \u041a\u0456\u043b\u044c\u043a\u0456\u0441\u0442\u044c",aggregate_sum:"\u0414\u043b\u044f \u0433\u0440\u0443\u043f\u0438: \u0421\u0443\u043c\u0430",aggregate_max:"\u0414\u043b\u044f \u0433\u0440\u0443\u043f\u0438: \u041c\u0430\u043a\u0441\u0438\u043c\u0443\u043c",aggregate_min:"\u0414\u043b\u044f \u0433\u0440\u0443\u043f\u0438: \u041c\u0456\u043d\u0456\u043c\u0443\u043c",aggregate_avg:"\u0414\u043b\u044f \u0433\u0440\u0443\u043f\u0438: \u0421\u0435\u0440\u0434\u043d\u0454",aggregate_remove:"\u0414\u043b\u044f \u0433\u0440\u0443\u043f\u0438: \u041f\u0443\u0441\u0442\u043e"}}),e}])}])}(),function(){var e=["uiT","uiTranslate"],t=["t","uiTranslate"],i=angular.module("ui.grid.i18n");i.constant("i18nConstants",{MISSING:"[MISSING]",UPDATE_EVENT:"$uiI18n",LOCALE_DIRECTIVE_ALIAS:"uiI18n",DEFAULT_LANG:"en"}),i.service("i18nService",["$log","i18nConstants","$rootScope",function(e,t,i){var n={_langs:{},current:null,get:function(e){return this._langs[e.toLowerCase()]},add:function(e,t){var i=e.toLowerCase();this._langs[i]||(this._langs[i]={}),angular.extend(this._langs[i],t)},getAllLangs:function(){var e=[];if(!this._langs)return e;for(var t in this._langs)e.push(t);return e},setCurrent:function(e){this.current=e.toLowerCase()},getCurrentLang:function(){return this.current}},r={add:function(e,t){"object"==typeof e?angular.forEach(e,function(e){e&&n.add(e,t)}):n.add(e,t)},getAllLangs:function(){return n.getAllLangs()},get:function(e){var t=e||r.getCurrentLang();return n.get(t)},getSafeText:function(e,i){var o=i||r.getCurrentLang(),s=n.get(o);if(!s)return t.MISSING;for(var a=e.split("."),l=s,c=0;c<a.length;++c){if(l[a[c]]===undefined||null===l[a[c]])return t.MISSING;l=l[a[c]]}return l},setCurrentLang:function(e){e&&(n.setCurrent(e),i.$broadcast(t.UPDATE_EVENT))},getCurrentLang:function(){var e=n.getCurrentLang();return e||(e=t.DEFAULT_LANG,n.setCurrent(e)),e}};return r}]);var n=function(e,t){return{compile:function(){return{pre:function(i,n,r){var o=t.LOCALE_DIRECTIVE_ALIAS,s=i.$eval(r[o]);s?i.$watch(r[o],function(){e.setCurrentLang(s)}):r.$$observers&&r.$observe(o,function(){e.setCurrentLang(r[o]||t.DEFAULT_LANG)})}}}}};i.directive("uiI18n",["i18nService","i18nConstants",n]);var r=function(t,i,n){return{restrict:"EA",compile:function(){return{pre:function(r,o,s){var a,l=e[0],c=e[1],u=s[l]||s[c]||o.html(),d=n.MISSING+u;if(s.$$observers){var h=s[l]?l:c;a=s.$observe(h,function(e){e&&o.html(t(e)(i.getCurrentLang())||d)})}var p=t(u),g=r.$on(n.UPDATE_EVENT,function(){a?a(s[l]||s[c]):o.html(p(i.get())||d)});r.$on("$destroy",g),o.html(p(i.get())||d)}}}}};angular.forEach(e,function(e){i.directive(e,["$parse","i18nService","i18nConstants",r])});var o=function(e,t,i){return function(n){return e(n)(t.get())||i.MISSING+n}};angular.forEach(t,function(e){i.filter(e,["$parse","i18nService","i18nConstants",o])})}(),function(){angular.module("ui.grid").config(["$provide",function(e){e.decorator("i18nService",["$delegate",function(e){return e.add("zh-cn",{headerCell:{aria:{defaultFilterLabel:"\u5217\u8fc7\u6ee4\u5668",removeFilter:"\u79fb\u9664\u8fc7\u6ee4\u5668",columnMenuButtonLabel:"\u5217\u83dc\u5355"},priority:"\u4f18\u5148\u7ea7:",filterLabel:"\u5217\u8fc7\u6ee4\u5668: "},aggregate:{label:"\u884c"},groupPanel:{description:"\u62d6\u66f3\u8868\u5934\u5230\u6b64\u5904\u8fdb\u884c\u5206\u7ec4"},search:{placeholder:"\u67e5\u627e",showingItems:"\u5df2\u663e\u793a\u884c\u6570\uff1a",selectedItems:"\u5df2\u9009\u62e9\u884c\u6570\uff1a",totalItems:"\u603b\u884c\u6570\uff1a",size:"\u6bcf\u9875\u663e\u793a\u884c\u6570\uff1a",first:"\u9996\u9875",next:"\u4e0b\u4e00\u9875",previous:"\u4e0a\u4e00\u9875",last:"\u672b\u9875"},menu:{text:"\u9009\u62e9\u5217\uff1a"},sort:{ascending:"\u5347\u5e8f",descending:"\u964d\u5e8f",none:"\u65e0\u5e8f",remove:"\u53d6\u6d88\u6392\u5e8f"},column:{hide:"\u9690\u85cf\u5217"},aggregation:{count:"\u8ba1\u6570\uff1a",sum:"\u6c42\u548c\uff1a",avg:"\u5747\u503c\uff1a",min:"\u6700\u5c0f\u503c\uff1a",max:"\u6700\u5927\u503c\uff1a"},pinning:{pinLeft:"\u5de6\u4fa7\u56fa\u5b9a",pinRight:"\u53f3\u4fa7\u56fa\u5b9a",unpin:"\u53d6\u6d88\u56fa\u5b9a"},columnMenu:{close:"\u5173\u95ed"},gridMenu:{aria:{buttonLabel:"\u8868\u683c\u83dc\u5355"},columns:"\u5217\uff1a",importerTitle:"\u5bfc\u5165\u6587\u4ef6",exporterAllAsCsv:"\u5bfc\u51fa\u5168\u90e8\u6570\u636e\u5230CSV",exporterVisibleAsCsv:"\u5bfc\u51fa\u53ef\u89c1\u6570\u636e\u5230CSV",exporterSelectedAsCsv:"\u5bfc\u51fa\u5df2\u9009\u6570\u636e\u5230CSV",exporterAllAsPdf:"\u5bfc\u51fa\u5168\u90e8\u6570\u636e\u5230PDF",exporterVisibleAsPdf:"\u5bfc\u51fa\u53ef\u89c1\u6570\u636e\u5230PDF",exporterSelectedAsPdf:"\u5bfc\u51fa\u5df2\u9009\u6570\u636e\u5230PDF",clearAllFilters:"\u6e05\u9664\u6240\u6709\u8fc7\u6ee4\u5668"},importer:{noHeaders:"\u65e0\u6cd5\u83b7\u53d6\u5217\u540d\uff0c\u786e\u5b9a\u6587\u4ef6\u5305\u542b\u8868\u5934\uff1f",noObjects:"\u65e0\u6cd5\u83b7\u53d6\u6570\u636e\uff0c\u786e\u5b9a\u6587\u4ef6\u5305\u542b\u6570\u636e\uff1f",invalidCsv:"\u65e0\u6cd5\u5904\u7406\u6587\u4ef6\uff0c\u786e\u5b9a\u662f\u5408\u6cd5\u7684CSV\u6587\u4ef6\uff1f",invalidJson:"\u65e0\u6cd5\u5904\u7406\u6587\u4ef6\uff0c\u786e\u5b9a\u662f\u5408\u6cd5\u7684JSON\u6587\u4ef6\uff1f",jsonNotArray:"\u5bfc\u5165\u7684\u6587\u4ef6\u4e0d\u662fJSON\u6570\u7ec4\uff01"},pagination:{aria:{pageToFirst:"\u7b2c\u4e00\u9875",pageBack:"\u4e0a\u4e00\u9875",pageSelected:"\u5f53\u524d\u9875",pageForward:"\u4e0b\u4e00\u9875",pageToLast:"\u6700\u540e\u4e00\u9875"},sizes:"\u884c\u6bcf\u9875",totalItems:"\u884c",through:"\u81f3",of:"\u5171"},grouping:{group:"\u5206\u7ec4",ungroup:"\u53d6\u6d88\u5206\u7ec4",aggregate_count:"\u5408\u8ba1: \u8ba1\u6570",aggregate_sum:"\u5408\u8ba1: \u6c42\u548c",aggregate_max:"\u5408\u8ba1: \u6700\u5927",aggregate_min:"\u5408\u8ba1: \u6700\u5c0f",aggregate_avg:"\u5408\u8ba1: \u5e73\u5747",aggregate_remove:"\u5408\u8ba1: \u79fb\u9664"}}),e}])}])}(),function(){angular.module("ui.grid").config(["$provide",function(e){e.decorator("i18nService",["$delegate",function(e){return e.add("zh-tw",{aggregate:{label:"\u884c"},groupPanel:{description:"\u62d6\u66f3\u8868\u982d\u5230\u6b64\u8655\u9032\u884c\u5206\u7d44"},search:{placeholder:"\u67e5\u627e",showingItems:"\u5df2\u986f\u793a\u884c\u6578\uff1a",selectedItems:"\u5df2\u9078\u64c7\u884c\u6578\uff1a",totalItems:"\u7e3d\u884c\u6578\uff1a",size:"\u6bcf\u9801\u986f\u793a\u884c\u6578\uff1a",first:"\u9996\u9801",next:"\u4e0b\u58f9\u9801",previous:"\u4e0a\u58f9\u9801",last:"\u672b\u9801"},menu:{text:"\u9078\u64c7\u5217\uff1a"},sort:{ascending:"\u5347\u5e8f",descending:"\u964d\u5e8f",remove:"\u53d6\u6d88\u6392\u5e8f"},column:{hide:"\u96b1\u85cf\u5217"},aggregation:{count:"\u8a08\u6578\uff1a",sum:"\u6c42\u548c\uff1a",avg:"\u5747\u503c\uff1a",min:"\u6700\u5c0f\u503c\uff1a",max:"\u6700\u5927\u503c\uff1a"},pinning:{pinLeft:"\u5de6\u5074\u56fa\u5b9a",pinRight:"\u53f3\u5074\u56fa\u5b9a",unpin:"\u53d6\u6d88\u56fa\u5b9a"},gridMenu:{columns:"\u5217\uff1a",importerTitle:"\u5c0e\u5165\u6587\u4ef6",exporterAllAsCsv:"\u5c0e\u51fa\u5168\u90e8\u6578\u64da\u5230CSV",exporterVisibleAsCsv:"\u5c0e\u51fa\u53ef\u898b\u6578\u64da\u5230CSV",exporterSelectedAsCsv:"\u5c0e\u51fa\u5df2\u9078\u6578\u64da\u5230CSV",exporterAllAsPdf:"\u5c0e\u51fa\u5168\u90e8\u6578\u64da\u5230PDF",exporterVisibleAsPdf:"\u5c0e\u51fa\u53ef\u898b\u6578\u64da\u5230PDF",exporterSelectedAsPdf:"\u5c0e\u51fa\u5df2\u9078\u6578\u64da\u5230PDF",clearAllFilters:"\u6e05\u9664\u6240\u6709\u8fc7\u6ee4\u5668"},importer:{noHeaders:"\u7121\u6cd5\u7372\u53d6\u5217\u540d\uff0c\u78ba\u5b9a\u6587\u4ef6\u5305\u542b\u8868\u982d\uff1f",noObjects:"\u7121\u6cd5\u7372\u53d6\u6578\u64da\uff0c\u78ba\u5b9a\u6587\u4ef6\u5305\u542b\u6578\u64da\uff1f",invalidCsv:"\u7121\u6cd5\u8655\u7406\u6587\u4ef6\uff0c\u78ba\u5b9a\u662f\u5408\u6cd5\u7684CSV\u6587\u4ef6\uff1f",invalidJson:"\u7121\u6cd5\u8655\u7406\u6587\u4ef6\uff0c\u78ba\u5b9a\u662f\u5408\u6cd5\u7684JSON\u6587\u4ef6\uff1f",jsonNotArray:"\u5c0e\u5165\u7684\u6587\u4ef6\u4e0d\u662fJSON\u6578\u7d44\uff01"},pagination:{sizes:"\u884c\u6bcf\u9801",totalItems:"\u884c"}}),e}])}])}(),function(){"use strict";angular.module("ui.grid.autoResize",["ui.grid"]).directive("uiGridAutoResize",["$timeout","gridUtil",function(e,t){return{require:"uiGrid",scope:!1,link:function(e,i,n,r){function o(){l=t.elementHeight(i),a=t.elementWidth(i)}function s(){clearTimeout(c),c=setTimeout(function(){var n=t.elementHeight(i),c=t.elementWidth(i);n!==l||c!==a?(r.grid.gridHeight=n,r.grid.gridWidth=c,r.grid.api.core.raise.gridDimensionChanged(l,a,n,c),e.$apply(function(){r.grid.refresh().then(function(){o(),s()})})):s()},250)}var a,l;o();var c;s(),e.$on("$destroy",function(){clearTimeout(c)})}}}])}(),function(){"use strict";var e=angular.module("ui.grid.cellNav",["ui.grid"]);e.constant("uiGridCellNavConstants",{FEATURE_NAME:"gridCellNav",CELL_NAV_EVENT:"cellNav",direction:{LEFT:0,RIGHT:1,UP:2,DOWN:3,PG_UP:4,PG_DOWN:5},EVENT_TYPE:{KEYDOWN:0,CLICK:1,CLEAR:2}}),e.factory("uiGridCellNavFactory",["gridUtil","uiGridConstants","uiGridCellNavConstants","GridRowColumn","$q",function(e,t,i,n){var r=function(e,t,i,n){this.rows=e.visibleRowCache,this.columns=t.visibleColumnCache,this.leftColumns=i?i.visibleColumnCache:[],this.rightColumns=n?n.visibleColumnCache:[],this.bodyContainer=e};return r.prototype.getFocusableCols=function(){return this.leftColumns.concat(this.columns,this.rightColumns).filter(function(e){return e.colDef.allowCellFocus})},r.prototype.getFocusableRows=function(){return this.rows.filter(function(e){return!1!==e.allowCellFocus})},r.prototype.getNextRowCol=function(e,t,n){switch(e){case i.direction.LEFT:return this.getRowColLeft(t,n);case i.direction.RIGHT:return this.getRowColRight(t,n);case i.direction.UP:return this.getRowColUp(t,n);case i.direction.DOWN:return this.getRowColDown(t,n);case i.direction.PG_UP:return this.getRowColPageUp(t,n);case i.direction.PG_DOWN:return this.getRowColPageDown(t,n)}},r.prototype.initializeSelection=function(){var e=this.getFocusableCols(),t=this.getFocusableRows();if(0===e.length||0===t.length)return null;return new n(t[0],e[0])},r.prototype.getRowColLeft=function(e,t){var i=this.getFocusableCols(),r=this.getFocusableRows(),o=i.indexOf(t),s=r.indexOf(e);-1===o&&(o=1);var a=0===o?i.length-1:o-1;return a>=o?0===s?new n(e,i[a]):new n(r[s-1],i[a]):new n(e,i[a])},r.prototype.getRowColRight=function(e,t){var i=this.getFocusableCols(),r=this.getFocusableRows(),o=i.indexOf(t),s=r.indexOf(e);-1===o&&(o=0);var a=o===i.length-1?0:o+1;return a<=o?s===r.length-1?new n(e,i[a]):new n(r[s+1],i[a]):new n(e,i[a])},r.prototype.getRowColDown=function(e,t){var i=this.getFocusableCols(),r=this.getFocusableRows(),o=i.indexOf(t),s=r.indexOf(e);return-1===o&&(o=0),s===r.length-1?new n(e,i[o]):new n(r[s+1],i[o])},r.prototype.getRowColPageDown=function(e,t){var i=this.getFocusableCols(),r=this.getFocusableRows(),o=i.indexOf(t),s=r.indexOf(e);-1===o&&(o=0);var a=this.bodyContainer.minRowsToRender();return s>=r.length-a?new n(r[r.length-1],i[o]):new n(r[s+a],i[o])},r.prototype.getRowColUp=function(e,t){var i=this.getFocusableCols(),r=this.getFocusableRows(),o=i.indexOf(t),s=r.indexOf(e);return-1===o&&(o=0),0===s?new n(e,i[o]):new n(r[s-1],i[o])},r.prototype.getRowColPageUp=function(e,t){var i=this.getFocusableCols(),r=this.getFocusableRows(),o=i.indexOf(t),s=r.indexOf(e);-1===o&&(o=0);var a=this.bodyContainer.minRowsToRender();return s-a<0?new n(r[0],i[o]):new n(r[s-a],i[o])},r}]),e.service("uiGridCellNavService",["gridUtil","uiGridConstants","uiGridCellNavConstants","$q","uiGridCellNavFactory","GridRowColumn","ScrollEvent",function(e,t,i,n,r){var o={initializeGrid:function(e){e.registerColumnBuilder(o.cellNavColumnBuilder),e.cellNav={},e.cellNav.lastRowCol=null,e.cellNav.focusedCells=[],o.defaultGridOptions(e.options);var t={events:{cellNav:{navigate:function(){},viewPortKeyDown:function(){},viewPortKeyPress:function(){}}},methods:{cellNav:{scrollToFocus:function(t,i){return o.scrollToFocus(e,t,i)},getFocusedCell:function(){return e.cellNav.lastRowCol},getCurrentSelection:function(){return e.cellNav.focusedCells},rowColSelectIndex:function(t){for(var i=-1,n=0;n<e.cellNav.focusedCells.length;n++)if(e.cellNav.focusedCells[n].col.uid===t.col.uid&&e.cellNav.focusedCells[n].row.uid===t.row.uid){i=n;break}return i}}}};e.api.registerEventsFromObject(t.events),e.api.registerMethodsFromObject(t.methods)},defaultGridOptions:function(e){e.modifierKeysToMultiSelectCells=!0===e.modifierKeysToMultiSelectCells,e.keyDownOverrides=e.keyDownOverrides||[]},decorateRenderContainers:function(e){var t=e.hasRightContainer()?e.renderContainers.right:null,i=e.hasLeftContainer()?e.renderContainers.left:null;null!==i&&(e.renderContainers.left.cellNav=new r(e.renderContainers.body,i,t,e.renderContainers.body)),null!==t&&(e.renderContainers.right.cellNav=new r(e.renderContainers.body,t,e.renderContainers.body,i)),e.renderContainers.body.cellNav=new r(e.renderContainers.body,e.renderContainers.body,i,t)},getDirection:function(e){return e.keyCode===t.keymap.LEFT||e.keyCode===t.keymap.TAB&&e.shiftKey?i.direction.LEFT:e.keyCode===t.keymap.RIGHT||e.keyCode===t.keymap.TAB?i.direction.RIGHT:e.keyCode===t.keymap.UP||e.keyCode===t.keymap.ENTER&&e.shiftKey?i.direction.UP:e.keyCode===t.keymap.PG_UP?i.direction.PG_UP:e.keyCode===t.keymap.DOWN||e.keyCode===t.keymap.ENTER&&!e.ctrlKey&&!e.altKey?i.direction.DOWN:e.keyCode===t.keymap.PG_DOWN?i.direction.PG_DOWN:null},cellNavColumnBuilder:function(e){var t=[];return e.allowCellFocus=e.allowCellFocus===undefined||e.allowCellFocus,n.all(t)},scrollToFocus:function(e,t,i){var n=null,r=null;return void 0!==t&&null!==t&&(n=e.getRow(t)),void 0!==i&&null!==i&&(r=e.getColumn(i.name?i.name:i.field)),e.api.core.scrollToIfNecessary(n,r).then(function(){var t={row:n,col:r};null!==n&&null!==r&&e.cellNav.broadcastCellNav(t)})},getLeftWidth:function(e,t){var i=0;if(!t)return i;var n=e.renderContainers.body.visibleColumnCache.indexOf(t);e.renderContainers.body.visibleColumnCache.forEach(function(e,t){t<n&&(i+=e.drawnWidth)});var r=0===n?0:(n+1)/e.renderContainers.body.visibleColumnCache.length;return i+=t.drawnWidth*r}};return o}]),e.directive("uiGridCellnav",["gridUtil","uiGridCellNavService","uiGridCellNavConstants","uiGridConstants","GridRowColumn","$timeout","$compile",function(e,t,i,n,r,o,s){return{replace:!0,priority:-150,require:"^uiGrid",scope:!1,controller:function(){},compile:function(){return{pre:function(e,o,s,a){var l=e,c=a.grid;t.initializeGrid(c),a.cellNav={},a.cellNav.makeRowCol=function(e){return e instanceof r||(e=new r(e.row,e.col)),e},a.cellNav.getActiveCell=function(){var e=o[0].getElementsByClassName("ui-grid-cell-focus");return e.length>0?e[0]:undefined},a.cellNav.broadcastCellNav=c.cellNav.broadcastCellNav=function(e,t,n){t=!(t===undefined||!t),e=a.cellNav.makeRowCol(e),a.cellNav.broadcastFocus(e,t,n),l.$broadcast(i.CELL_NAV_EVENT,e,t,n)},a.cellNav.clearFocus=c.cellNav.clearFocus=function(){c.cellNav.focusedCells=[],l.$broadcast(i.CELL_NAV_EVENT)},a.cellNav.broadcastFocus=function(e,t,i){t=!(t===undefined||!t),e=a.cellNav.makeRowCol(e);var n=e.row,o=e.col,s=a.grid.api.cellNav.rowColSelectIndex(e);if(null===c.cellNav.lastRowCol||-1===s){var l=new r(n,o);null!==c.cellNav.lastRowCol&&c.cellNav.lastRowCol.row===l.row&&c.cellNav.lastRowCol.col===l.col||(c.api.cellNav.raise.navigate(l,c.cellNav.lastRowCol,i),c.cellNav.lastRowCol=l),a.grid.options.modifierKeysToMultiSelectCells&&t?c.cellNav.focusedCells.push(e):c.cellNav.focusedCells=[e]}else c.options.modifierKeysToMultiSelectCells&&t&&s>=0&&c.cellNav.focusedCells.splice(s,1)},a.cellNav.handleKeyDown=function(e){var r=t.getDirection(e);if(null===r)return null;var o="body";e.uiGridTargetRenderContainerId&&(o=e.uiGridTargetRenderContainerId);var s=a.grid.api.cellNav.getFocusedCell();if(s){var l=a.grid.renderContainers[o].cellNav.getNextRowCol(r,s.row,s.col),u=a.grid.renderContainers[o].cellNav.getFocusableCols(),d=a.grid.api.cellNav.rowColSelectIndex(l);return r===i.direction.LEFT&&l.col===u[u.length-1]&&l.row===s.row&&e.keyCode===n.keymap.TAB&&e.shiftKey?(c.cellNav.focusedCells.splice(d,1),a.cellNav.clearFocus(),!0):r!==i.direction.RIGHT||l.col!==u[0]||l.row!==s.row||e.keyCode!==n.keymap.TAB||e.shiftKey?(c.scrollToIfNecessary(l.row,l.col).then(function(){a.cellNav.broadcastCellNav(l,null,e)}),e.stopPropagation(),e.preventDefault(),!1):(c.cellNav.focusedCells.splice(d,1),a.cellNav.clearFocus(),!0)}}},post:function(e,t,n,r){function o(){var n='<div id="'+a.id+'-aria-speakable" class="ui-grid-a11y-ariascreenreader-speakable ui-grid-offscreen" aria-live="assertive" role="region" aria-atomic="true" aria-hidden="false" aria-relevant="additions" >&nbsp;</div>',r=s(n)(e);t.prepend(r),e.$on(i.CELL_NAV_EVENT,function(e,t,i,n){function o(e){e!==r.text()&&(r[0].style.clip="rect(0px,0px,0px,0px)",r[0].innerHTML="",r[0].style.visibility="hidden",r[0].style.visibility="visible",""!==e&&(r[0].style.clip="auto",r[0].appendChild(document.createTextNode(e+" ")),r[0].style.visibility="hidden",r[0].style.visibility="visible"))}if(!n||"focus"!==n.type){for(var s=[],l=a.api.cellNav.getCurrentSelection(),c=0;c<l.length;c++)s.push(a.getCellDisplayValue(l[c].row,l[c].col));o(s.toString())}})}var a=r.grid,l=!0;try{angular.module("ngAria")}catch(e){l=!1}l&&o()}}}}}]),e.directive("uiGridRenderContainer",["$timeout","$document","gridUtil","uiGridConstants","uiGridCellNavService","$compile","uiGridCellNavConstants",function(e,t,i,n,r,o,s){return{replace:!0,priority:-99999,require:["^uiGrid","uiGridRenderContainer","?^uiGridCellnav"],scope:!1,compile:function(){return{post:function(t,n,a,l){var c=l[0],u=l[1],d=l[2];if(c.grid.api.cellNav){var h=u.containerId,p=c.grid;if(r.decorateRenderContainers(p),"body"===h){c.grid.options.modifierKeysToMultiSelectCells?n.attr("aria-multiselectable",!0):n.attr("aria-multiselectable",!1);var g=o('<div class="ui-grid-focuser" role="region" aria-live="assertive" aria-atomic="false" tabindex="0" aria-controls="'+p.id+"-aria-speakable "+p.id+'-grid-container" aria-owns="'+p.id+'-grid-container"></div>')(t);n.append(g),g.on("focus",function(e){e.uiGridTargetRenderContainerId=h;var t=c.grid.api.cellNav.getFocusedCell();null===t&&(t=c.grid.renderContainers[h].cellNav.getNextRowCol(s.direction.DOWN,null,null),t.row&&t.col&&c.cellNav.broadcastCellNav(t))}),d.setAriaActivedescendant=function(e){n.attr("aria-activedescendant",e)},d.removeAriaActivedescendant=function(e){n.attr("aria-activedescendant")===e&&n.attr("aria-activedescendant","")},c.focus=function(){i.focus.byElement(g[0])};var f=null;g.on("keydown",function(e){e.uiGridTargetRenderContainerId=h;var t=c.grid.api.cellNav.getFocusedCell();null===(c.grid.options.keyDownOverrides.some(function(t){return Object.keys(t).every(function(i){return t[i]===e[i]})})?null:c.cellNav.handleKeyDown(e))&&(c.grid.api.cellNav.raise.viewPortKeyDown(e,t),f=t)}),g.on("keypress",function(t){f&&(e(function(){c.grid.api.cellNav.raise.viewPortKeyPress(t,f)},4),f=null)}),t.$on("$destroy",function(){g.off()})}}}}}}}]),e.directive("uiGridViewport",["$timeout","$document","gridUtil","uiGridConstants","uiGridCellNavService","uiGridCellNavConstants","$log","$compile",function(){return{replace:!0,priority:-99999,require:["^uiGrid","^uiGridRenderContainer","?^uiGridCellnav"],scope:!1,compile:function(){return{pre:function(){},post:function(e,t,i,n){var r=n[0],o=n[1];if(r.grid.api.cellNav){if("body"===o.containerId){var s=r.grid;s.api.core.on.scrollBegin(e,function(){var e=r.grid.api.cellNav.getFocusedCell();null!==e&&o.colContainer.containsColumn(e.col)&&r.cellNav.clearFocus()}),s.api.core.on.scrollEnd(e,function(){var e=r.grid.api.cellNav.getFocusedCell();null!==e&&o.colContainer.containsColumn(e.col)&&r.cellNav.broadcastCellNav(e)}),s.api.cellNav.on.navigate(e,function(){r.focus()})}}}}}}}]),e.directive("uiGridCell",["$timeout","$document","uiGridCellNavService","gridUtil","uiGridCellNavConstants","uiGridConstants","GridRowColumn",function(e,t,i,n,r,o,s){return{priority:-150,restrict:"A",require:["^uiGrid","?^uiGridCellnav"],scope:!1,link:function(t,i,n,a){function l(e){e.preventDefault()}function c(){g.cellNav.focusedCells.some(function(e){return e.row===t.row&&e.col===t.col})?u():d()}function u(){if(!t.focused){i.find("div").addClass("ui-grid-cell-focus"),i.attr("aria-selected",!0),p.setAriaActivedescendant(i.attr("id")),t.focused=!0}}function d(){if(t.focused){i.find("div").removeClass("ui-grid-cell-focus"),i.attr("aria-selected",!1),p.removeAriaActivedescendant(i.attr("id")),t.focused=!1}}var h=a[0],p=a[1];if(h.grid.api.cellNav&&t.col.colDef.allowCellFocus){var g=h.grid;t.focused=!1,i.attr("tabindex",-1),i.find("div").on("click",function(e){h.cellNav.broadcastCellNav(new s(t.row,t.col),e.ctrlKey||e.metaKey,e),e.stopPropagation(),t.$apply()}),i.on("mousedown",l),h.grid.api.edit&&(h.grid.api.edit.on.beginCellEdit(t,function(){i.off("mousedown",l)}),h.grid.api.edit.on.afterCellEdit(t,function(){i.on("mousedown",l)}),h.grid.api.edit.on.cancelCellEdit(t,function(){i.on("mousedown",l)})),c(),i.on("focus",function(e){h.cellNav.broadcastCellNav(new s(t.row,t.col),!1,e),e.stopPropagation(),t.$apply()}),t.$on(r.CELL_NAV_EVENT,c);var f=h.grid.registerDataChangeCallback(function(){d(),e(c)},[o.dataChange.ROW]);t.$on("$destroy",function(){f(),i.find("div").off(),i.off()})}}}}])}(),function(){"use strict";var e=angular.module("ui.grid.edit",["ui.grid"]);e.constant("uiGridEditConstants",{EDITABLE_CELL_TEMPLATE:/EDITABLE_CELL_TEMPLATE/g,EDITABLE_CELL_DIRECTIVE:/editable_cell_directive/g,events:{BEGIN_CELL_EDIT:"uiGridEventBeginCellEdit",END_CELL_EDIT:"uiGridEventEndCellEdit",CANCEL_CELL_EDIT:"uiGridEventCancelCellEdit"}}),e.service("uiGridEditService",["$q","uiGridConstants","gridUtil",function(e,t,i){var n={initializeGrid:function(e){n.defaultGridOptions(e.options),e.registerColumnBuilder(n.editColumnBuilder),e.edit={};var t={events:{edit:{afterCellEdit:function(){},beginCellEdit:function(){},cancelCellEdit:function(){}}},methods:{edit:{}}};e.api.registerEventsFromObject(t.events)},defaultGridOptions:function(e){e.cellEditableCondition=e.cellEditableCondition===undefined||e.cellEditableCondition,e.enableCellEditOnFocus=e.enableCellEditOnFocus!==undefined&&e.enableCellEditOnFocus},editColumnBuilder:function(t,n,r){var o=[];return t.enableCellEdit=t.enableCellEdit===undefined?r.enableCellEdit===undefined?"object"!==t.type:r.enableCellEdit:t.enableCellEdit,t.cellEditableCondition=t.cellEditableCondition===undefined?r.cellEditableCondition:t.cellEditableCondition,t.enableCellEdit&&(t.editableCellTemplate=t.editableCellTemplate||r.editableCellTemplate||"ui-grid/cellEditor",o.push(i.getTemplate(t.editableCellTemplate).then(function(e){n.editableCellTemplate=e},function(){throw new Error("Couldn't fetch/use colDef.editableCellTemplate '"+t.editableCellTemplate+"'")}))),t.enableCellEditOnFocus=t.enableCellEditOnFocus===undefined?r.enableCellEditOnFocus:t.enableCellEditOnFocus,e.all(o)},isStartEditKey:function(e){return!(e.metaKey||e.keyCode===t.keymap.ESC||e.keyCode===t.keymap.SHIFT||e.keyCode===t.keymap.CTRL||e.keyCode===t.keymap.ALT||e.keyCode===t.keymap.WIN||e.keyCode===t.keymap.CAPSLOCK||e.keyCode===t.keymap.LEFT||e.keyCode===t.keymap.TAB&&e.shiftKey||e.keyCode===t.keymap.RIGHT||e.keyCode===t.keymap.TAB||e.keyCode===t.keymap.UP||e.keyCode===t.keymap.ENTER&&e.shiftKey||e.keyCode===t.keymap.DOWN||e.keyCode===t.keymap.ENTER)}};return n}]),e.directive("uiGridEdit",["gridUtil","uiGridEditService",function(e,t){return{replace:!0,priority:0,require:"^uiGrid",scope:!1,compile:function(){return{pre:function(e,i,n,r){t.initializeGrid(r.grid)},post:function(){}}}}}]),e.directive("uiGridViewport",["uiGridEditConstants",function(e){return{replace:!0,priority:-99998,require:["^uiGrid","^uiGridRenderContainer"],scope:!1,compile:function(){return{post:function(t,i,n,r){var o=r[0];if(o.grid.api.edit&&o.grid.api.cellNav){"body"===r[1].containerId&&(t.$on(e.events.CANCEL_CELL_EDIT,function(){o.focus()}),t.$on(e.events.END_CELL_EDIT,function(){o.focus()}))}}}}}}]),e.directive("uiGridCell",["$compile","$injector","$timeout","uiGridConstants","uiGridEditConstants","gridUtil","$parse","uiGridEditService","$rootScope","$q",function(e,t,i,n,r,o,s,a,l,c){var u=500;if(t.has("uiGridCellNavService")){t.get("uiGridCellNavService")}return{priority:-100,restrict:"A",scope:!1,require:"?^uiGrid",link:function(t,d,h,p){function g(){d.on("dblclick",C),d.on("touchstart",f),p&&p.grid.api.cellNav&&(L=p.grid.api.cellNav.on.viewPortKeyDown(t,function(e,i){null!==i&&(i.row!==t.row||i.col!==t.col||t.col.colDef.enableCellEditOnFocus||y(e))}),M=p.grid.api.cellNav.on.navigate(t,function(e,n,r){t.col.colDef.enableCellEditOnFocus&&(n&&e.row===n.row&&e.col===n.col||e.row!==t.row||e.col!==t.col||i(function(){C(r)}))})),t.beginEditEventsWired=!0}function f(e){"undefined"!=typeof e.originalEvent&&e.originalEvent!==undefined&&(e=e.originalEvent),d.on("touchend",m),k=i(function(){},u),k.then(function(){setTimeout(C,0),d.off("touchend",m)})}function m(){i.cancel(k),d.off("touchend",m)}function v(){d.off("dblclick",C),d.off("keydown",y),d.off("touchstart",f),M(),L(),t.beginEditEventsWired=!1}function y(e){a.isStartEditKey(e)&&C(e)}function w(e,i){return!i.isSaving&&(angular.isFunction(e.colDef.cellEditableCondition)?e.colDef.cellEditableCondition(t):e.colDef.cellEditableCondition)}function C(e){t.grid.api.core.scrollToIfNecessary(t.row,t.col).then(function(){b(e)})}function b(a){if(!T&&w(t.col,t.row)){var u=t.row.getQualifiedColField(t.col);t.col.colDef.editModelField&&(u=o.preEval("row.entity."+t.col.colDef.editModelField)),F=s(u),$=F(t),E=t.col.editableCellTemplate,E=E.replace(n.MODEL_COL_FIELD,u),E=E.replace(n.COL_FIELD,"grid.getCellValue(row, col)");var h=t.col.colDef.editDropdownFilter?"|"+t.col.colDef.editDropdownFilter:"";E=E.replace(n.CUSTOM_FILTERS,h);var p="text";switch(t.col.colDef.type){case"boolean":p="checkbox";break;case"number":p="number";break;case"date":p="date"}E=E.replace("INPUT_TYPE",p);var g=t.col.colDef.editDropdownOptionsFunction;if(g)c.when(g(t.row.entity,t.col.colDef)).then(function(e){t.editDropdownOptionsArray=e});else{var f=t.col.colDef.editDropdownRowEntityOptionsArrayPath;t.editDropdownOptionsArray=f?S(t.row.entity,f):t.col.colDef.editDropdownOptionsArray}t.editDropdownIdLabel=t.col.colDef.editDropdownIdLabel?t.col.colDef.editDropdownIdLabel:"id",t.editDropdownValueLabel=t.col.colDef.editDropdownValueLabel?t.col.colDef.editDropdownValueLabel:"value";var m=function(){T=!0,v();var i=angular.element(E);d.append(i),D=t.$new(),e(i)(D),angular.element(d.children()[0]).addClass("ui-grid-cell-contents-hidden")};l.$$phase?m():t.$apply(m);var y=t.col.grid.api.core.on.scrollBegin(t,function(){t.grid.disableScrolling||(A(),t.grid.api.edit.raise.afterCellEdit(t.row.entity,t.col.colDef,F(t),$),y(),C(),b())}),C=t.$on(r.events.END_CELL_EDIT,function(){A(),t.grid.api.edit.raise.afterCellEdit(t.row.entity,t.col.colDef,F(t),$),C(),y(),b()}),b=t.$on(r.events.CANCEL_CELL_EDIT,function(){x(),b(),y(),C()});t.$broadcast(r.events.BEGIN_CELL_EDIT,a),i(function(){t.grid.api.edit.raise.beginCellEdit(t.row.entity,t.col.colDef,a)})}}function A(){if(t.grid.disableScrolling=!1,T){p&&p.grid.api.cellNav&&p.focus();var e=angular.element(d.children()[0]);D.$destroy();for(var i=d.children(),r=1;r<i.length;r++)angular.element(i[r]).remove();e.removeClass("ui-grid-cell-contents-hidden"),T=!1,g(),t.grid.api.core.notifyDataChange(n.dataChange.EDIT)}}function x(){t.grid.disableScrolling=!1,T&&(F.assign(t,$),t.$apply(),
t.grid.api.edit.raise.cancelCellEdit(t.row.entity,t.col.colDef),A())}function S(e,t){t=t.replace(/\[(\w+)\]/g,".$1"),t=t.replace(/^\./,"");for(var i=t.split(".");i.length;){var n=i.shift();if(!(n in e))return;e=e[n]}return e}var E,$,F,k,D,T=!1;if(t.col.colDef.enableCellEdit){var M=function(){},L=function(){},R=function(){t.col.colDef.enableCellEdit&&!1!==t.row.enableCellEdit?t.beginEditEventsWired||g():t.beginEditEventsWired&&v()};R();var _=t.$watch("row",function(e,t){e!==t&&R()});t.$on("$destroy",function(){_(),d.off()})}}}}]),e.directive("uiGridEditor",["gridUtil","uiGridConstants","uiGridEditConstants","$timeout","uiGridEditService",function(e,t,i,n,r){return{scope:!0,require:["?^uiGrid","?^uiGridRenderContainer","ngModel"],compile:function(){return{pre:function(){},post:function(e,o,s,a){var l,c,u;a[0]&&(l=a[0]),a[1]&&(c=a[1]),a[2]&&(u=a[2]),e.$on(i.events.BEGIN_CELL_EDIT,function(){if(n(function(){if(o[0].focus(),!o[0].select||!e.col.colDef.enableCellEditOnFocus&&l&&l.grid.api.cellNav)try{o[0].setSelectionRange(o[0].value.length,o[0].value.length)}catch(e){}else o[0].select()}),l&&l.grid.api.cellNav)var t=l.grid.api.cellNav.on.viewPortKeyPress(e,function(e){r.isStartEditKey(e)&&(u.$setViewValue(String.fromCharCode("number"==typeof e.which?e.which:e.keyCode),e),u.$render()),t()});o.on("mousedown",function(){"checkbox"===o[0].type&&(o.off("blur",e.stopEdit),n(function(){o[0].focus(),o.on("blur",e.stopEdit)}))}),o.on("blur",e.stopEdit)}),e.deepEdit=!1,e.stopEdit=function(t){e.inputForm&&!e.inputForm.$valid?(t.stopPropagation(),e.$emit(i.events.CANCEL_CELL_EDIT)):e.$emit(i.events.END_CELL_EDIT),e.deepEdit=!1},o.on("click",function(){"checkbox"!==o[0].type&&(e.deepEdit=!0,n(function(){e.grid.disableScrolling=!0}))}),o.on("keydown",function(n){switch(n.keyCode){case t.keymap.ESC:n.stopPropagation(),e.$emit(i.events.CANCEL_CELL_EDIT)}if(!e.deepEdit||n.keyCode!==t.keymap.LEFT&&n.keyCode!==t.keymap.RIGHT&&n.keyCode!==t.keymap.UP&&n.keyCode!==t.keymap.DOWN)if(l&&l.grid.api.cellNav)n.uiGridTargetRenderContainerId=c.containerId,null!==l.cellNav.handleKeyDown(n)&&e.stopEdit(n);else switch(n.keyCode){case t.keymap.ENTER:case t.keymap.TAB:n.stopPropagation(),n.preventDefault(),e.stopEdit(n)}else n.stopPropagation();return!0}),e.$on("$destroy",function(){o.off()})}}}}}]),e.directive("uiGridEditor",["$filter",function(e){function t(e){if(void 0===e||""===e)return null;var t=e.split("-");if(3!==t.length)return null;var i=parseInt(t[0],10),n=parseInt(t[1],10),r=parseInt(t[2],10);return n<1||i<1||r<1?null:new Date(i,n-1,r)}return{priority:-100,require:"?ngModel",link:function(i,n,r,o){2===angular.version.minor&&r.type&&"date"===r.type&&o&&(o.$formatters.push(function(t){return o.$setValidity(null,!t||!isNaN(t.getTime())),e("date")(t,"yyyy-MM-dd")}),o.$parsers.push(function(e){if(e&&e.length>0){var i=t(e);return o.$setValidity(null,i&&!isNaN(i.getTime())),i}return o.$setValidity(null,!0),null}))}}}]),e.directive("uiGridEditDropdown",["uiGridConstants","uiGridEditConstants","$timeout",function(e,t,i){return{require:["?^uiGrid","?^uiGridRenderContainer"],scope:!0,compile:function(){return{pre:function(){},post:function(n,r,o,s){var a=s[0],l=s[1];n.$on(t.events.BEGIN_CELL_EDIT,function(){i(function(){r[0].focus()}),r[0].style.width=r[0].parentElement.offsetWidth-1+"px",r.on("blur",function(e){n.stopEdit(e)})}),n.stopEdit=function(){n.$emit(t.events.END_CELL_EDIT)},r.on("keydown",function(i){switch(i.keyCode){case e.keymap.ESC:i.stopPropagation(),n.$emit(t.events.CANCEL_CELL_EDIT)}if(a&&a.grid.api.cellNav)i.uiGridTargetRenderContainerId=l.containerId,null!==a.cellNav.handleKeyDown(i)&&n.stopEdit(i);else switch(i.keyCode){case e.keymap.ENTER:case e.keymap.TAB:i.stopPropagation(),i.preventDefault(),n.stopEdit(i)}return!0}),n.$on("$destroy",function(){r.off()})}}}}}]),e.directive("uiGridEditFileChooser",["gridUtil","uiGridConstants","uiGridEditConstants","$timeout",function(e,t,i){return{scope:!0,require:["?^uiGrid","?^uiGridRenderContainer"],compile:function(){return{pre:function(){},post:function(t,n,r,o){var s;o[0]&&(s=o[0]),o[1]&&o[1];var a=(s.grid,function(n){var r=n.srcElement||n.target;r&&r.files&&r.files.length>0?("function"==typeof t.col.colDef.editFileChooserCallback?t.col.colDef.editFileChooserCallback(t.row,t.col,r.files):e.logError("You need to set colDef.editFileChooserCallback to use the file chooser"),r.form.reset(),t.$emit(i.events.END_CELL_EDIT)):t.$emit(i.events.CANCEL_CELL_EDIT)});n[0].addEventListener("change",a,!1),t.$on(i.events.BEGIN_CELL_EDIT,function(){n[0].focus(),n[0].select(),n.on("blur",function(){t.$emit(i.events.END_CELL_EDIT)})}),t.$on("$destroy",function(){n.off(),n[0].removeEventListener("change",a,!1)})}}}}}])}(),function(){"use strict";var e=angular.module("ui.grid.emptyBaseLayer",["ui.grid"]);e.service("uiGridBaseLayerService",["gridUtil","$compile",function(){return{initializeGrid:function(e,t){e.baseLayer={emptyRows:[]},!1!==e.options.enableEmptyGridBaseLayer&&(e.options.enableEmptyGridBaseLayer=!t)},setNumberOfEmptyRows:function(e,t){var i=t.options.rowHeight,n=Math.ceil(e/i);if(n>0){t.baseLayer.emptyRows=[];for(var r=0;r<n;r++)t.baseLayer.emptyRows.push({})}}}}]),e.directive("uiGridEmptyBaseLayer",["gridUtil","uiGridBaseLayerService","$parse",function(e,t,i){return{require:"^uiGrid",scope:!1,compile:function(){return{pre:function(e,n,r,o){var s=!1===i(r.uiGridEmptyBaseLayer)(e);t.initializeGrid(o.grid,s)},post:function(e,i,n,r){function o(){var e=a.getViewportHeight();return e!==l&&(l=e,!0)}function s(e){return".grid"+r.grid.id+" .ui-grid-render-container .ui-grid-empty-base-layer-container.ui-grid-canvas { height: "+e+"px; }"}if(r.grid.options.enableEmptyGridBaseLayer){var a=r.grid.renderContainers.body,l=a.getViewportHeight();r.grid.registerStyleComputation({func:function(){return o()&&t.setNumberOfEmptyRows(l,r.grid),s(l)}})}}}}}}]),e.directive("uiGridViewport",["$compile","gridUtil","$templateCache",function(e,t,i){return{priority:-200,scope:!1,compile:function(e){var t=i.get("ui-grid/emptyBaseLayerContainer");return e.prepend(t),{pre:function(){},post:function(){}}}}}])}(),function(){"use strict";var e=angular.module("ui.grid.expandable",["ui.grid"]);e.service("uiGridExpandableService",["gridUtil","$compile",function(e){var t={initializeGrid:function(i){i.expandable={},i.expandable.expandedAll=!1,i.options.enableExpandable=!1!==i.options.enableExpandable,i.options.expandableRowHeight=i.options.expandableRowHeight||150,i.options.expandableRowHeaderWidth=i.options.expandableRowHeaderWidth||40,i.options.enableExpandable&&!i.options.expandableRowTemplate&&(e.logError("You have not set the expandableRowTemplate, disabling expandable module"),i.options.enableExpandable=!1);var n={events:{expandable:{rowExpandedBeforeStateChanged:function(){},rowExpandedStateChanged:function(){}}},methods:{expandable:{toggleRowExpansion:function(e){var n=i.getRow(e);null!==n&&t.toggleRowExpansion(i,n)},expandAllRows:function(){t.expandAllRows(i)},collapseAllRows:function(){t.collapseAllRows(i)},toggleAllRows:function(){t.toggleAllRows(i)},expandRow:function(e){var n=i.getRow(e);null===n||n.isExpanded||t.toggleRowExpansion(i,n)},collapseRow:function(e){var n=i.getRow(e);null!==n&&n.isExpanded&&t.toggleRowExpansion(i,n)},getExpandedRows:function(){return t.getExpandedRows(i).map(function(e){return e.entity})}}}};i.api.registerEventsFromObject(n.events),i.api.registerMethodsFromObject(n.methods)},toggleRowExpansion:function(e,t){e.api.expandable.raise.rowExpandedBeforeStateChanged(t),t.isExpanded=!t.isExpanded,angular.isUndefined(t.expandedRowHeight)&&(t.expandedRowHeight=e.options.expandableRowHeight),t.isExpanded?t.height=t.grid.options.rowHeight+t.expandedRowHeight:(t.height=t.grid.options.rowHeight,e.expandable.expandedAll=!1),e.api.expandable.raise.rowExpandedStateChanged(t)},expandAllRows:function(e){e.renderContainers.body.visibleRowCache.forEach(function(i){i.isExpanded||t.toggleRowExpansion(e,i)}),e.expandable.expandedAll=!0,e.queueGridRefresh()},collapseAllRows:function(e){e.renderContainers.body.visibleRowCache.forEach(function(i){i.isExpanded&&t.toggleRowExpansion(e,i)}),e.expandable.expandedAll=!1,e.queueGridRefresh()},toggleAllRows:function(e){e.expandable.expandedAll?t.collapseAllRows(e):t.expandAllRows(e)},getExpandedRows:function(e){return e.rows.filter(function(e){return e.isExpanded})}};return t}]),e.directive("uiGridExpandable",["uiGridExpandableService","$templateCache",function(e,t){return{replace:!0,priority:0,require:"^uiGrid",scope:!1,compile:function(){return{pre:function(i,n,r,o){if(e.initializeGrid(o.grid),o.grid.options.enableExpandable&&!1!==o.grid.options.enableExpandableRowHeader){var s={name:"expandableButtons",displayName:"",exporterSuppressExport:!0,enableColumnResizing:!1,enableColumnMenu:!1,width:o.grid.options.expandableRowHeaderWidth||40};s.cellTemplate=t.get("ui-grid/expandableRowHeader"),s.headerCellTemplate=t.get("ui-grid/expandableTopRowHeader"),o.grid.addRowHeaderColumn(s,-90)}},post:function(){}}}}}]),e.directive("uiGrid",["uiGridExpandableService","$templateCache",function(){return{replace:!0,priority:599,require:"^uiGrid",scope:!1,compile:function(){return{pre:function(e,t,i,n){n.grid.api.core.on.renderingComplete(e,function(){e.row&&e.row.grid&&e.row.grid.options&&e.row.grid.options.enableExpandable&&(n.grid.parentRow=e.row)})},post:function(){}}}}}]),e.directive("uiGridExpandableRow",["uiGridExpandableService","$timeout","$compile","uiGridConstants","gridUtil","$interval","$log",function(e,t,i,n,r){return{replace:!1,priority:0,scope:!1,compile:function(){return{pre:function(e,t){r.getTemplate(e.grid.options.expandableRowTemplate).then(function(n){if(e.grid.options.expandableRowScope){var r=e.grid.options.expandableRowScope;for(var o in r)r.hasOwnProperty(o)&&(e[o]=r[o])}var s=angular.element(n);t.append(s),s=i(s)(e),e.row.expandedRendered=!0})},post:function(e){e.$on("$destroy",function(){e.row.expandedRendered=!1})}}}}}]),e.directive("uiGridRow",["$compile","gridUtil","$templateCache",function(){return{priority:-200,scope:!1,compile:function(){return{pre:function(e){e.grid.options.enableExpandable&&(e.expandableRow={},e.expandableRow.shouldRenderExpand=function(){return"body"===e.colContainer.name&&!1!==e.grid.options.enableExpandable&&e.row.isExpanded&&(!e.grid.isScrollingVertically||e.row.expandedRendered)},e.expandableRow.shouldRenderFiller=function(){return e.row.isExpanded&&("body"!==e.colContainer.name||e.grid.isScrollingVertically&&!e.row.expandedRendered)})},post:function(){}}}}}]),e.directive("uiGridViewport",["$compile","gridUtil","$templateCache",function(e,t,i){return{priority:-200,scope:!1,compile:function(e){var t=angular.element(e.children().children()[0]),n=i.get("ui-grid/expandableScrollFiller"),r=i.get("ui-grid/expandableRow");return t.append(r),t.append(n),{pre:function(){},post:function(){}}}}}])}(),function(){"use strict";var e=angular.module("ui.grid.exporter",["ui.grid"]);e.constant("uiGridExporterConstants",{featureName:"exporter",ALL:"all",VISIBLE:"visible",SELECTED:"selected",CSV_CONTENT:"CSV_CONTENT",BUTTON_LABEL:"BUTTON_LABEL",FILE_NAME:"FILE_NAME"}),e.service("uiGridExporterService",["$q","uiGridExporterConstants","gridUtil","$compile","$interval","i18nService",function(e,t,i,n,r,o){var s={delay:100,initializeGrid:function(e){e.exporter={},this.defaultGridOptions(e.options);var t={events:{exporter:{}},methods:{exporter:{csvExport:function(t,i){s.csvExport(e,t,i)},pdfExport:function(t,i){s.pdfExport(e,t,i)}}}};e.api.registerEventsFromObject(t.events),e.api.registerMethodsFromObject(t.methods),e.api.core.addToGridMenu?s.addToMenu(e):r(function(){e.api.core.addToGridMenu&&s.addToMenu(e)},this.delay,1)},defaultGridOptions:function(e){e.exporterSuppressMenu=!0===e.exporterSuppressMenu,e.exporterMenuLabel=e.exporterMenuLabel?e.exporterMenuLabel:"Export",e.exporterSuppressColumns=e.exporterSuppressColumns?e.exporterSuppressColumns:[],e.exporterCsvColumnSeparator=e.exporterCsvColumnSeparator?e.exporterCsvColumnSeparator:",",e.exporterCsvFilename=e.exporterCsvFilename?e.exporterCsvFilename:"download.csv",e.exporterPdfFilename=e.exporterPdfFilename?e.exporterPdfFilename:"download.pdf",e.exporterOlderExcelCompatibility=!0===e.exporterOlderExcelCompatibility,e.exporterIsExcelCompatible=!0===e.exporterIsExcelCompatible,e.exporterMenuItemOrder=e.exporterMenuItemOrder?e.exporterMenuItemOrder:200,e.exporterPdfDefaultStyle=e.exporterPdfDefaultStyle?e.exporterPdfDefaultStyle:{fontSize:11},e.exporterPdfTableStyle=e.exporterPdfTableStyle?e.exporterPdfTableStyle:{margin:[0,5,0,15]},e.exporterPdfTableHeaderStyle=e.exporterPdfTableHeaderStyle?e.exporterPdfTableHeaderStyle:{bold:!0,fontSize:12,color:"black"},e.exporterPdfHeader=e.exporterPdfHeader?e.exporterPdfHeader:null,e.exporterPdfFooter=e.exporterPdfFooter?e.exporterPdfFooter:null,e.exporterPdfOrientation=e.exporterPdfOrientation?e.exporterPdfOrientation:"landscape",e.exporterPdfPageSize=e.exporterPdfPageSize?e.exporterPdfPageSize:"A4",e.exporterPdfMaxGridWidth=e.exporterPdfMaxGridWidth?e.exporterPdfMaxGridWidth:720,e.exporterMenuAllData=e.exporterMenuAllData===undefined||e.exporterMenuAllData,e.exporterMenuVisibleData=e.exporterMenuVisibleData===undefined||e.exporterMenuVisibleData,e.exporterMenuSelectedData=e.exporterMenuSelectedData===undefined||e.exporterMenuSelectedData,e.exporterMenuCsv=e.exporterMenuCsv===undefined||e.exporterMenuCsv,e.exporterMenuPdf=e.exporterMenuPdf===undefined||e.exporterMenuPdf,e.exporterPdfCustomFormatter=e.exporterPdfCustomFormatter&&"function"==typeof e.exporterPdfCustomFormatter?e.exporterPdfCustomFormatter:function(e){return e},e.exporterHeaderFilterUseName=!0===e.exporterHeaderFilterUseName,e.exporterFieldCallback=e.exporterFieldCallback?e.exporterFieldCallback:function(e,t,i,n){return n},e.exporterAllDataFn=e.exporterAllDataFn?e.exporterAllDataFn:null,null==e.exporterAllDataFn&&e.exporterAllDataPromise&&(e.exporterAllDataFn=e.exporterAllDataPromise)},addToMenu:function(e){e.api.core.addToGridMenu(e,[{title:o.getSafeText("gridMenu.exporterAllAsCsv"),action:function(){e.api.exporter.csvExport(t.ALL,t.ALL)},shown:function(){return e.options.exporterMenuCsv&&e.options.exporterMenuAllData},order:e.options.exporterMenuItemOrder},{title:o.getSafeText("gridMenu.exporterVisibleAsCsv"),action:function(){e.api.exporter.csvExport(t.VISIBLE,t.VISIBLE)},shown:function(){return e.options.exporterMenuCsv&&e.options.exporterMenuVisibleData},order:e.options.exporterMenuItemOrder+1},{title:o.getSafeText("gridMenu.exporterSelectedAsCsv"),action:function(){e.api.exporter.csvExport(t.SELECTED,t.VISIBLE)},shown:function(){return e.options.exporterMenuCsv&&e.options.exporterMenuSelectedData&&e.api.selection&&e.api.selection.getSelectedRows().length>0},order:e.options.exporterMenuItemOrder+2},{title:o.getSafeText("gridMenu.exporterAllAsPdf"),action:function(){e.api.exporter.pdfExport(t.ALL,t.ALL)},shown:function(){return e.options.exporterMenuPdf&&e.options.exporterMenuAllData},order:e.options.exporterMenuItemOrder+3},{title:o.getSafeText("gridMenu.exporterVisibleAsPdf"),action:function(){e.api.exporter.pdfExport(t.VISIBLE,t.VISIBLE)},shown:function(){return e.options.exporterMenuPdf&&e.options.exporterMenuVisibleData},order:e.options.exporterMenuItemOrder+4},{title:o.getSafeText("gridMenu.exporterSelectedAsPdf"),action:function(){e.api.exporter.pdfExport(t.SELECTED,t.VISIBLE)},shown:function(){return e.options.exporterMenuPdf&&e.options.exporterMenuSelectedData&&e.api.selection&&e.api.selection.getSelectedRows().length>0},order:e.options.exporterMenuItemOrder+5}])},csvExport:function(e,t,i){var n=this;this.loadAllDataIfNeeded(e,t,i).then(function(){var r=e.options.showHeader?n.getColumnHeaders(e,i):[],o=n.getData(e,t,i),s=n.formatAsCsv(r,o,e.options.exporterCsvColumnSeparator);n.downloadFile(e.options.exporterCsvFilename,s,e.options.exporterCsvColumnSeparator,e.options.exporterOlderExcelCompatibility,e.options.exporterIsExcelCompatible)})},loadAllDataIfNeeded:function(i,n){if(n===t.ALL&&i.rows.length!==i.options.totalItems&&i.options.exporterAllDataFn)return i.options.exporterAllDataFn().then(function(){i.modifyRows(i.options.data)});var r=e.defer();return r.resolve(),r.promise},getColumnHeaders:function(e,i){var n,r=[];if(i===t.ALL)n=e.columns;else{var o=e.renderContainers.left?e.renderContainers.left.visibleColumnCache.filter(function(e){return e.visible}):[],s=e.renderContainers.body?e.renderContainers.body.visibleColumnCache.filter(function(e){return e.visible}):[],a=e.renderContainers.right?e.renderContainers.right.visibleColumnCache.filter(function(e){return e.visible}):[];n=o.concat(s,a)}return n.forEach(function(t){!0!==t.colDef.exporterSuppressExport&&-1===e.options.exporterSuppressColumns.indexOf(t.name)&&r.push({name:t.field,displayName:e.options.exporterHeaderFilter?e.options.exporterHeaderFilterUseName?e.options.exporterHeaderFilter(t.name):e.options.exporterHeaderFilter(t.displayName):t.displayName,width:t.drawnWidth?t.drawnWidth:t.width,align:"number"===t.colDef.type?"right":"left"})}),r},getData:function(e,n,r,o){var s,a,l=[];switch(n){case t.ALL:s=e.rows;break;case t.VISIBLE:s=e.getVisibleRows();break;case t.SELECTED:e.api.selection?s=e.api.selection.getSelectedGridRows():i.logError("selection feature must be enabled to allow selected rows to be exported")}if(r===t.ALL)a=e.columns;else{var c=e.renderContainers.left?e.renderContainers.left.visibleColumnCache.filter(function(e){return e.visible}):[],u=e.renderContainers.body?e.renderContainers.body.visibleColumnCache.filter(function(e){return e.visible}):[],d=e.renderContainers.right?e.renderContainers.right.visibleColumnCache.filter(function(e){return e.visible}):[];a=c.concat(u,d)}return s.forEach(function(i){if(!1!==i.exporterEnableExporting){var n=[];a.forEach(function(s){if((s.visible||r===t.ALL)&&!0!==s.colDef.exporterSuppressExport&&-1===e.options.exporterSuppressColumns.indexOf(s.name)){var a=o?e.getCellDisplayValue(i,s):e.getCellValue(i,s),l={value:e.options.exporterFieldCallback(e,i,s,a)};s.colDef.exporterPdfAlign&&(l.alignment=s.colDef.exporterPdfAlign),n.push(l)}}),l.push(n)}}),l},formatAsCsv:function(e,t,i){var n=this,r=e.map(function(e){return{value:e.displayName}}),o=r.length>0?n.formatRowAsCsv(this,i)(r)+"\n":"";return o+=t.map(this.formatRowAsCsv(this,i)).join("\n")},formatRowAsCsv:function(e,t){return function(i){return i.map(e.formatFieldAsCsv).join(t)}},formatFieldAsCsv:function(e){return null==e.value?"":"number"==typeof e.value?e.value:"boolean"==typeof e.value?e.value?"TRUE":"FALSE":"string"==typeof e.value?'"'+e.value.replace(/"/g,'""')+'"':JSON.stringify(e.value)},isIE:function(){var e=navigator.userAgent.search(/(?:Edge|MSIE|Trident\/.*; rv:)/),t=!1;return-1!==e&&(t=!0),t},downloadFile:function(e,t,i,n,r){var o,s=document,a=s.createElement("a"),l="application/octet-stream;charset=utf-8",c=this.isIE();if(r&&(t="sep="+i+"\r\n"+t),navigator.msSaveBlob)return navigator.msSaveOrOpenBlob(new Blob([n?"\ufeff":"",t],{type:l}),e);if(c){var u=s.createElement("iframe");return document.body.appendChild(u),u.contentWindow.document.open("text/html","replace"),u.contentWindow.document.write(t),u.contentWindow.document.close(),u.contentWindow.focus(),u.contentWindow.document.execCommand("SaveAs",!0,e),document.body.removeChild(u),!0}if("download"in a){var d=new Blob([n?"\ufeff":"",t],{type:l});o=URL.createObjectURL(d),a.setAttribute("download",e)}else o="data:"+l+","+encodeURIComponent(t),a.setAttribute("target","_blank");a.href=o,a.setAttribute("style","display:none;"),s.body.appendChild(a),setTimeout(function(){if(a.click)a.click();else if(document.createEvent){var e=document.createEvent("MouseEvents");e.initEvent("click",!0,!0),a.dispatchEvent(e)}s.body.removeChild(a)},this.delay)},pdfExport:function(e,t,i){var n=this;this.loadAllDataIfNeeded(e,t,i).then(function(){var r=n.getColumnHeaders(e,i),o=n.getData(e,t,i),s=n.prepareAsPdf(e,r,o);n.isIE()||-1!==navigator.appVersion.indexOf("Edge")?n.downloadPDF(e.options.exporterPdfFilename,s):pdfMake.createPdf(s).open()})},downloadPDF:function(e,t){var i,n=document;n.createElement("a");i=this.isIE();var r,o=pdfMake.createPdf(t);o.getBuffer(function(t){if(r=new Blob([t]),navigator.msSaveBlob)return navigator.msSaveBlob(r,e);if(i){var o=n.createElement("iframe");return document.body.appendChild(o),o.contentWindow.document.open("text/html","replace"),o.contentWindow.document.write(r),o.contentWindow.document.close(),o.contentWindow.focus(),o.contentWindow.document.execCommand("SaveAs",!0,e),document.body.removeChild(o),!0}})},prepareAsPdf:function(e,t,i){var n=this.calculatePdfHeaderWidths(e,t),r=t.map(function(e){return{text:e.displayName,style:"tableHeader"}}),o=i.map(this.formatRowAsPdf(this)),s=[r].concat(o),a={pageOrientation:e.options.exporterPdfOrientation,pageSize:e.options.exporterPdfPageSize,content:[{style:"tableStyle",table:{headerRows:1,widths:n,body:s}}],styles:{tableStyle:e.options.exporterPdfTableStyle,tableHeader:e.options.exporterPdfTableHeaderStyle},defaultStyle:e.options.exporterPdfDefaultStyle};return e.options.exporterPdfLayout&&(a.layout=e.options.exporterPdfLayout),e.options.exporterPdfHeader&&(a.header=e.options.exporterPdfHeader),e.options.exporterPdfFooter&&(a.footer=e.options.exporterPdfFooter),e.options.exporterPdfCustomFormatter&&(a=e.options.exporterPdfCustomFormatter(a)),a},calculatePdfHeaderWidths:function(e,t){var i=0;t.forEach(function(e){"number"==typeof e.width&&(i+=e.width)});var n=0;t.forEach(function(e){if("*"===e.width&&(n+=100),"string"==typeof e.width&&e.width.match(/(\d)*%/)){var t=parseInt(e.width.match(/(\d)*%/)[0]);e.width=i*t/100,n+=e.width}});var r=i+n;return t.map(function(t){return"*"===t.width?t.width:t.width*e.options.exporterPdfMaxGridWidth/r})},formatRowAsPdf:function(e){return function(t){return t.map(e.formatFieldAsPdfString)}},formatFieldAsPdfString:function(e){var t;return t=null==e.value?"":"number"==typeof e.value?e.value.toString():"boolean"==typeof e.value?e.value?"TRUE":"FALSE":"string"==typeof e.value?e.value.replace(/"/g,'""'):JSON.stringify(e.value).replace(/^"/,"").replace(/"$/,""),e.alignment&&"string"==typeof e.alignment&&(t={text:t,alignment:e.alignment}),t}};return s}]),e.directive("uiGridExporter",["uiGridExporterConstants","uiGridExporterService","gridUtil","$compile",function(e,t){return{replace:!0,priority:0,require:"^uiGrid",scope:!1,link:function(e,i,n,r){t.initializeGrid(r.grid),r.grid.exporter.$scope=e}}}])}(),function(){"use strict";var e=angular.module("ui.grid.grouping",["ui.grid","ui.grid.treeBase"]);e.constant("uiGridGroupingConstants",{featureName:"grouping",rowHeaderColName:"treeBaseRowHeaderCol",EXPANDED:"expanded",COLLAPSED:"collapsed",aggregation:{COUNT:"count",SUM:"sum",MAX:"max",MIN:"min",AVG:"avg"}}),e.service("uiGridGroupingService",["$q","uiGridGroupingConstants","gridUtil","rowSorter","GridRow","gridClassFactory","i18nService","uiGridConstants","uiGridTreeBaseService",function(e,t,i,n,r,o,s,a,l){var c={initializeGrid:function(e,t){l.initializeGrid(e,t),e.grouping={},e.grouping.groupHeaderCache={},c.defaultGridOptions(e.options),e.registerRowsProcessor(c.groupRows,400),e.registerColumnBuilder(c.groupingColumnBuilder),e.registerColumnsProcessor(c.groupingColumnProcessor,400);var i={events:{grouping:{aggregationChanged:{},groupingChanged:{}}},methods:{grouping:{getGrouping:function(t){var i=c.getGrouping(e);return i.grouping.forEach(function(e){e.colName=e.col.name,delete e.col}),i.aggregations.forEach(function(e){e.colName=e.col.name,delete e.col}),i.aggregations=i.aggregations.filter(function(e){return!e.aggregation.source||"grouping"!==e.aggregation.source}),t&&(i.rowExpandedStates=c.getRowExpandedStates(e.grouping.groupingHeaderCache)),i},setGrouping:function(t){c.setGrouping(e,t)},groupColumn:function(t){var i=e.getColumn(t);c.groupColumn(e,i)},ungroupColumn:function(t){var i=e.getColumn(t);c.ungroupColumn(e,i)},clearGrouping:function(){c.clearGrouping(e)},aggregateColumn:function(t,i,n){var r=e.getColumn(t);c.aggregateColumn(e,r,i,n)}}}};e.api.registerEventsFromObject(i.events),e.api.registerMethodsFromObject(i.methods),e.api.core.on.sortChanged(t,c.tidyPriorities)},defaultGridOptions:function(e){e.enableGrouping=!1!==e.enableGrouping,e.groupingShowCounts=!1!==e.groupingShowCounts,e.groupingNullLabel="undefined"==typeof e.groupingNullLabel?"Null":e.groupingNullLabel,e.enableGroupHeaderSelection=!0===e.enableGroupHeaderSelection},groupingColumnBuilder:function(e,n,r){if(!1!==e.enableGrouping){"undefined"==typeof n.grouping&&"undefined"!=typeof e.grouping?(n.grouping=angular.copy(e.grouping),"undefined"!=typeof n.grouping.groupPriority&&n.grouping.groupPriority>-1&&(n.treeAggregationFn=l.nativeAggregations()[t.aggregation.COUNT].aggregationFn,n.treeAggregationFinalizerFn=c.groupedFinalizerFn)):"undefined"==typeof n.grouping&&(n.grouping={}),"undefined"!=typeof n.grouping&&"undefined"!=typeof n.grouping.groupPriority&&n.grouping.groupPriority>=0&&(n.suppressRemoveSort=!0);var o={name:"ui.grid.grouping.group",title:s.get().grouping.group,icon:"ui-grid-icon-indent-right",shown:function(){return"undefined"==typeof this.context.col.grouping||"undefined"==typeof this.context.col.grouping.groupPriority||this.context.col.grouping.groupPriority<0},action:function(){c.groupColumn(this.context.col.grid,this.context.col)}},a={name:"ui.grid.grouping.ungroup",title:s.get().grouping.ungroup,icon:"ui-grid-icon-indent-left",shown:function(){return"undefined"!=typeof this.context.col.grouping&&"undefined"!=typeof this.context.col.grouping.groupPriority&&this.context.col.grouping.groupPriority>=0},action:function(){c.ungroupColumn(this.context.col.grid,this.context.col)}},u={name:"ui.grid.grouping.aggregateRemove",title:s.get().grouping.aggregate_remove,shown:function(){return"undefined"!=typeof this.context.col.treeAggregationFn},action:function(){c.aggregateColumn(this.context.col.grid,this.context.col,null)}},d=function(e,t){t=t||s.get().grouping["aggregate_"+e]||e;var r={name:"ui.grid.grouping.aggregate"+e,title:t,shown:function(){return"undefined"==typeof this.context.col.treeAggregation||"undefined"==typeof this.context.col.treeAggregation.type||this.context.col.treeAggregation.type!==e},action:function(){c.aggregateColumn(this.context.col.grid,this.context.col,e)}};i.arrayContainsObjectWithProperty(n.menuItems,"name","ui.grid.grouping.aggregate"+e)||n.menuItems.push(r)};!1!==n.colDef.groupingShowGroupingMenu&&(i.arrayContainsObjectWithProperty(n.menuItems,"name","ui.grid.grouping.group")||n.menuItems.push(o),i.arrayContainsObjectWithProperty(n.menuItems,"name","ui.grid.grouping.ungroup")||n.menuItems.push(a)),!1!==n.colDef.groupingShowAggregationMenu&&(angular.forEach(l.nativeAggregations(),function(e,t){d(t)}),angular.forEach(r.treeCustomAggregations,function(e,t){d(t,e.menuTitle)}),i.arrayContainsObjectWithProperty(n.menuItems,"name","ui.grid.grouping.aggregateRemove")||n.menuItems.push(u))}},groupingColumnProcessor:function(e,t){return e=c.moveGroupColumns(this,e,t)},groupedFinalizerFn:function(e){var t=this;"undefined"!=typeof e.groupVal?(e.rendered=e.groupVal,t.grid.options.groupingShowCounts&&"date"!==t.colDef.type&&"object"!==t.colDef.type&&(e.rendered+=" ("+e.value+")")):e.rendered=null},moveGroupColumns:function(e,t){return!1===e.options.moveGroupColumns?t:(t.forEach(function(e,t){e.groupingPosition=t}),t.sort(function(e,t){var i,n;return i=e.isRowHeader?e.headerPriority:"undefined"==typeof e.grouping||"undefined"==typeof e.grouping.groupPriority||e.grouping.groupPriority<0?null:e.grouping.groupPriority,n=t.isRowHeader?t.headerPriority:"undefined"==typeof t.grouping||"undefined"==typeof t.grouping.groupPriority||t.grouping.groupPriority<0?null:t.grouping.groupPriority,null!==i&&null===n?-1:null!==n&&null===i?1:null!==i&&null!==n?i-n:e.groupingPosition-t.groupingPosition}),t.forEach(function(e){delete e.groupingPosition}),t)},groupColumn:function(e,i){"undefined"==typeof i.grouping&&(i.grouping={});var n=c.getGrouping(e);i.grouping.groupPriority=n.grouping.length,i.previousSort=angular.copy(i.sort),i.sort?"undefined"!=typeof i.sort.direction&&null!==i.sort.direction||(i.sort.direction=a.ASC):i.sort={direction:a.ASC},i.treeAggregation={type:t.aggregation.COUNT,source:"grouping"},i.treeAggregationFn=l.nativeAggregations()[t.aggregation.COUNT].aggregationFn,i.treeAggregationFinalizerFn=c.groupedFinalizerFn,e.api.grouping.raise.groupingChanged(i),e.api.core.raise.sortChanged(e,e.getColumnSorting()),e.queueGridRefresh()},ungroupColumn:function(e,t){"undefined"!=typeof t.grouping&&(delete t.grouping.groupPriority,delete t.treeAggregation,delete t.customTreeAggregationFinalizer,t.previousSort&&(t.sort=t.previousSort,delete t.previousSort),c.tidyPriorities(e),e.api.grouping.raise.groupingChanged(t),e.api.core.raise.sortChanged(e,e.getColumnSorting()),e.queueGridRefresh())},aggregateColumn:function(e,t,i){"undefined"!=typeof t.grouping&&"undefined"!=typeof t.grouping.groupPriority&&t.grouping.groupPriority>=0&&c.ungroupColumn(e,t);var n={};"undefined"!=typeof e.options.treeCustomAggregations[i]?n=e.options.treeCustomAggregations[i]:"undefined"!=typeof l.nativeAggregations()[i]&&(n=l.nativeAggregations()[i]),t.treeAggregation={type:i,label:s.get().aggregation[n.label]||n.label},t.treeAggregationFn=n.aggregationFn,t.treeAggregationFinalizerFn=n.finalizerFn,e.api.grouping.raise.aggregationChanged(t),e.queueGridRefresh()},setGrouping:function(e,t){void 0!==t&&(c.clearGrouping(e),t.grouping&&t.grouping.length&&t.grouping.length>0&&t.grouping.forEach(function(t){var i=e.getColumn(t.colName);i&&c.groupColumn(e,i)}),t.aggregations&&t.aggregations.length&&t.aggregations.forEach(function(t){var i=e.getColumn(t.colName);i&&c.aggregateColumn(e,i,t.aggregation.type)}),t.rowExpandedStates&&c.applyRowExpandedStates(e.grouping.groupingHeaderCache,t.rowExpandedStates))},clearGrouping:function(e){var t=c.getGrouping(e);t.grouping.length>0&&t.grouping.forEach(function(t){t.col||(t.col=e.getColumn(t.colName)),c.ungroupColumn(e,t.col)}),t.aggregations.length>0&&t.aggregations.forEach(function(t){t.col||(t.col=e.getColumn(t.colName)),c.aggregateColumn(e,t.col,null)})},tidyPriorities:function(e){void 0!==e&&"undefined"==typeof e.grid||"undefined"==typeof this.grid||(e=this.grid);var t=[],i=[];e.columns.forEach(function(e){"undefined"!=typeof e.grouping&&"undefined"!=typeof e.grouping.groupPriority&&e.grouping.groupPriority>=0?t.push(e):"undefined"!=typeof e.sort&&"undefined"!=typeof e.sort.priority&&e.sort.priority>=0&&i.push(e)}),t.sort(function(e,t){return e.grouping.groupPriority-t.grouping.groupPriority}),t.forEach(function(e,t){e.grouping.groupPriority=t,e.suppressRemoveSort=!0,"undefined"==typeof e.sort&&(e.sort={}),e.sort.priority=t});var n=t.length;i.sort(function(e,t){return e.sort.priority-t.sort.priority}),i.forEach(function(e){e.sort.priority=n,e.suppressRemoveSort=e.colDef.suppressRemoveSort,n++})},groupRows:function(e){if(0===e.length)return e;var t=this;t.grouping.oldGroupingHeaderCache=t.grouping.groupingHeaderCache||{},t.grouping.groupingHeaderCache={};for(var i=c.initialiseProcessingState(t),r=function(r,a){var l=t.getCellValue(s,r.col);r.initialised&&0===n.getSortFn(t,r.col,e)(l,r.currentValue)||(c.insertGroupHeader(t,e,o,i,a),o++)},o=0;o<e.length;o++){var s=e[o];s.visible&&i.forEach(r)}return delete t.grouping.oldGroupingHeaderCache,e},initialiseProcessingState:function(e){var t=[];return c.getGrouping(e).grouping.forEach(function(e){t.push({fieldName:e.field,col:e.col,initialised:!1,currentValue:null,currentRow:null})}),t},getGrouping:function(e){var t=[],i=[];return e.columns.forEach(function(e){e.grouping&&"undefined"!=typeof e.grouping.groupPriority&&e.grouping.groupPriority>=0&&t.push({field:e.field,col:e,groupPriority:e.grouping.groupPriority,grouping:e.grouping}),e.treeAggregation&&e.treeAggregation.type&&i.push({field:e.field,col:e,aggregation:e.treeAggregation})}),t.sort(function(e,t){return e.groupPriority-t.groupPriority}),t.forEach(function(e,t){e.grouping.groupPriority=t,e.groupPriority=t,delete e.grouping}),{grouping:t,aggregations:i}},insertGroupHeader:function(e,t,i,n,s){var a=(n[s].fieldName,n[s].col),l=e.getCellValue(t[i],a),u=l;void 0!==l&&null!==l||(u=e.options.groupingNullLabel);for(var d=function(e){return angular.isObject(e)?JSON.stringify(e):e},h=e.grouping.oldGroupingHeaderCache,p=0;p<s;p++)h&&h[d(n[p].currentValue)]&&(h=h[d(n[p].currentValue)].children);var g;for(h&&h[d(l)]?(g=h[d(l)].row,g.entity={}):(g=new r({},null,e),o.rowTemplateAssigner.call(e,g)),g.entity["$$"+n[s].col.uid]={groupVal:u},g.treeLevel=s,g.groupHeader=!0,g.internalRow=!0,g.enableCellEdit=!1,g.enableSelection=e.options.enableGroupHeaderSelection,n[s].initialised=!0,n[s].currentValue=l,n[s].currentRow=g,
c.finaliseProcessingState(n,s+1),t.splice(i,0,g),h=e.grouping.groupingHeaderCache,p=0;p<s;p++)h=h[d(n[p].currentValue)].children;h[d(l)]={row:g,children:{}}},finaliseProcessingState:function(e,t){for(var i=t;i<e.length;i++)e[i].initialised=!1,e[i].currentRow=null,e[i].currentValue=null},getRowExpandedStates:function(e){if(void 0===e)return{};var t={};return angular.forEach(e,function(e,i){t[i]={state:e.row.treeNode.state},e.children?t[i].children=c.getRowExpandedStates(e.children):t[i].children={}}),t},applyRowExpandedStates:function(e,t){void 0!==t&&angular.forEach(t,function(t,i){e[i]&&(e[i].row.treeNode.state=t.state,t.children&&e[i].children&&c.applyRowExpandedStates(e[i].children,t.children))})}};return c}]),e.directive("uiGridGrouping",["uiGridGroupingConstants","uiGridGroupingService","$templateCache",function(e,t){return{replace:!0,priority:0,require:"^uiGrid",scope:!1,compile:function(){return{pre:function(e,i,n,r){!1!==r.grid.options.enableGrouping&&t.initializeGrid(r.grid,e)},post:function(){}}}}}])}(),function(){"use strict";var e=angular.module("ui.grid.importer",["ui.grid"]);e.constant("uiGridImporterConstants",{featureName:"importer"}),e.service("uiGridImporterService",["$q","uiGridConstants","uiGridImporterConstants","gridUtil","$compile","$interval","i18nService","$window",function(e,t,i,n,r,o,s,a){var l={initializeGrid:function(e,t){t.importer={$scope:e},this.defaultGridOptions(t.options);var i={events:{importer:{}},methods:{importer:{importFile:function(e){l.importThisFile(t,e)}}}};t.api.registerEventsFromObject(i.events),t.api.registerMethodsFromObject(i.methods),t.options.enableImporter&&t.options.importerShowMenu&&(t.api.core.addToGridMenu?l.addToMenu(t):o(function(){t.api.core.addToGridMenu&&l.addToMenu(t)},100,1))},defaultGridOptions:function(e){e.enableImporter||e.enableImporter===undefined?a.hasOwnProperty("File")&&a.hasOwnProperty("FileReader")&&a.hasOwnProperty("FileList")&&a.hasOwnProperty("Blob")?e.enableImporter=!0:(n.logError("The File APIs are not fully supported in this browser, grid importer cannot be used."),e.enableImporter=!1):e.enableImporter=!1,e.importerProcessHeaders=e.importerProcessHeaders||l.processHeaders,e.importerHeaderFilter=e.importerHeaderFilter||function(e){return e},e.importerErrorCallback&&"function"==typeof e.importerErrorCallback||delete e.importerErrorCallback,!0!==e.enableImporter||e.importerDataAddCallback||(n.logError("You have not set an importerDataAddCallback, importer is disabled"),e.enableImporter=!1),e.importerShowMenu=!1!==e.importerShowMenu,e.importerObjectCallback=e.importerObjectCallback||function(e,t){return t}},addToMenu:function(e){e.api.core.addToGridMenu(e,[{title:s.getSafeText("gridMenu.importerTitle"),order:150},{templateUrl:"ui-grid/importerMenuItemContainer",action:function(){this.grid.api.importer.importAFile(e)},order:151}])},importThisFile:function(e,t){if(!t)return void n.logError("No file object provided to importThisFile, should be impossible, aborting");var i=new FileReader;switch(t.type){case"application/json":i.onload=l.importJsonClosure(e);break;default:i.onload=l.importCsvClosure(e)}i.readAsText(t)},importJsonClosure:function(e){return function(t){var i,n=[],r=l.parseJson(e,t);null!==r&&(r.forEach(function(t){i=l.newObject(e),angular.extend(i,t),i=e.options.importerObjectCallback(e,i),n.push(i)}),l.addObjects(e,n))}},parseJson:function(e,t){var i;try{i=JSON.parse(t.target.result)}catch(i){return void l.alertError(e,"importer.invalidJson","File could not be processed, is it valid json? Content was: ",t.target.result)}return Array.isArray(i)?i:(l.alertError(e,"importer.jsonNotarray","Import failed, file is not an array, file was: ",t.target.result),[])},importCsvClosure:function(e){return function(t){var i=l.parseCsv(t);if(!i||i.length<1)return void l.alertError(e,"importer.invalidCsv","File could not be processed, is it valid csv? Content was: ",t.target.result);var n=l.createCsvObjects(e,i);if(!n||0===n.length)return void l.alertError(e,"importer.noObjects","Objects were not able to be derived, content was: ",t.target.result);l.addObjects(e,n)}},parseCsv:function(e){var t=e.target.result;return CSV.parse(t)},createCsvObjects:function(e,t){var i=e.options.importerProcessHeaders(e,t.shift());if(!i||0===i.length)return l.alertError(e,"importer.noHeaders","Column names could not be derived, content was: ",t),[];var n,r=[];return t.forEach(function(t){n=l.newObject(e),null!==t&&t.forEach(function(e,t){null!==i[t]&&(n[i[t]]=e)}),n=e.options.importerObjectCallback(e,n),r.push(n)}),r},processHeaders:function(e,t){var i=[];if(e.options.columnDefs&&0!==e.options.columnDefs.length){var n=l.flattenColumnDefs(e,e.options.columnDefs);return t.forEach(function(e){n[e]?i.push(n[e]):n[e.toLowerCase()]?i.push(n[e.toLowerCase()]):i.push(null)}),i}return t.forEach(function(e){i.push(e.replace(/[^0-9a-zA-Z\-_]/g,"_"))}),i},flattenColumnDefs:function(e,t){var i={};return t.forEach(function(t){t.name&&(i[t.name]=t.field||t.name,i[t.name.toLowerCase()]=t.field||t.name),t.field&&(i[t.field]=t.field||t.name,i[t.field.toLowerCase()]=t.field||t.name),t.displayName&&(i[t.displayName]=t.field||t.name,i[t.displayName.toLowerCase()]=t.field||t.name),t.displayName&&e.options.importerHeaderFilter&&(i[e.options.importerHeaderFilter(t.displayName)]=t.field||t.name,i[e.options.importerHeaderFilter(t.displayName).toLowerCase()]=t.field||t.name)}),i},addObjects:function(e,i){if(e.api.rowEdit){var n=e.registerDataChangeCallback(function(){e.api.rowEdit.setRowsDirty(i),n()},[t.dataChange.ROW]);e.importer.$scope.$on("$destroy",n)}e.importer.$scope.$apply(e.options.importerDataAddCallback(e,i))},newObject:function(e){return"undefined"!=typeof e.options&&"undefined"!=typeof e.options.importerNewObject?new e.options.importerNewObject:{}},alertError:function(e,t,i,r){e.options.importerErrorCallback?e.options.importerErrorCallback(e,t,i,r):(a.alert(s.getSafeText(t)),n.logError(i+r))}};return l}]),e.directive("uiGridImporter",["uiGridImporterConstants","uiGridImporterService","gridUtil","$compile",function(e,t){return{replace:!0,priority:0,require:"^uiGrid",scope:!1,link:function(e,i,n,r){t.initializeGrid(e,r.grid)}}}]),e.directive("uiGridImporterMenuItem",["uiGridImporterConstants","uiGridImporterService","gridUtil","$compile",function(e,t,i){return{replace:!0,priority:0,require:"^uiGrid",scope:!1,templateUrl:"ui-grid/importerMenuItem",link:function(e,n,r,o){var s=function(e){var i=e.srcElement||e.target;if(i&&i.files&&1===i.files.length){var n=i.files[0];t.importThisFile(l,n),i.form.reset()}},a=n[0].querySelectorAll(".ui-grid-importer-file-chooser"),l=o.grid;1!==a.length?i.logError("Found > 1 or < 1 file choosers within the menu item, error, cannot continue"):a[0].addEventListener("change",s,!1)}}}])}(),function(){"use strict";var e=angular.module("ui.grid.infiniteScroll",["ui.grid"]);e.service("uiGridInfiniteScrollService",["gridUtil","$compile","$timeout","uiGridConstants","ScrollEvent","$q",function(e,t,i,n,r,o){var s={initializeGrid:function(e,t){if(s.defaultGridOptions(e.options),e.options.enableInfiniteScroll){e.infiniteScroll={dataLoading:!1},s.setScrollDirections(e,e.options.infiniteScrollUp,e.options.infiniteScrollDown),e.api.core.on.scrollEnd(t,s.handleScroll);var i={events:{infiniteScroll:{needLoadMoreData:function(){},needLoadMoreDataTop:function(){}}},methods:{infiniteScroll:{dataLoaded:function(t,i){return s.setScrollDirections(e,t,i),s.adjustScroll(e).then(function(){e.infiniteScroll.dataLoading=!1})},resetScroll:function(t,i){s.setScrollDirections(e,t,i),s.adjustInfiniteScrollPosition(e,0)},saveScrollPercentage:function(){e.infiniteScroll.prevScrollTop=e.renderContainers.body.prevScrollTop,e.infiniteScroll.previousVisibleRows=e.getVisibleRowCount()},dataRemovedTop:function(t,i){s.dataRemovedTop(e,t,i)},dataRemovedBottom:function(t,i){s.dataRemovedBottom(e,t,i)},setScrollDirections:function(t,i){s.setScrollDirections(e,t,i)}}}};e.api.registerEventsFromObject(i.events),e.api.registerMethodsFromObject(i.methods)}},defaultGridOptions:function(e){e.enableInfiniteScroll=!1!==e.enableInfiniteScroll,e.infiniteScrollRowsFromEnd=e.infiniteScrollRowsFromEnd||20,e.infiniteScrollUp=!0===e.infiniteScrollUp,e.infiniteScrollDown=!1!==e.infiniteScrollDown},setScrollDirections:function(e,t,i){e.infiniteScroll.scrollUp=!0===t,e.suppressParentScrollUp=!0===t,e.infiniteScroll.scrollDown=!1!==i,e.suppressParentScrollDown=!1!==i},handleScroll:function(e){if(!(e.grid.infiniteScroll&&e.grid.infiniteScroll.dataLoading||"ui.grid.adjustInfiniteScrollPosition"===e.source)&&e.y)if(0===e.y.percentage)e.grid.scrollDirection=n.scrollDirection.UP,s.loadData(e.grid);else if(1===e.y.percentage)e.grid.scrollDirection=n.scrollDirection.DOWN,s.loadData(e.grid);else{var t=e.grid.options.infiniteScrollRowsFromEnd/e.grid.renderContainers.body.visibleRowCache.length;e.grid.scrollDirection===n.scrollDirection.UP?e.y.percentage<=t&&s.loadData(e.grid):e.grid.scrollDirection===n.scrollDirection.DOWN&&1-e.y.percentage<=t&&s.loadData(e.grid)}},loadData:function(e){e.infiniteScroll.previousVisibleRows=e.renderContainers.body.visibleRowCache.length,e.infiniteScroll.direction=e.scrollDirection,delete e.infiniteScroll.prevScrollTop,e.scrollDirection===n.scrollDirection.UP&&e.infiniteScroll.scrollUp?(e.infiniteScroll.dataLoading=!0,e.api.infiniteScroll.raise.needLoadMoreDataTop()):e.scrollDirection===n.scrollDirection.DOWN&&e.infiniteScroll.scrollDown&&(e.infiniteScroll.dataLoading=!0,e.api.infiniteScroll.raise.needLoadMoreData())},adjustScroll:function(e){var t=o.defer();return i(function(){var r,o,a,l,c;r=e.getViewportHeight()+e.headerHeight-e.renderContainers.body.headerHeight-e.scrollbarHeight,o=e.options.rowHeight,e.infiniteScroll.direction===undefined&&s.adjustInfiniteScrollPosition(e,0),a=e.getVisibleRowCount();var u=o*a;e.infiniteScroll.scrollDown&&r>u&&e.api.infiniteScroll.raise.needLoadMoreData(),e.infiniteScroll.direction===n.scrollDirection.UP&&(l=e.infiniteScroll.prevScrollTop||0,c=l+(a-e.infiniteScroll.previousVisibleRows)*o,s.adjustInfiniteScrollPosition(e,c),i(function(){t.resolve()})),e.infiniteScroll.direction===n.scrollDirection.DOWN&&(c=e.infiniteScroll.prevScrollTop||e.infiniteScroll.previousVisibleRows*o-r,s.adjustInfiniteScrollPosition(e,c),i(function(){t.resolve()}))},0),t.promise},adjustInfiniteScrollPosition:function(e,t){var i=new r(e,null,null,"ui.grid.adjustInfiniteScrollPosition"),n=e.getVisibleRowCount(),o=e.getViewportHeight()+e.headerHeight-e.renderContainers.body.headerHeight-e.scrollbarHeight,s=e.options.rowHeight,a=n*s-o;0===t&&e.infiniteScroll.scrollUp?i.y={percentage:1/a}:i.y={percentage:t/a},e.scrollContainers("",i)},dataRemovedTop:function(e,t,i){var n,r,o,a;s.setScrollDirections(e,t,i),n=e.renderContainers.body.visibleRowCache.length,r=e.infiniteScroll.prevScrollTop,a=e.options.rowHeight,o=r-(e.infiniteScroll.previousVisibleRows-n)*a,s.adjustInfiniteScrollPosition(e,o)},dataRemovedBottom:function(e,t,i){var n;s.setScrollDirections(e,t,i),n=e.infiniteScroll.prevScrollTop,s.adjustInfiniteScrollPosition(e,n)}};return s}]),e.directive("uiGridInfiniteScroll",["uiGridInfiniteScrollService",function(e){return{priority:-200,scope:!1,require:"^uiGrid",compile:function(){return{pre:function(t,i,n,r){e.initializeGrid(r.grid,t)},post:function(){}}}}}])}(),function(){"use strict";var e=angular.module("ui.grid.moveColumns",["ui.grid"]);e.service("uiGridMoveColumnService",["$q","$timeout","$log","ScrollEvent","uiGridConstants","gridUtil",function(e,t,i,n,r,o){var s={initializeGrid:function(e){var t=this;this.registerPublicApi(e),this.defaultGridOptions(e.options),e.moveColumns={orderCache:[]},e.registerColumnBuilder(t.movableColumnBuilder),e.registerDataChangeCallback(t.verifyColumnOrder,[r.dataChange.COLUMN])},registerPublicApi:function(e){var t=this,i={events:{colMovable:{columnPositionChanged:function(){}}},methods:{colMovable:{moveColumn:function(i,n){var r=e.columns;if(!angular.isNumber(i)||!angular.isNumber(n))return void o.logError("MoveColumn: Please provide valid values for originalPosition and finalPosition");for(var s=0,a=0;a<r.length;a++)(angular.isDefined(r[a].colDef.visible)&&!1===r[a].colDef.visible||!0===r[a].isRowHeader)&&s++;if(i>=r.length-s||n>=r.length-s)return void o.logError("MoveColumn: Invalid values for originalPosition, finalPosition");var l=function(e){for(var t=e,i=0;i<=t;i++)angular.isDefined(r[i])&&(angular.isDefined(r[i].colDef.visible)&&!1===r[i].colDef.visible||!0===r[i].isRowHeader)&&t++;return t};t.redrawColumnAtPosition(e,l(i),l(n))}}}};e.api.registerEventsFromObject(i.events),e.api.registerMethodsFromObject(i.methods)},defaultGridOptions:function(e){e.enableColumnMoving=!1!==e.enableColumnMoving},movableColumnBuilder:function(t,i,n){var r=[];return t.enableColumnMoving=t.enableColumnMoving===undefined?n.enableColumnMoving:t.enableColumnMoving,e.all(r)},updateColumnCache:function(e){e.moveColumns.orderCache=e.getOnlyDataColumns()},verifyColumnOrder:function(e){var t,i=e.rowHeaderColumns.length;angular.forEach(e.moveColumns.orderCache,function(n,r){if(-1!==(t=e.columns.indexOf(n))&&t-i!==r){var o=e.columns.splice(t,1)[0];e.columns.splice(r+i,0,o)}})},redrawColumnAtPosition:function(e,i,n){var o=e.columns;if(i!==n){var a=i<n?i+1:i-1,l=Math.min(a,n);for(l;l<=Math.max(a,n)&&!o[l].visible;l++);if(!(l>Math.max(a,n))){var c=o[i];if(c.colDef.enableColumnMoving){if(i>n)for(var u=i;u>n;u--)o[u]=o[u-1];else if(n>i)for(var d=i;d<n;d++)o[d]=o[d+1];o[n]=c,s.updateColumnCache(e),e.queueGridRefresh(),t(function(){e.api.core.notifyDataChange(r.dataChange.COLUMN),e.api.colMovable.raise.columnPositionChanged(c.colDef,i,n)})}}}}};return s}]),e.directive("uiGridMoveColumns",["uiGridMoveColumnService",function(e){return{replace:!0,priority:0,require:"^uiGrid",scope:!1,compile:function(){return{pre:function(t,i,n,r){e.initializeGrid(r.grid)},post:function(){}}}}}]),e.directive("uiGridHeaderCell",["$q","gridUtil","uiGridMoveColumnService","$document","$log","uiGridConstants","ScrollEvent",function(e,t,i,n,r,o,s){return{priority:-10,require:"^uiGrid",compile:function(){return{post:function(e,t,r,o){if(e.col.colDef.enableColumnMoving){var a,l,c,u,d,h,p=angular.element(t[0].querySelectorAll(".ui-grid-cell-contents")),g=!1,f=!1,m=function(t){a=e.grid.element[0].getBoundingClientRect().left,e.grid.hasLeftContainer()&&(a+=e.grid.renderContainers.left.header[0].getBoundingClientRect().width),l=t.pageX||(t.originalEvent?t.originalEvent.pageX:0),c=0,u=a+e.grid.getViewportWidth(),"mousedown"===t.type?(n.on("mousemove",v),n.on("mouseup",y)):"touchstart"===t.type&&(n.on("touchmove",v),n.on("touchend",y))},v=function(e){var t=e.pageX||(e.originalEvent?e.originalEvent.pageX:0),i=t-l;0!==i&&(document.onselectstart=function(){return!1},f=!0,g?g&&(A(i),l=t):b())},y=function(){if(document.onselectstart=null,d&&(d.remove(),g=!1),C(),w(),f){for(var t=e.grid.columns,n=0,r=0;r<t.length&&t[r].colDef.name!==e.col.colDef.name;r++)n++;var o;if(c<0){var s,a=0;if(e.grid.isRTL()){for(s=n+1;s<t.length;s++)if((angular.isUndefined(t[s].colDef.visible)||!0===t[s].colDef.visible)&&(a+=t[s].drawnWidth||t[s].width||t[s].colDef.width)>Math.abs(c)){i.redrawColumnAtPosition(e.grid,n,s-1);break}}else for(s=n-1;s>=0;s--)if((angular.isUndefined(t[s].colDef.visible)||!0===t[s].colDef.visible)&&(a+=t[s].drawnWidth||t[s].width||t[s].colDef.width)>Math.abs(c)){i.redrawColumnAtPosition(e.grid,n,s+1);break}a<Math.abs(c)&&(o=0,e.grid.isRTL()&&(o=t.length-1),i.redrawColumnAtPosition(e.grid,n,o))}else if(c>0){var l,u=0;if(e.grid.isRTL()){for(l=n-1;l>0;l--)if((angular.isUndefined(t[l].colDef.visible)||!0===t[l].colDef.visible)&&(u+=t[l].drawnWidth||t[l].width||t[l].colDef.width)>c){i.redrawColumnAtPosition(e.grid,n,l);break}}else for(l=n+1;l<t.length;l++)if((angular.isUndefined(t[l].colDef.visible)||!0===t[l].colDef.visible)&&(u+=t[l].drawnWidth||t[l].width||t[l].colDef.width)>c){i.redrawColumnAtPosition(e.grid,n,l-1);break}u<c&&(o=t.length-1,e.grid.isRTL()&&(o=0),i.redrawColumnAtPosition(e.grid,n,o))}}},w=function(){p.on("touchstart",m),p.on("mousedown",m)},C=function(){p.off("touchstart",m),p.off("mousedown",m),n.off("mousemove",v),n.off("touchmove",v),n.off("mouseup",y),n.off("touchend",y)};w();var b=function(){g=!0,d=t.clone(),t.parent().append(d),d.addClass("movingColumn");var i={};i.left=t[0].offsetLeft+"px";var n=e.grid.element[0].getBoundingClientRect().right,r=t[0].getBoundingClientRect().right;r>n&&(h=e.col.drawnWidth+(n-r),i.width=h+"px"),d.css(i)},A=function(t){for(var i=e.grid.columns,n=0,r=0;r<i.length;r++)(angular.isUndefined(i[r].colDef.visible)||!0===i[r].colDef.visible)&&(n+=i[r].drawnWidth||i[r].width||i[r].colDef.width);var l,p=d[0].getBoundingClientRect().left-1,g=d[0].getBoundingClientRect().right;if(l=p-a+t,l=l<u?l:u,(p>=a||t>0)&&(g<=u||t<0))d.css({visibility:"visible",left:d[0].offsetLeft+(l<u?t:u-p)+"px"});else if(n>Math.ceil(o.grid.gridWidth)){t*=8;var f=new s(e.col.grid,null,null,"uiGridHeaderCell.moveElement");f.x={pixels:t},f.grid.scrollContainers("",f)}for(var m=0,v=0;v<i.length;v++)if(angular.isUndefined(i[v].colDef.visible)||!0===i[v].colDef.visible){if(i[v].colDef.name===e.col.colDef.name)break;m+=i[v].drawnWidth||i[v].width||i[v].colDef.width}e.newScrollLeft===undefined?c+=t:c=e.newScrollLeft+l-m,h<e.col.drawnWidth&&(h+=Math.abs(t),d.css({width:h+"px"}))};e.$on("$destroy",C)}}}}}}])}(),function(){"use strict";var e=angular.module("ui.grid.pagination",["ng","ui.grid"]);e.service("uiGridPaginationService",["gridUtil",function(e){var t={initializeGrid:function(e){t.defaultGridOptions(e.options);var i={events:{pagination:{paginationChanged:function(){}}},methods:{pagination:{getPage:function(){return e.options.enablePagination?e.options.paginationCurrentPage:null},getFirstRowIndex:function(){return e.options.useCustomPagination?e.options.paginationPageSizes.reduce(function(t,i,n){return n<e.options.paginationCurrentPage-1?t+i:t},0):(e.options.paginationCurrentPage-1)*e.options.paginationPageSize},getLastRowIndex:function(){return e.options.useCustomPagination?i.methods.pagination.getFirstRowIndex()+e.options.paginationPageSizes[e.options.paginationCurrentPage-1]-1:Math.min(e.options.paginationCurrentPage*e.options.paginationPageSize,e.options.totalItems)-1},getTotalPages:function(){return e.options.enablePagination?e.options.useCustomPagination?e.options.paginationPageSizes.length:0===e.options.totalItems?1:Math.ceil(e.options.totalItems/e.options.paginationPageSize):null},nextPage:function(){e.options.enablePagination&&(e.options.totalItems>0?e.options.paginationCurrentPage=Math.min(e.options.paginationCurrentPage+1,i.methods.pagination.getTotalPages()):e.options.paginationCurrentPage++)},previousPage:function(){e.options.enablePagination&&(e.options.paginationCurrentPage=Math.max(e.options.paginationCurrentPage-1,1))},seek:function(t){if(e.options.enablePagination){if(!angular.isNumber(t)||t<1)throw"Invalid page number: "+t;e.options.paginationCurrentPage=Math.min(t,i.methods.pagination.getTotalPages())}}}}};e.api.registerEventsFromObject(i.events),e.api.registerMethodsFromObject(i.methods);var n=function(t){if(e.options.useExternalPagination||!e.options.enablePagination)return t;var n=parseInt(e.options.paginationPageSize,10),r=parseInt(e.options.paginationCurrentPage,10),o=t.filter(function(e){return e.visible});e.options.totalItems=o.length;var s=i.methods.pagination.getFirstRowIndex(),a=i.methods.pagination.getLastRowIndex();return s>o.length&&(r=e.options.paginationCurrentPage=1,s=(r-1)*n),o.slice(s,a+1)};e.registerRowsProcessor(n,900)},defaultGridOptions:function(t){t.enablePagination=!1!==t.enablePagination,t.enablePaginationControls=!1!==t.enablePaginationControls,t.useExternalPagination=!0===t.useExternalPagination,t.useCustomPagination=!0===t.useCustomPagination,e.isNullOrUndefined(t.totalItems)&&(t.totalItems=0),e.isNullOrUndefined(t.paginationPageSizes)&&(t.paginationPageSizes=[250,500,1e3]),e.isNullOrUndefined(t.paginationPageSize)&&(t.paginationPageSizes.length>0?t.paginationPageSize=t.paginationPageSizes[0]:t.paginationPageSize=0),e.isNullOrUndefined(t.paginationCurrentPage)&&(t.paginationCurrentPage=1),e.isNullOrUndefined(t.paginationTemplate)&&(t.paginationTemplate="ui-grid/pagination")},onPaginationChanged:function(e,t,i){e.api.pagination.raise.paginationChanged(t,i),e.options.useExternalPagination||e.queueGridRefresh()}};return t}]),e.directive("uiGridPagination",["gridUtil","uiGridPaginationService",function(e,t){return{priority:-200,scope:!1,require:"uiGrid",link:{pre:function(i,n,r,o){t.initializeGrid(o.grid),e.getTemplate(o.grid.options.paginationTemplate).then(function(e){var t=angular.element(e);n.append(t),o.innerCompile(t)})}}}}]),e.directive("uiGridPager",["uiGridPaginationService","uiGridConstants","gridUtil","i18nService",function(e,t,i,n){return{priority:-200,scope:!0,require:"^uiGrid",link:function(r,o,s,a){var l=".ui-grid-pager-control-input";r.aria=n.getSafeText("pagination.aria"),r.paginationApi=a.grid.api.pagination,r.sizesLabel=n.getSafeText("pagination.sizes"),r.totalItemsLabel=n.getSafeText("pagination.totalItems"),r.paginationOf=n.getSafeText("pagination.of"),r.paginationThrough=n.getSafeText("pagination.through");var c=a.grid.options;a.grid.renderContainers.body.registerViewportAdjuster(function(e){return e.height=e.height-i.elementHeight(o,"padding"),e});var u=a.grid.registerDataChangeCallback(function(e){e.options.useExternalPagination||(e.options.totalItems=e.rows.length)},[t.dataChange.ROW]);r.$on("$destroy",u);var d=r.$watch("grid.options.paginationCurrentPage + grid.options.paginationPageSize",function(t,i){if(t!==i&&i!==undefined)return!angular.isNumber(c.paginationCurrentPage)||c.paginationCurrentPage<1?void(c.paginationCurrentPage=1):c.totalItems>0&&c.paginationCurrentPage>r.paginationApi.getTotalPages()?void(c.paginationCurrentPage=r.paginationApi.getTotalPages()):void e.onPaginationChanged(r.grid,c.paginationCurrentPage,c.paginationPageSize)});r.$on("$destroy",function(){d()}),r.cantPageForward=function(){return r.paginationApi.getTotalPages()?r.cantPageToLast():c.data.length<1},r.cantPageToLast=function(){var e=r.paginationApi.getTotalPages();return!e||c.paginationCurrentPage>=e},r.cantPageBackward=function(){return c.paginationCurrentPage<=1};var h=function(e){e&&i.focus.bySelector(o,l)};r.pageFirstPageClick=function(){r.paginationApi.seek(1),h(r.cantPageBackward())},r.pagePreviousPageClick=function(){r.paginationApi.previousPage(),h(r.cantPageBackward())},r.pageNextPageClick=function(){r.paginationApi.nextPage(),h(r.cantPageForward())},r.pageLastPageClick=function(){r.paginationApi.seek(r.paginationApi.getTotalPages()),h(r.cantPageToLast())}}}}])}(),function(){"use strict";var e=angular.module("ui.grid.pinning",["ui.grid"]);e.constant("uiGridPinningConstants",{container:{LEFT:"left",RIGHT:"right",NONE:""}}),e.service("uiGridPinningService",["gridUtil","GridRenderContainer","i18nService","uiGridPinningConstants",function(e,t,i,n){var r={initializeGrid:function(e){r.defaultGridOptions(e.options),e.registerColumnBuilder(r.pinningColumnBuilder);var t={events:{pinning:{columnPinned:function(){}}},methods:{pinning:{pinColumn:function(t,i){r.pinColumn(e,t,i)}}}};e.api.registerEventsFromObject(t.events),e.api.registerMethodsFromObject(t.methods)},defaultGridOptions:function(e){e.enablePinning=!1!==e.enablePinning},pinningColumnBuilder:function(t,o,s){if(t.enablePinning=t.enablePinning===undefined?s.enablePinning:t.enablePinning,t.pinnedLeft?(o.renderContainer="left",o.grid.createLeftContainer()):t.pinnedRight&&(o.renderContainer="right",o.grid.createRightContainer()),t.enablePinning){var a={name:"ui.grid.pinning.pinLeft",title:i.get().pinning.pinLeft,icon:"ui-grid-icon-left-open",shown:function(){return"undefined"==typeof this.context.col.renderContainer||!this.context.col.renderContainer||"left"!==this.context.col.renderContainer},action:function(){r.pinColumn(this.context.col.grid,this.context.col,n.container.LEFT)}},l={name:"ui.grid.pinning.pinRight",title:i.get().pinning.pinRight,icon:"ui-grid-icon-right-open",shown:function(){return"undefined"==typeof this.context.col.renderContainer||!this.context.col.renderContainer||"right"!==this.context.col.renderContainer},action:function(){r.pinColumn(this.context.col.grid,this.context.col,n.container.RIGHT)}},c={name:"ui.grid.pinning.unpin",title:i.get().pinning.unpin,icon:"ui-grid-icon-cancel",shown:function(){return"undefined"!=typeof this.context.col.renderContainer&&null!==this.context.col.renderContainer&&"body"!==this.context.col.renderContainer},action:function(){r.pinColumn(this.context.col.grid,this.context.col,n.container.NONE)}};e.arrayContainsObjectWithProperty(o.menuItems,"name","ui.grid.pinning.pinLeft")||o.menuItems.push(a),e.arrayContainsObjectWithProperty(o.menuItems,"name","ui.grid.pinning.pinRight")||o.menuItems.push(l),e.arrayContainsObjectWithProperty(o.menuItems,"name","ui.grid.pinning.unpin")||o.menuItems.push(c)}},pinColumn:function(e,t,i){i===n.container.NONE?(t.renderContainer=null,t.colDef.pinnedLeft=t.colDef.pinnedRight=!1):(t.renderContainer=i,i===n.container.LEFT?e.createLeftContainer():i===n.container.RIGHT&&e.createRightContainer()),e.refresh().then(function(){e.api.pinning.raise.columnPinned(t.colDef,i)})}};return r}]),e.directive("uiGridPinning",["gridUtil","uiGridPinningService",function(e,t){return{require:"uiGrid",scope:!1,compile:function(){return{pre:function(e,i,n,r){t.initializeGrid(r.grid)},post:function(){}}}}}])}(),function(){"use strict";var e=angular.module("ui.grid.resizeColumns",["ui.grid"]);e.service("uiGridResizeColumnsService",["gridUtil","$q","$timeout",function(e,t,i){return{defaultGridOptions:function(e){e.enableColumnResizing=!1!==e.enableColumnResizing,!1===e.enableColumnResize&&(e.enableColumnResizing=!1)},colResizerColumnBuilder:function(e,i,n){var r=[];return e.enableColumnResizing=e.enableColumnResizing===undefined?n.enableColumnResizing:e.enableColumnResizing,!1===e.enableColumnResize&&(e.enableColumnResizing=!1),t.all(r)},registerPublicApi:function(e){var t={events:{colResizable:{columnSizeChanged:function(){}}}};e.api.registerEventsFromObject(t.events)},fireColumnSizeChanged:function(t,n,r){i(function(){t.api.colResizable?t.api.colResizable.raise.columnSizeChanged(n,r):e.logError("The resizeable api is not registered, this may indicate that you've included the module but not added the 'ui-grid-resize-columns' directive to your grid definition.  Cannot raise any events.")})},findTargetCol:function(e,t,i){var n=e.getRenderContainer();if("left"===t){var r=n.visibleColumnCache.indexOf(e);return n.visibleColumnCache[r-1*i]}return e}}}]),e.directive("uiGridResizeColumns",["gridUtil","uiGridResizeColumnsService",function(e,t){return{replace:!0,priority:0,require:"^uiGrid",scope:!1,compile:function(){return{pre:function(e,i,n,r){t.defaultGridOptions(r.grid.options),r.grid.registerColumnBuilder(t.colResizerColumnBuilder),t.registerPublicApi(r.grid)},post:function(){}}}}}]),e.directive("uiGridHeaderCell",["gridUtil","$templateCache","$compile","$q","uiGridResizeColumnsService","uiGridConstants","$timeout",function(e,t,i,n,r,o,s){return{priority:-10,require:"^uiGrid",compile:function(){return{post:function(e,n,a,l){var c=l.grid;if(c.options.enableColumnResizing){var u=t.get("ui-grid/columnResizer"),d=1;c.isRTL()&&(e.position="left",d=-1);var h=function(){for(var t=n[0].getElementsByClassName("ui-grid-column-resizer"),o=0;o<t.length;o++)angular.element(t[o]).remove();var s=r.findTargetCol(e.col,"left",d),a=e.col.getRenderContainer();if(s&&0!==a.visibleColumnCache.indexOf(e.col)&&!1!==s.colDef.enableColumnResizing){var l=angular.element(u).clone();l.attr("position","left"),n.prepend(l),i(l)(e)}if(!1!==e.col.colDef.enableColumnResizing){var c=angular.element(u).clone();c.attr("position","right"),n.append(c),i(c)(e)}};h();var p=function(){s(h)},g=c.registerDataChangeCallback(p,[o.dataChange.COLUMN]);e.$on("$destroy",g)}}}}}}]),e.directive("uiGridColumnResizer",["$document","gridUtil","uiGridConstants","uiGridResizeColumnsService",function(e,t,i,n){var r=angular.element('<div class="ui-grid-resize-overlay"></div>');return{priority:0,scope:{col:"=",position:"@",renderIndex:"="},require:"?^uiGrid",link:function(o,s,a,l){function c(){l.grid.refreshCanvas(!0).then(function(){l.grid.queueGridRefresh()})}function u(e,t){var i=t;return e.minWidth&&i<e.minWidth?i=e.minWidth:e.maxWidth&&i>e.maxWidth&&(i=e.maxWidth),i}function d(e){e.originalEvent&&(e=e.originalEvent),e.preventDefault(),g=(e.targetTouches?e.targetTouches[0]:e).clientX-f,g<0?g=0:g>l.grid.gridWidth&&(g=l.grid.gridWidth);var t=n.findTargetCol(o.col,o.position,m);if(!1!==t.colDef.enableColumnResizing){l.grid.element.hasClass("column-resizing")||l.grid.element.addClass("column-resizing");var s=g-p,a=parseInt(t.drawnWidth+s*m,10);g+=(u(t,a)-a)*m,r.css({left:g+"px"}),l.fireEvent(i.events.ITEM_DRAGGING)}}function h(e){e.originalEvent&&(e=e.originalEvent),e.preventDefault(),l.grid.element.removeClass("column-resizing"),r.remove(),g=(e.changedTouches?e.changedTouches[0]:e).clientX-f;var t=g-p;if(0===t)return w(),void y();var i=n.findTargetCol(o.col,o.position,m);if(!1!==i.colDef.enableColumnResizing){var s=parseInt(i.drawnWidth+t*m,10);i.width=u(i,s),i.hasCustomWidth=!0,c(t),n.fireColumnSizeChanged(l.grid,i.colDef,t),w(),y()}}var p=0,g=0,f=0,m=1;l.grid.isRTL()&&(o.position="left",m=-1),"left"===o.position?s.addClass("left"):"right"===o.position&&s.addClass("right");var v=function(t){t.originalEvent&&(t=t.originalEvent),t.stopPropagation(),f=l.grid.element[0].getBoundingClientRect().left,p=(t.targetTouches?t.targetTouches[0]:t).clientX-f,l.grid.element.append(r),r.css({left:p}),"touchstart"===t.type?(e.on("touchend",h),e.on("touchmove",d),s.off("mousedown",v)):(e.on("mouseup",h),e.on("mousemove",d),s.off("touchstart",v))},y=function(){s.on("mousedown",v),s.on("touchstart",v)},w=function(){e.off("mouseup",h),e.off("touchend",h),e.off("mousemove",d),e.off("touchmove",d),s.off("mousedown",v),s.off("touchstart",v)};y();var C=function(e){e.stopPropagation();var r=n.findTargetCol(o.col,o.position,m);if(!1!==r.colDef.enableColumnResizing){var a=0,d=0,h=t.closestElm(s,".ui-grid-render-container"),p=h.querySelectorAll("."+i.COL_CLASS_PREFIX+r.uid+" .ui-grid-cell-contents");Array.prototype.forEach.call(p,function(e){var i;angular.element(e).parent().hasClass("ui-grid-header-cell")&&(i=angular.element(e).parent()[0].querySelectorAll(".ui-grid-column-menu-button")),t.fakeElement(e,{},function(e){var n=angular.element(e);n.attr("style","float: left");var r=t.elementWidth(n);if(i){r+=t.elementWidth(i)}r>a&&(a=r,d=a-r)})}),r.width=u(r,a),r.hasCustomWidth=!0,c(d),n.fireColumnSizeChanged(l.grid,r.colDef,d)}};s.on("dblclick",C),s.on("$destroy",function(){s.off("dblclick",C),w()})}}}])}(),function(){"use strict";var e=angular.module("ui.grid.rowEdit",["ui.grid","ui.grid.edit","ui.grid.cellNav"]);e.constant("uiGridRowEditConstants",{}),e.service("uiGridRowEditService",["$interval","$q","uiGridConstants","uiGridRowEditConstants","gridUtil",function(e,t,i,n,r){var o={initializeGrid:function(e,t){t.rowEdit={};var i={events:{rowEdit:{saveRow:function(){}}},methods:{rowEdit:{setSavePromise:function(e,i){o.setSavePromise(t,e,i)},getDirtyRows:function(){return t.rowEdit.dirtyRows?t.rowEdit.dirtyRows:[]},getErrorRows:function(){return t.rowEdit.errorRows?t.rowEdit.errorRows:[]},flushDirtyRows:function(){return o.flushDirtyRows(t)},setRowsDirty:function(e){o.setRowsDirty(t,e)},setRowsClean:function(e){o.setRowsClean(t,e)}}}};t.api.registerEventsFromObject(i.events),t.api.registerMethodsFromObject(i.methods),t.api.core.on.renderingComplete(e,function(){t.api.edit.on.afterCellEdit(e,o.endEditCell),t.api.edit.on.beginCellEdit(e,o.beginEditCell),t.api.edit.on.cancelCellEdit(e,o.cancelEditCell),t.api.cellNav&&t.api.cellNav.on.navigate(e,o.navigate)})},defaultGridOptions:function(){},saveRow:function(e,t){var i=this;return function(){if(t.isSaving=!0,t.rowEditSavePromise)return t.rowEditSavePromise;var n=e.api.rowEdit.raise.saveRow(t.entity);return t.rowEditSavePromise?t.rowEditSavePromise.then(i.processSuccessPromise(e,t),i.processErrorPromise(e,t)):r.logError("A promise was not returned when saveRow event was raised, either nobody is listening to event, or event handler did not return a promise"),n}},setSavePromise:function(e,t,i){e.getRow(t).rowEditSavePromise=i},processSuccessPromise:function(e,t){var i=this;return function(){delete t.isSaving,delete t.isDirty,delete t.isError,delete t.rowEditSaveTimer,delete t.rowEditSavePromise,i.removeRow(e.rowEdit.errorRows,t),i.removeRow(e.rowEdit.dirtyRows,t)}},processErrorPromise:function(e,t){return function(){delete t.isSaving,delete t.rowEditSaveTimer,delete t.rowEditSavePromise,t.isError=!0,
e.rowEdit.errorRows||(e.rowEdit.errorRows=[]),o.isRowPresent(e.rowEdit.errorRows,t)||e.rowEdit.errorRows.push(t)}},removeRow:function(e,t){void 0!==e&&null!==e&&e.forEach(function(i,n){i.uid===t.uid&&e.splice(n,1)})},isRowPresent:function(e,t){var i=!1;return e.forEach(function(e){e.uid===t.uid&&(i=!0)}),i},flushDirtyRows:function(e){var i=[];return e.api.rowEdit.getDirtyRows().forEach(function(t){o.saveRow(e,t)(),i.push(t.rowEditSavePromise)}),t.all(i)},endEditCell:function(e,t,i,n){var s=this.grid,a=s.getRow(e);if(!a)return void r.logError("Unable to find rowEntity in grid data, dirty flag cannot be set");(i!==n||a.isDirty)&&(s.rowEdit.dirtyRows||(s.rowEdit.dirtyRows=[]),a.isDirty||(a.isDirty=!0,s.rowEdit.dirtyRows.push(a)),delete a.isError,o.considerSetTimer(s,a))},beginEditCell:function(e){var t=this.grid,i=t.getRow(e);if(!i)return void r.logError("Unable to find rowEntity in grid data, timer cannot be cancelled");o.cancelTimer(t,i)},cancelEditCell:function(e){var t=this.grid,i=t.getRow(e);if(!i)return void r.logError("Unable to find rowEntity in grid data, timer cannot be set");o.considerSetTimer(t,i)},navigate:function(e,t){var i=this.grid;e.row.rowEditSaveTimer&&o.cancelTimer(i,e.row),t&&t.row&&t.row!==e.row&&o.considerSetTimer(i,t.row)},considerSetTimer:function(t,i){if(o.cancelTimer(t,i),i.isDirty&&!i.isSaving&&-1!==t.options.rowEditWaitInterval){var n=t.options.rowEditWaitInterval?t.options.rowEditWaitInterval:2e3;i.rowEditSaveTimer=e(o.saveRow(t,i),n,1)}},cancelTimer:function(t,i){i.rowEditSaveTimer&&!i.isSaving&&(e.cancel(i.rowEditSaveTimer),delete i.rowEditSaveTimer)},setRowsDirty:function(e,t){var i;t.forEach(function(t){i=e.getRow(t),i?(e.rowEdit.dirtyRows||(e.rowEdit.dirtyRows=[]),i.isDirty||(i.isDirty=!0,e.rowEdit.dirtyRows.push(i)),delete i.isError,o.considerSetTimer(e,i)):r.logError("requested row not found in rowEdit.setRowsDirty, row was: "+t)})},setRowsClean:function(e,t){var i;t.forEach(function(t){i=e.getRow(t),i?(delete i.isDirty,o.removeRow(e.rowEdit.dirtyRows,i),o.cancelTimer(e,i),delete i.isError,o.removeRow(e.rowEdit.errorRows,i)):r.logError("requested row not found in rowEdit.setRowsClean, row was: "+t)})}};return o}]),e.directive("uiGridRowEdit",["gridUtil","uiGridRowEditService","uiGridEditConstants",function(e,t){return{replace:!0,priority:0,require:"^uiGrid",scope:!1,compile:function(){return{pre:function(e,i,n,r){t.initializeGrid(e,r.grid)},post:function(){}}}}}]),e.directive("uiGridViewport",["$compile","uiGridConstants","gridUtil","$parse",function(){return{priority:-200,scope:!1,compile:function(e){var t=angular.element(e.children().children()[0]),i=t.attr("ng-class"),n="";return n=i?i.slice(0,-1)+", 'ui-grid-row-dirty': row.isDirty, 'ui-grid-row-saving': row.isSaving, 'ui-grid-row-error': row.isError}":"{'ui-grid-row-dirty': row.isDirty, 'ui-grid-row-saving': row.isSaving, 'ui-grid-row-error': row.isError}",t.attr("ng-class",n),{pre:function(){},post:function(){}}}}}])}(),function(){"use strict";var e=angular.module("ui.grid.saveState",["ui.grid","ui.grid.selection","ui.grid.cellNav","ui.grid.grouping","ui.grid.pinning","ui.grid.treeView"]);e.constant("uiGridSaveStateConstants",{featureName:"saveState"}),e.service("uiGridSaveStateService",["$q","uiGridSaveStateConstants","gridUtil","$compile","$interval","uiGridConstants",function(){var e={initializeGrid:function(t){t.saveState={},this.defaultGridOptions(t.options);var i={events:{saveState:{}},methods:{saveState:{save:function(){return e.save(t)},restore:function(i,n){e.restore(t,i,n)}}}};t.api.registerEventsFromObject(i.events),t.api.registerMethodsFromObject(i.methods)},defaultGridOptions:function(e){e.saveWidths=!1!==e.saveWidths,e.saveOrder=!1!==e.saveOrder,e.saveScroll=!0===e.saveScroll,e.saveFocus=!0!==e.saveScroll&&!1!==e.saveFocus,e.saveVisible=!1!==e.saveVisible,e.saveSort=!1!==e.saveSort,e.saveFilter=!1!==e.saveFilter,e.saveSelection=!1!==e.saveSelection,e.saveGrouping=!1!==e.saveGrouping,e.saveGroupingExpandedStates=!0===e.saveGroupingExpandedStates,e.savePinning=!1!==e.savePinning,e.saveTreeView=!1!==e.saveTreeView},save:function(t){var i={};return i.columns=e.saveColumns(t),i.scrollFocus=e.saveScrollFocus(t),i.selection=e.saveSelection(t),i.grouping=e.saveGrouping(t),i.treeView=e.saveTreeView(t),i.pagination=e.savePagination(t),i},restore:function(t,i,n){n.columns&&e.restoreColumns(t,n.columns),n.scrollFocus&&e.restoreScrollFocus(t,i,n.scrollFocus),n.selection&&e.restoreSelection(t,n.selection),n.grouping&&e.restoreGrouping(t,n.grouping),n.treeView&&e.restoreTreeView(t,n.treeView),n.pagination&&e.restorePagination(t,n.pagination),t.refresh()},saveColumns:function(e){var t=[];return e.getOnlyDataColumns().forEach(function(i){var n={};n.name=i.name,e.options.saveVisible&&(n.visible=i.visible),e.options.saveWidths&&(n.width=i.width),e.options.saveSort&&(n.sort=angular.copy(i.sort)),e.options.saveFilter&&(n.filters=[],i.filters.forEach(function(e){var t={};angular.forEach(e,function(e,i){"condition"!==i&&"$$hashKey"!==i&&"placeholder"!==i&&(t[i]=e)}),n.filters.push(t)})),e.api.pinning&&e.options.savePinning&&(n.pinned=i.renderContainer?i.renderContainer:""),t.push(n)}),t},saveScrollFocus:function(t){if(!t.api.cellNav)return{};var i={};if(t.options.saveFocus){i.focus=!0;var n=t.api.cellNav.getFocusedCell();null!==n&&(null!==n.col&&(i.colName=n.col.colDef.name),null!==n.row&&(i.rowVal=e.getRowVal(t,n.row)))}return(t.options.saveScroll||t.options.saveFocus&&!i.colName&&!i.rowVal)&&(i.focus=!1,t.renderContainers.body.prevRowScrollIndex&&(i.rowVal=e.getRowVal(t,t.renderContainers.body.visibleRowCache[t.renderContainers.body.prevRowScrollIndex])),t.renderContainers.body.prevColScrollIndex&&(i.colName=t.renderContainers.body.visibleColumnCache[t.renderContainers.body.prevColScrollIndex].name)),i},saveSelection:function(t){return t.api.selection&&t.options.saveSelection?t.api.selection.getSelectedGridRows().map(function(i){return e.getRowVal(t,i)}):[]},saveGrouping:function(e){return e.api.grouping&&e.options.saveGrouping?e.api.grouping.getGrouping(e.options.saveGroupingExpandedStates):{}},savePagination:function(e){return e.api.pagination&&e.options.paginationPageSize?{paginationCurrentPage:e.options.paginationCurrentPage,paginationPageSize:e.options.paginationPageSize}:{}},saveTreeView:function(e){return e.api.treeView&&e.options.saveTreeView?e.api.treeView.getTreeView():{}},getRowVal:function(e,t){if(!t)return null;var i={};return e.options.saveRowIdentity?(i.identity=!0,i.row=e.options.saveRowIdentity(t.entity)):(i.identity=!1,i.row=e.renderContainers.body.visibleRowCache.indexOf(t)),i},restoreColumns:function(e,t){var i=!1;t.forEach(function(t,n){var r=e.getColumn(t.name);if(r&&!e.isRowHeaderColumn(r)){!e.options.saveVisible||r.visible===t.visible&&r.colDef.visible===t.visible||(r.visible=t.visible,r.colDef.visible=t.visible,e.api.core.raise.columnVisibilityChanged(r)),e.options.saveWidths&&r.width!==t.width&&(r.width=t.width,r.hasCustomWidth=!0),!e.options.saveSort||angular.equals(r.sort,t.sort)||r.sort===undefined&&angular.isEmpty(t.sort)||(r.sort=angular.copy(t.sort),i=!0),e.options.saveFilter&&!angular.equals(r.filters,t.filters)&&(t.filters.forEach(function(e,t){angular.extend(r.filters[t],e),"undefined"!=typeof e.term&&null!==e.term||delete r.filters[t].term}),e.api.core.raise.filterChanged()),e.api.pinning&&e.options.savePinning&&r.renderContainer!==t.pinned&&e.api.pinning.pinColumn(r,t.pinned);var o=e.getOnlyDataColumns().indexOf(r);if(-1!==o&&e.options.saveOrder&&o!==n){var s=e.columns.splice(o+e.rowHeaderColumns.length,1)[0];e.columns.splice(n+e.rowHeaderColumns.length,0,s)}}}),i&&e.api.core.raise.sortChanged(e,e.getColumnSorting())},restoreScrollFocus:function(t,i,n){if(t.api.cellNav){var r,o;if(n.colName){var s=t.options.columnDefs.filter(function(e){return e.name===n.colName});s.length>0&&(r=s[0])}n.rowVal&&n.rowVal.row&&(o=n.rowVal.identity?e.findRowByIdentity(t,n.rowVal):t.renderContainers.body.visibleRowCache[n.rowVal.row]);var a=o&&o.entity?o.entity:null;(r||a)&&(n.focus?t.api.cellNav.scrollToFocus(a,r):t.scrollTo(a,r))}},restoreSelection:function(t,i){t.api.selection&&(t.api.selection.clearSelectedRows(),i.forEach(function(i){if(i.identity){var n=e.findRowByIdentity(t,i);n&&t.api.selection.selectRow(n.entity)}else t.api.selection.selectRowByVisibleIndex(i.row)}))},restoreGrouping:function(e,t){e.api.grouping&&void 0!==t&&null!==t&&!angular.equals(t,{})&&e.api.grouping.setGrouping(t)},restoreTreeView:function(e,t){e.api.treeView&&void 0!==t&&null!==t&&!angular.equals(t,{})&&e.api.treeView.setTreeView(t)},restorePagination:function(e,t){e.api.pagination&&e.options.paginationPageSize&&(e.options.paginationCurrentPage=t.paginationCurrentPage,e.options.paginationPageSize=t.paginationPageSize)},findRowByIdentity:function(e,t){if(!e.options.saveRowIdentity)return null;var i=e.rows.filter(function(i){return e.options.saveRowIdentity(i.entity)===t.row});return i.length>0?i[0]:null}};return e}]),e.directive("uiGridSaveState",["uiGridSaveStateConstants","uiGridSaveStateService","gridUtil","$compile",function(e,t){return{replace:!0,priority:0,require:"^uiGrid",scope:!1,link:function(e,i,n,r){t.initializeGrid(r.grid)}}}])}(),function(){"use strict";var e=angular.module("ui.grid.selection",["ui.grid"]);e.constant("uiGridSelectionConstants",{featureName:"selection",selectionRowHeaderColName:"selectionRowHeaderCol"}),angular.module("ui.grid").config(["$provide",function(e){e.decorator("GridRow",["$delegate",function(e){return e.prototype.setSelected=function(e){e!==this.isSelected&&(this.isSelected=e,this.grid.selection.selectedCount+=e?1:-1)},e}])}]),e.service("uiGridSelectionService",["$q","$templateCache","uiGridSelectionConstants","gridUtil",function(){var e={initializeGrid:function(t){t.selection={},t.selection.lastSelectedRow=null,t.selection.selectAll=!1,t.selection.selectedCount=0,e.defaultGridOptions(t.options);var i={events:{selection:{rowSelectionChanged:function(){},rowSelectionChangedBatch:function(){}}},methods:{selection:{toggleRowSelection:function(i,n){var r=t.getRow(i);null!==r&&e.toggleRowSelection(t,r,n,t.options.multiSelect,t.options.noUnselect)},selectRow:function(i,n){var r=t.getRow(i);null===r||r.isSelected||e.toggleRowSelection(t,r,n,t.options.multiSelect,t.options.noUnselect)},selectRowByVisibleIndex:function(i,n){var r=t.renderContainers.body.visibleRowCache[i];null===r||void 0===r||r.isSelected||e.toggleRowSelection(t,r,n,t.options.multiSelect,t.options.noUnselect)},unSelectRow:function(i,n){var r=t.getRow(i);null!==r&&r.isSelected&&e.toggleRowSelection(t,r,n,t.options.multiSelect,t.options.noUnselect)},selectAllRows:function(i){if(!1!==t.options.multiSelect){var n=[];t.rows.forEach(function(r){r.isSelected||!1===r.enableSelection||(r.setSelected(!0),e.decideRaiseSelectionEvent(t,r,n,i))}),e.decideRaiseSelectionBatchEvent(t,n,i),t.selection.selectAll=!0}},selectAllVisibleRows:function(i){if(!1!==t.options.multiSelect){var n=[];t.rows.forEach(function(r){r.visible?r.isSelected||!1===r.enableSelection||(r.setSelected(!0),e.decideRaiseSelectionEvent(t,r,n,i)):r.isSelected&&(r.setSelected(!1),e.decideRaiseSelectionEvent(t,r,n,i))}),e.decideRaiseSelectionBatchEvent(t,n,i),t.selection.selectAll=!0}},clearSelectedRows:function(i){e.clearSelectedRows(t,i)},getSelectedRows:function(){return e.getSelectedRows(t).map(function(e){return e.entity})},getSelectedGridRows:function(){return e.getSelectedRows(t)},getSelectedCount:function(){return t.selection.selectedCount},setMultiSelect:function(e){t.options.multiSelect=e},setModifierKeysToMultiSelect:function(e){t.options.modifierKeysToMultiSelect=e},getSelectAllState:function(){return t.selection.selectAll}}}};t.api.registerEventsFromObject(i.events),t.api.registerMethodsFromObject(i.methods)},defaultGridOptions:function(e){e.enableRowSelection=!1!==e.enableRowSelection,e.multiSelect=!1!==e.multiSelect,e.noUnselect=!0===e.noUnselect,e.modifierKeysToMultiSelect=!0===e.modifierKeysToMultiSelect,e.enableRowHeaderSelection=!1!==e.enableRowHeaderSelection,"undefined"==typeof e.enableFullRowSelection&&(e.enableFullRowSelection=!e.enableRowHeaderSelection),e.enableSelectAll=!1!==e.enableSelectAll,e.enableSelectionBatchEvent=!1!==e.enableSelectionBatchEvent,e.selectionRowHeaderWidth=angular.isDefined(e.selectionRowHeaderWidth)?e.selectionRowHeaderWidth:30,e.enableFooterTotalSelected=!1!==e.enableFooterTotalSelected,e.isRowSelectable=angular.isDefined(e.isRowSelectable)?e.isRowSelectable:angular.noop},toggleRowSelection:function(t,i,n,r,o){var s=i.isSelected;if(!1!==i.enableSelection||s){var a;r||s?!r&&s&&(a=e.getSelectedRows(t),a.length>1&&(s=!1,e.clearSelectedRows(t,n))):e.clearSelectedRows(t,n),s&&o||(i.setSelected(!s),!0===i.isSelected&&(t.selection.lastSelectedRow=i),a=e.getSelectedRows(t),t.selection.selectAll=t.rows.length===a.length,t.api.selection.raise.rowSelectionChanged(i,n))}},shiftSelect:function(t,i,n,r){if(r){var o=e.getSelectedRows(t),s=o.length>0?t.renderContainers.body.visibleRowCache.indexOf(t.selection.lastSelectedRow):0,a=t.renderContainers.body.visibleRowCache.indexOf(i);if(s>a){var l=s;s=a,a=l}for(var c=[],u=s;u<=a;u++){var d=t.renderContainers.body.visibleRowCache[u];d&&(d.isSelected||!1===d.enableSelection||(d.setSelected(!0),t.selection.lastSelectedRow=d,e.decideRaiseSelectionEvent(t,d,c,n)))}e.decideRaiseSelectionBatchEvent(t,c,n)}},getSelectedRows:function(e){return e.rows.filter(function(e){return e.isSelected})},clearSelectedRows:function(t,i){var n=[];e.getSelectedRows(t).forEach(function(r){r.isSelected&&(r.setSelected(!1),e.decideRaiseSelectionEvent(t,r,n,i))}),e.decideRaiseSelectionBatchEvent(t,n,i),t.selection.selectAll=!1,t.selection.selectedCount=0},decideRaiseSelectionEvent:function(e,t,i,n){e.options.enableSelectionBatchEvent?i.push(t):e.api.selection.raise.rowSelectionChanged(t,n)},decideRaiseSelectionBatchEvent:function(e,t,i){t.length>0&&e.api.selection.raise.rowSelectionChangedBatch(t,i)}};return e}]),e.directive("uiGridSelection",["uiGridSelectionConstants","uiGridSelectionService","$templateCache","uiGridConstants",function(e,t,i,n){return{replace:!0,priority:0,require:"^uiGrid",scope:!1,compile:function(){return{pre:function(i,r,o,s){if(t.initializeGrid(s.grid),s.grid.options.enableRowHeaderSelection){var a={name:e.selectionRowHeaderColName,displayName:"",width:s.grid.options.selectionRowHeaderWidth,minWidth:10,cellTemplate:"ui-grid/selectionRowHeader",headerCellTemplate:"ui-grid/selectionHeaderCell",enableColumnResizing:!1,enableColumnMenu:!1,exporterSuppressExport:!0,allowCellFocus:!0};s.grid.addRowHeaderColumn(a,0)}var l=!1,c=function(e){return e.forEach(function(e){e.enableSelection=s.grid.options.isRowSelectable(e)}),e},u=function(){s.grid.options.isRowSelectable!==angular.noop&&!0!==l&&(s.grid.registerRowsProcessor(c,500),l=!0)};u();var d=s.grid.registerDataChangeCallback(u,[n.dataChange.OPTIONS]);i.$on("$destroy",d)},post:function(){}}}}}]),e.directive("uiGridSelectionRowHeaderButtons",["$templateCache","uiGridSelectionService","gridUtil",function(e,t,i){return{replace:!0,restrict:"E",template:e.get("ui-grid/selectionRowHeaderButtons"),scope:!0,require:"^uiGrid",link:function(e,n,r,o){function s(e,i){i.stopPropagation(),i.shiftKey?t.shiftSelect(l,e,i,l.options.multiSelect):i.ctrlKey||i.metaKey?t.toggleRowSelection(l,e,i,l.options.multiSelect,l.options.noUnselect):t.toggleRowSelection(l,e,i,l.options.multiSelect&&!l.options.modifierKeysToMultiSelect,l.options.noUnselect)}function a(e){(e.ctrlKey||e.shiftKey)&&(e.target.onselectstart=function(){return!1},window.setTimeout(function(){e.target.onselectstart=null},0))}var l=o.grid;e.selectButtonClick=s,"ie"===i.detectBrowser()&&n.on("mousedown",a),e.$on("$destroy",function(){n.off()})}}}]),e.directive("uiGridSelectionSelectAllButtons",["$templateCache","uiGridSelectionService",function(e,t){return{replace:!0,restrict:"E",template:e.get("ui-grid/selectionSelectAllButtons"),scope:!1,link:function(e){var i=e.col.grid;e.headerButtonClick=function(e,n){i.selection.selectAll?(t.clearSelectedRows(i,n),i.options.noUnselect&&i.api.selection.selectRowByVisibleIndex(0,n),i.selection.selectAll=!1):i.options.multiSelect&&(i.api.selection.selectAllVisibleRows(n),i.selection.selectAll=!0)}}}}]),e.directive("uiGridViewport",["$compile","uiGridConstants","uiGridSelectionConstants","gridUtil","$parse","uiGridSelectionService",function(){return{priority:-200,scope:!1,compile:function(e){var t=angular.element(e.children().children()[0]),i=t.attr("ng-class"),n="";return n=i?i.slice(0,-1)+",'ui-grid-row-selected': row.isSelected}":"{'ui-grid-row-selected': row.isSelected}",t.attr("ng-class",n),{pre:function(){},post:function(){}}}}}]),e.directive("uiGridCell",["$compile","uiGridConstants","uiGridSelectionConstants","gridUtil","$parse","uiGridSelectionService","$timeout",function(e,t,i,n,r,o,s){return{priority:-200,restrict:"A",require:"?^uiGrid",scope:!1,link:function(e,i,n,r){function a(){e.grid.options.enableRowSelection&&e.grid.options.enableFullRowSelection&&(i.addClass("ui-grid-disable-selection"),i.on("touchstart",h),i.on("touchend",p),i.on("click",d),e.registered=!0)}function l(){e.registered&&(i.removeClass("ui-grid-disable-selection"),i.off("touchstart",h),i.off("touchend",p),i.off("click",d),e.registered=!1)}var c=0,u=300;r.grid.api.cellNav&&r.grid.api.cellNav.on.viewPortKeyDown(e,function(t,i){null!==i&&i.row===e.row&&i.col===e.col&&32===t.keyCode&&"selectionRowHeaderCol"===e.col.colDef.name&&(o.toggleRowSelection(e.grid,e.row,t,e.grid.options.multiSelect&&!e.grid.options.modifierKeysToMultiSelect,e.grid.options.noUnselect),e.$apply())});var d=function(t){"ui-grid-icon-minus-squared"!==t.target.className&&"ui-grid-icon-plus-squared"!==t.target.className&&(i.off("touchend",p),t.shiftKey?o.shiftSelect(e.grid,e.row,t,e.grid.options.multiSelect):t.ctrlKey||t.metaKey?o.toggleRowSelection(e.grid,e.row,t,e.grid.options.multiSelect,e.grid.options.noUnselect):o.toggleRowSelection(e.grid,e.row,t,e.grid.options.multiSelect&&!e.grid.options.modifierKeysToMultiSelect,e.grid.options.noUnselect),e.$apply(),s(function(){i.on("touchend",p)},u))},h=function(){c=(new Date).getTime(),i.off("click",d)},p=function(e){(new Date).getTime()-c<u&&d(e),s(function(){i.on("click",d)},u)};a();var g=e.grid.registerDataChangeCallback(function(){e.grid.options.enableRowSelection&&e.grid.options.enableFullRowSelection&&!e.registered?a():e.grid.options.enableRowSelection&&e.grid.options.enableFullRowSelection||!e.registered||l()},[t.dataChange.OPTIONS]);i.on("$destroy",g)}}}]),e.directive("uiGridGridFooter",["$compile","uiGridConstants","gridUtil",function(e,t,i){return{restrict:"EA",replace:!0,priority:-1e3,require:"^uiGrid",scope:!0,compile:function(){return{pre:function(t,n,r,o){o.grid.options.showGridFooter&&i.getTemplate("ui-grid/gridFooterSelectedItems").then(function(i){var r=angular.element(i),o=e(r)(t);angular.element(n[0].getElementsByClassName("ui-grid-grid-footer")[0]).append(o)})},post:function(){}}}}}])}(),function(){"use strict";var e=angular.module("ui.grid.treeBase",["ui.grid"]);e.constant("uiGridTreeBaseConstants",{featureName:"treeBase",rowHeaderColName:"treeBaseRowHeaderCol",EXPANDED:"expanded",COLLAPSED:"collapsed",aggregation:{COUNT:"count",SUM:"sum",MAX:"max",MIN:"min",AVG:"avg"}}),e.service("uiGridTreeBaseService",["$q","uiGridTreeBaseConstants","gridUtil","GridRow","gridClassFactory","i18nService","uiGridConstants","rowSorter",function(e,t,i,n,r,o,s,a){var l={initializeGrid:function(e){e.treeBase={},e.treeBase.numberLevels=0,e.treeBase.expandAll=!1,e.treeBase.tree=[],l.defaultGridOptions(e.options),e.registerRowsProcessor(l.treeRows,410),e.registerColumnBuilder(l.treeBaseColumnBuilder),l.createRowHeader(e);var t={events:{treeBase:{rowExpanded:{},rowCollapsed:{}}},methods:{treeBase:{expandAllRows:function(){l.expandAllRows(e)},collapseAllRows:function(){l.collapseAllRows(e)},toggleRowTreeState:function(t){l.toggleRowTreeState(e,t)},expandRow:function(t){l.expandRow(e,t)},expandRowChildren:function(t){l.expandRowChildren(e,t)},collapseRow:function(t){l.collapseRow(e,t)},collapseRowChildren:function(t){l.collapseRowChildren(e,t)},getTreeExpandedState:function(){return{expandedState:l.getTreeState(e)}},setTreeState:function(t){l.setTreeState(e,t)},getRowChildren:function(e){return e.treeNode.children.map(function(e){return e.row})}}}};e.api.registerEventsFromObject(t.events),e.api.registerMethodsFromObject(t.methods)},defaultGridOptions:function(e){e.treeRowHeaderBaseWidth=e.treeRowHeaderBaseWidth||30,e.treeIndent=e.treeIndent||10,e.showTreeRowHeader=!1!==e.showTreeRowHeader,e.showTreeExpandNoChildren=!1!==e.showTreeExpandNoChildren,e.treeRowHeaderAlwaysVisible=!1!==e.treeRowHeaderAlwaysVisible,e.treeCustomAggregations=e.treeCustomAggregations||{},e.enableExpandAll=!1!==e.enableExpandAll},treeBaseColumnBuilder:function(e,t,i){"undefined"!=typeof e.customTreeAggregationFn&&(t.treeAggregationFn=e.customTreeAggregationFn),"undefined"!=typeof e.treeAggregationType&&(t.treeAggregation={type:e.treeAggregationType},"undefined"!=typeof i.treeCustomAggregations[e.treeAggregationType]?(t.treeAggregationFn=i.treeCustomAggregations[e.treeAggregationType].aggregationFn,t.treeAggregationFinalizerFn=i.treeCustomAggregations[e.treeAggregationType].finalizerFn,t.treeAggregation.label=i.treeCustomAggregations[e.treeAggregationType].label):"undefined"!=typeof l.nativeAggregations()[e.treeAggregationType]&&(t.treeAggregationFn=l.nativeAggregations()[e.treeAggregationType].aggregationFn,t.treeAggregation.label=l.nativeAggregations()[e.treeAggregationType].label)),"undefined"!=typeof e.treeAggregationLabel&&("undefined"==typeof t.treeAggregation&&(t.treeAggregation={}),t.treeAggregation.label=e.treeAggregationLabel),t.treeAggregationUpdateEntity=!1!==e.treeAggregationUpdateEntity,"undefined"==typeof t.customTreeAggregationFinalizerFn&&(t.customTreeAggregationFinalizerFn=e.customTreeAggregationFinalizerFn)},createRowHeader:function(e){var i={name:t.rowHeaderColName,displayName:"",width:e.options.treeRowHeaderBaseWidth,minWidth:10,cellTemplate:"ui-grid/treeBaseRowHeader",headerCellTemplate:"ui-grid/treeBaseHeaderCell",enableColumnResizing:!1,enableColumnMenu:!1,exporterSuppressExport:!0,allowCellFocus:!0};i.visible=e.options.treeRowHeaderAlwaysVisible,e.addRowHeaderColumn(i,-100)},expandAllRows:function(e){e.treeBase.tree.forEach(function(i){l.setAllNodes(e,i,t.EXPANDED)}),e.treeBase.expandAll=!0,e.queueGridRefresh()},collapseAllRows:function(e){e.treeBase.tree.forEach(function(i){l.setAllNodes(e,i,t.COLLAPSED)}),e.treeBase.expandAll=!1,e.queueGridRefresh()},setAllNodes:function(e,i,n){"undefined"!=typeof i.state&&i.state!==n&&(i.state=n,n===t.EXPANDED?e.api.treeBase.raise.rowExpanded(i.row):e.api.treeBase.raise.rowCollapsed(i.row)),i.children&&i.children.forEach(function(t){l.setAllNodes(e,t,n)})},toggleRowTreeState:function(e,i){"undefined"==typeof i.treeLevel||null===i.treeLevel||i.treeLevel<0||(i.treeNode.state===t.EXPANDED?l.collapseRow(e,i):l.expandRow(e,i),e.queueGridRefresh())},expandRow:function(e,i){"undefined"==typeof i.treeLevel||null===i.treeLevel||i.treeLevel<0||i.treeNode.state!==t.EXPANDED&&(i.treeNode.state=t.EXPANDED,e.api.treeBase.raise.rowExpanded(i),e.treeBase.expandAll=l.allExpanded(e.treeBase.tree),e.queueGridRefresh())},expandRowChildren:function(e,i){"undefined"==typeof i.treeLevel||null===i.treeLevel||i.treeLevel<0||(l.setAllNodes(e,i.treeNode,t.EXPANDED),e.treeBase.expandAll=l.allExpanded(e.treeBase.tree),e.queueGridRefresh())},collapseRow:function(e,i){"undefined"==typeof i.treeLevel||null===i.treeLevel||i.treeLevel<0||i.treeNode.state!==t.COLLAPSED&&(i.treeNode.state=t.COLLAPSED,e.treeBase.expandAll=!1,e.api.treeBase.raise.rowCollapsed(i),e.queueGridRefresh())},collapseRowChildren:function(e,i){"undefined"==typeof i.treeLevel||null===i.treeLevel||i.treeLevel<0||(l.setAllNodes(e,i.treeNode,t.COLLAPSED),e.treeBase.expandAll=!1,e.queueGridRefresh())},allExpanded:function(e){var t=!0;return e.forEach(function(e){l.allExpandedInternal(e)||(t=!1)}),t},allExpandedInternal:function(e){if(e.children&&e.children.length>0){if(e.state===t.COLLAPSED)return!1;var i=!0;return e.children.forEach(function(e){l.allExpandedInternal(e)||(i=!1)}),i}return!0},treeRows:function(e){if(0===e.length)return e;var i=this;t.EXPANDED;return i.treeBase.tree=l.createTree(i,e),l.updateRowHeaderWidth(i),l.sortTree(i),l.fixFilter(i),l.renderTree(i.treeBase.tree)},updateRowHeaderWidth:function(e){var i=e.getColumn(t.rowHeaderColName),n=e.options.treeRowHeaderBaseWidth+e.options.treeIndent*Math.max(e.treeBase.numberLevels-1,0);i&&n!==i.width&&(i.width=n,e.queueRefresh());var r=!0;!1===e.options.showTreeRowHeader&&(r=!1),!1===e.options.treeRowHeaderAlwaysVisible&&e.treeBase.numberLevels<=0&&(r=!1),i&&i.visible!==r&&(i.visible=r,i.colDef.visible=r,e.queueGridRefresh())},renderTree:function(e){var i=[];return e.forEach(function(e){e.row.visible&&i.push(e.row),e.state===t.EXPANDED&&e.children&&e.children.length>0&&(i=i.concat(l.renderTree(e.children)))}),i},createTree:function(e,i){var n,r=-1,o=[];e.treeBase.tree=[],e.treeBase.numberLevels=0;var s=l.getAggregations(e),a=function(i){if("undefined"!=typeof i.entity.$$treeLevel&&i.treeLevel!==i.entity.$$treeLevel&&(i.treeLevel=i.entity.$$treeLevel),i.treeLevel<=r){for(;i.treeLevel<=r;){var a=o.pop();l.finaliseAggregations(a),r--}n=o.length>0?l.setCurrentState(o):t.EXPANDED}("undefined"==typeof i.treeLevel||null===i.treeLevel||i.treeLevel<0)&&i.visible&&l.aggregate(e,i,o),l.addOrUseNode(e,i,o,s),"undefined"!=typeof i.treeLevel&&null!==i.treeLevel&&i.treeLevel>=0&&(o.push(i),r++,n=l.setCurrentState(o)),e.treeBase.numberLevels<i.treeLevel+1&&(e.treeBase.numberLevels=i.treeLevel+1)};for(i.forEach(a);o.length>0;){var c=o.pop();l.finaliseAggregations(c)}return e.treeBase.tree},addOrUseNode:function(e,i,n,r){var o=[];r.forEach(function(e){o.push(l.buildAggregationObject(e.col))});var s={state:t.COLLAPSED,row:i,parentRow:null,aggregations:o,children:[]};i.treeNode&&(s.state=i.treeNode.state),n.length>0&&(s.parentRow=n[n.length-1]),i.treeNode=s,0===n.length?e.treeBase.tree.push(s):n[n.length-1].treeNode.children.push(s)},setCurrentState:function(e){var i=t.EXPANDED;return e.forEach(function(e){e.treeNode.state===t.COLLAPSED&&(i=t.COLLAPSED)}),i},sortTree:function(e){e.columns.forEach(function(e){e.sort&&e.sort.ignoreSort&&delete e.sort.ignoreSort}),e.treeBase.tree=l.sortInternal(e,e.treeBase.tree)},sortInternal:function(e,i){var n=i.map(function(e){return e.row});n=a.sort(e,n,e.columns);var r=n.map(function(e){return e.treeNode});return r.forEach(function(i){i.state===t.EXPANDED&&i.children&&i.children.length>0&&(i.children=l.sortInternal(e,i.children))}),r},fixFilter:function(e){var t;e.treeBase.tree.forEach(function(e){e.children&&e.children.length>0&&(t=e.row.visible,l.fixFilterInternal(e.children,t))})},fixFilterInternal:function(e,t){return e.forEach(function(e){e.row.visible&&!t&&(l.setParentsVisible(e),t=!0),e.children&&e.children.length>0&&l.fixFilterInternal(e.children,t&&e.row.visible)&&(t=!0)}),t},setParentsVisible:function(e){for(;e.parentRow;)e.parentRow.visible=!0,e=e.parentRow.treeNode},buildAggregationObject:function(e){var t={col:e};return e.treeAggregation&&e.treeAggregation.type&&(t.type=e.treeAggregation.type),e.treeAggregation&&e.treeAggregation.label&&(t.label=e.treeAggregation.label),t},getAggregations:function(e){var t=[];return e.columns.forEach(function(i){"undefined"!=typeof i.treeAggregationFn&&(t.push(l.buildAggregationObject(i)),e.options.showColumnFooter&&"undefined"==typeof i.colDef.aggregationType&&i.treeAggregation&&(i.treeFooterAggregation=l.buildAggregationObject(i),i.aggregationType=l.treeFooterAggregationType))}),t},aggregate:function(e,t,i){0===i.length&&t.treeNode&&t.treeNode.aggregations&&t.treeNode.aggregations.forEach(function(i){if("undefined"!=typeof i.col.treeFooterAggregation){var n=e.getCellValue(t,i.col),r=Number(n);i.col.treeAggregationFn(i.col.treeFooterAggregation,n,r,t)}}),i.forEach(function(i,n){i.treeNode.aggregations&&i.treeNode.aggregations.forEach(function(i){var r=e.getCellValue(t,i.col),o=Number(r);i.col.treeAggregationFn(i,r,o,t),0===n&&"undefined"!=typeof i.col.treeFooterAggregation&&i.col.treeAggregationFn(i.col.treeFooterAggregation,r,o,t)})})},nativeAggregations:function(){return{count:{label:o.get().aggregation.count,menuTitle:o.get().grouping.aggregate_count,aggregationFn:function(e){"undefined"==typeof e.value?e.value=1:e.value++}},sum:{label:o.get().aggregation.sum,menuTitle:o.get().grouping.aggregate_sum,aggregationFn:function(e,t,i){isNaN(i)||("undefined"==typeof e.value?e.value=i:e.value+=i)}},min:{label:o.get().aggregation.min,menuTitle:o.get().grouping.aggregate_min,aggregationFn:function(e,t){"undefined"==typeof e.value?e.value=t:void 0!==t&&null!==t&&(t<e.value||null===e.value)&&(e.value=t)}},max:{label:o.get().aggregation.max,menuTitle:o.get().grouping.aggregate_max,aggregationFn:function(e,t){"undefined"==typeof e.value?e.value=t:void 0!==t&&null!==t&&(t>e.value||null===e.value)&&(e.value=t)}},avg:{label:o.get().aggregation.avg,menuTitle:o.get().grouping.aggregate_avg,aggregationFn:function(e,t,i){"undefined"==typeof e.count?e.count=1:e.count++,isNaN(i)||("undefined"==typeof e.value||"undefined"==typeof e.sum?(e.value=i,e.sum=i):(e.sum+=i,e.value=e.sum/e.count))}}}},finaliseAggregation:function(e,t){t.col.treeAggregationUpdateEntity&&void 0!==e&&"undefined"!=typeof e.entity["$$"+t.col.uid]&&angular.extend(t,e.entity["$$"+t.col.uid]),"function"==typeof t.col.treeAggregationFinalizerFn&&t.col.treeAggregationFinalizerFn(t),"function"==typeof t.col.customTreeAggregationFinalizerFn&&t.col.customTreeAggregationFinalizerFn(t),"undefined"==typeof t.rendered&&(t.rendered=t.label?t.label+t.value:t.value)},finaliseAggregations:function(e){null!=e&&"undefined"!=typeof e.treeNode.aggregations&&e.treeNode.aggregations.forEach(function(t){if(l.finaliseAggregation(e,t),t.col.treeAggregationUpdateEntity){var i={};angular.forEach(t,function(e,n){t.hasOwnProperty(n)&&"col"!==n&&(i[n]=e)}),e.entity["$$"+t.col.uid]=i}})},treeFooterAggregationType:function(e,t){return l.finaliseAggregation(undefined,t.treeFooterAggregation),"undefined"==typeof t.treeFooterAggregation.value||null===t.treeFooterAggregation.rendered?"":t.treeFooterAggregation.rendered}};return l}]),e.directive("uiGridTreeBaseRowHeaderButtons",["$templateCache","uiGridTreeBaseService",function(e,t){return{replace:!0,restrict:"E",template:e.get("ui-grid/treeBaseRowHeaderButtons"),scope:!0,require:"^uiGrid",link:function(e,i,n,r){var o=r.grid;e.treeButtonClick=function(e,i){t.toggleRowTreeState(o,e,i)}}}}]),e.directive("uiGridTreeBaseExpandAllButtons",["$templateCache","uiGridTreeBaseService",function(e,t){return{replace:!0,restrict:"E",template:e.get("ui-grid/treeBaseExpandAllButtons"),scope:!1,link:function(e){var i=e.col.grid;e.headerButtonClick=function(e,n){i.treeBase.expandAll?t.collapseAllRows(i,n):t.expandAllRows(i,n)}}}}]),e.directive("uiGridViewport",["$compile","uiGridConstants","gridUtil","$parse",function(){return{priority:-200,scope:!1,compile:function(e){var t=angular.element(e.children().children()[0]),i=t.attr("ng-class"),n="";return n=i?i.slice(0,-1)+",'ui-grid-tree-header-row': row.treeLevel > -1}":"{'ui-grid-tree-header-row': row.treeLevel > -1}",t.attr("ng-class",n),{pre:function(){},post:function(){}}}}}])}(),function(){"use strict";var e=angular.module("ui.grid.treeView",["ui.grid","ui.grid.treeBase"]);e.constant("uiGridTreeViewConstants",{featureName:"treeView",rowHeaderColName:"treeBaseRowHeaderCol",EXPANDED:"expanded",COLLAPSED:"collapsed",aggregation:{COUNT:"count",SUM:"sum",MAX:"max",MIN:"min",AVG:"avg"}}),e.service("uiGridTreeViewService",["$q","uiGridTreeViewConstants","uiGridTreeBaseConstants","uiGridTreeBaseService","gridUtil","GridRow","gridClassFactory","i18nService","uiGridConstants",function(e,t,i,n){var r={initializeGrid:function(e,t){n.initializeGrid(e,t),e.treeView={},e.registerRowsProcessor(r.adjustSorting,60);var i={events:{treeView:{}},methods:{treeView:{}}};e.api.registerEventsFromObject(i.events),e.api.registerMethodsFromObject(i.methods)},defaultGridOptions:function(e){e.enableTreeView=!1!==e.enableTreeView},adjustSorting:function(e){return this.columns.forEach(function(e){e.sort&&(e.sort.ignoreSort=!0)}),e}};return r}]),e.directive("uiGridTreeView",["uiGridTreeViewConstants","uiGridTreeViewService","$templateCache",function(e,t){return{replace:!0,priority:0,require:"^uiGrid",scope:!1,compile:function(){return{pre:function(e,i,n,r){!1!==r.grid.options.enableTreeView&&t.initializeGrid(r.grid,e)},post:function(){}}}}}])}(),function(){"use strict";var e=angular.module("ui.grid.validate",["ui.grid"])
;e.service("uiGridValidateService",["$sce","$q","$http","i18nService","uiGridConstants",function(e,t,i,n){var r={validatorFactories:{},setExternalFactoryFunction:function(e){r.externalFactoryFunction=e},clearExternalFactory:function(){delete r.externalFactoryFunction},getValidatorFromExternalFactory:function(e,t){return r.externalFactoryFunction(e,t).validatorFactory(t)},getMessageFromExternalFactory:function(e,t){return r.externalFactoryFunction(e,t).messageFunction(t)},setValidator:function(e,t,i){r.validatorFactories[e]={validatorFactory:t,messageFunction:i}},getValidator:function(e,t){if(r.externalFactoryFunction){var i=r.getValidatorFromExternalFactory(e,t);if(i)return i}if(!r.validatorFactories[e])throw"Invalid validator name: "+e;return r.validatorFactories[e].validatorFactory(t)},getMessage:function(e,t){if(r.externalFactoryFunction){var i=r.getMessageFromExternalFactory(e,t);if(i)return i}return r.validatorFactories[e].messageFunction(t)},isInvalid:function(e,t){return e["$$invalid"+t.name]},setInvalid:function(e,t){e["$$invalid"+t.name]=!0},setValid:function(e,t){delete e["$$invalid"+t.name]},setError:function(e,t,i){e["$$errors"+t.name]||(e["$$errors"+t.name]={}),e["$$errors"+t.name][i]=!0},clearError:function(e,t,i){e["$$errors"+t.name]&&i in e["$$errors"+t.name]&&delete e["$$errors"+t.name][i]},getErrorMessages:function(e,t){var i=[];return e["$$errors"+t.name]&&0!==Object.keys(e["$$errors"+t.name]).length?(Object.keys(e["$$errors"+t.name]).sort().forEach(function(e){i.push(r.getMessage(e,t.validators[e]))}),i):i},getFormattedErrors:function(t,i){var o="",s=r.getErrorMessages(t,i);if(s.length)return s.forEach(function(e){o+=e+"<br/>"}),e.trustAsHtml("<p><b>"+n.getSafeText("validate.error")+"</b></p>"+o)},getTitleFormattedErrors:function(t,i){var o="\n",s="",a=r.getErrorMessages(t,i);if(a.length)return a.forEach(function(e){s+=e+o}),e.trustAsHtml(n.getSafeText("validate.error")+o+s)},runValidators:function(e,i,n,o,s){if(n!==o){if("undefined"==typeof i.name||!i.name)throw new Error("colDef.name is required to perform validation");r.setValid(e,i);var a=function(e,t,i){return function(a){a||(r.setInvalid(e,t),r.setError(e,t,i),s&&s.api.validate.raise.validationFailed(e,t,n,o))}},l=[];for(var c in i.validators){r.clearError(e,i,c);var u=r.getValidator(c,i.validators[c]),d=t.when(u(o,n,e,i)).then(a(e,i,c));l.push(d)}return t.all(l)}},createDefaultValidators:function(){r.setValidator("minLength",function(e){return function(t,i){return i===undefined||null===i||""===i||i.length>=e}},function(e){return n.getSafeText("validate.minLength").replace("THRESHOLD",e)}),r.setValidator("maxLength",function(e){return function(t,i){return i===undefined||null===i||""===i||i.length<=e}},function(e){return n.getSafeText("validate.maxLength").replace("THRESHOLD",e)}),r.setValidator("required",function(e){return function(t,i){return!e||!(i===undefined||null===i||""===i)}},function(){return n.getSafeText("validate.required")})},initializeGrid:function(e,t){t.validate={isInvalid:r.isInvalid,getFormattedErrors:r.getFormattedErrors,getTitleFormattedErrors:r.getTitleFormattedErrors,runValidators:r.runValidators};var i={events:{validate:{validationFailed:function(){}}},methods:{validate:{isInvalid:function(e,i){return t.validate.isInvalid(e,i)},getErrorMessages:function(e,i){return t.validate.getErrorMessages(e,i)},getFormattedErrors:function(e,i){return t.validate.getFormattedErrors(e,i)},getTitleFormattedErrors:function(e,i){return t.validate.getTitleFormattedErrors(e,i)}}}};t.api.registerEventsFromObject(i.events),t.api.registerMethodsFromObject(i.methods),t.edit&&t.api.edit.on.afterCellEdit(e,function(e,i,n,r){t.validate.runValidators(e,i,n,r,t)}),r.createDefaultValidators()}};return r}]),e.directive("uiGridValidate",["gridUtil","uiGridValidateService",function(e,t){return{priority:0,replace:!0,require:"^uiGrid",scope:!1,compile:function(){return{pre:function(e,i,n,r){t.initializeGrid(e,r.grid)},post:function(){}}}}}])}(),angular.module("ui.grid").run(["$templateCache",function(e){"use strict";e.put("ui-grid/ui-grid-filter",'<div class="ui-grid-filter-container" ng-style="col.extraStyle" ng-repeat="colFilter in col.filters" ng-class="{\'ui-grid-filter-cancel-button-hidden\' : colFilter.disableCancelFilterButton === true }"><div ng-if="colFilter.type !== \'select\'"><input type="text" class="ui-grid-filter-input ui-grid-filter-input-{{$index}}" ng-model="colFilter.term" ng-attr-placeholder="{{colFilter.placeholder || \'\'}}" aria-label="{{colFilter.ariaLabel || aria.defaultFilterLabel}}"><div role="button" class="ui-grid-filter-button" ng-click="removeFilter(colFilter, $index)" ng-if="!colFilter.disableCancelFilterButton" ng-disabled="colFilter.term === undefined || colFilter.term === null || colFilter.term === \'\'" ng-show="colFilter.term !== undefined && colFilter.term !== null && colFilter.term !== \'\'"><i class="ui-grid-icon-cancel" ui-grid-one-bind-aria-label="aria.removeFilter">&nbsp;</i></div></div><div ng-if="colFilter.type === \'select\'"><select class="ui-grid-filter-select ui-grid-filter-input-{{$index}}" ng-model="colFilter.term" ng-show="colFilter.selectOptions.length > 0" ng-attr-placeholder="{{colFilter.placeholder || aria.defaultFilterLabel}}" aria-label="{{colFilter.ariaLabel || \'\'}}" ng-options="option.value as option.label for option in colFilter.selectOptions"><option value=""></option></select><div role="button" class="ui-grid-filter-button-select" ng-click="removeFilter(colFilter, $index)" ng-if="!colFilter.disableCancelFilterButton" ng-disabled="colFilter.term === undefined || colFilter.term === null || colFilter.term === \'\'" ng-show="colFilter.term !== undefined && colFilter.term != null"><i class="ui-grid-icon-cancel" ui-grid-one-bind-aria-label="aria.removeFilter">&nbsp;</i></div></div></div>'),e.put("ui-grid/ui-grid-footer",'<div class="ui-grid-footer-panel ui-grid-footer-aggregates-row"><!-- tfooter --><div class="ui-grid-footer ui-grid-footer-viewport"><div class="ui-grid-footer-canvas"><div class="ui-grid-footer-cell-wrapper" ng-style="colContainer.headerCellWrapperStyle()"><div role="row" class="ui-grid-footer-cell-row"><div ui-grid-footer-cell role="gridcell" ng-repeat="col in colContainer.renderedColumns track by col.uid" col="col" render-index="$index" class="ui-grid-footer-cell ui-grid-clearfix"></div></div></div></div></div></div>'),e.put("ui-grid/ui-grid-grid-footer",'<div class="ui-grid-footer-info ui-grid-grid-footer"><span>{{\'search.totalItems\' | t}} {{grid.rows.length}}</span> <span ng-if="grid.renderContainers.body.visibleRowCache.length !== grid.rows.length" class="ngLabel">({{"search.showingItems" | t}} {{grid.renderContainers.body.visibleRowCache.length}})</span></div>'),e.put("ui-grid/ui-grid-group-panel",'<div class="ui-grid-group-panel"><div ui-t="groupPanel.description" class="description" ng-show="groupings.length == 0"></div><ul ng-show="groupings.length > 0" class="ngGroupList"><li class="ngGroupItem" ng-repeat="group in configGroups"><span class="ngGroupElement"><span class="ngGroupName">{{group.displayName}} <span ng-click="removeGroup($index)" class="ngRemoveGroup">x</span></span> <span ng-hide="$last" class="ngGroupArrow"></span></span></li></ul></div>'),e.put("ui-grid/ui-grid-header",'<div role="rowgroup" class="ui-grid-header"><!-- theader --><div class="ui-grid-top-panel"><div class="ui-grid-header-viewport"><div class="ui-grid-header-canvas"><div class="ui-grid-header-cell-wrapper" ng-style="colContainer.headerCellWrapperStyle()"><div role="row" class="ui-grid-header-cell-row"><div class="ui-grid-header-cell ui-grid-clearfix" ng-repeat="col in colContainer.renderedColumns track by col.uid" ui-grid-header-cell col="col" render-index="$index"></div></div></div></div></div></div></div>'),e.put("ui-grid/ui-grid-menu-button",'<div class="ui-grid-menu-button"><div role="button" ui-grid-one-bind-id-grid="\'grid-menu\'" class="ui-grid-icon-container" ng-click="toggleMenu()" aria-haspopup="true"><i class="ui-grid-icon-menu" ui-grid-one-bind-aria-label="i18n.aria.buttonLabel">&nbsp;</i></div><div ui-grid-menu menu-items="menuItems"></div></div>'),e.put("ui-grid/ui-grid-no-header",'<div class="ui-grid-top-panel"></div>'),e.put("ui-grid/ui-grid-row","<div ng-repeat=\"(colRenderIndex, col) in colContainer.renderedColumns track by col.uid\" ui-grid-one-bind-id-grid=\"rowRenderIndex + '-' + col.uid + '-cell'\" class=\"ui-grid-cell\" ng-class=\"{ 'ui-grid-row-header-cell': col.isRowHeader }\" role=\"{{col.isRowHeader ? 'rowheader' : 'gridcell'}}\" ui-grid-cell></div>"),e.put("ui-grid/ui-grid",'<div ui-i18n="en" class="ui-grid"><!-- TODO (c0bra): add "scoped" attr here, eventually? --><style ui-grid-style>.grid{{ grid.id }} {\n      /* Styles for the grid */\n    }\n\n    .grid{{ grid.id }} .ui-grid-row, .grid{{ grid.id }} .ui-grid-cell, .grid{{ grid.id }} .ui-grid-cell .ui-grid-vertical-bar {\n      height: {{ grid.options.rowHeight }}px;\n    }\n\n    .grid{{ grid.id }} .ui-grid-row:last-child .ui-grid-cell {\n      border-bottom-width: {{ ((grid.getTotalRowHeight() < grid.getViewportHeight()) && \'1\') || \'0\' }}px;\n    }\n\n    {{ grid.verticalScrollbarStyles }}\n    {{ grid.horizontalScrollbarStyles }}\n\n    /*\n    .ui-grid[dir=rtl] .ui-grid-viewport {\n      padding-left: {{ grid.verticalScrollbarWidth }}px;\n    }\n    */\n\n    {{ grid.customStyles }}</style><div class="ui-grid-contents-wrapper"><div ui-grid-menu-button ng-if="grid.options.enableGridMenu"></div><div ng-if="grid.hasLeftContainer()" style="width: 0" ui-grid-pinned-container="\'left\'"></div><div ui-grid-render-container container-id="\'body\'" col-container-name="\'body\'" row-container-name="\'body\'" bind-scroll-horizontal="true" bind-scroll-vertical="true" enable-horizontal-scrollbar="grid.options.enableHorizontalScrollbar" enable-vertical-scrollbar="grid.options.enableVerticalScrollbar"></div><div ng-if="grid.hasRightContainer()" style="width: 0" ui-grid-pinned-container="\'right\'"></div><div ui-grid-grid-footer ng-if="grid.options.showGridFooter"></div><div ui-grid-column-menu ng-if="grid.options.enableColumnMenus"></div><div ng-transclude></div></div></div>'),e.put("ui-grid/uiGridCell",'<div class="ui-grid-cell-contents" title="TOOLTIP">{{COL_FIELD CUSTOM_FILTERS}}</div>'),e.put("ui-grid/uiGridColumnMenu",'<div class="ui-grid-column-menu"><div ui-grid-menu menu-items="menuItems"><!-- <div class="ui-grid-column-menu">\n    <div class="inner" ng-show="menuShown">\n      <ul>\n        <div ng-show="grid.options.enableSorting">\n          <li ng-click="sortColumn($event, asc)" ng-class="{ \'selected\' : col.sort.direction == asc }"><i class="ui-grid-icon-sort-alt-up"></i> Sort Ascending</li>\n          <li ng-click="sortColumn($event, desc)" ng-class="{ \'selected\' : col.sort.direction == desc }"><i class="ui-grid-icon-sort-alt-down"></i> Sort Descending</li>\n          <li ng-show="col.sort.direction" ng-click="unsortColumn()"><i class="ui-grid-icon-cancel"></i> Remove Sort</li>\n        </div>\n      </ul>\n    </div>\n  </div> --></div></div>'),e.put("ui-grid/uiGridFooterCell",'<div class="ui-grid-cell-contents" col-index="renderIndex"><div>{{ col.getAggregationText() + ( col.getAggregationValue() CUSTOM_FILTERS ) }}</div></div>'),e.put("ui-grid/uiGridHeaderCell",'<div role="columnheader" ng-class="{ \'sortable\': sortable }" ui-grid-one-bind-aria-labelledby-grid="col.uid + \'-header-text \' + col.uid + \'-sortdir-text\'" aria-sort="{{col.sort.direction == asc ? \'ascending\' : ( col.sort.direction == desc ? \'descending\' : (!col.sort.direction ? \'none\' : \'other\'))}}"><div role="button" tabindex="0" class="ui-grid-cell-contents ui-grid-header-cell-primary-focus" col-index="renderIndex" title="TOOLTIP"><span class="ui-grid-header-cell-label" ui-grid-one-bind-id-grid="col.uid + \'-header-text\'">{{ col.displayName CUSTOM_FILTERS }}</span> <span ui-grid-one-bind-id-grid="col.uid + \'-sortdir-text\'" ui-grid-visible="col.sort.direction" aria-label="{{getSortDirectionAriaLabel()}}"><i ng-class="{ \'ui-grid-icon-up-dir\': col.sort.direction == asc, \'ui-grid-icon-down-dir\': col.sort.direction == desc, \'ui-grid-icon-blank\': !col.sort.direction }" title="{{isSortPriorityVisible() ? i18n.headerCell.priority + \' \' + ( col.sort.priority + 1 )  : null}}" aria-hidden="true"></i> <sub ui-grid-visible="isSortPriorityVisible()" class="ui-grid-sort-priority-number">{{col.sort.priority + 1}}</sub></span></div><div role="button" tabindex="0" ui-grid-one-bind-id-grid="col.uid + \'-menu-button\'" class="ui-grid-column-menu-button" ng-if="grid.options.enableColumnMenus && !col.isRowHeader  && col.colDef.enableColumnMenu !== false" ng-click="toggleMenu($event)" ng-class="{\'ui-grid-column-menu-button-last-col\': isLastCol}" ui-grid-one-bind-aria-label="i18n.headerCell.aria.columnMenuButtonLabel" aria-haspopup="true"><i class="ui-grid-icon-angle-down" aria-hidden="true">&nbsp;</i></div><div ui-grid-filter></div></div>'),e.put("ui-grid/uiGridMenu",'<div class="ui-grid-menu" ng-if="shown"><style ui-grid-style>{{dynamicStyles}}</style><div class="ui-grid-menu-mid" ng-show="shownMid"><div class="ui-grid-menu-inner"><ul role="menu" class="ui-grid-menu-items"><li ng-repeat="item in menuItems" role="menuitem" ui-grid-menu-item ui-grid-one-bind-id="\'menuitem-\'+$index" action="item.action" name="item.title" active="item.active" icon="item.icon" shown="item.shown" context="item.context" template-url="item.templateUrl" leave-open="item.leaveOpen" screen-reader-only="item.screenReaderOnly"></li></ul></div></div></div>'),e.put("ui-grid/uiGridMenuItem",'<button type="button" class="ui-grid-menu-item" ng-click="itemAction($event, title)" ng-show="itemShown()" ng-class="{ \'ui-grid-menu-item-active\': active(), \'ui-grid-sr-only\': (!focus && screenReaderOnly) }" aria-pressed="{{active()}}" tabindex="0" ng-focus="focus=true" ng-blur="focus=false"><i ng-class="icon" aria-hidden="true">&nbsp;</i> {{ name }}</button>'),e.put("ui-grid/uiGridRenderContainer","<div role=\"grid\" ui-grid-one-bind-id-grid=\"'grid-container'\" class=\"ui-grid-render-container\" ng-style=\"{ 'margin-left': colContainer.getMargin('left') + 'px', 'margin-right': colContainer.getMargin('right') + 'px' }\"><!-- All of these dom elements are replaced in place --><div ui-grid-header></div><div ui-grid-viewport></div><div ng-if=\"colContainer.needsHScrollbarPlaceholder()\" class=\"ui-grid-scrollbar-placeholder\" ng-style=\"{height:colContainer.grid.scrollbarHeight + 'px'}\"></div><ui-grid-footer ng-if=\"grid.options.showColumnFooter\"></ui-grid-footer></div>"),e.put("ui-grid/uiGridViewport",'<div role="rowgroup" class="ui-grid-viewport" ng-style="colContainer.getViewportStyle()"><!-- tbody --><div class="ui-grid-canvas"><div ng-repeat="(rowRenderIndex, row) in rowContainer.renderedRows track by $index" class="ui-grid-row" ng-style="Viewport.rowStyle(rowRenderIndex)"><div role="row" ui-grid-row="row" row-render-index="rowRenderIndex"></div></div></div></div>'),e.put("ui-grid/cellEditor",'<div><form name="inputForm"><input type="INPUT_TYPE" ng-class="\'colt\' + col.uid" ui-grid-editor ng-model="MODEL_COL_FIELD"></form></div>'),e.put("ui-grid/dropdownEditor",'<div><form name="inputForm"><select ng-class="\'colt\' + col.uid" ui-grid-edit-dropdown ng-model="MODEL_COL_FIELD" ng-options="field[editDropdownIdLabel] as field[editDropdownValueLabel] CUSTOM_FILTERS for field in editDropdownOptionsArray"></select></form></div>'),e.put("ui-grid/fileChooserEditor",'<div><form name="inputForm"><input ng-class="\'colt\' + col.uid" ui-grid-edit-file-chooser type="file" id="files" name="files[]" ng-model="MODEL_COL_FIELD"></form></div>'),e.put("ui-grid/emptyBaseLayerContainer",'<div class="ui-grid-empty-base-layer-container ui-grid-canvas"><div class="ui-grid-row" ng-repeat="(rowRenderIndex, row) in grid.baseLayer.emptyRows track by $index" ng-style="Viewport.rowStyle(rowRenderIndex)"><div><div><div ng-repeat="(colRenderIndex, col) in colContainer.renderedColumns track by col.colDef.name" class="ui-grid-cell {{ col.getColClass(false) }}"></div></div></div></div></div>'),e.put("ui-grid/expandableRow",'<div ui-grid-expandable-row ng-if="expandableRow.shouldRenderExpand()" class="expandableRow" style="float:left; margin-top: 1px; margin-bottom: 1px" ng-style="{width: (grid.renderContainers.body.getCanvasWidth()) + \'px\', height: row.expandedRowHeight + \'px\'}"></div>'),e.put("ui-grid/expandableRowHeader",'<div class="ui-grid-row-header-cell ui-grid-expandable-buttons-cell"><div class="ui-grid-cell-contents"><i ng-if="!row.groupHeader==true" ng-class="{ \'ui-grid-icon-plus-squared\' : !row.isExpanded, \'ui-grid-icon-minus-squared\' : row.isExpanded }" ng-click="grid.api.expandable.toggleRowExpansion(row.entity)"></i></div></div>'),e.put("ui-grid/expandableScrollFiller","<div ng-if=\"expandableRow.shouldRenderFiller()\" ng-class=\"{scrollFiller:true, scrollFillerClass:(colContainer.name === 'body')}\" ng-style=\"{ width: (grid.getViewportWidth()) + 'px', height: row.expandedRowHeight + 2 + 'px', 'margin-left': grid.options.rowHeader.rowHeaderWidth + 'px' }\"><i class=\"ui-grid-icon-spin5 ui-grid-animate-spin\" ng-style=\"{'margin-top': ( row.expandedRowHeight/2 - 5) + 'px', 'margin-left' : ((grid.getViewportWidth() - grid.options.rowHeader.rowHeaderWidth)/2 - 5) + 'px'}\"></i></div>"),e.put("ui-grid/expandableTopRowHeader",'<div class="ui-grid-row-header-cell ui-grid-expandable-buttons-cell"><div class="ui-grid-cell-contents"><i ng-class="{ \'ui-grid-icon-plus-squared\' : !grid.expandable.expandedAll, \'ui-grid-icon-minus-squared\' : grid.expandable.expandedAll }" ng-click="grid.api.expandable.toggleAllRows()"></i></div></div>'),e.put("ui-grid/csvLink",'<span class="ui-grid-exporter-csv-link-span"><a href="data:text/csv;charset=UTF-8,CSV_CONTENT" download="FILE_NAME">LINK_LABEL</a></span>'),e.put("ui-grid/importerMenuItem",'<li class="ui-grid-menu-item"><form><input class="ui-grid-importer-file-chooser" type="file" id="files" name="files[]"></form></li>'),e.put("ui-grid/importerMenuItemContainer","<div ui-grid-importer-menu-item></div>"),e.put("ui-grid/pagination",'<div role="contentinfo" class="ui-grid-pager-panel" ui-grid-pager ng-show="grid.options.enablePaginationControls"><div role="navigation" class="ui-grid-pager-container"><div role="menubar" class="ui-grid-pager-control"><button type="button" role="menuitem" class="ui-grid-pager-first" ui-grid-one-bind-title="aria.pageToFirst" ui-grid-one-bind-aria-label="aria.pageToFirst" ng-click="pageFirstPageClick()" ng-disabled="cantPageBackward()"><div ng-class="grid.isRTL() ? \'last-triangle\' : \'first-triangle\'"><div ng-class="grid.isRTL() ? \'last-bar-rtl\' : \'first-bar\'"></div></div></button> <button type="button" role="menuitem" class="ui-grid-pager-previous" ui-grid-one-bind-title="aria.pageBack" ui-grid-one-bind-aria-label="aria.pageBack" ng-click="pagePreviousPageClick()" ng-disabled="cantPageBackward()"><div ng-class="grid.isRTL() ? \'last-triangle prev-triangle\' : \'first-triangle prev-triangle\'"></div></button> <input type="number" ui-grid-one-bind-title="aria.pageSelected" ui-grid-one-bind-aria-label="aria.pageSelected" class="ui-grid-pager-control-input" ng-model="grid.options.paginationCurrentPage" min="1" max="{{ paginationApi.getTotalPages() }}" required> <span class="ui-grid-pager-max-pages-number" ng-show="paginationApi.getTotalPages() > 0"><abbr ui-grid-one-bind-title="paginationOf">/</abbr> {{ paginationApi.getTotalPages() }}</span> <button type="button" role="menuitem" class="ui-grid-pager-next" ui-grid-one-bind-title="aria.pageForward" ui-grid-one-bind-aria-label="aria.pageForward" ng-click="pageNextPageClick()" ng-disabled="cantPageForward()"><div ng-class="grid.isRTL() ? \'first-triangle next-triangle\' : \'last-triangle next-triangle\'"></div></button> <button type="button" role="menuitem" class="ui-grid-pager-last" ui-grid-one-bind-title="aria.pageToLast" ui-grid-one-bind-aria-label="aria.pageToLast" ng-click="pageLastPageClick()" ng-disabled="cantPageToLast()"><div ng-class="grid.isRTL() ? \'first-triangle\' : \'last-triangle\'"><div ng-class="grid.isRTL() ? \'first-bar-rtl\' : \'last-bar\'"></div></div></button></div><div class="ui-grid-pager-row-count-picker" ng-if="grid.options.paginationPageSizes.length > 1 && !grid.options.useCustomPagination"><select ui-grid-one-bind-aria-labelledby-grid="\'items-per-page-label\'" ng-model="grid.options.paginationPageSize" ng-options="o as o for o in grid.options.paginationPageSizes"></select><span ui-grid-one-bind-id-grid="\'items-per-page-label\'" class="ui-grid-pager-row-count-label">&nbsp;{{sizesLabel}}</span></div><span ng-if="grid.options.paginationPageSizes.length <= 1" class="ui-grid-pager-row-count-label">{{grid.options.paginationPageSize}}&nbsp;{{sizesLabel}}</span></div><div class="ui-grid-pager-count-container"><div class="ui-grid-pager-count"><span ng-show="grid.options.totalItems > 0">{{ 1 + paginationApi.getFirstRowIndex() }} <abbr ui-grid-one-bind-title="paginationThrough">-</abbr> {{ 1 + paginationApi.getLastRowIndex() }} {{paginationOf}} {{grid.options.totalItems}} {{totalItemsLabel}}</span></div></div></div>'),e.put("ui-grid/columnResizer",'<div ui-grid-column-resizer ng-if="grid.options.enableColumnResizing" class="ui-grid-column-resizer" col="col" position="right" render-index="renderIndex" unselectable="on"></div>'),e.put("ui-grid/gridFooterSelectedItems",'<span ng-if="grid.selection.selectedCount !== 0 && grid.options.enableFooterTotalSelected">({{"search.selectedItems" | t}} {{grid.selection.selectedCount}})</span>'),e.put("ui-grid/selectionHeaderCell",'<div><!-- <div class="ui-grid-vertical-bar">&nbsp;</div> --><div class="ui-grid-cell-contents" col-index="renderIndex"><ui-grid-selection-select-all-buttons ng-if="grid.options.enableSelectAll"></ui-grid-selection-select-all-buttons></div></div>'),e.put("ui-grid/selectionRowHeader",'<div class="ui-grid-disable-selection"><div class="ui-grid-cell-contents"><ui-grid-selection-row-header-buttons></ui-grid-selection-row-header-buttons></div></div>'),e.put("ui-grid/selectionRowHeaderButtons",'<div class="ui-grid-selection-row-header-buttons ui-grid-icon-ok" ng-class="{\'ui-grid-row-selected\': row.isSelected}" ng-click="selectButtonClick(row, $event)">&nbsp;</div>'),e.put("ui-grid/selectionSelectAllButtons",'<div class="ui-grid-selection-row-header-buttons ui-grid-icon-ok" ng-class="{\'ui-grid-all-selected\': grid.selection.selectAll}" ng-click="headerButtonClick($event)"></div>'),e.put("ui-grid/treeBaseExpandAllButtons",'<div class="ui-grid-tree-base-row-header-buttons" ng-class="{\'ui-grid-icon-minus-squared\': grid.treeBase.numberLevels > 0 && grid.treeBase.expandAll, \'ui-grid-icon-plus-squared\': grid.treeBase.numberLevels > 0 && !grid.treeBase.expandAll}" ng-click="headerButtonClick($event)"></div>'),e.put("ui-grid/treeBaseHeaderCell",'<div><div class="ui-grid-cell-contents" col-index="renderIndex"><ui-grid-tree-base-expand-all-buttons ng-if="grid.options.enableExpandAll"></ui-grid-tree-base-expand-all-buttons></div></div>'),e.put("ui-grid/treeBaseRowHeader",'<div class="ui-grid-cell-contents"><ui-grid-tree-base-row-header-buttons></ui-grid-tree-base-row-header-buttons></div>'),e.put("ui-grid/treeBaseRowHeaderButtons","<div class=\"ui-grid-tree-base-row-header-buttons\" ng-class=\"{'ui-grid-tree-base-header': row.treeLevel > -1 }\" ng-click=\"treeButtonClick(row, $event)\"><i ng-class=\"{'ui-grid-icon-minus-squared': ( ( grid.options.showTreeExpandNoChildren && row.treeLevel > -1 ) || ( row.treeNode.children && row.treeNode.children.length > 0 ) ) && row.treeNode.state === 'expanded', 'ui-grid-icon-plus-squared': ( ( grid.options.showTreeExpandNoChildren && row.treeLevel > -1 ) || ( row.treeNode.children && row.treeNode.children.length > 0 ) ) && row.treeNode.state === 'collapsed'}\" ng-style=\"{'padding-left': grid.options.treeIndent * row.treeLevel + 'px'}\"></i> &nbsp;</div>"),e.put("ui-grid/cellTitleValidator",'<div class="ui-grid-cell-contents" ng-class="{invalid:grid.validate.isInvalid(row.entity,col.colDef)}" title="{{grid.validate.getTitleFormattedErrors(row.entity,col.colDef)}}">{{COL_FIELD CUSTOM_FILTERS}}</div>'),e.put("ui-grid/cellTooltipValidator",'<div class="ui-grid-cell-contents" ng-class="{invalid:grid.validate.isInvalid(row.entity,col.colDef)}" tooltip-html-unsafe="{{grid.validate.getFormattedErrors(row.entity,col.colDef)}}" tooltip-enable="grid.validate.isInvalid(row.entity,col.colDef)" tooltip-append-to-body="true" tooltip-placement="top" title="TOOLTIP">{{COL_FIELD CUSTOM_FILTERS}}</div>')}]),$("#applyAsEvaluator").on("click",function(){$.ajax({method:"POST",url:"/contribute/apply",data:{apply:!0}}).done(function(e){e.success&&(window.location.href="/dashboard"),console.log(e)}).fail(function(e){console.log(e)})}),$("#suggest_problem_statement").length){var suggest_problem_editor=ace.edit("suggest_problem_statement"),textarea=$('textarea[name="suggest_problem_statement"]').hide();suggest_problem_editor.setOptions({showLineNumbers:!0,displayIndentGuides:!0,enableBasicAutocompletion:!0,fontSize:"12px",maxLines:100,minLines:15,showInvisibles:!1,showPrintMargin:!1,scrollPastEnd:!1,useSoftTabs:!0,tabSize:4}),suggest_problem_editor.getSession().setValue(textarea.val()),suggest_problem_editor.getSession().on("change",function(){textarea.val(suggest_problem_editor.getSession().getValue())});var suggestProblemApp=angular.module("SuggestProblem",["ui.grid","ui.grid.pagination"]);suggestProblemApp.controller("SuggestProblemCtrl",["$scope","backend","uiGridConstants",function(e,t){angular.element(document).ready(function(){e.loadData(),$.loader({className:"blue-with-image-2",content:"Loading Data"}),$("#suggest_problem_root").show()}),e.problem_suggests=null,e.selected_problem_statement="",e.selfClaim=!0,e.gridOptions={data:"problem_suggests",paginationPageSizes:[15,30,45,60],paginationPageSize:15,enableColumnMenus:!1,enableFiltering:!0,columnDefs:[{field:"id",displayName:"ID",cellTemplate:'<div style="padding: 4px 10px 2px 10px;">{{row.entity.id}}</div>',width:75,enableFiltering:!1},{field:"problem_statement",displayName:"Problem Statement",cellTemplate:'<div style="padding: 4px 10px 2px 10px; cursor: pointer;" ng-click="grid.appScope.showDescription(row.entity.problem_statement)">{{row.entity.problem_statement | trim:true:125:\' ....\'}}</div>',enableSorting:!1},{field:"Actions",cellTemplate:'<div class="row"><div class="col-md-offset-1 col-md-2"><button class="btn btn-success fa fa-thumbs-up" ng-click="grid.appScope.upvote(row)" style="border-radius: 0px;"></div><div class="col-md-offset-2 col-md-2"><button class="btn btn-danger fa fa-thumbs-down" ng-click="grid.appScope.downvote(row)" style="border-radius: 0px;"></div></div>',enableSorting:!1,enableFiltering:!1,width:120}]},e.grid=null,e.gridOptions.onRegisterApi=function(t){e.grid=t.grid,e.grid.appScope.upvote=e.upvote,e.grid.appScope.downvote=e.downvote,e.grid.appScope.showDescription=e.showDescription},e.upvote=function(e){var i=e.entity.id;t.voteProblemSuggest({type:"upvote",suggest_problem_id:i})},e.downvote=function(e){var i=e.entity.id;t.voteProblemSuggest({type:"downvote",suggest_problem_id:i})},e.suggestProblem=function(){$("#add_problem_suggest").attr("disabled","disabled"),bootbox.confirm("You won't be able to edit the problem statement later, Do you really want to submit?",function(i){i?(e.problem_statement=suggest_problem_editor.getSession().getValue().replace(/[\n]{3,}/gi,"\n\n").trim(),e.problem_statement.length>=200&&e.problem_statement.length<=3e3?t.addProblemSuggest({problem_statement:e.problem_statement,topic:e.suggestProbTopic,self_claim:e.selfClaim}):($("#add_problem_suggest").removeAttr("disabled"),e.problem_statement.length<300&&bootbox.alert('<div class="alert alert-danger"><center>Flash Fiction Detected!!!</center></div>Provided problem description is "toooo short". Please provide a description with at least 200 characters.'),e.problem_statement.length>3e3&&bootbox.alert('<div class="alert alert-danger"><center>Storyteller Detected!!!</center></div><br /><br />Provided problem description is "toooo long". Please provide a description with at most 3000 characters.'))):$("#add_problem_suggest").removeAttr("disabled")})},e.showDescription=function(t){e.selected_problem_statement=t.replace(/[\n]{3,}/gi,"\n\n").trim(),$("#probSuggestDescription").modal("show")},e.loadData=function(){t.loadData(function(t){e.problem_suggests=t.problem_suggests,e.topics=t.topics,e.suggestProbTopic=e.topics[0],$.loader("close")})}}]),suggestProblemApp.factory("backend",["$http",function(e){return{loadData:function(t){e({method:"GET",url:"/contribute/suggest-problem/?json=true"}).then(function(e){t(e.data)},function(e){t(e)})},addProblemSuggest:function(t){e({method:"POST",url:"/contribute/add-suggest-problem",data:t}).then(function(e){e.data.success?bootbox.alert("Problem added to Suggestions!!"):("dwarf"==e.data.error_type&&bootbox.alert('<div class="alert alert-danger"><center>Flash Fiction Detected!!!</center></div>Provided problem description is "toooo short". Please provide a description with at least 200 characters.'),"elf"==e.data.error_type&&bootbox.alert('<div class="alert alert-danger"><center>Storyteller Detected!!!</center></div><br /><br />Provided problem description is "toooo long". Please provide a description with at most 3000 characters.'),"duplicate"==e.data.error_type&&bootbox.alert('<div class="alert alert-danger"><center>Seriously!!!</center></div><br /><br />Provided description is similar to the some of the existing suggestions or is searchable on the web. ')),$("#add_problem_suggest").removeAttr("disabled")},function(e){console.log(e)})},voteProblemSuggest:function(t){console.log(t),e({method:"POST",url:"/contribute/vote-problem-suggest",data:t}).then(function(e){console.log(e),e.data.success?"upvote"==e.data.type?bootbox.alert("Upvoted!!"):"downvote"==e.data.type&&bootbox.alert("Downvoted!!"):"upvote"==e.data.type?bootbox.alert("Already upvoted."):"downvote"==e.data.type&&bootbox.alert("Already downvoted.")},function(e){console.log(e)})}}}]),suggestProblemApp.filter("trim",function(){return function(e,t,i,n){if(!e)return"";if(!(i=parseInt(i,10)))return e;if(e.length<=i)return e;if(e=e.substr(0,i),t){var r=e.lastIndexOf(" ");-1!==r&&("."!==e.charAt(r-1)&&","!==e.charAt(r-1)||(r-=1),e=e.substr(0,r))}return e+(n||" \u2026")}})}