(function(b,a){if(!a.UI){a.UI={};a.UI.DefaultZIndex={WaDropDown:40000,ToolTip:40000,Calendar:40000};a.UI.LinkedControlBehavior={Enable:"enable",Disable:"disable",Show:"show",Hide:"hide"};a.UI.MouseEventCode={RightButton:3};}})(window,window.WA);(function(c,b){if(!b.UI.Animation){b.UI.Animation=new a();}function a(){var f=this,h="WA.UI.Animation";f.toString=function(){return h;};f.animate=d;f.vivify=i;f.stop=g;function d(k,l,m,j){e()("#"+k).animate(l,m,j);}function i(l,k,j){e()(l).animate(k,j);}function g(k,j,l){k=(typeof(k)=="string")?b.$(k):k;e()(k).stop(j||false,l||false);}function e(){return(b.jq$)||c.jq$;}}})(window,WA);(function(d,c,b){if(!d.WaAttachmentsHandleService){d.WaAttachmentsHandleService=a;}function a(){var g=this;var f=c.jq$||d.jq$;g.deleteFile=e;g.uploadFile=h;g.fileUploaded=c.Tools.EventHandlers.createHandlers(g,{id:"attachmentControlFileUploaded"});g.fileUploadFailed=c.Tools.EventHandlers.createHandlers(g,{id:"attachmentControlFileUploadFailed"});g.fileUploadProgressUpdated=c.Tools.EventHandlers.createHandlers(g,{id:"attachmentControlFileUploadProgressUpdated"});g.fileDeleted=c.Tools.EventHandlers.createHandlers(g,{id:"attachmentControlFileDeleted"});g.fileDeleteFailed=c.Tools.EventHandlers.createHandlers(g,{id:"attachmentControlFileDeleteFailed"});function e(k){var i=k.domElementId,l=k.name,j=k.id,m=k.token;f.ajax({contentType:"application/json; charset=utf-8",data:JSON.stringify({resourceId:j,token:m}),processData:false,type:"POST",url:"/Sys/FileSystem/Delete",success:function(){g.fileDeleted.fireHandlers({id:j,name:l,domElementId:i});},error:function(n){g.fileDeleteFailed.fireHandlers({id:j,name:l,domElementId:i,message:n.responseText||n.statusText});}});}function h(p){var k=p.file,q=p.uploadToken,j=p.domElementId,n=p.isImage,o=c.topWindow.location.pathname,l=(/^\/event-/).test(o)||(/^\/admin\/events\//).test(o),m=!!c.topWindow.isForumEditPage;var r={"X-Upload-Path":l?"EventRegistrations":b,"X-Access-Level":m?b:"AdminOnly"};if(d.FormData!==b){var i=new FormData();i.append("file",k);i.append("token",q);f.ajax({contentType:false,data:i,processData:false,type:"POST",url:"/Sys/FileSystem/Upload",headers:r,xhr:function(){var s=f.ajaxSettings.xhr();if(s.upload){s.upload.addEventListener("progress",function(t){var u=0,v=t.loaded||t.position,w=t.total;if(t.lengthComputable){u=Math.ceil(v/w*100);g.fileUploadProgressUpdated.fireHandlers({domElementId:j,isImage:n,fileName:k.name,percent:u});}},false);}return s;},success:function(s){g.fileUploaded.fireHandlers({id:s.id,name:k.name,token:s.token,size:k.size,isImage:n,url:s.url,domElementId:j,lastModified:k.lastModified,thumbnailUrl:s.thumbnailUrl});},error:function(s){g.fileUploadFailed.fireHandlers({domElementId:j,isImage:n,name:k.name,message:s.responseText||s.statusText});}});}else{g.fileUploadFailed.fireHandlers({domElementId:j,isImage:n,fileName:k.name,message:"This browser doesn't support HTML5 file uploads!"});}}}})(window,window.WA);(function(d,c,b){if(!d.WaAttachmentsHandleControl){d.WaAttachmentsHandleControl=a;}function a(e,D){var i=/^image\//,o=20000000,n=20,A={errorLargeFileTemplate:"File {0} exceeds maximum size of 20Mb",errorFilesCountExceeded:"Attachments number exceeded. You can upload up to 20 files.",errorHasAlreadyBeenUploadedTemplate:"File {0} has already been uploaded",errorUnableToDeleteFileTemplate:"Unable to delete file {0}",errorUnableToUploadFileTemplate:"Unable to upload file {0}"},B=new WaAttachmentsHandleService(),C={},f,h=c.topWindow.contentarea?c.topWindow.contentarea.document:h;function j(){f=h.getElementById(e||"idAttachmentsContainer");if(!f){return;}if(c.Browser.isMSIE8||c.Browser.isMSIE9){f.querySelector(".attachmentsUploadContainer").style.display="none";}var E=f.querySelector(".inputUploadFile");c.addHandler(E,"click",w);c.addHandler(E,"change",v);c.addHandler(f,"click",p);B.fileUploaded.addHandler(s);B.fileUploadFailed.addHandler(t);B.fileUploadProgressUpdated.addHandler(u);B.fileDeleted.addHandler(q);B.fileDeleteFailed.addHandler(r);}function g(E,F){var G,J,H,I,K;I=h.getElementById(E);G=I.getAttribute("data-resource-id");J=I.getAttribute("data-resource-token");if(G in C){B.deleteFile({domElementId:E,id:G,token:J,name:F});}else{H=h.createElement("input");H.name=(e||"")+"detachedFiles";H.type="hidden";H.value=G;K=I.parentNode;K.parentNode.appendChild(H);z(E);}}function z(F){var G=c.jq$||d.jq$;var E=(c.topWindow.contentarea&&c.topWindow.contentarea.document)?c.topWindow.contentarea.document:c.topWindow.document;G("#"+F,E).hide("slow",function(){G(this).remove();});}function p(E){var F,G,H=c.getEventTarget(E);if(c.Dom.containsClassName(H,"deleteButton")){G=c.Dom.getFirstParentByTagName(H,"li");F=G.getAttribute("data-resource-name");g(G.id,F);}}function q(I,E){var F=E.domElementId,H=E.id,G=E.name;if(H in C){delete C[H];}z(F);}function r(G,E){var F=E.name;alert(c.String.format(A.errorUnableToDeleteFileTemplate,F));}function u(I,E){if(E.isImage){return false;}var F=E.domElementId,G,H=E.percent;G=h.getElementById(F).querySelector(".fileUploadProgressBarFill");G.style.width=H+"%";}function t(J,E){var F,G=E.domElementId,H=E.name,I=c.String.format(A.errorUnableToUploadFileTemplate,H);F=h.getElementById(G);F.parentNode.removeChild(F);alert(E.message?I+": "+E.message:I);}function s(Q,F){var G=F.domElementId,H=F.id,I=F.lastModified,J=F.url,K=F.name,M=F.token,L=F.size,O=F.isImage,E,N,P;P=h.getElementById(G);P.classList.remove("uploading");P.setAttribute("data-resource-id",H);P.setAttribute("data-resource-name",K);P.setAttribute("data-resource-token",M);C[H]={name:K,size:L,lastModified:I,domElementId:G};if(O){P.querySelector(".photoLink").href=J;}else{E=h.createElement("a");E.className="fileName";E.innerHTML=K;E.href=J;E.setAttribute("target","_blank");P.insertBefore(E,P.firstChild);}N=h.createElement("input");N.name=(e||"")+"uploadedFiles";N.type="hidden";N.value=H;P.appendChild(N);}function w(){this.value=null;}function v(){var F=this.files,E,G;for(G=0;G';I.className="photosContainerLi uploading";I.id=E;I.innerHTML=J;I.querySelector(".photoInnerContainer a").appendChild(G);K.appendChild(I);L.onload=(function(M){return function(N){M.src=N.target.result;M.setAttribute("eventtags","lightbox");};})(G);L.readAsDataURL(F);B.uploadFile({file:F,domElementId:E,isImage:true,uploadToken:D});}function x(G){var F=c.getRandomId(),J=f.querySelector(".linksContainerUl"),H=h.createElement("li"),I='';H.className="linksContainerLi uploading";H.id=F;G.sizeReadable="("+G.size+" B)";for(var E=["KB","MB","GB"],L=0,K=G.size/1024;K>1;K/=1024,L++){G.sizeReadable="("+K.toFixed(2)+" "+E[L]+")";}H.innerHTML=I;H.querySelector(".fileName").innerHTML=G.name;H.querySelector(".fileSize").innerHTML=G.sizeReadable;J.appendChild(H);B.uploadFile({file:G,domElementId:F,isImage:false,uploadToken:D});}function m(E){return E.size>o;}function l(){var F=f.querySelectorAll(".photosContainerUl .photosContainerLi").length,E=f.querySelectorAll(".linksContainerUl .linksContainerLi").length;return(F+E>=n);}function k(E){var F,G;for(F in C){G=C[F];if(G.name===E.name&&G.lastModified===E.lastModified&&G.size===E.size){return true;}}return false;}j();}})(window,window.WA);(function(d,c,b){if(!c.UI.BackgroundImageControl){c.UI.BackgroundImageControl=a;}function a(i,h){h=h||{};var p=this,t="WA.UI.BackgroundImageControl",v=i,r=v.resources,o=h.parentComponent;p.toString=function(){return t;};p.RenderComplete=c.Tools.EventHandlers.createHandlers(p,{id:"RenderComplete"});p.Dispose=c.Tools.EventHandlers.createHandlers(p,{id:"Dispose"});p.ValueChanged=c.Tools.EventHandlers.createHandlers(p,{id:"ValueChanged"});var k=false,u,j,e;p.render=q;function q(){return c.UI.BackgroundImageControlTemplate(v);}function m(x,w){p.RenderComplete.fireHandlers();s();}function l(x,w){s();p.ValueChanged.fireHandlers();}function s(){if(u.getValue("image.src")){e.show();c.UI.Helpers.ControlHelper.showDescription(v.id);}else{e.hide();c.UI.Helpers.ControlHelper.hideDescription(v.id);}}function n(x,w){p.ValueChanged.fireHandlers();}function g(){o.RenderComplete.addHandler(m);o.Dispose.addHandler(f);u=c.UI.Helpers.ValueAccessorHelper.createValueAccessor(i,p);j=new c.UI.InsertImageControl({id:v.id+c.UI.BackgroundImageControlTemplate.InsertImageControlIdPostfix,valueAccessor:u.createChildValueAccessor("image",p),fileSortType:v.fileSortType,rootPath:v.rootPath,resources:r.insertImageControl,parentComponent:p});j.ValueChanged.addHandler(l);e=new c.UI.BackgroundImageSettings({id:v.id+c.UI.BackgroundImageControlTemplate.BackgroundImageSettingsIdPostfix,valueAccessor:u.createChildValueAccessor("settings",p),resources:r.backgroundImageSettings,parentComponent:p});e.ValueChanged.addHandler(n);}function f(){if(k){return;}p.Dispose.fireHandlers();o.RenderComplete.removeHandler(m);o.Dispose.removeHandler(f);v=null;o=null;j=null;e=null;u=null;p.RenderComplete=null;p.Dispose=null;p.ValueChanged=null;k=true;}g();}})(window,WA);(function(d,c,b){if(!c.UI.BackgroundImageControlTemplate){c.UI.BackgroundImageControlTemplate=a;c.UI.BackgroundImageControlTemplate.InsertImageControlIdPostfix="_insertImageControl";c.UI.BackgroundImageControlTemplate.BackgroundImageSettingsIdPostfix="_bgImageSettings";}function a(i){var g=c.UI.ContainerTemplate,h=c.UI.InsertImageControlTemplate,e=c.UI.BackgroundImageSettingsTemplate,f=c.UI.ControlLayoutTemplate;i.controlContainerDisplayType=c.UI.ControlLayoutTemplate.ControlContainerDisplayType.Flexible;i.cssClass="backgroundImageControl"+(i.cssClass?" "+i.cssClass:"");i.layoutContentHTML=g({id:i.id,contentHTML:h({id:i.id+c.UI.BackgroundImageControlTemplate.InsertImageControlIdPostfix,title:i.resources.insertImageControl.title,titlePosition:c.UI.ControlLayoutTemplate.TitlePosition.Left,titleWidth:138,resources:i.resources.insertImageControl})+e({id:i.id+c.UI.BackgroundImageControlTemplate.BackgroundImageSettingsIdPostfix,resources:i.resources.backgroundImageSettings})});return f(i);}})(window,WA);(function(d,c,b){if(!c.UI.BackgroundImageSettings){c.UI.BackgroundImageSettings=a;}function a(l){var s=this,x="WA.UI.BackgroundImageSettings",z=l,v=l.resources,p=z.parentComponent;s.toString=function(){return x;};s.RenderComplete=c.Tools.EventHandlers.createHandlers(s,{id:"RenderComplete"});s.Dispose=c.Tools.EventHandlers.createHandlers(s,{id:"Dispose"});s.ValueChanged=c.Tools.EventHandlers.createHandlers(s,{id:"ValueChanged"});var m=false,y,u,q,r,e;s.render=t;s.show=w;s.hide=j;function w(){c.Dom.removeClassName(e,"hidden");}function j(){c.Dom.addClassName(e,"hidden");}function t(){return c.UI.BackgroundImageSettingsTemplate(z);}function o(B,A){e=c.$(z.id);s.RenderComplete.fireHandlers();}function n(B,A){s.ValueChanged.fireHandlers();}function i(){return[{value:"no-repeat",contentText:v.repeat.options.noRepeat,attr:{eventTags:"no-repeat"}},{value:"repeat-x",contentText:v.repeat.options.repeatX,attr:{eventTags:"repeat-x"}},{value:"repeat-y",contentText:v.repeat.options.repeatY,attr:{eventTags:"repeat-y"}},{value:"repeat",contentText:v.repeat.options.repeat,attr:{eventTags:"repeat"}}];}function g(){return[{value:"left",contentText:v.positionX.options.left,attr:{eventTags:"left"}},{value:"center",contentText:v.positionX.options.center,attr:{eventTags:"center"}},{value:"right",contentText:v.positionX.options.right,attr:{eventTags:"right"}}];}function h(){return[{value:"top",contentText:v.positionY.options.top,attr:{eventTags:"top"}},{value:"center",contentText:v.positionY.options.center,attr:{eventTags:"center"}},{value:"bottom",contentText:v.positionY.options.bottom,attr:{eventTags:"bottom"}}];}function k(){p.RenderComplete.addHandler(o);p.Dispose.addHandler(f);y=c.UI.Helpers.ValueAccessorHelper.createValueAccessor(l,s);u=new c.UI.WaDropdownList({id:z.id+c.UI.BackgroundImageSettingsTemplate.RepeatlIdPostfix,items:i(),valueAccessor:y.createChildValueAccessor("repeat",s)},{parentComponent:s});u.ValueChanged.addHandler(n);q=new c.UI.WaDropdownList({id:z.id+c.UI.BackgroundImageSettingsTemplate.PositionXlIdPostfix,items:g(),valueAccessor:y.createChildValueAccessor("positionX",s)},{parentComponent:s});q.ValueChanged.addHandler(n);r=new c.UI.WaDropdownList({id:z.id+c.UI.BackgroundImageSettingsTemplate.PositionYlIdPostfix,items:h(),valueAccessor:y.createChildValueAccessor("positionY",s)},{parentComponent:s});r.ValueChanged.addHandler(n);}function f(){if(m){return;}s.Dispose.fireHandlers();p.RenderComplete.removeHandler(o);p.Dispose.removeHandler(f);z=null;p=null;u=null;q=null;r=null;y=null;s.RenderComplete=null;s.Dispose=null;s.ValueChanged=null;m=true;}k();}})(window,WA);(function(d,c,b){if(!c.UI.BackgroundImageSettingsTemplate){c.UI.BackgroundImageSettingsTemplate=a;c.UI.BackgroundImageSettingsTemplate.RepeatlIdPostfix="_repeat";c.UI.BackgroundImageSettingsTemplate.PositionXlIdPostfix="_positionX";c.UI.BackgroundImageSettingsTemplate.PositionYlIdPostfix="_positionY";}function a(g){var f=c.UI.ContainerTemplate,e=c.UI.WaDropdownListTemplate;return f({id:g.id,cssClass:"backgroundImageSettings",contentHTML:e({id:g.id+c.UI.BackgroundImageSettingsTemplate.RepeatlIdPostfix,title:g.resources.repeat.title,titlePosition:c.UI.ControlLayoutTemplate.TitlePosition.Left,titleWidth:120})+e({id:g.id+c.UI.BackgroundImageSettingsTemplate.PositionXlIdPostfix,title:g.resources.positionX.title,titlePosition:c.UI.ControlLayoutTemplate.TitlePosition.Left,titleWidth:120})+e({id:g.id+c.UI.BackgroundImageSettingsTemplate.PositionYlIdPostfix,title:g.resources.positionY.title,titlePosition:c.UI.ControlLayoutTemplate.TitlePosition.Left,titleWidth:120})});}})(window,WA);(function(c,b){if(!b.UI.BackgroundImagePicker){b.UI.BackgroundImagePicker=a;b.UI.BackgroundImagePicker.TypeName="WA.UI.BackgroundImagePicker";}function a(j,i,z){i=i||{};var t=this,r=i.parentComponent,B=b.UI.BackgroundImagePicker.TypeName,D=j,C,x=j.resources;t.toString=function(){return B;};t.ValueChanged=b.Tools.EventHandlers.createHandlers(t,{id:"ValueChanged"});t.ValidationFailed=b.Tools.EventHandlers.createHandlers(t,{id:"ValidationFailed"});t.RenderComplete=b.Tools.EventHandlers.createHandlers(t,{id:"RenderComplete"});t.Dispose=b.Tools.EventHandlers.createHandlers(t,{id:"Dispose"});var q,s,v,u,y={};t.render=w;t.getSelectedImage=function(){return y;};t.getType=function(){return D.layoutControlType;};function w(){return b.UI.BackgroundImagePickerTemplate(D);}function o(){var E=D.frameWindow||c;t.RenderComplete.fireHandlers();A();E=null;}function p(){t.ValidationFailed.fireHandlers();}function A(){if(!C.getValue("value")){v.hideLink();q.setWaButtonTitle(x.SelectButtonTitle);return;}v.showLink();q.setWaButtonTitle(x.ChangeButtonTitle);}function k(F,E){y=E.value;C.setValue(y.source,"source");C.setValue(y.value,"value");A();t.ValueChanged.fireHandlers();}function l(F,E){}function m(){s.showPicker({tabId:b.Admin.Cms.UI.Dialogs.BackgroundImagePickerDialogTemplate.GlobalTabId});}function n(){C.setValue("Undefined","source");C.setValue("","value");s.setValue(C.getValue());A();y={};t.ValueChanged.fireHandlers();}function e(E){if(E.source.toLowerCase()==b.UI.BackgroundStyleSelectorTemplate.ImageSource.Shared||E.source.toLowerCase()==b.UI.BackgroundStyleSelectorTemplate.ImageSource.Theme){return{value:E.value,source:E.source,thumbnailPath:g(E.value,E.source)};}return E;}function f(E){switch(E.toLowerCase()){case b.UI.BackgroundStyleSelectorTemplate.ImageSource.Shared:return"sharedBackgrounds";case b.UI.BackgroundStyleSelectorTemplate.ImageSource.Theme:return"recommendedBackgrounds";default:throw new Error("unknown source type");}}function g(L,K){var E,J,I,H,G,F;for(E=0,J=x.libraries.length;Es.value){G=G.substring(0,s.value);}return{normalizedValue:G};}function i(H,F){if(q){var D,E,G;for(D=0,E=q.length;Ds.value&&F>0){return false;}return true;}function e(D){if(!q){q=[];}q.push({regex:new RegExp(D.value,"im"),rule:D});}function f(D){if(!x){x=[];}x.push({regex:new RegExp(D.regex,"g"),rule:D});}function g(D){if(!A){A=[];}A.push({rule:D});}function r(J,H){var I=J?J.toString():"";var G="";var D,F,E;for(D=0,F=I.length;D1?c.Array.getHashFromArrays(E.from,E.to):null,rule:E};break;case"trim":g(E);break;}}}function k(){w.Dispose.fireHandlers();v.Dispose.removeHandler(k);j=null;s=null;q=null;u=null;x=null;z=null;A=null;h=null;v=null;w.Dispose=null;}}})(window,WA);(function(d,c,b){if(!c.UI.BordersControl){c.UI.BordersControl=a;}function a(l,k){k=k||{};var q=this,u="WA.UI.BordersControl",w=l,p=k.parentComponent,s=w.resources;q.toString=function(){return u;};q.RenderComplete=c.Tools.EventHandlers.createHandlers(q,{id:"RenderComplete"});q.Dispose=c.Tools.EventHandlers.createHandlers(q,{id:"Dispose"});q.ValueChanged=c.Tools.EventHandlers.createHandlers(q,{id:"ValueChanged"});var m=false,h,g,e,f,v;q.render=r;q.setCustomColors=t;function t(x){h.setCustomColors(x);g.setCustomColors(x);e.setCustomColors(x);f.setCustomColors(x);}function r(){return c.UI.BordersControlTemplate(w);}function n(y,x){q.RenderComplete.fireHandlers();}function o(){q.ValueChanged.fireHandlers();}function j(){p.RenderComplete.addHandler(n);p.Dispose.addHandler(i);v=c.UI.Helpers.ValueAccessorHelper.createValueAccessor(w,q);h=new c.UI.BorderSelector({id:w.id+c.UI.BordersControlTemplate.IdBorderSelectorTopPostfix,valueAccessor:v.createChildValueAccessor("top",q),borderMinWidth:w.borderMinWidth,borderMaxWidth:w.borderMaxWidth,hint:w.hint,defaultValue:w.defaultValue,resources:s.borderSelector,parentComponent:q});h.ValueChanged.addHandler(o);g=new c.UI.BorderSelector({id:w.id+c.UI.BordersControlTemplate.IdBorderSelectorRightPostfix,valueAccessor:v.createChildValueAccessor("right",q),borderMinWidth:w.borderMinWidth,borderMaxWidth:w.borderMaxWidth,hint:w.hint,defaultValue:w.defaultValue,resources:s.borderSelector,parentComponent:q});g.ValueChanged.addHandler(o);e=new c.UI.BorderSelector({id:w.id+c.UI.BordersControlTemplate.IdBorderSelectorBottomPostfix,valueAccessor:v.createChildValueAccessor("bottom",q),borderMinWidth:w.borderMinWidth,borderMaxWidth:w.borderMaxWidth,hint:w.hint,defaultValue:w.defaultValue,resources:s.borderSelector,parentComponent:q});e.ValueChanged.addHandler(o);f=new c.UI.BorderSelector({id:w.id+c.UI.BordersControlTemplate.IdBorderSelectorLeftPostfix,valueAccessor:v.createChildValueAccessor("left",q),borderMinWidth:w.borderMinWidth,borderMaxWidth:w.borderMaxWidth,hint:w.hint,defaultValue:w.defaultValue,resources:s.borderSelector,parentComponent:q});f.ValueChanged.addHandler(o);}function i(){if(m){return;}q.Dispose.fireHandlers();p.RenderComplete.removeHandler(n);p.Dispose.removeHandler(i);w=null;p=null;q.RenderComplete=null;q.Dispose=null;q.ValueChanged=null;m=true;h=null;g=null;e=null;f=null;v=null;}j();}})(window,WA);(function(d,c,b){if(!c.UI.BordersControlTemplate){c.UI.BordersControlTemplate=a;c.UI.BordersControlTemplate.IdPostfix="_BordersControl";c.UI.BordersControlTemplate.IdBorderSelectorTopPostfix="_TopBorderSelector";c.UI.BordersControlTemplate.IdBorderSelectorRightPostfix="_RightBorderSelector";c.UI.BordersControlTemplate.IdBorderSelectorBottomPostfix="_BottomBorderSelector";c.UI.BordersControlTemplate.IdBorderSelectorLeftPostfix="_LeftBorderSelector";}function a(i){var h=c.UI.ContainerTemplate,e=c.UI.BorderSelectorTemplate,f=c.UI.ControlLayoutTemplate;i.controlContainerDisplayType=c.UI.ControlLayoutTemplate.ControlContainerDisplayType.Flexible;i.cssClass="bordersControl";i.layoutContentHTML=g(i);return f(i);function g(j){return e({id:j.id+c.UI.BordersControlTemplate.IdBorderSelectorTopPostfix,title:j.resources.borderSelector.top.title,titleWidth:j.titleWidth,titlePosition:j.titlePosition,cssClass:"top"})+e({id:j.id+c.UI.BordersControlTemplate.IdBorderSelectorRightPostfix,title:j.resources.borderSelector.right.title,titleWidth:j.titleWidth,titlePosition:j.titlePosition,cssClass:"right"})+e({id:j.id+c.UI.BordersControlTemplate.IdBorderSelectorBottomPostfix,title:j.resources.borderSelector.bottom.title,titleWidth:j.titleWidth,titlePosition:j.titlePosition,cssClass:"bottom"})+e({id:j.id+c.UI.BordersControlTemplate.IdBorderSelectorLeftPostfix,title:j.resources.borderSelector.left.title,titleWidth:j.titleWidth,titlePosition:j.titlePosition,cssClass:"left"});}}})(window,WA);(function(d,c,b){if(!c.UI.BorderSelector){c.UI.BorderSelector=a;}function a(k){var p=this,u="WA.UI.BorderSelector",w=k,o=w.parentComponent,r=w.resources,v=w.valueAccessor;p.toString=function(){return u;};p.RenderComplete=c.Tools.EventHandlers.createHandlers(p,{id:"RenderComplete"});p.Dispose=c.Tools.EventHandlers.createHandlers(p,{id:"Dispose"});p.ValueChanged=c.Tools.EventHandlers.createHandlers(p,{id:"ValueChanged"});var l=false,f,g,e;p.render=q;p.setCustomColors=t;function t(x){e.setCustomColors(x);}function q(){return c.UI.BorderSelectorTemplate(w);}function m(y,x){p.RenderComplete.fireHandlers();s();}function n(y,x){s();p.ValueChanged.fireHandlers();}function s(){if(f.getValue()=="none"){g.disable();e.disable();}else{g.enable();e.enable();}}function h(){return[{contentText:r.borderStyleSelector.options.none,value:"none"},{contentText:r.borderStyleSelector.options.solid,value:"solid"},{contentText:r.borderStyleSelector.options.dashed,value:"dashed"},{contentText:r.borderStyleSelector.options.dotted,value:"dotted"},{contentText:r.borderStyleSelector.options.pair,value:"double"}];}function j(){o.RenderComplete.addHandler(m);o.Dispose.addHandler(i);f=new c.UI.WaDropdownList({id:w.id+c.UI.BorderSelectorTemplate.IdBorderStyleSelectorPostfix,items:h(),valueAccessor:v.createChildValueAccessor("style",p)},{parentComponent:p});f.ValueChanged.addHandler(n);g=new c.UI.NumberTextbox({id:w.id+c.UI.BorderSelectorTemplate.IdBorderWidthSelectorPostfix,valueAccessor:v.createChildValueAccessor("width",p),minValue:w.borderMinWidth,maxValue:w.borderMaxWidth,hint:w.hint,defaultValue:w.defaultValue},{parentComponent:p});g.ValueChanged.addHandler(n);e=new c.UI.ColorPickerCompact({id:w.id+c.UI.BorderSelectorTemplate.IdBorderColorSelectorPostfix,valueAccessor:v.createChildValueAccessor("color",p),resources:r.borderColorSelector,parentComponent:p});e.ValueChanged.addHandler(n);}function i(){if(l){return;}p.Dispose.fireHandlers();o.RenderComplete.removeHandler(m);o.Dispose.removeHandler(i);w=null;o=null;p.RenderComplete=null;p.Dispose=null;p.ValueChanged=null;l=true;f=null;g=null;e=null;v=null;}j();}})(window,WA);(function(d,c,b){if(!c.UI.BorderSelectorTemplate){c.UI.BorderSelectorTemplate=a;c.UI.BorderSelectorTemplate.IdPostfix="_BorderSelector";c.UI.BorderSelectorTemplate.IdBorderStyleSelectorPostfix="_BorderStyleSelector";c.UI.BorderSelectorTemplate.IdBorderWidthSelectorPostfix="_BorderWidthSelector";c.UI.BorderSelectorTemplate.IdBorderColorSelectorPostfix="_BorderColorSelector";}function a(k){var j=c.UI.ContainerTemplate,f=c.UI.WaDropdownListTemplate,g=c.UI.NumberTextboxTemplate,e=c.UI.ColorPickerCompactTemplate,h=c.UI.ControlLayoutTemplate;k.controlContainerDisplayType=c.UI.ControlLayoutTemplate.ControlContainerDisplayType.Flexible;k.cssClass="borderSelector";k.layoutContentHTML=i(k);return h(k);function i(l){return f({id:l.id+c.UI.BorderSelectorTemplate.IdBorderStyleSelectorPostfix,controlContainerDisplayType:c.UI.ControlLayoutTemplate.ControlContainerDisplayType.Fixed,cssClass:"borderStyleSelector"})+j({cssClass:"divider"})+g({id:l.id+c.UI.BorderSelectorTemplate.IdBorderWidthSelectorPostfix,controlContainerDisplayType:c.UI.ControlLayoutTemplate.ControlContainerDisplayType.Fixed,cssClass:"borderWidthSelector"})+j({cssClass:"divider"})+e({id:l.id+c.UI.BorderSelectorTemplate.IdBorderColorSelectorPostfix,controlContainerDisplayType:c.UI.ControlLayoutTemplate.ControlContainerDisplayType.Fixed,cssClass:"borderColorSelector"});}}})(window,WA);(function(d,c,b){if(!c.UI.BreadCrumbs){c.UI.BreadCrumbs=a;}function a(o,n){n=n||{};var t=this,x="WA.UI.BreadCrumbs",y=o,s=n.parentComponent;t.toString=function(){return x;};t.RenderComplete=c.Tools.EventHandlers.createHandlers(t,{id:"RenderComplete"});t.Dispose=c.Tools.EventHandlers.createHandlers(t,{id:"Dispose"});t.FilePathChange=c.Tools.EventHandlers.createHandlers(t,{id:"FilePathChange"});var p=false,f=[],h,g;t.render=v;t.refreshCrumbs=u;t.disable=i;t.enable=l;function i(){c.Dom.addClassName(g,"disabled");var z,B,A;for(z=0,B=f.length;z"});}})(window,WA);(function(d,c,b){if(!c.UI.CrumbTemplate){c.UI.CrumbTemplate=a;c.UI.CrumbTemplate.CssClasses={Active:"active"};}function a(g){var e=c.UI.ContainerTemplate,f=c.UI.LinkTemplate,h=c.UI.TextControlSimpleTemplate;if(g.state!==c.UI.Crumb.State.Active){return e({id:g.id,cssClass:"crumb",contentHTML:f({id:g.id+c.UI.LinkTemplate.defaultEventTag,contentText:g.title})});}else{return e({id:g.id,cssClass:"crumb",contentHTML:h({id:g.id+c.UI.TextControlSimpleTemplate.Postfix,cssClass:"inlineText",contentText:g.title})});}}})(window,WA);(function(d,c,b){if(!c.UI.BulletedContainer){c.UI.BulletedContainer=a;}function a(r,q){q=q||{};var z=this,F="WA.UI.BulletedContainer",G=r,y=q.parentComponent;z.toString=function(){return F;};z.RenderComplete=c.Tools.EventHandlers.createHandlers(z,{id:"RenderComplete"});z.Dispose=c.Tools.EventHandlers.createHandlers(z,{id:"Dispose"});z.IconClick=c.Tools.EventHandlers.createHandlers(z,{id:"IconClick"});z.dispose=k;z.render=B;z.renderComplete=x;z.recalculateState=A;z.enableToolTip=m;z.disableToolTip=j;var D,n=[],o=[],v=G.displayType&&G.displayType.toLowerCase()==c.UI.TextContainerTemplate.DisplayType.SingleLine.toLowerCase(),t=G.fadeMode===true&&v,H=t&&G.windowResizeWatcherEnabled===true,s=false,E,u=false;function m(){l();}function j(){i();if(E){E.disableToolTip();}}function A(){c.throttle(l,72);}function C(){i();if(t&&D.scrollWidth>D.offsetWidth){E.enableToolTip();}else{E.disableToolTip();}}function B(){return c.UI.BulletedContainerTemplate(G);}function l(){if(!t||u){return;}u=true;if(E){E.disableToolTip();}c.addHandler(D,"mousemove",C);}function i(){c.clearThrottle(l);if(!t||!u){return;}u=false;c.removeHandler(D,"mousemove",C);}function x(J,I){D=c.$(G.id+c.UI.BulletedContainerTemplate.TextContainerPostfix);h();z.RenderComplete.fireHandlers();E.setToolTipContent(G.contentText);l();if(H){c.addHandler(d,"resize",A);}}function h(){if(E&&!E.isDisposed()){return;}E=new c.UI.ToolTip({id:G.id+c.UI.BulletedContainerTemplate.ToolTipPostfix,target:D,autoEnable:false},{parentComponent:z,trackMouse:true});}function p(){y.RenderComplete.addHandler(x);y.Dispose.addHandler(k);f();g();}function g(){var K,L,J,I;for(K=0,L=n.length;K0&&m.width>0){q.width+=j;}q.height=Math.max(q.height,m.height);}return q;}function c(v,o,w,x){if(!o||!o.length){return"";}var n,u,l,p=[],k=h.UI.ContainerTemplate,j,s=w==h.UI.BulletedContainerTemplate.LeftIconsContainerPostfix,t=x.displayType==h.UI.BulletedContainerTemplate.DisplayType.SingleLine,q=s?x.leftIconsPadding:x.rightIconsPadding,r=s?x.leftIconsSize:x.rightIconsSize;for(n=0,u=o.length;n0){l.padding=l.padding||{};l.padding.left=(l.padding.left||0)+q;}p.push(h.UI.IconTemplate(l));}if(x.displayType==h.UI.BulletedContainerTemplate.DisplayType.SingleLine){j=h.Object.copy(x.attr);j.style=j.style||{};j.style["margin-top"]="-"+Math.round(r.height/2)+"px";if(v.iconsFixed){j.style.width=r.width+"px";}}else{j=x.attr;}return k({cssClass:"iconsContainer "+(s?"left":"right"),id:v.id?(v.id+w):null,attr:j,contentHTML:p.join("")});}function f(j){switch(j.toLowerCase()){case h.UI.BulletedContainerTemplate.DisplayType.SingleLine:return(" singleLine");case h.UI.BulletedContainerTemplate.DisplayType.MultiLine:return(" multiLine");case h.UI.BulletedContainerTemplate.DisplayType.ListItem:return(" listItem");default:}}})(window,WA);(function(d,c,b){if(!c.UI.BulletedList){c.UI.BulletedList=a;}function a(h,g){g=g||{};var l=this,n="WA.UI.BulletedList",o=h,k=g.parentComponent;l.toString=function(){return n;};l.RenderComplete=c.Tools.EventHandlers.createHandlers(l,{id:"RenderComplete"});l.Dispose=c.Tools.EventHandlers.createHandlers(l,{id:"Dispose"});var i=false;l.render=m;function m(){return c.UI.BulletedListTemplate(o);}function j(q,p){l.RenderComplete.fireHandlers();}function f(){k.RenderComplete.addHandler(j);k.Dispose.addHandler(e);}function e(){if(i){return;}l.Dispose.fireHandlers();k.RenderComplete.removeHandler(j);k.Dispose.removeHandler(e);o=null;k=null;l.RenderComplete=null;l.Dispose=null;i=true;}f();}})(window,WA);(function(d,c,b){if(!c.UI.BulletedListTemplate){c.UI.BulletedListTemplate=a;}function a(h){var e=[];var f,g;for(f=0,g=h.items.length;f");return c.join("");};a.UI.ButtonTemplate.defaultEventTag="_button";}})(window,WA);(function(c,b){if(!b.UI.CalendarTextBox){b.UI.CalendarTextBox=a;b.UI.CalendarTextBox.TypeName="WA.UI.CalendarTextBox";b.UI.CalendarTextBox.DateFormat={Ticks:"ticks",String:"string"};b.UI.CalendarTextBox.DefaultDateMask=b.WaDate.DateFormat.ddMMMMyyyy;}function a(y,x,Q){x=x||{};var O=this,Y=b.UI.CalendarTextBox.TypeName,aa=y,M=x.parentComponent,B=aa.minDateRestriction,A=aa.maxDateRestriction,Z;O.toString=function(){return Y;};O.RenderComplete=b.Tools.EventHandlers.createHandlers(O,{id:"RenderComplete"});O.Dispose=b.Tools.EventHandlers.createHandlers(O,{id:"Dispose"});O.ValueChanged=b.Tools.EventHandlers.createHandlers(O,{id:"ValueChanged"});O.EditStarted=b.Tools.EventHandlers.createHandlers(O,{id:"EditStarted"});O.VisualStateChanged=b.Tools.EventHandlers.createHandlers(O,{id:"VisualStateChanged"});var W,d,e,k=aa.mask||b.UI.CalendarTextBox.DefaultDateMask,j="%e %B %Y",C=b.String.gtrim(k).charAt(0)=="m",f="Br/ / /T/r",g=0,h=2,u=false,z=false,i,V=x.hasOwnProperty("showValidationMessage")?x.showValidationMessage:true;O.dispose=n;O.render=P;O.getValue=t;O.getFormattedValue=s;O.setValue=U;O.setPostfix=T;O.setErrorState=S;O.getType=function(){return aa.layoutControlType;};O.parentSelected=N;O.isEnabled=function(){return !aa.disabled;};O.enable=o;O.disable=m;O.setCalendarSelection=R;function R(ab){if(!ab){throw new Error("ticks value is empty.");}e.moveTo(new Date(ab));e.selection.set(q(ab));}function q(ab){return b.Date.format(new Date(ab),"yyyymmdd",true);}function o(){W.enable();d.enableToolTip();d.enableIcon();aa.disabled=false;}function m(){W.disable();d.disableToolTip();d.disableIcon();aa.disabled=true;}function N(ab){b.UI.Helpers.ControlHelper.applyParentSelectedBehavior(O,aa.parentChangeBehaviour,ab);}function S(ab){W.setErrorState(ab);if(ab===true){b.Dom.addClassName(i,"error");return;}b.Dom.removeClassName(i,"error");}function T(ab){b.UI.Helpers.ControlHelper.setPostfix(aa.id,ab);}function U(ac,ab){var ad=ab==b.UI.CalendarTextBox.DateFormat.Ticks?ac:l(ac);Z.setValue(ad,"unixTicks");W.setValue(r(ad));}function r(ab){if(!ab){return"";}return b.Date.format(new Date(ab),k,true);}function t(){return{name:aa.attr.eventTags,value:Z.getValue("unixTicks")};}function s(){var ab=Z.getValue("unixTicks");return{name:aa.attr.eventTags,value:r(ab)};}function P(){return b.UI.CalendarTextBoxTemplate(aa);}function p(){if(u){O.ValueChanged.fireHandlers({controlId:aa.id,newValue:Z.getValue("unixTicks")});}u=false;z=false;}function F(ac,ab){p();}function E(ac,ab){var ad=l(ab.value[0]);Z.setValue(ad,"unixTicks");W.setValue(r(ad));u=true;p();v();}function H(ac,ab){i=b.$(aa.id+b.UI.ControlLayoutTemplate.IdControlLayoutPostfix);Q.events.contentScroll.addHandler(G);e=Calendar.setup({inputField:aa.id+b.UI.CalendarTextBoxTemplate.idTextBoxPostfix,trigger:aa.id+b.UI.CalendarTextBoxTemplate.FakeTriggerPostfix,anchor:aa.id+b.UI.CalendarTextBoxTemplate.idTextBoxPostfix+b.UI.ControlLayoutTemplate.IdControlContainerPostfix,offset:{x:g,y:h},bottomBar:true,fdow:0,selectionType:Calendar.SEL_SINGLE,weekNumbers:false,dateFormat:j,titleFormat:"%b %Y",showTime:false,timePos:"right",minuteStep:10,fixed:true,noScroll:true,min:B?X(B.unixTicks):null,max:A?X(A.unixTicks):null,align:"Br/ / /T/r",date:aa.calendarSelection?new Date(aa.calendarSelection):true,selection:aa.calendarSelection?q(aa.calendarSelection):[]});e.ValueChanged.addHandler(E);e.CloseCalendar.addHandler(F);O.RenderComplete.fireHandlers();}function X(ac){var ab=new Date(ac);return[ab.getUTCFullYear(),ab.getUTCMonth()+1,ab.getUTCDate()].join("-");}function G(ac,ab){v();}function J(ac,ab){b.UI.Helpers.ControlHelper.hideValidationMessages(aa.id);O.EditStarted.fireHandlers();}function L(ac,ab){O.VisualStateChanged.fireHandlers();}function l(ab){if(!ab){return null;}return b.Date.getDateOnlyUtcTicks(Calendar.parseDate(""+ab,C));}function I(ac,ab){if(ab.isValueChanged===false){return;}var ad=l(W.getValue());W.setValue(r(ad));Z.setValue(ad,"unixTicks");b.UI.Helpers.ControlHelper.hideValidationMessages(aa.id);O.ValueChanged.fireHandlers({controlId:aa.id,newValue:Z.getValue("unixTicks")});u=false;}function D(ab){if(z===true||aa.disabled){b.throttle(v,50);z=false;return;}e.showForField(aa.id+b.UI.CalendarTextBoxTemplate.TriggerPostfix,aa.id+b.UI.CalendarTextBoxTemplate.idTextBoxPostfix,aa.id+b.UI.CalendarTextBoxTemplate.idTextBoxPostfix+b.UI.ControlLayoutTemplate.IdControlContainerPostfix,j,f,{x:g,y:h});z=true;}function v(){e.hide();}function K(){var ab=Z.getErrors();if(ab.length>0&&V){b.UI.Helpers.ControlHelper.showValidationMessages(aa.id,ab);S(true);}}function w(){Z=b.UI.Helpers.ValueAccessorHelper.createValueAccessor(y,O);W=new b.UI.TextBox({id:aa.id+b.UI.CalendarTextBoxTemplate.idTextBoxPostfix,attr:{eventTags:aa.attr.eventTags+"_input"},value:r(Z.getValue("unixTicks")),disabled:aa.disabled},{parentComponent:O});W.ValueChanged.addHandler(J);W.TextBoxBlur.addHandler(I);W.VisualStateChanged.addHandler(L);d=new b.UI.Icon({id:aa.id+b.UI.CalendarTextBoxTemplate.TriggerPostfix,iconType:b.UI.IconType.CalendarIcon,iconSize:b.UI.IconTemplate.IconSize.Medium,iconToolTip:{toolTipText:"Select date"},disabled:aa.disabled},{parentComponent:O});d.IconClick.addHandler(D);M.RenderComplete.addHandler(H);M.Dispose.addHandler(n);if(M.ValidationFailed){M.ValidationFailed.addHandler(K);}}function n(){O.Dispose.fireHandlers();M.RenderComplete.removeHandler(H);M.Dispose.removeHandler(n);if(M.ValidationFailed){M.ValidationFailed.removeHandler(K);}if(e){e.ValueChanged.removeHandler(E);e.CloseCalendar.removeHandler(F);}Q.events.contentScroll.removeHandler(G);b.clearThrottle(v);aa=null;e=null;i=null;M=null;O.RenderComplete=null;O.ValueChanged=null;O.EditStarted=null;O.Dispose=null;O.VisualStateChanged=null;}w();}})(window,WA);(function(d,c){if(!c.UI.CalendarTextBoxTemplate){c.UI.CalendarTextBoxTemplate=a;c.UI.CalendarTextBoxTemplate.getWidthByDateFormat=b;c.UI.CalendarTextBoxTemplate.TriggerPostfix="_trigger";c.UI.CalendarTextBoxTemplate.FakeTriggerPostfix="_fakeTrigger";c.UI.CalendarTextBoxTemplate.idTextBoxPostfix="_textBox";c.UI.CalendarTextBoxTemplate.PostfixTextPostfix="_postfixText";}function a(h){var g=c.UI.ContainerTemplate,f=c.UI.ControlLayoutTemplate,e=h.controlContainerDisplayType?h.controlContainerDisplayType:c.UI.ControlLayoutTemplate.ControlContainerDisplayType.Flexible,i=h.width;if(h.fitToDate){e=c.UI.ControlLayoutTemplate.ControlContainerDisplayType.Fixed;i=b(h.mask);}h.controlContainerDisplayType=e;h.cssClass="calendarTextBox";h.layoutContentHTML=g({cssClass:"calendarTextBoxContainer",attr:(e!=c.UI.ControlLayoutTemplate.ControlContainerDisplayType.Flexible&&i!=undefined)?{style:"width: "+i+"px;"}:undefined,contentHTML:g({cssClass:"inputContainer",contentHTML:c.UI.TextBoxTemplate({id:h.id+c.UI.CalendarTextBoxTemplate.idTextBoxPostfix,disabled:h.disabled})+g({cssClass:"triggerButtonContainer",contentHTML:c.UI.IconTemplate({id:h.id+c.UI.CalendarTextBoxTemplate.TriggerPostfix,iconType:c.UI.IconType.CalendarIcon,iconSize:c.UI.IconTemplate.IconSize.Medium,iconToolTip:{toolTipText:"toolTipText"}})+g({cssClass:"fakeTriggerButton",id:h.id+c.UI.CalendarTextBoxTemplate.FakeTriggerPostfix})})})});return f(h);}c.UI.CalendarTextBoxTemplate.createSummary=function(e){if(e.hideInSummary||e.value==""){return"";}return c.UI.ContainerTemplate({cssClass:"controlSummary",contentHTML:c.UI.TextContainerTemplate({contentText:e.summaryTitle})});};function b(e){e=e||c.UI.CalendarTextBox.DefaultDateMask;var f=c.WaDate.DateFormat;switch(e){case f.MMddyyyySlash:case f.dMMyyyySlash:case f.ddMMyyyyDot:case f.ddMMyyyyHyphen:case f.yyyyMMddHyphen:return 105;case f.dMMMyyyySpace:case f.ddMMMyyyySpace:case f.ddMMMyyyyHyphen:return 110;case f.ddddMMMMddyyyy:return 230;case f.dddMMMMddyyyy:return 190;case f.MMMMddyyyy:return 155;case f.ddMMMMyyyy:return 151;default:throw new Error("Unsupported date format.");}}})(window,WA);(function(d,c,b){if(!c.UI.CancellationBehaviorEdit){c.UI.CancellationBehaviorEdit=a;}function a(o,n){n=n||{};var w=this,y="WA.UI.CancellationBehaviorEdit",A=o,z=A.valueAccessor,u=n.parentComponent;w.toString=function(){return y;};w.RenderComplete=c.Tools.EventHandlers.createHandlers(w,{id:"RenderComplete"});w.Dispose=c.Tools.EventHandlers.createHandlers(w,{id:"Dispose"});w.ValueChanged=c.Tools.EventHandlers.createHandlers(w,{id:"ValueChanged"});var p=false,j,e,k,f,g;w.render=x;w.enable=l;w.disable=h;w.parentSelected=v;function x(){return c.UI.CancellationBehaviorEditTemplate(A);}function l(){}function v(B){c.UI.Helpers.ControlHelper.applyParentSelectedBehavior(w,A.parentChangeBehaviour,B);}function h(){}function t(C,B){if(k.getValue()){g.disable();}w.RenderComplete.fireHandlers();}function m(){var D=0;var C=9999;g=new c.UI.NumberTextbox({id:A.id+c.UI.CancellationBehaviorEditTemplate.DaysBeforeEventIdPostfix,minValue:D,maxValue:C,valueAccessor:z.createChildValueAccessor("daysBeforeEvent",w)},{parentComponent:w});var E=A.id+c.UI.CancellationBehaviorEditTemplate.DoNotAllowRadioButtonIdPostfix;k=z.createChildValueAccessor("doNotAllow",w),j=new c.UI.RadioButton({id:E,value:z.getValue("doNotAllow"),valueAccessor:k,attr:{eventTags:E}},{parentComponent:w});j.ValueChanged.addHandler(s);var B=A.id+c.UI.CancellationBehaviorEditTemplate.AllowRadioButtonIdPostfix;f=z.createChildValueAccessor("allow",w),e=new c.UI.RadioButton({id:B,valueAccessor:f,attr:{eventTags:B}},{parentComponent:w});e.ValueChanged.addHandler(q);u.RenderComplete.addHandler(t);u.Dispose.addHandler(i);}function s(C,B){f.setValue(!C.getValue());r();}function q(C,B){k.setValue(!C.getValue());r();}function r(){if(f.getValue()&&!g.isEnabled()){g.enable();}if(!f.getValue()&&g.isEnabled()){g.disable();}}function i(){if(p){return;}w.Dispose.fireHandlers();u.RenderComplete.removeHandler(t);u.Dispose.removeHandler(i);A=null;u=null;z=null;j=null;e=null;k=null;f=null;g=null;w.ValueChanged=null;w.RenderComplete=null;w.Dispose=null;p=true;}m();}})(window,WA);(function(i,h,g){if(!h.UI.CancellationBehaviorEditTemplate){h.UI.CancellationBehaviorEditTemplate=a;h.UI.CancellationBehaviorEditTemplate.DaysBeforeEventIdPostfix="_daysBeforeEvent";h.UI.CancellationBehaviorEditTemplate.DoNotAllowRadioButtonIdPostfix="_doNotAllowRadioButton";h.UI.CancellationBehaviorEditTemplate.AllowRadioButtonIdPostfix="_allowRadioButton";h.UI.CancellationBehaviorEditTemplate.CancellationRadioButtonGroup="cancellationGroup";}function a(k){var j=h.UI.ContainerTemplate;k.cssClass="cancellationBehaviorEditContainer";k.layoutContentHTML=j({cssClass:"cancellationBehaviorEdit",contentHTML:e(k)+b(k)});return h.UI.ControlLayoutTemplate(k);}function e(j){return h.UI.ContainerTemplate({cssClass:"doNotAllowCancellationContainer",contentHTML:f(j)});}function f(j){return h.UI.RadioButtonTemplate({id:j.id+h.UI.CancellationBehaviorEditTemplate.DoNotAllowRadioButtonIdPostfix,name:h.UI.CancellationBehaviorEditTemplate.CancellationRadioButtonGroup,contentText:j.resources.doNotAllowCancellationLabel});}function b(j){return h.UI.ContainerTemplate({cssClass:"allowCancellationContainer",contentHTML:c(j)+d(j)});}function c(j){return h.UI.RadioButtonTemplate({id:j.id+h.UI.CancellationBehaviorEditTemplate.AllowRadioButtonIdPostfix,name:h.UI.CancellationBehaviorEditTemplate.CancellationRadioButtonGroup,cssClass:"allowCancellationRadioButton",contentText:j.resources.allowUpToPeriodBeforeDaysEditorLabel});}function d(j){return h.UI.NumberTextboxTemplate({id:j.id+h.UI.CancellationBehaviorEditTemplate.DaysBeforeEventIdPostfix,cssClass:"allowCancellationDaysBeforeEvent",controlContainerDisplayType:h.UI.ControlLayoutTemplate.ControlContainerDisplayType.Fixed,postfix:j.resources.allowUpToPeriodExplanationLabel,width:50});}})(window,WA);(function(c,b){if(!b.UI.CanvasPageHeaderTemplate){b.UI.CanvasPageHeaderTemplate=a;}function a(d){d=d||{};d.contentText=d.contentText||"";d.cssClass=d.cssClass||"";return b.UI.ContainerTemplate({id:d.id,cssClass:"PageHeaderContainer xcontainer",contentHTML:b.UI.ContainerTemplate({cssClass:"PageHeader",contentHTML:b.UI.TextContainerTemplate({cssClass:"PageHeaderMainText "+d.cssClass,contentText:d.contentText})})});}})(window,WA);(function(d,c,b){if(!c.UI.CheckBox){c.UI.CheckBox=a;c.UI.CheckBox.TypeName="WA.UI.CheckBox";}function a(r,q,L){q=q||{};var I=this,O=c.UI.CheckBox.TypeName,l={},Q=r,P,G=q.parentComponent,s=Q.id,x;Q.attr=Q.attr||{eventTags:Q.id};I.toString=function(){return O;};var w=null,u=false,t,g,h=s+c.UI.ControlLayoutTemplate.IdControlLayoutPostfix,e,K,v=true,f=q.childElementEventHandlers||{ValueChanged:A,VisualStateChanged:F};I.ValueChanged=c.Tools.EventHandlers.createHandlers(I,{id:"ValueChanged"});I.ValidationFailed=c.Tools.EventHandlers.createHandlers(I,{id:"ValidationFailed"});I.Dispose=c.Tools.EventHandlers.createHandlers(I,{id:"Dispose"});I.RenderComplete=c.Tools.EventHandlers.createHandlers(I,{id:"RenderComplete"});I.VisualStateChanged=c.Tools.EventHandlers.createHandlers(I,{id:"VisualStateChanged"});I.isEnabled=function(){return v;};I.dispose=j;I.render=J;I.renderComplete=D;I.enable=k;I.disable=i;I.getId=function(){return s;};I.getContainerId=function(){return h;};I.setValue=M;I.parentSelected=H;I.isChecked=function(){return Q.checked;};I.isDisposed=function(){return u;};I.getValue=n;I.getType=function(){return Q.layoutControlType;};I.getContainer=function(){return g;};I.getModel=function(){return Q;};I.getKey=function(){return Q.attr.eventTags;};I.hide=o;I.show=N;I.isFirst=function(){return Q.isFirst;};function n(){return Q.checked?P.getValue():null;}function o(){g.style.display="none";}function N(){g.style.display="";}function H(R){if(R===false){return;}}function A(S,R){I.ValueChanged.fireHandlers(R);}function J(){return c.UI.CheckBoxTemplate(Q);}function D(S,R){var U=Q.frameWindow||d;t=c.$(s,U);g=c.$(h,U);if(!g){throw new Error("containerElem was not found!");}var T=P.getValue();if(T===b){P.setValue(t.checked);}else{if(c.getTypeString(T)=="boolean"){t.checked=T;}}l[s]={click:y};c.Tools.applyEventModel(l,Q.frameWindow);if(Q.linkedControlContainerType==c.UI.ControlLayoutTemplate.LinkedControlContainerType.Parent){x=c.$(Q.linkedControlContainerId);x.innerHTML=c.UI.Helpers.ControlHelper.createLinkedControlHtml(Q);}if(Q.disabled===true){i();}else{k();}if(Q.hidden===true){o();}Q.checked=t.checked;I.RenderComplete.fireHandlers(R);if(w){w.parentSelected(P.getValue());}U=null;}function E(R){c.UI.Helpers.ValidationHelper.updateValidationMessages({controlId:Q.id,messages:P.getErrors(),isEditInProgress:R.isEditInProgress});I.ValidationFailed.fireHandlers();}function y(R){if(c.getTypeString(P.getValue())=="boolean"){P.setValue(Boolean(t.checked));}Q.checked=t.checked;m();}function M(R,S){if(c.getTypeString(P.getValue())=="boolean"){P.setValue(Boolean(R));}Q.checked=R;if(t){t.checked=R;}if(!S){return;}m();}function m(){var R=P.getValue();if(w){w.parentSelected(R);}I.ValueChanged.fireHandlers({eventTags:Q.attr.eventTags,newValue:R,checkedState:Q.checked});}function z(S,R){switch(R.state){case true:k();break;case false:i();break;}}function F(){I.VisualStateChanged.fireHandlers();}function C(){e.disableToolTip();if(K){K.disableToolTip();}}function B(){e.enableToolTip();if(K){K.enableToolTip();}}function k(){c.Dom.removeClassName(g,"disabled");t.disabled=false;v=true;}function i(){c.Dom.addClassName(g,"disabled");t.disabled=true;v=false;}function p(){w=c.UI.Helpers.ControlHelper.createLinkedControl(Q,{parentComponent:I},L,f);G.Dispose.addHandler(j);if(G.RenderComplete){G.RenderComplete.addHandler(D);}if(G.ChildCheckBoxDragStart){G.ChildCheckBoxDragStart.addHandler(C);}if(G.ChildCheckBoxDragEnd){G.ChildCheckBoxDragEnd.addHandler(B);}if(G.ValidationFailed){G.ValidationFailed.addHandler(E);}if(G.EnabledStateChanged){G.EnabledStateChanged.addHandler(z);}if(r.value===b){r.value=r.checked;}if(r.valueAccessor==b&&r.value==b){}P=c.UI.Helpers.ValueAccessorHelper.createValueAccessor(r,I);e=new c.UI.BulletedContainer({id:(Q.id||c.getRandomId())+c.UI.CheckBoxTemplate.LabelPostfix,contentText:Q.contentText,contentHTML:Q.contentHTML,leftIcons:Q.leftIcons,rightIcons:Q.rightIcons,fadeMode:Q.fadeMode!==b?Q.fadeMode:true,displayType:Q.displayType||c.UI.BulletedContainerTemplate.DisplayType.SingleLine},{parentComponent:I});if(Q.rightColumnText){K=c.Object.create(c.UI.TextContainer,[{id:Q.id+c.UI.CheckBoxTemplate.LabelRightColumntPostfix,contentText:Q.rightColumnText,fadeMode:false,displayType:Q.displayType||c.UI.BulletedContainerTemplate.DisplayType.SingleLine},{parentComponent:I}]);}if(q.htmlReady){D();}}function j(){if(u){return;}I.Dispose.fireHandlers();G.Dispose.removeHandler(j);if(G.RenderComplete){G.RenderComplete.removeHandler(D);}if(G.ChildCheckBoxDragStart){G.ChildCheckBoxDragStart.removeHandler(C);}if(G.ChildCheckBoxDragEnd){G.ChildCheckBoxDragEnd.removeHandler(B);}if(G.ValidationFailed){G.ValidationFailed.removeHandler(E);}if(G.EnabledStateChanged){G.EnabledStateChanged.removeHandler(z);}c.Tools.disposeEventModel(l,Q.frameWindow);Q=null;e=null;K=null;I.RenderComplete=null;I.Dispose=null;I.ValueChanged=null;I.ValidationFailed=null;I.VisualStateChanged=null;t=null;g=null;P=null;x=null;u=true;}p();}})(window,WA);(function(d,c,b){if(!c.UI.CheckBoxAvatarTemplate){c.UI.CheckBoxAvatarTemplate=a;c.UI.CheckBoxAvatarTemplate.AvatarPostfix="_checkboxAvatar";}function a(f){var e=c.Object.copy(f);e.id=e.id+c.UI.CheckBoxAvatarTemplate.AvatarPostfix;return c.UI.CheckBoxTemplate(e);}})(window,WA);(function(g,f,e){if(!f.UI.CheckBoxTemplate){f.UI.CheckBoxTemplate=a;f.UI.CheckBoxTemplate.LabelPostfix="_checkboxLabel";f.UI.CheckBoxTemplate.LabelRightColumntPostfix="_checkboxLabelRightColumn";f.UI.CheckBoxTemplate.IdValidationContainerPostfix="_checkBoxValidationContainer";f.UI.CheckBoxTemplate.CheckBoxClassName="checkBox";f.UI.CheckBoxTemplate.FirstCheckBoxClassName="first";f.UI.CheckBoxTemplate.NoDragClassName="dragDisabled";}function a(n){n.id=n.id||f.getRandomId();var h=b(n);var k=c(n);var i=f.UI.ControlLayoutTemplate,j=f.UI.ContainerTemplate,l={};l.id=n.id;l.attr=n.attr;l.title=n.title;l.titleWidth=n.titleWidth;l.description=n.description;l.fadeMode=n.fadeMode;l.width=n.width;l.titlePosition=n.titlePosition;l.linkedControl=n.linkedControl;l.linkedControlPosition=n.linkedControlPosition;l.linkedControlContainerType=n.linkedControlContainerType;l.linkedControlContainerDisplayType=n.linkedControlContainerDisplayType||f.UI.ControlLayoutTemplate.ControlContainerDisplayType.Fixed;l.controlContainerDisplayType=n.controlContainerDisplayType?n.controlContainerDisplayType:f.UI.ControlLayoutTemplate.ControlContainerDisplayType.Flexible;l.cssClass=f.UI.CheckBoxTemplate.CheckBoxClassName+(n.cssClass?" "+n.cssClass:"")+(n.isFirst?(" "+f.UI.CheckBoxTemplate.FirstCheckBoxClassName):"");l.layoutContentHTML=j({cssClass:"checkboxContainer"+d(n.displayType||f.UI.BulletedContainerTemplate.DisplayType.SingleLine),contentHTML:j({cssClass:"inputContainer",contentHTML:h})+k});return i(l);}function b(j){var h=[],k=(j.value!=e&&j.value.value!=e)?j.value.value:false,i=j.checked;if(i==e){if(f.getTypeString(k)=="boolean"){i=k;}else{i=false;}}h.push('");return h.join("");}function d(h){switch(h.toLowerCase()){case f.UI.BulletedContainerTemplate.DisplayType.SingleLine:return(" singleLine");case f.UI.BulletedContainerTemplate.DisplayType.MultiLine:return(" multiLine");case f.UI.BulletedContainerTemplate.DisplayType.ListItem:return(" listItem");default:}}function c(l){var h=[],j=l.displayType||f.UI.BulletedContainerTemplate.DisplayType.SingleLine,i=f.UI.BulletedContainerTemplate({id:l.id+f.UI.CheckBoxTemplate.LabelPostfix,fadeMode:l.fadeMode!==e?l.fadeMode:true,displayType:j,attr:l.attr,contentText:l.contentText,contentHTML:l.contentHTML,rightIcons:l.rightIcons,leftIcons:l.leftIcons}),n=l.rightColumnText?f.UI.TextContainerTemplate({id:l.id+f.UI.CheckBoxTemplate.LabelRightColumntPostfix,contentText:l.rightColumnText,fadeMode:false,displayType:j}):"",k=j==f.UI.BulletedContainerTemplate.DisplayType.SingleLine?f.UI.ContainerTemplate({contentHTML:i+n}):i+n;h.push('");return h.join("");}})(window,WA);(function(c,b){if(!b.UI.CheckBoxList){b.UI.CheckBoxList=a;b.UI.CheckBoxList.TypeName="WA.UI.CheckBoxList";b.UI.CheckBoxList.PlaceHolderDropType={Before:"before",After:"after"};}function a(P,O,at){O=O||{};var ak=this,aw=b.UI.CheckBoxList.TypeName,ay=P,V,f,ai=O.parentComponent;ay.attr=ay.attr||{eventTags:ay.id};ak.toString=function(){return aw;};var j={},ar,h,k=22,x,p,q=ay.id+b.UI.ControlLayoutTemplate.IdControlLayoutPostfix,l,m=ay.id+b.UI.CheckBoxListTemplate.IdContainerPostfix,n,o=ay.id+b.UI.CheckBoxListTemplate.IdContentContainerPostfix,ao,U=ay.fadeMode,g=ay.bindings,Q=false,S=false,T,J=ay.groupOperationsDisabled,ap=ay.scrolling||{enabled:false,maxHeight:250},R=ay.groupOperationsTop!=undefined,K;ap.maxHeight=ap.maxHeight||250;ak.ValueChanged=b.Tools.EventHandlers.createHandlers(ak,{id:"ValueChanged"});ak.ValidationFailed=b.Tools.EventHandlers.createHandlers(ak,{id:"ValidationFailed"});ak.RenderComplete=b.Tools.EventHandlers.createHandlers(ak,{id:"RenderComplete"});ak.EnabledStateChanged=b.Tools.EventHandlers.createHandlers(ak,{id:"EnabledStateChanged"});ak.Dispose=b.Tools.EventHandlers.createHandlers(ak,{id:"Dispose"});ak.VisualStateChanged=b.Tools.EventHandlers.createHandlers(ak,{id:"VisualStateChanged"});ak.ChildCheckBoxDragStart=b.Tools.EventHandlers.createHandlers(ak,{id:"ChildCheckBoxDragStart"});ak.ChildCheckBoxDragEnd=b.Tools.EventHandlers.createHandlers(ak,{id:"ChildCheckBoxDragEnd"});ak.render=al;ak.enableManualSorting=E;ak.disableManualSorting=z;ak.applyNewModel=e;ak.renderComplete=ac;ak.dispose=B;ak.disable=y;ak.enable=D;ak.show=au;ak.hide=L;ak.disableUnselectedItems=A;ak.enableUnselectedItems=F;ak.selectAll=aq;ak.deselectAll=w;ak.parentSelected=aj;ak.getValue=function(){return V.getValue();};ak.getType=function(){return ay.layoutControlType;};function z(){if(T){T.dispose();}S=false;}function E(){if(ay.items.length<=1){return;}T=new b.UI.CheckBoxListDragDrop({controlLayoutContainerId:q,items:ay.items,boundsBuilder:i},{parentComponent:ak});T.CheckBoxDrop.addHandler(Z);T.CheckBoxDragStart.addHandler(Y);if(ap.enabled){T.BoundReached.addHandler(X);T.SoftBoundReached.addHandler(ae);T.BoundLeave.addHandler(W);}S=true;}function i(){return H();}function H(){if(ap.enabled){h=ao.getContainerRect();}else{h=b.Dimensions.getElementRect(l);}h.bottom=h.bottom-k;return h;}function X(aA,az){if(az.bounds.top){ao.startAutoScroll({scrollDirection:b.UI.ScrollablePanelV2.ScrollDirection.Up,scrollSpeed:b.UI.ScrollablePanelV2.ScrollSpeed.Fast});return;}if(az.bounds.bottom){ao.startAutoScroll({scrollDirection:b.UI.ScrollablePanelV2.ScrollDirection.Down,scrollSpeed:b.UI.ScrollablePanelV2.ScrollSpeed.Fast});}}function ae(aA,az){if(az.bounds.softTop){ao.startAutoScroll({scrollDirection:b.UI.ScrollablePanelV2.ScrollDirection.Up,scrollSpeed:b.UI.ScrollablePanelV2.ScrollSpeed.Slow});return;}if(az.bounds.softBottom){ao.startAutoScroll({scrollDirection:b.UI.ScrollablePanelV2.ScrollDirection.Down,scrollSpeed:b.UI.ScrollablePanelV2.ScrollSpeed.Slow});}}function W(){ao.stopAutoScroll();}function Y(aA,az){ak.ChildCheckBoxDragStart.fireHandlers();}function Z(aB,az){var aA=az.dropCommand;if(ap.enabled){ao.stopAutoScroll();}an(aA);ak.ChildCheckBoxDragEnd.fireHandlers();}function an(aC){var aD,aG,aF,az,aH,aA;for(aD=0,aG=ay.items.length;aD=0){aB.splice(aB.indexOf(az.value),1);}}}return aB;}function G(az){var aA=az.newValues;if(aA!=undefined){V.setValue(aA);}ak.ValueChanged.fireHandlers({checkBoxCheckedState:az.checkBoxCheckedState});av(V.getErrors());}function ah(aA,az){ak.VisualStateChanged.fireHandlers();}function d(aA){if(!g){return;}var aB,aC,az;for(aB=0,aC=g.length;aB=0));aB.fadeMode=aB.fadeMode!==undefined?aB.fadeMode:U;}aA.ValueChanged.addHandler(aa);aA.VisualStateChanged.addHandler(ah);if(at&&at.controlList){at.controlList[aB.id]=aA;}j[aA.getKey()]={checkBox:aA,value:aB.value};return aA;}function s(){var aB,aC,aA,aD=V.getValue(),az=false;for(aB=0,aC=ay.items.length;aB';}function i(){var H,J,I;u={};for(H=0,J=G.items.length;H0)?b(l):e(l)})});}return j.UI.ContainerTemplate({id:l.id+j.UI.CheckBoxListTemplate.IdContentContainerPostfix,cssClass:"checkBoxListContentContainer",contentHTML:(l.items&&l.items.length>0)?b(l):e(l)});}function h(l,n){if(n==i){return"";}n.id=n.id||l.id+j.UI.CheckBoxListTopGroupOperationsTemplate.IdPostfix;return j.UI.CheckBoxListTopGroupOperationsTemplate(n);}function b(t){var n=j.UI.CheckBoxTemplate,o,s,q,l=[],p=t.id,r=t.items;for(o=0,s=r.length;o0,d=U.automaticValue||b.UI.ColorPickerTemplate.AutomaticColor;U.value=U.value||d;function h(){e={};e.behaviors=[];e.behaviors.push({type:"mask",value:"^[A-Fa-f0-9]*$"});e.behaviors.push({type:"maxLength",value:6});if(U.defaultValue!=undefined){e.behaviors.push({type:"defaultValue",value:U.defaultValue});}}function G(){return b.UI.ColorPickerTemplate(U);}function B(){g=b.$(U.id);m=b.$(l);Q=b.$(U.id+b.UI.ColorPickerTemplate.ThemeColorsContainerPostfix);R=b.$(U.id+b.UI.ColorPickerTemplate.ThemeColorsContentContainerPostfix);F.RenderComplete.fireHandlers();N(U.value);}function L(V){if(S){S.dispose();}P=V;o=P&&P.length&&P.length>0;if(!o){b.Dom.addClassName(Q,"hidden");R.innerHTML="";return;}k();R.innerHTML=S.render();S.renderComplete();b.Dom.removeClassName(Q,"hidden");}function J(V){var W=V.value||"";O(W.replace(/#/i,""),true);}function z(W,V){b.Tools.KeyboardWatcher.Enter.addHandler(M);}function y(W,V){b.Tools.KeyboardWatcher.Enter.removeHandler(M);}function A(V){N(p.getValue());}function C(){O(d);p.setValue("");r(v(d));}function D(){M();}function M(){var V=v(p.getValue());r(V);F.ValueChanged.fireHandlers({value:V,id:U.id});}function v(X){if(X.toLowerCase()==b.UI.ColorPickerTemplate.TransparentColor.toLowerCase()){return X.toLowerCase();}if(X.toLowerCase()==b.UI.ColorPickerTemplate.AutomaticColor.toLowerCase()){return X.toLowerCase();}var W=new RegExp("[a-fA-F0-9]{6}","g"),V;if(X.length&&X.length==3){X=X[0]+X[0]+X[1]+X[1]+X[2]+X[2];}V=X.match(W);if(!V){return d;}return b.UI.ColorPickerTemplate.HexPoundSign+V[0].toUpperCase();}function O(W,V){W=W||d;W=v(W);if(!V){F.ValueChanged.fireHandlers({value:W,id:U.id});}N(W);p.setValue(w(W));}function w(V){if(V==undefined||V.toLowerCase()==b.UI.ColorPickerTemplate.TransparentValue.toLowerCase()||V.toLowerCase()==b.UI.ColorPickerTemplate.AutomaticColor.toLowerCase()){return"";}return V.replace(b.UI.ColorPickerTemplate.HexPoundSign,"").toUpperCase();}function r(V){if(o){S.setSelectedValue(V);}if(!o||S.getValue()==undefined){u.setSelectedValue(V);}}function N(V){if(V==undefined||V.toLowerCase()==b.UI.ColorPickerTemplate.TransparentValue.toLowerCase()||V.toLowerCase()==b.UI.ColorPickerTemplate.AutomaticColor.toLowerCase()){m.style.backgroundColor="";return;}m.style.backgroundColor=b.UI.ColorPickerTemplate.HexPoundSign+V.replace(b.UI.ColorPickerTemplate.HexPoundSign,"");}function x(W,V){O(V.value);switch(V.listName){case U.id+b.UI.ColorPickerTemplate.MainColorTableContainerPostfix:if(o){S.resetSelectedValue();}break;case U.id+b.UI.ColorPickerTemplate.ThemeColorTableContainerPostfix:u.resetSelectedValue();break;default:u.resetSelectedValue();if(o){S.resetSelectedValue();}throw new Error("undefined list name");}}function k(){if(!o){return;}S=new b.UI.ListControl({id:U.id+b.UI.ColorPickerTemplate.ThemeColorTableContainerPostfix,items:i(P,b.UI.ColorPickerTemplate.ThemeColorPostfixId),selectedValue:U.value,listName:U.id+b.UI.ColorPickerTemplate.ThemeColorTableContainerPostfix},{parentComponent:F});S.ValueChanged.addHandler(x);}function j(){k();u=new b.UI.ListControl({id:U.id+b.UI.ColorPickerTemplate.MainColorTableContainerPostfix,items:i(b.UI.ColorPickerTemplate.Colors(),b.UI.ColorPickerTemplate.ColorPostfixId),selectedValue:(o&&S.getValue()!=undefined)?null:U.value,listName:U.id+b.UI.ColorPickerTemplate.MainColorTableContainerPostfix},{parentComponent:F});u.ValueChanged.addHandler(x);}function i(W,aa){var Y=[];var X,Z,V;for(X=0,Z=W.length;Xj.length){n=j.length;}var k,o,l;for(k=0,o=n||j.length;k'+c.encodeHtml(e.title)+"
":"")+''+e.contentHTML+"
";}})(window,WA);(function(b,a){if(!a.UI.ContainerTemplate){a.UI.ContainerTemplate=function(e){var f={id:"id",cssClass:"class",cssStyle:"style",eventTags:"eventTags",parseTags:"parseTags",title:"title"},d,c=[];c.push("");if(a.getTypeString(e.elements)=="array"&&e.elements.length>0){e.contentHTML=a.UI.Helpers.ControlHelper.createElementsHtml(e);}if(e.contentHTML!=undefined){c.push(e.contentHTML);}if(e.contentText!=undefined){c.push(a.encodeHtml(e.contentText+""));}c.push("
");return c.join("");};}})(window,WA);(function(d,c,b){if(!c.UI.ContainerMask){c.UI.ContainerMask=a;c.UI.ContainerMask.CssClass="waContainerMask";}function a(n,m){m=m||{};var s=this,v="WA.UI.ContainerMask",w=n,q=m.parentComponent,h=m.cssClass||"",x=m.zIndex||"",r=m.parentContainer;s.toString=function(){return v;};s.Dispose=c.Tools.EventHandlers.createHandlers(s,{id:"Dispose"});s.ContainerMaskClick=c.Tools.EventHandlers.createHandlers(s,{id:"ContainerMaskClick"});var o=false,k=w.id,f;s.dispose=i;s.show=u;s.hide=j;s.addCssClass=e;s.removeCssClass=t;function e(y){c.Dom.addClassName(f,y);}function t(y){c.Dom.removeClassName(f,y);}function u(){f.style.display="block";}function j(){f.style.display="none";}function p(){s.ContainerMaskClick.fireHandlers();}function g(){f=document.createElement("div");c.Dom.addClassName(f,c.UI.ContainerMask.CssClass);if(h){c.Dom.addClassName(f,h);}if(x){f.style.zIndex=x;}if(k){f.id=k;}r.appendChild(f);c.addHandler(f,"click",p);}function l(){if(typeof r=="string"){r=c.$(r);}if(q.Dispose){q.Dispose.addHandler(i);}g();}function i(){if(o){return;}s.Dispose.fireHandlers();if(q.Dispose){q.Dispose.removeHandler(i);}c.removeHandler(f,"click",p);r.removeChild(f);w=null;q=null;r=null;f=null;s.Dispose=null;s.ContainerMaskClick=null;o=true;}l();}})(window,WA);(function(c,b){if(!b.UI.ContextDialog){b.UI.ContextDialog=a;b.UI.ContextDialog.Prefixes={DomId:"idContextDialog",Css:"ContextDialog"};b.UI.ContextDialog.EventTags={Close:"close"};}function a(h,s){var A=this,H="WA.UI.ContextDialog",z=s.parentComponent;A.toString=function(){return H;};A.Dispose=b.Tools.EventHandlers.createHandlers(A,{id:"Dispose"});A.ContextDialogMouseOver=b.Tools.EventHandlers.createHandlers(A,{id:"ContextDialogMouseOver"});A.ContextDialogMouseOut=b.Tools.EventHandlers.createHandlers(A,{id:"ContextDialogMouseOut"});A.ContextDialogClick=b.Tools.EventHandlers.createHandlers(A,{id:"ContextDialogClick"});var k=s.currentWindow||c,g,u,i,j="idSystemContextsHolder",e,f=32,q=s.hideCloseButton,d=s.bounds||{},D=300,t=null,B=s.relativeContainerDelegate,G=s.startTopPositionOffset||10,F=0;d.width=d.width!=undefined?d.width:"auto";d.maxWidth=d.maxWidth!=undefined?d.maxWidth:500;A.dispose=l;A.setPosition=C;A.getHeight=m;A.show=E;A.hide=p;A.getMainContainer=function(){return u;};A.getContentContainer=function(){return g;};A.setContent=function(I){g.innerHTML=I;};function m(){if(!t&&u){t=u.offsetHeight;}return t||0;}function y(){F=null;b.throttle(C,D);}function C(){var I=n();if(u){u.style.left=o()+"px";u.style.top=I+d.top+"px";}}function n(){if(B){var I=B();if(I&&I.height!=undefined){F=I.height+G;}}return F;}function o(){return b.Dimensions.getElementRect(k.document.body).widthCenter-(((d.width=="auto"?g.clientWidth:d.width)+f)/2);}function E(){if(u){u.style.visibility="visible";C();b.addHandler(k,"resize",y);}}function p(){b.clearThrottle(C);b.removeHandler(k,"resize",y);if(u){if(g){b.removeHandler(u,"click",v);b.removeHandler(u,"mouseout",w);b.removeHandler(u,"mouseover",x);}i.removeChild(u);}g=null;u=null;i=null;e=null;}function v(I){var J=b.getEventTags(I);if(J==b.UI.ContextDialog.EventTags.Close){p();return;}if(J){A.ContextDialogClick.fireHandlers({eventTags:J});}}function w(){A.ContextDialogMouseOut.fireHandlers();}function x(){A.ContextDialogMouseOver.fireHandlers();}function r(){z.Dispose.addHandler(l);var I=k.document;i=b.$(j);u=I.createElement("DIV");u.id=h;if(s.z){u.zIndex=s.z;}if(d.maxWidth){u.style.maxWidth=d.maxWidth+"px";}u.style.width=d.width+(d.width!=="auto"?"px":"");var M=I.createElement("DIV");M.className="contextDialogContainer";if(b.getTypeString(s.cssClasses)=="array"){for(var K=0,L=s.cssClasses.length;K0){e.contentHTML=a.UI.Helpers.ControlHelper.createElementsHtml(e);}return c({id:d+a.UI.ControlListTemplate.IdContainerPostfix,cssClass:"controlListMainContainer",contentHTML:e.contentHTML,attr:a.UI.Helpers.ControlHelper.createContainerAttributes(e)});};a.UI.ControlListTemplate.createSummary=function(e){if(e.hideInSummary){return"";}var c=[],d=e.elements;if(!d||d.length<=0){return"";}c.push(a.UI.Helpers.ControlHelper.createElementsSummary(d));return c.join("");};a.UI.ControlListTemplate.IdContainerPostfix="_controlListContainer";}})(window,WA);(function(d,c,b){if(!c.UI.CustomLayoutChunksControl){c.UI.CustomLayoutChunksControl=a;c.UI.CustomLayoutChunksControl.PlaceHolderMarker={Prefix:"##placeholder",Delimiter:":",Postfix:"##"};}function a(p,o,B){o=o||{};var y=this,C="WA.UI.CustomLayoutChunksControl",E=p,u=o.parentComponent,D,A=E.resources,l=o.gadget;y.toString=function(){return C;};y.RenderComplete=c.Tools.EventHandlers.createHandlers(y,{id:"RenderComplete"});y.Dispose=c.Tools.EventHandlers.createHandlers(y,{id:"Dispose"});y.ValueChanged=c.Tools.EventHandlers.createHandlers(y,{id:"ValueChanged"});y.ValidationFailed=c.Tools.EventHandlers.createHandlers(y,{id:"ValidationFailed"});y.render=z;y.getType=function(){return E.layoutControlType;};E.innerControlId=c.UI.Helpers.ControlHelper.createElementId(E.id,0);var v=c.UI.CustomLayoutChunksControl.PlaceHolderMarker,h,g,j=null,k,x=new RegExp("("+v.Prefix+"(?:"+v.Delimiter+"[\\w]+)?"+v.Postfix+")"),w=new RegExp(v.Prefix+"("+v.Delimiter+"[\\w]+)"+v.Postfix);function z(){return c.UI.CustomLayoutChunksControlTemplate(E);}function r(G,F){y.RenderComplete.fireHandlers();}function s(){var I=D.getErrors(),F=[];if(I.length>0){var G,H;for(G=0,H=I.length;G2*R){N=O.itemsData;for(K=0,L=N.length;Kk.getValue("unixTicks")){j.setValue(null,c.UI.CalendarTextBox.DateFormat.Ticks);}w.ValueChanged.fireHandlers();}function q(K,J){A(false);w.ValueChanged.fireHandlers();}function t(){var J=H.getErrors();if(J.length>0&&D){c.UI.Helpers.ControlHelper.showValidationMessages(I.id,J);A(true);return;}}function A(J){E.setErrorState(J);j.setErrorState(J);if(J===true){c.Dom.addClassName(h,"error");return;}c.Dom.removeClassName(h,"error");}function p(K,J){A(false);}function m(){H=c.UI.Helpers.ValueAccessorHelper.createValueAccessor(o,w);F=H.createChildValueAccessor("start",w);k=H.createChildValueAccessor("end",w);if(v.ValidationFailed){v.ValidationFailed.addHandler(t);}E=new c.UI.CalendarTextBox({id:I.id+c.UI.DateRangePickerTemplate.StartDatePostfix,attr:{eventTags:"startDate"},valueAccessor:F,minDateRestriction:I.minDateRestriction,maxDateRestriction:I.maxDateRestriction,mask:I.mask},{parentComponent:w},y);E.ValueChanged.addHandler(s);E.EditStarted.addHandler(p);E.VisualStateChanged.addHandler(u);j=new c.UI.CalendarTextBox({id:I.id+c.UI.DateRangePickerTemplate.EndDatePostfix,attr:{eventTags:"endDate"},valueAccessor:k,minDateRestriction:I.minDateRestriction,maxDateRestriction:I.maxDateRestriction,mask:I.mask},{parentComponent:w},y);j.ValueChanged.addHandler(q);j.EditStarted.addHandler(p);j.VisualStateChanged.addHandler(u);v.RenderComplete.addHandler(r);v.Dispose.addHandler(i);}function i(){w.Dispose.fireHandlers();if(v.ValidationFailed){v.ValidationFailed.removeHandler(t);}v.RenderComplete.removeHandler(r);v.Dispose.removeHandler(i);I=null;v=null;E=null;j=null;H=null;F=null;k=null;h=null;w.RenderComplete=null;w.Dispose=null;w.ValueChanged=null;w.VisualStateChanged=null;}m();}})(window,WA);(function(d,c){if(!c.UI.DateRangePickerTemplate){c.UI.DateRangePickerTemplate=b;c.UI.DateRangePickerTemplate.StartDatePostfix="_startDate";c.UI.DateRangePickerTemplate.EndDatePostfix="_endDate";c.UI.DateRangePickerTemplate.DefaultTitleWidth=75;c.UI.DateRangePickerTemplate.CalendarLayout={Horizontal:"horizontal",Vertical:"vertical"};}function b(f){var e=c.UI.ControlLayoutTemplate;f.controlContainerDisplayType=f.controlContainerDisplayType?f.controlContainerDisplayType:c.UI.ControlLayoutTemplate.ControlContainerDisplayType.Flexible;f.cssClass="dateRangePicker"+(f.cssClass?" "+f.cssClass:"")+(f.isFirst?" first":"");f.layoutContentHTML=a(f);return e(f);}function a(h){var g=c.UI.ContainerTemplate,i=c.UI.CalendarTextBoxTemplate({id:h.id+c.UI.DateRangePickerTemplate.StartDatePostfix,title:h.resources.startDate,titlePosition:"left",titleWidth:h.calendarTitleWidth||c.UI.DateRangePickerTemplate.DefaultTitleWidth,controlContainerDisplayType:h.calendarContainerDisplayType,width:h.calendarWidth,cssClass:"startDate",postfixColor:h.calendarPostfixColor}),e=g({cssClass:"calendarTextBoxDivider"}),f=c.UI.CalendarTextBoxTemplate({id:h.id+c.UI.DateRangePickerTemplate.EndDatePostfix,title:h.resources.endDate,titlePosition:"left",titleWidth:h.calendarTitleWidth||c.UI.DateRangePickerTemplate.DefaultTitleWidth,controlContainerDisplayType:h.calendarContainerDisplayType,width:h.calendarWidth,cssClass:"endDate",postfixColor:h.calendarPostfixColor});return g({contentHTML:(h.calendarLayout==c.UI.DateRangePickerTemplate.CalendarLayout.Horizontal)?g({cssClass:"dateRangePickerHorizontal",contentHTML:g({contentHTML:i})+g({contentHTML:e})+g({contentHTML:f})}):i+e+f});}c.UI.DateRangePickerTemplate.createSummary=function(e){return"";};})(window,WA);Calendar=(function(){function H(P){P=P||{};this.args=P=J(P,{animation:!ad,cont:null,bottomBar:true,date:true,fdow:b("fdow"),min:null,max:null,reverseWheel:false,selection:[],selectionType:H.SEL_SINGLE,weekNumbers:false,align:"Br/ / /T/r",offset:null,inputField:null,trigger:null,anchor:null,dateFormat:"%Y-%m-%d",multiCtrl:true,fixed:false,opacity:ac?1:3,titleFormat:"%b %Y",showTime:false,timePos:"right",time:true,minuteStep:5,noScroll:false,disabled:ah,checkRange:false,dateInfo:ah,onChange:ah,onSelect:ah,onTimeChange:ah,onFocus:ah,onBlur:ah,onClose:ah});this.handlers={};var ar=this,at=new Date();P.min=al(P.min);P.max=al(P.max);if(P.date===true){P.date=at;}if(P.time===true){P.time=at.getHours()*100+Math.floor(at.getMinutes()/P.minuteStep)*P.minuteStep;}this.date=al(P.date);this.time=P.time;this.fdow=P.fdow;R("onChange onSelect onTimeChange onFocus onBlur onClose".split(/\s+/),function(au){var av=P[au];if(!(av instanceof Array)){av=[av];}ar.handlers[au]=av;});this.selection=new H.Selection(P.selection,P.selectionType,r,this);var D=j(this);if(P.cont){a(P.cont).appendChild(D);}if(P.trigger){this.manageFields(P.trigger,P.inputField,P.anchor,P.dateFormat,P.offset);}ar.ValueChanged=WA.Tools.EventHandlers.createHandlers(ar,{id:"ValueChanged"});ar.CloseCalendar=WA.Tools.EventHandlers.createHandlers(ar,{id:"CloseCalendar"});ar.showForField=aj.popupForField;ar.setMinDate=function(au){ar.args.min=au;};ar.setMaxDate=function(au){ar.args.max=au;};}var ap=navigator.userAgent,af=/opera/i.test(ap),ae=/Konqueror|Safari|KHTML/i.test(ap),ac=/msie/i.test(ap)&&!af&&!(/mac_powerpc/i.test(ap)),ad=ac&&/msie 6/i.test(ap),ab=/gecko/i.test(ap)&&!ae&&!af&&!ac,aj=H.prototype,Y=H.I18N={};H.SEL_NONE=0;H.SEL_SINGLE=1;H.SEL_MULTIPLE=2;H.SEL_WEEK=3;H.dateToInt=I;H.intToDate=aa;H.printDate=ak;H.formatString=S;H.i18n=b;H.LANG=function(D,ar,P){Y.__=Y[D]={name:ar,data:P};};H.setup=function(D){return new H(D);};aj.moveTo=function(au,D){var aF=this;au=al(au);var P=C(au,aF.date,true),at,aE=aF.args,aB=aE.min&&C(au,aE.min),aA=aE.max&&C(au,aE.max);if(!aE.animation){D=false;}E(aB!=null&&aB<=1,[aF.els.navPrevMonth,aF.els.navPrevYear],"DynarchCalendar-navDisabled");E(aA!=null&&aA>=-1,[aF.els.navNextMonth,aF.els.navNextYear],"DynarchCalendar-navDisabled");if(aB<-1){au=aE.min;at=1;P=0;}if(aA>1){au=aE.max;at=2;P=0;}aF.date=au;aF.refresh(!!D);aF.callHooks("onChange",aF,au,D);if(D&&!(P==0&&D==2)){if(aF._bodyAnim){aF._bodyAnim.stop();}var ar=aF.els.body,ax=B("div","DynarchCalendar-animBody-"+z[P],ar),aI=ar.firstChild,aC=ai(aI)||parseFloat("0.7"),az=at?N.brakes:P==0?N.shake:N.accel_ab2,aJ=P*P>4,aD=aJ?aI.offsetTop:aI.offsetLeft,aG=ax.style,av=aJ?ar.offsetHeight:ar.offsetWidth;if(P<0){av+=aD;}else{if(P>0){av=aD-av;}else{av=Math.round(av/7);if(at==2){av=-av;}}}if(!at&&P!=0){var ay=ax.cloneNode(true),aH=ay.style,aw=2*av;ay.appendChild(aI.cloneNode(true));aH[aJ?"marginTop":"marginLeft"]=av+"px";ar.appendChild(ay);}aI.style.visibility="hidden";ax.innerHTML=c(aF);aF._bodyAnim=y({onUpdate:function(aN,aM){var aK=az(aN);if(ay){var aL=aM(aK,av,aw)+"px";}if(at){aG[aJ?"marginTop":"marginLeft"]=aM(aK,av,0)+"px";}else{if(aJ||P==0){aG.marginTop=aM(P==0?az(aN*aN):aK,0,av)+"px";if(P!=0){aH.marginTop=aL;}}if(!aJ||P==0){aG.marginLeft=aM(aK,0,av)+"px";if(P!=0){aH.marginLeft=aL;}}}if(aF.args.opacity>2&&ay){ai(ay,1-aK);ai(ax,aK);}},onStop:function(aK){ar.innerHTML=c(aF,au);aF._bodyAnim=null;}});}aF._lastHoverDate=null;return aB>=-1&&aA<=1;};aj.isDisabled=function(D){var P=this.args;return(P.min&&C(D,P.min)<0)||(P.max&&C(D,P.max)>0)||P.disabled(D);};aj.toggleMenu=function(){k(this,!this._menuVisible);};aj.refresh=function(P){var D=this.els;if(!P){D.body.innerHTML=c(this);}D.title.innerHTML=i(this);D.yearInput.value=this.date.getFullYear();};aj.redraw=function(){var P=this,D=P.els;P.refresh();D.dayNames.innerHTML=e(P);D.menu.innerHTML=g(P);if(D.bottomBar){D.bottomBar.innerHTML=d(P);}aq(D.topCont,function(ar){var at=Z[ar.className];if(at){D[at]=ar;}if(ar.className=="DynarchCalendar-menu-year"){x(ar,P._focusEvents);D.yearInput=ar;}else{if(ac){ar.setAttribute("unselectable","on");}}});P.setTime(null,true);};aj.setLanguage=function(D){var P=H.setLanguage(D);if(P){this.fdow=P.data.fdow;this.redraw();}};H.setLanguage=function(D){var P=Y[D];if(P){Y.__=P;}return P;};aj.focus=function(){try{this.els[this._menuVisible?"yearInput":"focusLink"].focus();}catch(D){}u.call(this);};aj.blur=function(){this.els.focusLink.blur();this.els.yearInput.blur();s.call(this);};aj.showAt=function(aw,ax,D){if(this._showAnim){this._showAnim.stop();}D=D&&this.args.animation;var av=this.els.topCont,au=this,P=this.els.body.firstChild,ar=P.offsetHeight,at=av.style;at.position="absolute";at.left=aw+"px";at.top=ax+"px";at.zIndex=WA.UI.DefaultZIndex.Calendar;at.display="";if(D){P.style.marginTop=-ar+"px";this.args.opacity>1&&ai(av,0);this._showAnim=y({onUpdate:function(az,ay){P.style.marginTop=-ay(N.accel_b(az),ar,0)+"px";au.args.opacity>1&&ai(av,az);},onStop:function(){au.args.opacity>1&&ai(av,"");au._showAnim=null;}});}};aj.hide=function(){this.callHooks("onClose",this);var aw=this.els.topCont,av=this,D=this.els.body.firstChild,at=D.offsetHeight,au=V(aw).y,P=this.CloseCalendar;if(this.args.animation){if(this._showAnim){this._showAnim.stop();}this._showAnim=y({onUpdate:function(ay,ax){av.args.opacity>1&&ai(aw,1-ay);D.style.marginTop=-ax(N.accel_b(ay),0,at)+"px";aw.style.top=ax(N.accel_ab(ay),au,au-10)+"px";},onStop:function(){aw.style.display="none";D.style.marginTop="";av.args.opacity>1&&ai(aw,"");av._showAnim=null;}});}else{aw.style.display="none";}this.inputField=null;setTimeout(ar,150);function ar(){P.fireHandlers();}};aj.popup=function(at,D,ar,av){at=ar?a(ar):a(at);av=av||{};av.x=av.x||0;av.y=av.y||0;if(!D){D=this.args.align;}D=D.split(/\x2f/);var P=V(at),az=this.els.topCont,ax=az.style,ay,aA=W();ax.visibility="hidden";ax.display="";this.showAt(0,0);document.body.appendChild(az);ay={x:az.offsetWidth,y:az.offsetHeight};function au(aB){var aC={x:aw.x,y:aw.y};if(!aB){return aC;}if(/B/.test(aB)){aC.y+=av.y+at.offsetHeight+5;}if(/b/.test(aB)){aC.y+=at.offsetHeight-ay.y;}if(/T/.test(aB)){aC.y-=ay.y;}if(/l/.test(aB)){aC.x-=ay.x-at.offsetWidth;}if(/L/.test(aB)){aC.x-=ay.x;}if(/R/.test(aB)){aC.x+=at.offsetWidth;}if(/c/i.test(aB)){aC.x+=(at.offsetWidth-ay.x)/2;}if(/m/i.test(aB)){aC.y+=(at.offsetHeight-ay.y)/2;}return aC;}var aw=P;aw=au(D[0]);if(aw.yaA.x+aA.w){aw.x=P.x;aw=au(D[2]);}if(aw.y+ay.y>aA.y+aA.h){aw.y=P.y;aw=au(D[3]);}if(aw.x=0){if(D[at]===ar){D.splice(at,1);}}};aj.getTime=function(){return this.time;};aj.setTime=function(aw,au){if(this.args.showTime){aw=aw!=null?aw:this.time;this.time=aw;var P=this.getHours(),at=this.getMinutes(),D=P<12;if(this.args.showTime==12){if(P==0){P=12;}if(P>12){P-=12;}this.els.timeAM.innerHTML=b(D?"AM":"PM");}if(P<10){P="0"+P;}if(at<10){at="0"+at;}this.els.timeHour.innerHTML=P;this.els.timeMinute.innerHTML=at;if(!au){this.callHooks("onTimeChange",this,aw);var ar=this.inputField,av=this.selection;if(ar){var ax=av.print(this.dateFormat);(/input|textarea/i.test(ar.tagName))?ar.value=ax:ar.innerHTML=ax;}}}};aj.getHours=function(){return Math.floor(this.time/100);};aj.getMinutes=function(){return this.time%100;};aj.setHours=function(D){if(D<0){D+=24;}this.setTime(100*(D%24)+this.time%100);};aj.setMinutes=function(D){if(D<0){D+=60;}D=Math.floor(D/this.args.minuteStep)*this.args.minuteStep;this.setTime(100*this.getHours()+(D%60));};aj._getInputYear=function(){var D=parseInt(this.els.yearInput.value,10);if(isNaN(D)){D=this.date.getFullYear();}return D;};aj._showTooltip=function(D){var P="",ar,at=this.els.tooltip;if(D){D=aa(D);ar=this.args.dateInfo(D);if(ar&&ar.tooltip){P=""+ak(D,ar.tooltip)+"
";}}at.innerHTML=P;};var ao=" align='center' cellspacing='0' cellpadding='0'";function e(at){var P=[""],ar=0;if(at.args.weekNumbers){P.push("",b("wk")," | ");}while(ar<7){var D=(ar+++at.fdow)%7;P.push("=0?" class='DynarchCalendar-weekend'>":">",b("sdn")[D]," | ");}P.push("
");return P.join("");}function c(aD,ar,av){ar=ar||aD.date;av=av||aD.fdow;ar=new Date(ar.getFullYear(),ar.getMonth(),ar.getDate(),12,0,0,0);var aC=ar.getMonth(),aw=[],aA=0,aI=aD.args.weekNumbers;ar.setDate(1);var at=(ar.getDay()-av)%7;if(at<0){at+=7;}ar.setDate(0-at);ar.setDate(ar.getDate()+1);var aE=new Date(),aF=aE.getDate(),aG=aE.getMonth(),aH=aE.getFullYear();aw[aA++]="";for(var ax=0;ax<6;++ax){aw[aA++]="";if(aI){aw[aA++]=""+X(ar)+" | ";}for(var az=0;az<7;++az){var P=ar.getDate(),aB=ar.getMonth(),aJ=ar.getFullYear(),D=10000*aJ+100*(aB+1)+P,ay=aD.selection.isSelected(D),au=aD.isDisabled(ar);aw[aA++]="=0){aw[aA++]=" DynarchCalendar-weekend";}if(aB!=aC){aw[aA++]=" DynarchCalendar-day-othermonth";}if(P==aF&&aB==aG&&aJ==aH){aw[aA++]=" DynarchCalendar-day-today";}if(au){aw[aA++]=" DynarchCalendar-day-disabled";}if(ay){aw[aA++]=" DynarchCalendar-day-selected";}au=aD.args.dateInfo(ar);if(au&&au.klass){aw[aA++]=" "+au.klass;}aw[aA++]="'>"+P+" | ";ar=new Date(aJ,aB,P+1,12,0,0,0);}aw[aA++]="
";}aw[aA++]="
";return aw.join("");}function f(P){var D=["","",!ac?" ":" "," "," "," "," "," "," "," ",e(P)," "," "," "];if(P.args.bottomBar||P.args.showTime){D.push(" ",d(P)," ");}D.push(""," "," "," |
");return D.join("");}function i(D){return""+ak(D.date,D.args.titleFormat)+"
";}function g(av){var D=["",""," | ","",b("goToday")," | "," ",""," |
";return D.join("");}function h(P,D){D.push(""," | "," | "," | "," | "," | ");if(P.args.showTime==12){D.push(" | "," | ");}D.push("
"," | "," | ","
");}function d(ar){var P=[],D=ar.args;P.push("");function at(){if(D.showTime){P.push("");h(ar,P);P.push(" | ");}}if(D.timePos=="left"){at();}if(D.bottomBar){P.push("");P.push("");P.push(" | ");}if(D.timePos=="right"){at();}P.push("
");return P.join("");}var Z={"DynarchCalendar-topCont":"topCont","DynarchCalendar-focusLink":"focusLink",DynarchCalendar:"main","DynarchCalendar-topBar":"topBar","DynarchCalendar-title":"title","DynarchCalendar-dayNames":"dayNames","DynarchCalendar-body":"body","DynarchCalendar-menu":"menu","DynarchCalendar-menu-year":"yearInput","DynarchCalendar-bottomBar":"bottomBar","DynarchCalendar-tooltip":"tooltip","DynarchCalendar-time-hour":"timeHour","DynarchCalendar-time-minute":"timeMinute","DynarchCalendar-time-am":"timeAM","DynarchCalendar-navBtn DynarchCalendar-prevYear":"navPrevYear","DynarchCalendar-navBtn DynarchCalendar-nextYear":"navNextYear","DynarchCalendar-navBtn DynarchCalendar-prevMonth":"navPrevMonth","DynarchCalendar-navBtn DynarchCalendar-nextMonth":"navNextMonth"};function j(at){var D=B("div"),P=at.els={},ar={mousedown:G(o,at,true),mouseup:G(o,at,false),mouseover:G(p,at,true),mouseout:G(p,at,false),keypress:G(n,at)};if(!at.args.noScroll){ar[ab?"DOMMouseScroll":"mousewheel"]=G(q,at);}if(ac){ar.dblclick=ar.mousedown;ar.keydown=ar.keypress;}D.innerHTML=f(at);aq(D.firstChild,function(au){var av=Z[au.className];if(av){P[av]=au;}if(ac){au.setAttribute("unselectable","on");}});x(P.main,ar);x([P.focusLink,P.yearInput],at._focusEvents={focus:G(u,at),blur:G(t,at)});at.moveTo(at.date,false);at.setTime(null,true);return P.topCont;}function u(){if(this._bluringTimeout){clearTimeout(this._bluringTimeout);}this.focused=true;w(this.els.main,"DynarchCalendar-focused");this.callHooks("onFocus",this);}function s(){this.focused=false;K(this.els.main,"DynarchCalendar-focused");if(this._menuVisible){k(this,false);}if(!this.args.cont){this.hide();}this.callHooks("onBlur",this);}function t(){this._bluringTimeout=setTimeout(G(s,this),50);}function v(D){switch(D){case"time-hour+":this.setHours(this.getHours()+1);break;case"time-hour-":this.setHours(this.getHours()-1);break;case"time-min+":this.setMinutes(this.getMinutes()+this.args.minuteStep);break;case"time-min-":this.setMinutes(this.getMinutes()-this.args.minuteStep);break;default:return;}}var z={"-3":"backYear","-2":"back","0":"now","2":"fwd","3":"fwdYear"};function m(at,P,ar){if(this._bodyAnim){this._bodyAnim.stop();}var D;if(P!=0){D=new Date(at.date);D.setDate(1);switch(P){case"-Y":case -2:D.setFullYear(D.getFullYear()-1);break;case"+Y":case 2:D.setFullYear(D.getFullYear()+1);break;case"-M":case -1:D.setMonth(D.getMonth()-1);break;case"+M":case 1:D.setMonth(D.getMonth()+1);break;}}else{D=new Date();}return at.moveTo(D,!ar);}function k(ar,at){ar._menuVisible=at;E(at,ar.els.title,"DynarchCalendar-pressed-title");var P=ar.els.menu;if(ad){P.style.height=ar.els.main.offsetHeight+"px";}if(!ar.args.animation){L(P,at);if(ar.focused){ar.focus();}}else{if(ar._menuAnim){ar._menuAnim.stop();}var D=ar.els.main.offsetHeight;if(ad){P.style.width=ar.els.topBar.offsetWidth+"px";}if(at){P.firstChild.style.marginTop=-D+"px";ar.args.opacity>0&&ai(P,0);L(P,true);}ar._menuAnim=y({onUpdate:function(av,au){P.firstChild.style.marginTop=au(N.accel_b(av),-D,0,!at)+"px";ar.args.opacity>0&&ai(P,au(N.accel_b(av),0,parseFloat("0.85"),!at));},onStop:function(){ar.args.opacity>0&&ai(P,parseFloat("0.85"));P.firstChild.style.marginTop="";ar._menuAnim=null;if(!at){L(P,false);if(ar.focused){ar.focus();}}}});}}function o(at,av){av=av||window.event;var au=U(av);if(au&&!au.getAttribute("disabled")){var ax=au.getAttribute("dyc-btn"),aA=au.getAttribute("dyc-type"),ar=au.getAttribute("dyc-date"),ay=this.selection,az,D={mouseover:an,mousemove:an,mouseup:function(aC){var aB=au.getAttribute("dyc-cls");if(aB){K(au,M(aB,1));}clearTimeout(az);am(document,D,true);D=null;}};if(at){setTimeout(G(this.focus,this),1);var P=au.getAttribute("dyc-cls");if(P){w(au,M(P,1));}if("menu"==ax){this.toggleMenu();}else{if(au&&/^[+-][MY]$/.test(ax)){if(m(this,ax)){var aw=G(function(){if(m(this,ax,true)){az=setTimeout(aw,40);}else{D.mouseup();m(this,ax);}},this);az=setTimeout(aw,350);x(document,D,true);}else{D.mouseup();}}else{if("year"==ax){this.els.yearInput.focus();this.els.yearInput.select();}else{if(aA=="time-am"){x(document,D,true);}else{if(/^time/.test(aA)){var aw=G(function(aB){v.call(this,aB);az=setTimeout(aw,100);},this,aA);v.call(this,aA);az=setTimeout(aw,350);x(document,D,true);}else{if(ar&&ay.type){if(ay.type==H.SEL_MULTIPLE){if(av.shiftKey&&this._selRangeStart){ay.selectRange(this._selRangeStart,ar);}else{if(!av.ctrlKey&&!ay.isSelected(ar)&&this.args.multiCtrl){ay.clear(true);}ay.set(ar,true);this._selRangeStart=ar;}}else{ay.set(ar);this.moveTo(aa(ar),2);}au=this._getDateDiv(ar);p.call(this,true,{target:au});}x(document,D,true);}}}}}if(ac&&D&&/dbl/i.test(av.type)){D.mouseup();}if(!this.args.fixed&&/^(DynarchCalendar-(topBar|bottomBar|weekend|weekNumber|menu(-sep)?))?$/.test(au.className)&&!this.args.cont){D.mousemove=G(l,this);this._mouseDiff=O(av,V(this.els.topCont));x(document,D,true);}}else{if("today"==ax){if(!this._menuVisible&&ay.type==H.SEL_SINGLE){ay.set(new Date());}this.moveTo(new Date(),true);k(this,false);}else{if(/^m([0-9]+)/.test(ax)){var ar=new Date(this.date);ar.setDate(1);ar.setMonth(RegExp.$1);ar.setFullYear(this._getInputYear());this.moveTo(ar,true);k(this,false);}else{if(aA=="time-am"){this.setHours(this.getHours()+12);}}}}if(!ac){an(av);}}}function l(D){D=D||window.event;var ar=this.els.topCont.style,P=O(D,this._mouseDiff);ar.left=P.x+"px";ar.top=P.y+"px";}function U(P){var D=P.target||P.srcElement,ar=D;while(D&&D.getAttribute&&!D.getAttribute("dyc-type")){D=D.parentNode;}return D.getAttribute&&D||ar;}function M(D,P){return"DynarchCalendar-"+D.split(/,/)[P];}function p(ar,at){at=at||window.event;var P=U(at);if(P){var au=P.getAttribute("dyc-type");if(au&&!P.getAttribute("disabled")){if(!ar||!this._bodyAnim||au!="date"){var D=P.getAttribute("dyc-cls");D=D?M(D,0):"DynarchCalendar-hover-"+au;if(au!="date"||this.selection.type){E(ar,P,D);}if(au=="date"){E(ar,P.parentNode.parentNode,"DynarchCalendar-hover-week");this._showTooltip(P.getAttribute("dyc-date"));}if(/^time-hour/.test(au)){E(ar,this.els.timeHour,"DynarchCalendar-hover-time");}if(/^time-min/.test(au)){E(ar,this.els.timeMinute,"DynarchCalendar-hover-time");}K(this._getDateDiv(this._lastHoverDate),"DynarchCalendar-hover-date");this._lastHoverDate=null;}}}if(!ar){this._showTooltip();}}function q(ar){ar=ar||window.event;var P=U(ar);if(P){var at=P.getAttribute("dyc-btn"),au=P.getAttribute("dyc-type"),D=ar.wheelDelta?ar.wheelDelta/120:-ar.detail/3;D=D<0?-1:D>0?1:0;if(this.args.reverseWheel){D=-D;}if(/^(time-(hour|min))/.test(au)){switch(RegExp.$1){case"time-hour":this.setHours(this.getHours()+D);break;case"time-min":this.setMinutes(this.getMinutes()+this.args.minuteStep*D);break;}an(ar);}else{if(/Y/i.test(at)){D*=2;}m(this,-D);an(ar);}}}function r(){this.refresh();var D=this.inputField,P=this.selection;if(D){var ar=P.print(this.dateFormat);(/input|textarea/i.test(D.tagName))?D.value=ar:D.innerHTML=ar;this.ValueChanged.fireHandlers({value:ar});}this.callHooks("onSelect",this,P);}var F={37:-1,38:-2,39:1,40:2},ag={33:-1,34:1};function n(at){if(this._menuAnim){return;}at=at||window.event;var ar=at.target||at.srcElement,aC=ar.getAttribute("dyc-btn"),aw=at.keyCode,D=at.charCode||aw,az=F[aw];if("year"==aC&&aw==13){var P=new Date(this.date);P.setDate(1);P.setFullYear(this._getInputYear());this.moveTo(P,true);k(this,false);return an(at);}if(this._menuVisible){if(aw==27){k(this,false);return an(at);}}else{if(!at.ctrlKey){az=null;}if(az==null&&!at.ctrlKey){az=ag[aw];}if(aw==36){az=0;}if(az!=null){m(this,az);return an(at);}D=String.fromCharCode(D).toLowerCase();var aD=this.els.yearInput,aB=this.selection;if(D==" "){k(this,true);this.focus();aD.focus();aD.select();return an(at);}if(D>="0"&&D<="9"){k(this,true);this.focus();aD.value=D;aD.focus();return an(at);}var ay=b("mn"),au=at.shiftKey?-1:this.date.getMonth(),av=0,ax;while(++av<12){ax=ay[(au+av)%12].toLowerCase();if(ax.indexOf(D)==0){var P=new Date(this.date);P.setDate(1);P.setMonth((au+av)%12);this.moveTo(P,true);return an(at);}}if(aw>=37&&aw<=40){var P=this._lastHoverDate;if(!P&&!aB.isEmpty()){P=aw<39?aB.getFirstDate():aB.getLastDate();if(Pthis._lastDateVisible){P=null;}}if(!P){P=aw<39?this._lastDateVisible:this._firstDateVisible;}else{var aA=P;P=aa(P);var au=100;while(au-->0){switch(aw){case 37:P.setDate(P.getDate()-1);break;case 38:P.setDate(P.getDate()-7);break;case 39:P.setDate(P.getDate()+1);break;case 40:P.setDate(P.getDate()+7);break;}if(!this.isDisabled(P)){break;}}P=I(P);if(Pthis._lastDateVisible){this.moveTo(P);}}K(this._getDateDiv(aA),w(this._getDateDiv(P),"DynarchCalendar-hover-date"));this._lastHoverDate=P;return an(at);}if(aw==13){if(this._lastHoverDate){if(aB.type==H.SEL_MULTIPLE&&(at.shiftKey||at.ctrlKey)){if(at.shiftKey&&this._selRangeStart){aB.clear(true);aB.selectRange(this._selRangeStart,this._lastHoverDate);}if(at.ctrlKey){aB.set(this._selRangeStart=this._lastHoverDate,true);}}else{aB.reset(this._selRangeStart=this._lastHoverDate);}return an(at);}}if(aw==27&&!this.args.cont){this.hide();}}}aj._getDateDiv=function(D){var P=null;if(D){try{aq(this.els.body,function(at){if(at.getAttribute("dyc-date")==D){throw P=at;}});}catch(ar){}}return P;};function S(P,D){return P.replace(/\$\{([^:\}]+)(:[^\}]+)?\}/g,function(aw,au,av){var ar=D[au],at;if(av){at=av.substr(1).split(/\s*\|\s*/);ar=(ar>=at.length?at[at.length-1]:at[ar]).replace(/##?/g,function(ax){return ax.length==2?"#":ar;});}return ar;});}function b(D,P){var ar=Y.__.data[D];if(P&&typeof ar=="string"){ar=S(ar,P);}return ar;}(H.Selection=function(ar,at,P,D){this.type=at;this.sel=ar instanceof Array?ar:[ar];this.onChange=G(P,D);this.cal=D;}).prototype={get:function(){return this.type==H.SEL_SINGLE?this.sel[0]:this.sel;},isEmpty:function(){return this.sel.length==0;},set:function(D,at,P){var ar=this.type==H.SEL_SINGLE;if(D instanceof Array){this.sel=D;this.normalize();if(!P){this.onChange(this);}}else{D=I(D);if(ar||!this.isSelected(D)){ar?this.sel=[D]:this.sel.splice(this.findInsertPos(D),0,D);this.normalize();if(!P){this.onChange(this);}}else{if(at){this.unselect(D,P);}}}},reset:function(){this.sel=[];this.set.apply(this,arguments);},countDays:function(){var P=0,D=this.sel,au=D.length,av,ar,at;while(--au>=0){av=D[au];if(av instanceof Array){ar=aa(av[0]);at=aa(av[1]);P+=Math.round(Math.abs(at.getTime()-ar.getTime())/86400000);}++P;}return P;},unselect:function(at,aw){at=I(at);var P=false;for(var D=this.sel,au=D.length,ax;--au>=0;){ax=D[au];if(ax instanceof Array){if(at>=ax[0]&&at<=ax[1]){var ay=aa(at),ar=ay.getDate();if(at==ax[0]){ay.setDate(ar+1);ax[0]=I(ay);P=true;}else{if(at==ax[1]){ay.setDate(ar-1);ax[1]=I(ay);P=true;}else{var av=new Date(ay);av.setDate(ar+1);ay.setDate(ar-1);D.splice(au+1,0,[I(av),ax[1]]);ax[1]=I(ay);P=true;}}}}else{if(at==ax){D.splice(au,1);P=true;}}}if(P){this.normalize();if(!aw){this.onChange(this);}}},normalize:function(){this.sel=this.sel.sort(function(ax,ay){if(ax instanceof Array){ax=ax[0];}if(ay instanceof Array){ay=ay[0];}return ax-ay;});for(var D=this.sel,at=D.length,av,au;--at>=0;){av=D[at];if(av instanceof Array){if(av[0]>av[1]){D.splice(at,1);continue;}if(av[0]==av[1]){av=D[at]=av[0];}}if(au){var ar=au,P=av instanceof Array?av[1]:av;P=aa(P);P.setDate(P.getDate()+1);P=I(P);if(P>=ar){var aw=D[at+1];if(av instanceof Array&&aw instanceof Array){av[1]=aw[1];D.splice(at+1,1);}else{if(av instanceof Array){av[1]=au;D.splice(at+1,1);}else{if(aw instanceof Array){aw[0]=av;D.splice(at,1);}else{D[at]=[av,aw];D.splice(at+1,1);}}}}}au=av instanceof Array?av[0]:av;}},findInsertPos:function(P){for(var D=this.sel,ar=D.length,at;--ar>=0;){at=D[ar];if(at instanceof Array){at=at[0];}if(at<=P){break;}}return ar+1;},clear:function(D){this.sel=[];if(!D){this.onChange(this);}},selectRange:function(P,ar){P=I(P);ar=I(ar);if(P>ar){var au=P;P=ar;ar=au;}var D=this.cal.args.checkRange;if(!D){return this._do_selectRange(P,ar);}try{R(new H.Selection([[P,ar]],H.SEL_MULTIPLE,ah).getDates(),G(function(av){if(this.isDisabled(av)){if(D instanceof Function){D(av,this);}throw"OUT";}},this.cal));this._do_selectRange(P,ar);}catch(at){}},_do_selectRange:function(D,P){this.sel.push([D,P]);this.normalize();this.onChange(this);},isSelected:function(D){for(var P=this.sel.length,ar;--P>=0;){ar=this.sel[P];if(ar instanceof Array&&D>=ar[0]&&D<=ar[1]||D==ar){return true;}}return false;},getFirstDate:function(){var D=this.sel[0];if(D&&D instanceof Array){D=D[0];}return D;},getLastDate:function(){if(this.sel.length>0){var D=this.sel[this.sel.length-1];if(D&&D instanceof Array){D=D[1];}return D;}},print:function(P,aw){var D=[],at=0,av,ar=this.cal.getHours(),au=this.cal.getMinutes();if(!aw){aw=" -> ";}while(atay?3:auav?2:aw?0:arat?1:0;}function ak(P,aB){var av=P.getMonth(),D=P.getDate(),aE=P.getFullYear(),aD=X(P),aC=P.getDay(),at=P.getHours(),ax=(at>=12),au=(ax)?(at-12):at,ar=T(P),aw=P.getMinutes(),aA=P.getSeconds(),ay=/%./g,az;if(au===0){au=12;}az={"%a":b("sdn")[aC],"%A":b("dn")[aC],"%b":b("smn")[av],"%B":b("mn")[av],"%C":1+Math.floor(aE/100),"%d":D<10?"0"+D:D,"%e":D,"%H":at<10?"0"+at:at,"%I":au<10?"0"+au:au,"%j":ar<10?"00"+ar:ar<100?"0"+ar:ar,"%k":at,"%l":au,"%m":av<9?"0"+(1+av):1+av,"%o":1+av,"%M":aw<10?"0"+aw:aw,"%n":"\n","%p":ax?"PM":"AM","%P":ax?"pm":"am","%s":Math.floor(P.getTime()/1000),"%S":aA<10?"0"+aA:aA,"%t":"\t","%U":aD<10?"0"+aD:aD,"%W":aD<10?"0"+aD:aD,"%V":aD<10?"0"+aD:aD,"%u":aC+1,"%w":aC,"%y":(""+aE).substr(2,2),"%Y":aE,"%%":"%"};return aB.replace(ay,function(aF){return az.hasOwnProperty(aF)?az[aF]:aF;});}function al(P){if(P){if(typeof P=="number"){return aa(P);}if(!(P instanceof Date)){var D=P.split(/-/);return new Date(parseInt(D[0],10),parseInt(D[1],10)-1,parseInt(D[2],10),12,0,0,0);}}return P;}function Q(P){if(/\S/.test(P)){P=(""+P).toLowerCase();function D(ar){for(var at=ar.length;--at>=0;){if(ar[at].toLowerCase().indexOf(P)==0){return at+1;}}}return D(b("smn"))||D(b("mn"));}}H.isUnicodeLetter=function(D){return D.toUpperCase()!=D.toLowerCase();};H.parseDate=function(at,az,aB){if(!/\S/.test(at)){return"";}at=at.replace(/^\s+/,"").replace(/\s+$/,"");aB=aB||new Date();var aD=null,ax=null,ar=null,au=null,aw=null,aA=null;var P=at.match(/([0-9]{1,2}):([0-9]{1,2})(:[0-9]{1,2})?\s*(am|pm)?/i);if(P){au=parseInt(P[1],10);aw=parseInt(P[2],10);aA=P[3]?parseInt(P[3].substr(1),10):0;at=at.substring(0,P.index)+at.substr(P.index+P[0].length);if(P[4]){if(P[4].toLowerCase()=="pm"&&au<12){au+=12;}else{if(P[4].toLowerCase()=="am"&&au>=12){au-=12;}}}}var D=(function(){var aG=0,aM=[],aF;function aI(){return at.charAt(aG++);}function aJ(){return at.charAt(aG);}var aH=H.isUnicodeLetter;function aL(aN){while(aJ()&&aH(aJ())){aN+=aI();}return aN;}function aK(){var aN="";while(aJ()&&/[0-9]/.test(aJ())){aN+=aI();}if(aH(aJ())){return aL(aN);}return parseInt(aN,10);}function aE(aN){aM.push(aN);}while(aG=60){aD=aC;}else{if(aC>=0&&aC<=12){ay.push(aC);}else{if(aC>=1&&aC<=31){ar=aC;}}}}else{if(ax==null){ax=Q(aC);}}}}if(ay.length>=2){if(az){if(ax==null){ax=ay.shift();}if(ar==null){ar=ay.shift();}}else{if(ar==null){ar=ay.shift();}if(ax==null){ax=ay.shift();}}}else{if(ay.length==1){if(ar==null){ar=ay.shift();}else{if(ax==null){ax=ay.shift();}}}}if(aD==null){aD=ay.length>0?ay.shift():aB.getFullYear();}if(aD<30){aD+=2000;}else{if(aD<99){aD+=1900;}}if(ax==null){ax=aB.getMonth()+1;}return aD!=null&&ax!=null&&ar!=null?new Date(aD,ax-1,ar,au,aw,aA):null;};function J(D,P,ar,at){at={};for(ar in P){if(P.hasOwnProperty(ar)){at[ar]=P[ar];}}for(ar in D){if(D.hasOwnProperty(ar)){at[ar]=D[ar];}}return at;}function x(P,ar,at,D){if(P instanceof Array){for(var au=P.length;--au>=0;){x(P[au],ar,at,D);}}else{if(typeof ar=="object"){for(var au in ar){if(ar.hasOwnProperty(au)){x(P,au,ar[au],at);}}}else{if(P.addEventListener){P.addEventListener(ar,at,ac?true:!!D);}else{if(P.attachEvent){P.attachEvent("on"+ar,at);}else{P["on"+ar]=at;}}}}}function am(P,ar,at,D){if(P instanceof Array){for(var au=P.length;--au>=0;){am(P[au],ar,at);}}else{if(typeof ar=="object"){for(var au in ar){if(ar.hasOwnProperty(au)){am(P,au,ar[au],at);}}}else{if(P.removeEventListener){P.removeEventListener(ar,at,ac?true:!!D);}else{if(P.detachEvent){P.detachEvent("on"+ar,at);}else{P["on"+ar]=null;}}}}}function an(D){D=D||window.event;if(ac){D.cancelBubble=true;D.returnValue=false;}else{D.preventDefault();D.stopPropagation();}return false;}function K(au,ar,D){if(au){var at=au.className.replace(/^\s+|\s+$/,"").split(/\x20/),P=[],av;for(av=at.length;av>0;){if(at[--av]!=ar){P.push(at[av]);}}if(D){P.push(D);}au.className=P.join(" ");}return D;}function w(P,D){return K(P,D,D);}function E(P,ar,D){if(ar instanceof Array){for(var at=ar.length;--at>=0;){E(P,ar[at],D);}}else{K(ar,D,P?D:null);}return P;}function B(at,D,ar){var P=null;if(document.createElementNS){P=document.createElementNS("http://www.w3.org/1999/xhtml",at);}else{P=document.createElement(at);}if(D){P.className=D;}if(ar){ar.appendChild(P);}return P;}function A(au,av){if(av==null){av=0;}var D,ar,at;try{D=Array.prototype.slice.call(au,av);}catch(P){D=new Array(au.length-av);for(ar=av,at=0;ar0&&z){c.UI.Helpers.ControlHelper.showValidationMessages(D.id,E);g.setErrorState(true);A.setErrorState(true);}}function q(){C.setValue(g.getValue().value,"date");C.setValue(A.getValue(),"time");t.ValueChanged.fireHandlers({newValue:C.getValue()});}function j(){C=c.UI.Helpers.ValueAccessorHelper.createValueAccessor(l,t);if(s.ValidationFailed){s.ValidationFailed.addHandler(p);}g=new c.UI.CalendarTextBox({id:D.id+c.UI.DateTimePickerTemplate.DatePostfix,attr:{eventTags:"date"},value:{unixTicks:C.getValue("date")},minDateRestriction:D.minDateRestriction,maxDateRestriction:D.maxDateRestriction,mask:D.dateMask,calendarSelection:D.dateCalendarSelection||null},{parentComponent:t},v);g.ValueChanged.addHandler(q);g.EditStarted.addHandler(n);g.VisualStateChanged.addHandler(r);A=new c.UI.TimePicker({id:D.id+c.UI.DateTimePickerTemplate.TimePostfix,attr:{eventTags:"time"},value:C.getValue("time"),format:D.timeFormat},{parentComponent:t});A.ValueChanged.addHandler(q);A.EditStarted.addHandler(n);A.VisualStateChanged.addHandler(r);s.RenderComplete.addHandler(o);s.Dispose.addHandler(h);}function h(){if(m){return;}t.Dispose.fireHandlers();s.RenderComplete.removeHandler(o);s.Dispose.removeHandler(h);if(s.ValidationFailed){s.ValidationFailed.removeHandler(p);}D=null;s=null;C=null;g=null;A=null;f=null;t.RenderComplete=null;t.Dispose=null;t.ValueChanged=null;t.EditStarted=null;t.VisualStateChanged=null;m=true;}j();}})(window,WA);(function(e,d,c){if(!d.UI.DateTimePickerTemplate){d.UI.DateTimePickerTemplate=b;d.UI.DateTimePickerTemplate.DatePostfix="_date";d.UI.DateTimePickerTemplate.TimePostfix="_time";d.UI.DateTimePickerTemplate.DefaultTitleWidth=75;d.UI.DateTimePickerTemplate.DefaultDateTimeSeparatorWidth=7;d.UI.DateTimePickerTemplate.TimePosition={Left:"left",Right:"right"};}function b(h){var g=d.UI.ControlLayoutTemplate,f=h.controlContainerDisplayType?h.controlContainerDisplayType:d.UI.ControlLayoutTemplate.ControlContainerDisplayType.Flexible;if(h.fitDatePickerToDate){f=d.UI.ControlLayoutTemplate.ControlContainerDisplayType.Fixed;}h.controlContainerDisplayType=f;h.cssClass="waDateTimePicker"+(h.cssClass?" "+h.cssClass:"");h.layoutContentHTML=a(h);h.titleWidth=(d.getTypeString(h.titleWidth)=="number")?h.titleWidth:d.UI.DateTimePickerTemplate.DefaultTitleWidth;h.titlePosition=h.titlePosition||d.UI.ControlLayoutTemplate.TitlePosition.Left;return g(h);}function a(j){var k=j.dateTimeSeparatorWidth||d.UI.DateTimePickerTemplate.DefaultDateTimeSeparatorWidth,n=(j.timeFormat==d.UI.TimePicker.TimeFormat.H12)?d.UI.TimePickerTemplate.Width.H12:d.UI.TimePickerTemplate.Width.H24,g=j.pickerWidth?j.pickerWidth-k-n:null,i=d.UI.ContainerTemplate,f=d.UI.CalendarTextBoxTemplate({id:j.id+b.DatePostfix,controlContainerDisplayType:j.controlContainerDisplayType,width:g,cssClass:"waDateTimePickerDate",fitToDate:j.fitDatePickerToDate,mask:j.dateMask}),l=d.UI.TimePickerTemplate({id:j.id+d.UI.DateTimePickerTemplate.TimePostfix,format:j.timeFormat,cssClass:"waDateTimePickerDateTime"}),h=i({cssClass:"waDateTimePickerDateTimeDivider",attr:{style:{width:k+"px"}}});return i({cssClass:"waDateTimePickerContainer",contentHTML:(j.timePickerPosition==d.UI.DateTimePickerTemplate.TimePosition.Left)?l+h+f:f+h+l});}})(window,WA);(function(d,c,b){if(!c.UI.DateTimeRangePicker){c.UI.DateTimeRangePicker=a;}function a(l,k,v){k=k||{};var t=this,C="WA.UI.DateTimeRangePicker",E=l,s=k.parentComponent;E.attr=E.attr||{eventTags:E.id};t.toString=function(){return C;};t.RenderComplete=c.Tools.EventHandlers.createHandlers(t,{id:"RenderComplete"});t.Dispose=c.Tools.EventHandlers.createHandlers(t,{id:"Dispose"});t.ValueChanged=c.Tools.EventHandlers.createHandlers(t,{id:"ValueChanged"});t.VisualStateChanged=c.Tools.EventHandlers.createHandlers(t,{id:"VisualStateChanged"});var m=false,D,B,h,f,e=E.id+c.UI.ControlLayoutTemplate.IdControlLayoutPostfix,A=k.hasOwnProperty("showValidationMessage")?k.showValidationMessage:true;t.dispose=g;t.render=u;t.getType=function(){return E.layoutControlType;};t.getId=function(){return E.id;};t.renderComplete=p;t.getValue=i;t.setValue=z;t.setErrorState=x;t.setStartDateCalendarSelection=y;t.setEndDateCalendarSelection=w;function y(F){B.setDateCalendarSelection(F);}function w(F){h.setDateCalendarSelection(F);}function i(){return D.getValue();}function z(F){D.setValue(F);B.setValue({date:F.fromDate,time:F.fromTime});h.setValue({date:F.untilDate,time:F.untilTime});}function u(){return c.UI.DateTimeRangePickerTemplate(E);}function p(G,F){f=c.$(e);if(!f){throw new Error("Can not get controlElement");}t.RenderComplete.fireHandlers();}function r(G,F){t.VisualStateChanged.fireHandlers();}function n(H,F){var I=B.getValue(),G=h.getValue();if(I.date&&G.date==null&&I.time&&G.time!=null&&G.time0&&A){c.UI.Helpers.ControlHelper.showValidationMessages(E.id,F);B.setErrorState(true);h.setErrorState(true);}}function x(F){B.setErrorState(F);h.setErrorState(F);if(F===true){c.Dom.addClassName(f,"error");}else{c.Dom.removeClassName(f,"error");}}function o(G,F){x(false);}function j(){D=c.UI.Helpers.ValueAccessorHelper.createValueAccessor(l,t);if(s.ValidationFailed){s.ValidationFailed.addHandler(q);}B=new c.UI.DateTimePicker({id:E.id+c.UI.DateTimeRangePickerTemplate.StartPostfix,attr:{eventTags:"start"},value:{date:D.getValue("fromDate"),time:D.getValue("fromTime")},title:E.startTitle,titleWidth:E.startTitleWidth,pickerWidth:E.pickerWidth,controlContainerDisplayType:E.controlContainerDisplayType,dateMask:E.dateMask,timeHint:E.timeHint,timeFormat:E.timeFormat,timePickerPosition:E.startTimePickerPosition,minDateRestriction:E.minDateRestriction,maxDateRestriction:E.maxDateRestriction,dateCalendarSelection:E.startDateCalendarSelection||null,fitDatePickerToDate:E.fitDatePickerToDate},{parentComponent:t},v);B.ValueChanged.addHandler(n);B.EditStarted.addHandler(o);B.VisualStateChanged.addHandler(r);h=new c.UI.DateTimePicker({id:E.id+c.UI.DateTimeRangePickerTemplate.EndPostfix,attr:{eventTags:"end"},value:{date:D.getValue("untilDate"),time:D.getValue("untilTime")},title:E.endTitle,titleWidth:E.endTitleWidth,pickerWidth:E.pickerWidth,controlContainerDisplayType:E.controlContainerDisplayType,dateMask:E.dateMask,timeHint:E.timeHint,timeFormat:E.timeFormat,timePickerPosition:E.endTimePickerPosition,minDateRestriction:E.minDateRestriction,maxDateRestriction:E.maxDateRestriction,dateCalendarSelection:E.endDateCalendarSelection||null,fitDatePickerToDate:E.fitDatePickerToDate},{parentComponent:t},v);h.ValueChanged.addHandler(n);h.EditStarted.addHandler(o);h.VisualStateChanged.addHandler(r);s.RenderComplete.addHandler(p);s.Dispose.addHandler(g);}function g(){if(m){return;}t.Dispose.fireHandlers();s.RenderComplete.removeHandler(p);s.Dispose.removeHandler(g);if(s.ValidationFailed){s.ValidationFailed.removeHandler(q);}E=null;D=null;B=null;h=null;f=null;t.RenderComplete=null;t.Dispose=null;t.ValueChanged=null;t.VisualStateChanged=null;m=true;}j();}})(window,WA);(function(e,d,c){if(!d.UI.DateTimeRangePickerTemplate){d.UI.DateTimeRangePickerTemplate=b;d.UI.DateTimeRangePickerTemplate.StartPostfix="_start";d.UI.DateTimeRangePickerTemplate.EndPostfix="_end";d.UI.DateTimeRangePickerTemplate.PickersLayout={Horizontal:"horizontal",Vertical:"vertical"};}function b(g){var f=g.controlContainerDisplayType||d.UI.ControlLayoutTemplate.ControlContainerDisplayType.Flexible;if(g.fitDatePickerToDate){f=d.UI.ControlLayoutTemplate.ControlContainerDisplayType.Fixed;}g.controlContainerDisplayType=f;g.cssClass="waDateTimeRangePicker"+(g.cssClass?" "+g.cssClass:"");g.layoutContentHTML=a(g);return d.UI.ControlLayoutTemplate(g);}function a(g){var f=d.UI.ContainerTemplate;return f({cssClass:"waDateTimeRangePickerContainer"+(g.pickersLayout==d.UI.DateTimeRangePickerTemplate.PickersLayout.Vertical?"":" horizontal"),contentHTML:f({cssClass:"waDateTimeRangePickerStart",contentHTML:d.UI.DateTimePickerTemplate({id:g.id+d.UI.DateTimeRangePickerTemplate.StartPostfix,title:g.startTitle,titleWidth:g.startTitleWidth,titlePosition:g.startTitlePosition,pickerWidth:g.pickerWidth,controlContainerDisplayType:g.controlContainerDisplayType,timeFormat:g.timeFormat,timePickerPosition:g.startTimePickerPosition,fitDatePickerToDate:g.fitDatePickerToDate,dateMask:g.dateMask})})+f({cssClass:"waDateTimeRangePickerDivider",attr:{style:((g.pickersLayout==d.UI.DateTimeRangePickerTemplate.PickersLayout.Vertical)?"height":"width")+": "+(g.dividerSize||0)+"px;"}})+f({cssClass:"waDateTimeRangePickerEnd",contentHTML:d.UI.DateTimePickerTemplate({id:g.id+d.UI.DateTimeRangePickerTemplate.EndPostfix,title:g.endTitle,titleWidth:g.endTitleWidth,titlePosition:g.endTitlePosition,pickerWidth:g.pickerWidth,controlContainerDisplayType:g.controlContainerDisplayType,timeFormat:g.timeFormat,timePickerPosition:g.endTimePickerPosition,fitDatePickerToDate:g.fitDatePickerToDate,dateMask:g.dateMask})})});}})(window,WA);(function(f,e,d){var b=32;var c=500;if(!e.UI.DialogListControl){e.UI.DialogListControl=a;}function a(B,A){A=A||{};var U=this,al="WA.UI.DialogListControl",ao=B,R=A.parentComponent;U.toString=function(){return al;};ao.renderSummary=ao.renderSummary===d?true:ao.renderSummary;ao.itemTemplateType=ao.itemTemplateType||e.UI.DialogListControlItemTemplateType.Default;var E=e.UI.DialogListTemplateFactory.CreateTemplate(ao.itemTemplateType);if(Y()){}U.RenderComplete=e.Tools.EventHandlers.createHandlers(U,{id:"RenderComplete"});U.VisualStateChanged=e.Tools.EventHandlers.createHandlers(U,{id:"VisualStateChanged"});U.ValueChanged=e.Tools.EventHandlers.createHandlers(U,{id:"ValueChanged"});U.Dispose=e.Tools.EventHandlers.createHandlers(U,{id:"Dispose"});ao.maxWidth=ao.maxWidth||500;ao.minWidth=ao.minWidth||300;ao.maxHeight=ao.maxHeight||350;ao.minHeight=ao.minHeight||350;var D=false,ak=100,ai=ao.showMaxItemsCount,t=ao.footerTextIfOverflowMaxItemsCount,k,Q,ac,F,p,an,ad,m=[],n,ae,Z,aa="",T=ao.processDoubleClick||true,g=ao.id+"_apply",h=ao.id+"_cancel";U.render=V;U.parentSelected=S;U.show=af;U.hide=x;U.showDialogListControl=ah;function Y(){return ao.renderSummary===true;}function ah(){P();}function af(){ag();U.VisualStateChanged.fireHandlers();}function ag(){if(!Y()){return;}e.Dom.removeClassName(k,"hidden");}function x(){y();U.VisualStateChanged.fireHandlers();}function y(){if(!Y()){return;}e.Dom.addClassName(k,"hidden");}function S(ap){e.UI.Helpers.ControlHelper.applyParentSelectedBehavior(U,ao.parentChangeBehaviour,ap);}function V(){return e.UI.DialogListControlTemplate(ao);}function N(aq,ap){o();U.RenderComplete.fireHandlers();}function o(){if(!Y()){return;}k=e.$(ao.id);}function M(aq,ap){P();}function P(){p.setTitle(ao.DialogTitle);p.setWaitingState();p.show();e.throttle(aj,ak);}function aj(){ae.loadListData();}function J(){}function i(ap){return !(ap.itemsMetadata&&ap.itemsMetadata.levels&&ap.itemsMetadata.statuses&&(ap.itemsMetadata.resources||ap.itemsMetadata.groups));}function L(aq,ap){m=ap.items;if(!n){n=(E.InitMetadata?E.InitMetadata(ap.itemsMetadata):ap.itemsMetadata);}X();p.setNormalState();if(!an.getValue()){p.disableButton(g);}}function K(){p.setErrorState();}function I(aq,ap){ad=ap.value;p.enableButton(g);if(ap.selectEvent==e.UI.ListControl.SelectEvent.DoubleClick){G();}}function G(){if(!ad){return;}var ap=r(m,ad);if(E.ValueTransformer){ap=E.ValueTransformer(ap,n);}an.setValue(ap);p.hide();am(ap);U.ValueChanged.fireHandlers({value:ap});}function am(ap){if(!Y()){return;}ac.contentHTML(E.CreateSelectedItem(ap,n));ac.show();Q.setWaButtonTitle(ao.openDialogChangeButtonTitle);}function H(){p.hide();}function O(aq,ap){aa=e.String.gtrim(ap.newValue);e.throttle(X,b);}function ab(){p.setWaitingState();ae.loadListData(aa,false);}function X(){p.setContent(W());s();}function s(){if(F){F.renderComplete();}}function r(aq,at){for(var ap=0,ar=aq.length;ap0);}}})(window,WA);(function(d,c,b){if(!c.UI.DialogListService){c.UI.DialogListService=a;}function a(j){j=j||{};var l=this,n="WA.UI.DialogListService",k=j.parentComponent,m=j.resources;l.toString=function(){return n;};l.LoadListDataBeforeSend=c.Tools.EventHandlers.createHandlers(l,{id:"LoadListDataBeforeSend"});l.LoadListDataSuccess=c.Tools.EventHandlers.createHandlers(l,{id:"LoadListDataSuccess"});l.LoadListDataFailed=c.Tools.EventHandlers.createHandlers(l,{id:"LoadListDataFailed"});l.serverSearchFeature=null;l.Dispose=c.Tools.EventHandlers.createHandlers(l,{id:"Dispose"});var h=false,f;l.init=g;l.loadListData=i;function i(p,o){if(typeof o==="undefined"){o=true;}if(o&&f){l.LoadListDataSuccess.fireHandlers(f);return;}c.Ajax({url:m.dataSourceUrl,dataType:"json",type:"GET",data:{searchString:(p||""),from:0,count:100},beforeSend:function(){if(h){return;}l.LoadListDataBeforeSend.fireHandlers();},success:function(q){if(h){return;}f=q;l.LoadListDataSuccess.fireHandlers(q);},error:function(q){if(h){return;}l.LoadListDataFailed.fireHandlers({error:q});}});}function g(){k.Dispose.addHandler(e);}function e(){l.Dispose.fireHandlers();k.Dispose.removeHandler(e);k=null;f=null;l.LoadListDataBeforeSend=null;l.LoadListDataSuccess=null;l.LoadListDataFailed=null;l.Dispose=null;h=true;}}})(window,WA);(function(m,l,k){if(!l.UI.DialogListItemTemplate){l.UI.DialogListItemTemplate=e;l.UI.DialogListItemTemplate.CreateSearchIndex=b;l.UI.DialogListItemTemplate.InitMetadata=j;l.UI.DialogListItemTemplate.serverSearchFeature=null;}function j(n){n.levels=l.Array.convertToDictionary(n.levels,"id");n.statuses=l.Array.convertToDictionary(n.statuses,"id");return n;}function b(o,r){var n="";n+=o.id;n+=o.email;n+=o.org;n+=o.phone;var s=i(o,r);if(s){n+=s;}var p=f(o,r);if(p){n+=p;}var q=h(o,r);if(q){n+=q;}var t=g(o,r);if(t){n+=t;}return n;}function e(n,o){return l.UI.ContainerTemplate({cssClass:"itemContainer",attr:n.attr,contentHTML:l.UI.ContainerTemplate({attr:n.attr,cssClass:"firstColumn",contentHTML:a(n,o)})+l.UI.ContainerTemplate({attr:n.attr,cssClass:"secondColumn",contentHTML:c(n,o)})+l.UI.ContainerTemplate({attr:n.attr,cssClass:"thirdColumn",contentHTML:d(n,o)})});}function i(n,o){if(n.contactNameCache===k){if(n.name){n.contactNameCache=n.name+(n.archived===1?" "+o.resources.archivedContactLabel:"");}else{n.contactNameCache="";}}return n.contactNameCache;}function f(o,p){if(l.UI.DialogListItemTemplate.serverSearchFeature){return o.levelTitle;}if(o.membershipLevelCache===k){var q=p.resources;var n=p.levels;if(o.archived===1){o.membershipLevelCache="";}else{if(o.member!==1){o.membershipLevelCache=q.nonMemberLabel;}else{if(o.enabled!==1){o.membershipLevelCache=q.stoppedMembershipLabel;}else{if(o.level!==k&&o.level>0&&n[o.level]){o.membershipLevelCache=n[o.level].name;}else{o.membershipLevelCache="";}}}}}return o.membershipLevelCache;}function h(n,o){if(l.UI.DialogListItemTemplate.serverSearchFeature){return n.statusString;}if(n.membershipStatusCache===k){var p=o.statuses;if(n.archived===1){n.membershipStatusCache="";}else{if(n.level!==k&&n.enabled===1&&n.status!==k&&n.status>0&&p[n.status]){n.membershipStatusCache=p[n.status].name;}else{n.membershipStatusCache="";}}}return n.membershipStatusCache;}function g(n,o){if(n.membershipRenewalDateCache===k){if(n.archived===1){n.membershipRenewalDateCache="";}else{if(n.level!==k&&n.enabled===1&&n.renewal){n.membershipRenewalDateCache=n.renewal;}else{n.membershipRenewalDateCache="";}}}return n.membershipRenewalDateCache;}function a(o,p){var n="";var q=i(o,p);if(q){n+=l.UI.ContainerTemplate({attr:o.attr,cssClass:"columnItem",contentHTML:l.UI.TextContainerTemplate({cssClass:o.archived===1?"archivedItemName":"itemName",displayType:l.UI.TextContainerTemplate.DisplayType.SingleLine,fadeMode:true,attr:o.attr,contentText:q})});}if(o.org){n+=l.UI.ContainerTemplate({attr:o.attr,cssClass:"columnItem",contentHTML:l.UI.TextContainerTemplate({contentText:o.org,fadeMode:true,displayType:l.UI.TextContainerTemplate.DisplayType.SingleLine,attr:o.attr})});}if(o.hasOwnProperty("id")){n+=l.UI.BulletedContainerTemplate({contentText:o.id,leftIcons:[{cssClass:o.archived?"disabled":"",iconSize:l.UI.IconTemplate.IconSize.Small,iconType:o.admin===1?l.UI.IconType.Star:l.UI.IconType.Empty}]});}return n;}function c(o,s){var n="";var p=f(o,s);if(p){n+=l.UI.ContainerTemplate({attr:o.attr,cssClass:"columnItem",contentHTML:l.UI.TextContainerTemplate({cssClass:o.archived!==1?"itemName":"",fadeMode:true,displayType:l.UI.TextContainerTemplate.DisplayType.SingleLine,attr:o.attr,contentText:p})});}var r=h(o,s);if(r){n+=l.UI.ContainerTemplate({attr:o.attr,cssClass:"columnItem",contentHTML:l.UI.TextContainerTemplate({fadeMode:true,displayType:l.UI.TextContainerTemplate.DisplayType.SingleLine,attr:o.attr,contentText:r})});}var q=g(o,s);if(q){n+=l.UI.ContainerTemplate({attr:o.attr,cssClass:"columnItem",contentHTML:l.UI.TextContainerTemplate({fadeMode:true,displayType:l.UI.TextContainerTemplate.DisplayType.SingleLine,attr:o.attr,contentText:q})});}return n;}function d(o,p){var n="";if(o.email){n+=l.UI.ContainerTemplate({attr:o.attr,cssClass:"columnItem",contentHTML:l.UI.TextContainerTemplate({cssClass:o.archived!==1?"itemName":"",attr:o.attr,fadeMode:true,displayType:l.UI.TextContainerTemplate.DisplayType.SingleLine,contentText:o.email})});}if(o.phone){n+=l.UI.ContainerTemplate({attr:o.attr,cssClass:"columnItem",contentHTML:l.UI.TextContainerTemplate({attr:o.attr,fadeMode:true,displayType:l.UI.TextContainerTemplate.DisplayType.SingleLine,contentText:o.phone})});}return n;}})(window,WA);(function(c,b,a){if(!b.UI.DialogListTemplateFactory){b.UI.DialogListControlItemTemplateType={Default:"Default",FeaturedMember:"FeaturedMember"};b.UI.DialogListTemplateFactory={CreateTemplate:function(d){switch(d){case b.UI.DialogListControlItemTemplateType.FeaturedMember:return b.UI.FeaturedMemberItemTemplate;default:return b.UI.DialogListItemTemplate;}}};}})(window,WA);(function(j,i,g){if(!i.UI.FeaturedMemberItemTemplate){i.UI.FeaturedMemberItemTemplate=e;i.UI.FeaturedMemberItemTemplate.CreateSearchIndex=b;i.UI.FeaturedMemberItemTemplate.CreateSelectedItem=d;i.UI.FeaturedMemberItemTemplate.ValueTransformer=h;i.UI.FeaturedMemberItemTemplate.InitMetadata=f;i.UI.FeaturedMemberItemTemplate.serverSearchFeature=null;}function f(k){k.levels=i.Array.convertToDictionary(k.levels,"id");k.groups=i.Array.convertToDictionary(k.groups,"id");k.statuses=i.Array.convertToDictionary(k.statuses,"id");return k;}function b(n,o){var k=[];k.push(n.id);k.push(n.fullName);k.push(n.email);k.push(n.organization);if(n.membershipLevelId&&n.membershipLevelId>0&&o.levels[n.membershipLevelId]){k.push(o.levels[n.membershipLevelId].name);}if(n.membershipStatus&&o.statuses[n.membershipStatus]){k.push(o.statuses[n.membershipStatus].name);}if(n.adHocGroups&&n.adHocGroups.length>0){for(var l=0;l0&&m.levels[k.membershipLevelId]){l=m.levels[k.membershipLevelId].name;}var n={__type:"EntityValueJsonModel",id:k.id,fields:[{name:"fullName",value:k.fullName}]};if(l!=""){n.fields.push({name:"level",value:l});}return n;}function e(k,l){return i.UI.ContainerTemplate({cssClass:"itemContainer",attr:k.attr,contentHTML:i.UI.ContainerTemplate({attr:k.attr,cssClass:"firstColumn",contentHTML:a(k,l)})+i.UI.ContainerTemplate({attr:k.attr,cssClass:"secondColumn",contentHTML:c(k,l)})});}function a(l){var k=[];if(l.fullName){k.push(i.UI.ContainerTemplate({attr:l.attr,cssClass:"columnItem",contentHTML:i.UI.TextContainerTemplate({cssClass:"itemName",displayType:i.UI.TextContainerTemplate.DisplayType.SingleLine,fadeMode:true,attr:l.attr,contentText:l.fullName})}));}if(l.organization){k.push(i.UI.ContainerTemplate({attr:l.attr,cssClass:"columnItem",contentHTML:i.UI.TextContainerTemplate({contentText:l.organization,fadeMode:true,displayType:i.UI.TextContainerTemplate.DisplayType.SingleLine,attr:l.attr})}));}if(l.email){k.push(i.UI.ContainerTemplate({attr:l.attr,cssClass:"columnItem",contentHTML:i.UI.TextContainerTemplate({attr:l.attr,fadeMode:true,displayType:i.UI.TextContainerTemplate.DisplayType.SingleLine,contentText:l.email})}));}return k.join("");}function c(p,s){var k=[],q=null,r=null,n=null;if(i.UI.FeaturedMemberItemTemplate.serverSearchFeature){q=p.membershipLevelTitle;}else{q=(p.membershipLevelId&&s.levels[p.membershipLevelId])?s.levels[p.membershipLevelId].name:null;}if(q){k.push(i.UI.ContainerTemplate({attr:p.attr,cssClass:"columnItem",contentHTML:i.UI.TextContainerTemplate({cssClass:"itemName",fadeMode:true,displayType:i.UI.TextContainerTemplate.DisplayType.SingleLine,attr:p.attr,contentText:q})}));}if(i.UI.FeaturedMemberItemTemplate.serverSearchFeature){r=p.membershipStatusTitle;}else{r=(p.membershipStatus&&s.statuses[p.membershipStatus])?s.statuses[p.membershipStatus].name:null;}if(r){k.push(i.UI.ContainerTemplate({cssClass:"columnItem",contentText:r,attr:p.attr}));}if(i.UI.FeaturedMemberItemTemplate.serverSearchFeature){n=p.adHocGroupTitles;}else{if(p.adHocGroups&&p.adHocGroups.length>0){var l=[];for(var o=0;o0){n=l.join(", ");}}}if(n){k.push(i.UI.ContainerTemplate({attr:p.attr,cssClass:"columnItem",contentHTML:i.UI.TextContainerTemplate({attr:p.attr,fadeMode:true,displayType:i.UI.TextContainerTemplate.DisplayType.SingleLine,contentText:n})}));}return k.join("");}})(window,WA);(function(e,d,c){var b=500;if(!d.UI.DialogListControlAjaxSearch){d.UI.DialogListControlAjaxSearch=a;}function a(y,x){x=x||{};var R=this,ai="WA.UI.DialogListControlAjaxSearch",al=y,O=x.parentComponent;R.toString=function(){return ai;};al.renderSummary=al.renderSummary===c?true:al.renderSummary;al.itemTemplateType=al.itemTemplateType||d.UI.DialogListControlItemTemplateType.Default;var B=d.UI.DialogListTemplateFactoryAjaxSearch.CreateTemplate(al.itemTemplateType);R.RenderComplete=d.Tools.EventHandlers.createHandlers(R,{id:"RenderComplete"});R.VisualStateChanged=d.Tools.EventHandlers.createHandlers(R,{id:"VisualStateChanged"});R.ValueChanged=d.Tools.EventHandlers.createHandlers(R,{id:"ValueChanged"});R.Dispose=d.Tools.EventHandlers.createHandlers(R,{id:"Dispose"});al.maxWidth=al.maxWidth||500;al.minWidth=al.minWidth||300;al.maxHeight=al.maxHeight||350;al.minHeight=al.minHeight||350;var A=false,ah=100,af=al.showMaxItemsCount,r=al.footerTextIfOverflowMaxItemsCount,i,N,Z,C,n,ak,aa,k=[],l,ab,W,X="",Q=al.processDoubleClick||true,f=al.id+"_apply",g=al.id+"_cancel";R.render=S;R.parentSelected=P;R.show=ac;R.hide=u;R.showDialogListControl=ae;function V(){return al.renderSummary===true;}function ae(){M();}function ac(){ad();R.VisualStateChanged.fireHandlers();}function ad(){if(!V()){return;}d.Dom.removeClassName(i,"hidden");}function u(){v();R.VisualStateChanged.fireHandlers();}function v(){if(!V()){return;}d.Dom.addClassName(i,"hidden");}function P(am){d.UI.Helpers.ControlHelper.applyParentSelectedBehavior(R,al.parentChangeBehaviour,am);}function S(){return d.UI.DialogListControlTemplate(al);}function K(an,am){m();R.RenderComplete.fireHandlers();}function m(){if(!V()){return;}i=d.$(al.id);}function J(an,am){M();}function M(){n.setTitle(al.DialogTitle);n.setWaitingState();n.show();d.throttle(ag,ah);}function ag(){ab.loadListData();}function G(){}function I(an,am){k=am.items;l=am.itemsMetadata;U();n.setNormalState();if(!ak.getValue()){n.disableButton(f);}}function H(){n.setErrorState();}function F(an,am){aa=am.value;n.enableButton(f);if(am.selectEvent==d.UI.ListControl.SelectEvent.DoubleClick){D();}}function D(){if(!aa){return;}var am=p(k,aa);if(B.ValueTransformer){am=B.ValueTransformer(am,l);}ak.setValue(am);n.hide();aj(am);R.ValueChanged.fireHandlers({value:am});}function aj(am){if(!V()){return;}Z.contentHTML(B.CreateSelectedItem(am,l));Z.show();N.setWaButtonTitle(al.openDialogChangeButtonTitle);}function E(){n.hide();}function L(an,am){X=d.String.gtrim(am.newValue);d.throttle(Y,b);}function Y(){n.setWaitingState();ab.loadListData(X,false);}function U(){n.setContent(T());q();}function q(){if(C){C.renderComplete();}}function p(an,ap){for(var am=0,ao=an.length;am0?X.toLowerCase():c;for(var aq=0;aq0&&k&&k.levels&&k.levels[i.membershipLevelId]){j=k.levels[i.membershipLevelId].name;}var l={__type:"EntityValueJsonModel",id:i.id,fields:[{name:"fullName",value:i.fullName}]};if(j!=""){l.fields.push({name:"level",value:j});}return l;}function d(i,j){return g.UI.ContainerTemplate({cssClass:"itemContainer",attr:i.attr,contentHTML:g.UI.ContainerTemplate({attr:i.attr,cssClass:"firstColumn",contentHTML:a(i,j)})+g.UI.ContainerTemplate({attr:i.attr,cssClass:"secondColumn",contentHTML:b(i,j)})});}function a(j){var i=[];if(j.fullName){i.push(g.UI.ContainerTemplate({attr:j.attr,cssClass:"columnItem",contentHTML:g.UI.TextContainerTemplate({cssClass:"itemName",displayType:g.UI.TextContainerTemplate.DisplayType.SingleLine,fadeMode:true,attr:j.attr,contentText:j.fullName})}));}if(j.organization){i.push(g.UI.ContainerTemplate({attr:j.attr,cssClass:"columnItem",contentHTML:g.UI.TextContainerTemplate({contentText:j.organization,fadeMode:true,displayType:g.UI.TextContainerTemplate.DisplayType.SingleLine,attr:j.attr})}));}if(j.email){i.push(g.UI.ContainerTemplate({attr:j.attr,cssClass:"columnItem",contentHTML:g.UI.TextContainerTemplate({attr:j.attr,fadeMode:true,displayType:g.UI.TextContainerTemplate.DisplayType.SingleLine,contentText:j.email})}));}return i.join("");}function b(k,o){var i=[],l=null,n=null,j=null;l=k.membershipLevelTitle;if(l){i.push(g.UI.ContainerTemplate({attr:k.attr,cssClass:"columnItem",contentHTML:g.UI.TextContainerTemplate({cssClass:"itemName",fadeMode:true,displayType:g.UI.TextContainerTemplate.DisplayType.SingleLine,attr:k.attr,contentText:l})}));}n=k.membershipStatusTitle;if(n){i.push(g.UI.ContainerTemplate({cssClass:"columnItem",contentText:n,attr:k.attr}));}j=k.adHocGroupTitles;if(j){i.push(g.UI.ContainerTemplate({attr:k.attr,cssClass:"columnItem",contentHTML:g.UI.TextContainerTemplate({attr:k.attr,fadeMode:true,displayType:g.UI.TextContainerTemplate.DisplayType.SingleLine,contentText:j})}));}return i.join("");}})(window,WA);(function(c,b){if(!b.UI.DialogListControlFactory){b.UI.DialogListControlFactory=a;}function a(f,e,g){var d=b.AdminPanel.getPanelResource("Flags");if(d.LoadSelectContactsDynamically){return new b.UI.DialogListControlAjaxSearch(f,e,g);}return new b.UI.DialogListControl(f,e,g);}})(window,WA);(function(d,c,b){if(!c.UI.DragDrop){c.UI.DragDrop=a;}function a(z,y){y=y||{};var Q=this,V="WA.UI.DragDrop",W=z,O=y.parentComponent;Q.toString=function(){return V;};Q.Dispose=c.Tools.EventHandlers.createHandlers(Q,{id:"Dispose"});Q.DragStart=c.Tools.EventHandlers.createHandlers(Q,{id:"DragStart"});Q.DragMove=c.Tools.EventHandlers.createHandlers(Q,{id:"DragMove"});Q.DragVertical=c.Tools.EventHandlers.createHandlers(Q,{id:"DragVertical"});Q.DragHorizontal=c.Tools.EventHandlers.createHandlers(Q,{id:"DragHorizontal"});Q.DragEnd=c.Tools.EventHandlers.createHandlers(Q,{id:"DragEnd"});Q.BoundLeave=c.Tools.EventHandlers.createHandlers(Q,{id:"BoundLeave"});Q.BoundReached=c.Tools.EventHandlers.createHandlers(Q,{id:"BoundReached"});Q.SoftBoundReached=c.Tools.EventHandlers.createHandlers(Q,{id:"SoftBoundReached"});var B=false,D=c.jq$,J=W.noDragClassName,F=W.mouseXOffset||0,G=W.mouseYOffset||0,h=W.boundsBuilder,U=W.softBounds||null,I=W.moveRestrictions||{disableX:false,disableY:false},C,w=!c.Browser.isIE,n,E={},e,P,H=20,g,A=false,f=100,T,S,p=c.Browser.isIE?"dragActiveIE":"dragActive";function l(Z){var ab=Z.attr(c.eventTagsAttribute),aa=Z.width();if(!ab){throw new Error("eventTags was not defined on Drag item");}var X=document.createElement("div"),Y=W.avatarBuilder({eventTags:ab});X.className="dragDropAvatar";X.innerHTML=Y.avatarHTML;if(Y.zIndex!=b){X.style.zIndex=Y.zIndex;}e=D(X);e.css("width",aa);var ac=c.Dimensions.getElementRect(Z[0]);e.css("left",ac.left);e.css("top",ac.top);D(document.body).append(e);if(Y.renderCompleteCallBack){Y.renderCompleteCallBack({id:Y.id});}}function m(X,Y){E={};E.offsetX=X.offsetX!==b?X.offsetX:X.pageX-Y.offset().left;E.offsetY=X.offsetY!==b?X.offsetY:X.pageY-Y.offset().top;E.startX=E.lastX=X.pageX;E.startY=E.lastY=X.pageY;}function q(X){if(X.which==c.UI.MouseEventCode.RightButton){return false;}return true;}function v(Y){var aa=D(Y.target),Z;if(!aa.hasClass(W.handleClassName)){if(J&&aa.closest("."+J).length){return null;}Z=aa.closest("."+W.handleClassName);}else{Z=aa;}if(!Z.length){return null;}var X=aa.closest("."+W.targetClassName);if(!X.length){return null;}return X;}function N(Y){if(C||B){return;}if(!q(Y)){return;}var X=v(Y);if(!X){return;}T=c.Window.getScrollTop(d);S=c.Window.getScrollLeft(d);m(Y,X);l(X);Y.preventDefault();C=true;c.addHandler(d,c.Browser.dragDropEvent.eMove,M);c.Dom.addClassName(document.body,p);if(h){g=h();}Q.DragStart.fireHandlers({dragItemDomElement:X[0]});}function M(ad){if(!C||B){return;}ad.preventDefault();var ag=ad.pageX-E.offsetX+F,ah=ad.pageY-E.offsetY+G,X=i(ag,ah),aa=!I.disableX&&!X.X,ab=!I.disableY&&!X.Y,ac=e[0],Y=aa?ag:null,Z=ab?ah:null;if(Y!=null){ac.style.left=Y+"px";}if(Z!=null){ac.style.top=Z+"px";}j(ad);r(X);if(!E.moving){return;}if(!w){ac.style.visibility="hidden";}P=D(document.elementFromPoint(ad.pageX-(S),ad.pageY-(T)));if(!w){ac.style.visibility="visible";}var af=P.closest("."+W.targetClassName);if(!af){}var ae={pointDomElement:af?af[0]:null,mouse:{X:E.nowX,Y:E.nowY}};Q.DragMove.fireHandlers(ae);if(!I.disableX&&Q.DragHorizontal.hasSubscribers()){if(E.dirAx&&E.distAxX>=H){E.distAxX=0;Q.DragHorizontal.fireHandlers(ae);}}if(!I.disableY&&!E.dirAx&&Q.DragVertical.hasSubscribers()){Q.DragVertical.fireHandlers(ae);}ac=null;}function i(Y,Z){var X={};if(g&&U){X.softTop=U.top&&(Z<=(g.top+U.top));X.softBottom=U.bottom&&(Z>=(g.bottom-U.bottom));X.softLeft=U.left&&(Y<=(g.left+U.left));X.softRight=U.right&&(Y>=(g.right-U.right));}if(g){X.top=g.top&&(Z<=g.top);X.bottom=g.bottom&&(Z>=g.bottom);X.Y=X.top||X.bottom;X.left=g.left&&(Y<=g.left);X.right=g.right&&(Y>=g.right);X.X=X.left||X.right;}return X;}var t;function r(X){t=X;if(X.X||X.Y){c.throttle(s,f);return;}if(X.softTop||X.softBottom||X.softLeft||X.softRight){c.throttle(u,f);return;}if(A){c.clearThrottle(u);c.clearThrottle(s);A=false;Q.BoundLeave.fireHandlers();}}function s(){A=true;c.clearThrottle(u);Q.BoundReached.fireHandlers({bounds:t});}function u(){A=true;c.clearThrottle(s);Q.SoftBoundReached.fireHandlers({bounds:t});}function j(X){E.lastX=E.nowX;E.lastY=E.nowY;E.nowX=X.pageX;E.nowY=X.pageY;E.distX=E.nowX-E.lastX;E.distY=E.nowY-E.lastY;E.lastDirX=E.dirX;E.lastDirY=E.dirY;E.dirX=E.distX===0?0:E.distX>0?1:-1;E.dirY=E.distY===0?0:E.distY>0?1:-1;var Y=Math.abs(E.distX)>Math.abs(E.distY)?1:0;if(!E.moving){E.dirAx=Y;E.moving=true;return;}if(E.dirAx!==Y){E.distAxX=0;E.distAxY=0;}else{E.distAxX+=Math.abs(E.distX);if(E.dirX!==0&&E.dirX!==E.lastDirX){E.distAxX=0;}E.distAxY+=Math.abs(E.distY);if(E.dirY!==0&&E.dirY!==E.lastDirY){E.distAxY=0;}}E.dirAx=Y;}function K(){g=h();}function L(){if(!C||B){return;}e.remove();R();C=false;c.removeHandler(d,c.Browser.dragDropEvent.eMove,M);Q.DragEnd.fireHandlers();}function R(){c.Dom.removeClassName(document.body,p);E={offsetX:0,offsetY:0,startX:0,startY:0,lastX:0,lastY:0,nowX:0,nowY:0,distX:0,distY:0,dirAx:0,dirX:0,dirY:0,lastDirX:0,lastDirY:0,distAxX:0,distAxY:0};}function k(){c.clearThrottle(s);c.clearThrottle(u);}function x(){O.Dispose.addHandler(o);n=c.$(W.ddContainerId);if(!n){throw new Error("ddContainer was not found! id: "+W.ddContainerId);}c.addHandler(n,c.Browser.dragDropEvent.eStart,N);c.addGlobalHandler((c.Browser.isIE?"body":"window"),c.Browser.dragDropEvent.eEnd,L,"SharedUIDragDropMouseUpInAllWindow",{});if(O.BoundsChanged){O.BoundsChanged.addHandler(K);}}function o(){if(B){return;}k();Q.Dispose.fireHandlers();O.Dispose.removeHandler(o);if(O.BoundsChanged){O.BoundsChanged.removeHandler(K);}c.removeHandler(n,c.Browser.dragDropEvent.eStart,N);c.removeHandler(d,c.Browser.dragDropEvent.eMove,M);c.removeGlobalHandler("SharedUIDragDropMouseUpInAllWindow");W=null;O=null;E=null;Q.DragStart=null;Q.DragVertical=null;Q.DragHorizontal=null;Q.DragMove=null;Q.DragEnd=null;Q.BoundReached=null;Q.BoundLeave=null;Q.SoftBoundReached=null;Q.Dispose=null;B=true;}x();}})(window,WA,WA.jq$);(function(d,c,b){if(!c.UI.DragDropSelector){c.UI.DragDropSelector=a;}function a(n){var u=this,C="WA.UI.DragDropSelector",D=n,t=D.parentComponent;u.toString=function(){return C;};u.RenderComplete=c.Tools.EventHandlers.createHandlers(u,{id:"RenderComplete"});u.Dispose=c.Tools.EventHandlers.createHandlers(u,{id:"Dispose"});u.FilesSelect=c.Tools.EventHandlers.createHandlers(u,{id:"FilesSelect"});var o=false,A,j,i,B,l,k=D.id+"_dropZoneHolder";u.render=v;u.startWatch=x;u.stopWatch=z;function v(){return c.UI.DragDropSelectorTemplate(D);}function p(F,E){u.RenderComplete.fireHandlers();}function x(E){if(!E){throw new Error("target was not defined!");}A=E;c.addGlobalHandler("window","dragover",q,D.id+"_dragover");c.addGlobalHandler("window","drop",r,D.id+"_drop");c.addGlobalHandler("window","mouseover",y,D.id+"_mouseover");c.addGlobalHandler("window","resize",s,D.id+"_resize");}function g(){j=c.$(k);if(!j){j=d.document.createElement("DIV");j.id=k;d.document.body.appendChild(j);}}function e(){var E=document.createElement("DIV");E.innerHTML=c.UI.DragDropSelectorTemplate(D);i=j.appendChild(E.firstChild);l=c.$(D.id+c.UI.DragDropSelectorTemplate.idDropZoneFilmPosfix);E=null;}function q(E){c.stopEvent(E);f();c.Dom.removeClassName(i,"out");}function r(E){c.stopEvent(E);y();if(E.target!=l){return false;}u.FilesSelect.fireHandlers({files:E.dataTransfer.files});}function s(){f();}function y(E){c.stopEvent(E);w();c.Dom.addClassName(i,"out");return false;}function f(){B=c.Dimensions.getElementAbsXY(A);i.style.bottom=B.bottom+"px";i.style.left=B.left+"px";i.style.right=B.right+"px";i.style.top=B.top+"px";i.style.width=B.width+"px";i.style.height=B.height+"px";}function w(){i.style.bottom="";i.style.left="";i.style.right="";i.style.top="";i.style.width="";i.style.height="";}function z(){c.removeGlobalHandler(D.id+"_dragover");c.removeGlobalHandler(D.id+"_drop");c.removeGlobalHandler(D.id+"_mouseover");c.removeGlobalHandler(D.id+"_resize");}function m(){t.RenderComplete.addHandler(p);t.Dispose.addHandler(h);g();e();}function h(){if(o){return;}u.Dispose.fireHandlers();t.RenderComplete.removeHandler(p);t.Dispose.removeHandler(h);D=null;t=null;u.RenderComplete=null;u.Dispose=null;u.FilesSelect=null;A=null;j=null;k=null;i=null;B=null;l=null;o=true;}m();}})(window,WA);(function(d,c,b){if(!c.UI.DragDropSelectorTemplate){c.UI.DragDropSelectorTemplate=a;c.UI.DragDropSelectorTemplate.idPostfix="_DragDropSelector";c.UI.DragDropSelectorTemplate.idDropZonePostfix="_DropZonePostfix";c.UI.DragDropSelectorTemplate.idDropZoneFilmPosfix="_DropZoneFilmPostfix";}function a(f){var e=c.UI.ContainerTemplate;return e({id:f.id+c.UI.DragDropSelectorTemplate.idDropZonePostfix,cssClass:"dropZone out",contentHTML:c.UI.DragDropSelectorGenericBackgroundTemplate(f)+e({id:f.id+c.UI.DragDropSelectorTemplate.idDropZoneFilmPosfix,cssClass:"dropZoneFilm"})});}})(window,WA);(function(d,c,b){if(!c.UI.DragDropSelectorGenericBackgroundTemplate){c.UI.DragDropSelectorGenericBackgroundTemplate=a;c.UI.DragDropSelectorGenericBackgroundTemplate.IdBackgroundContainerPostfix="_BackgroundContainer";}function a(f){var e=c.UI.ContainerTemplate,g=c.UI.TextControlSimpleTemplate;return e({id:f.id+c.UI.DragDropSelectorGenericBackgroundTemplate.IdBackgroundContainerPostfix,cssClass:"dropZoneGenericBackground",contentHTML:e({cssClass:"borderContainer",contentHTML:g({cssClass:"dropZoneTitle",contentText:f.resources.title})})});}})(window,WA);(function(d,c,b){if(!c.UI.DropdownColorPicker){c.UI.DropdownColorPicker=a;}function a(k,j,r){j=j||{};var o=this,u="WA.UI.DropdownColorPicker",w=k,n=j.parentComponent,q=w.resources;o.toString=function(){return u;};o.RenderComplete=c.Tools.EventHandlers.createHandlers(o,{id:"RenderComplete"});o.Dispose=c.Tools.EventHandlers.createHandlers(o,{id:"Dispose"});o.ValueChanged=c.Tools.EventHandlers.createHandlers(o,{id:"ValueChanged"});var e,v;o.render=p;o.setColor=s;o.setCustomColors=t;o.enableColorPicker=h;o.disableColorPicker=f;function p(){return c.UI.DropdownColorPickerTemplate(w);}function s(x){e.setPreviewIconColor(x);}function t(x){e.setCustomColors(x);}function h(){e.enableColorPickerButton();}function f(){e.disableColorPickerButton();}function m(y,x){o.RenderComplete.fireHandlers();}function l(y,x){if(!x||!x.selectedColor){}v.setValue(x.selectedColor);o.ValueChanged.fireHandlers(x);}function i(){v=c.UI.Helpers.ValueAccessorHelper.createValueAccessor(k,o);e=c.Object.create(c.UI.ColorPickerDropdownButton,[{id:w.id,selectedColor:v.getValue(),resources:q},{parentComponent:o,session:r}]);e.ColorSelected.addHandler(l);if(n){n.RenderComplete.addHandler(m);n.Dispose.addHandler(g);}}function g(){o.Dispose.fireHandlers();if(n){n.RenderComplete.removeHandler(m);n.Dispose.removeHandler(g);}e=null;w=null;n=null;v=null;o.RenderComplete=null;o.Dispose=null;o.ValueChanged=null;}i();}})(window,WA);(function(d,c,b){if(!c.UI.DropdownColorPickerTemplate){c.UI.DropdownColorPickerTemplate=a;}function a(h){var g=c.UI.ContainerTemplate,f=c.UI.ColorPickerDropdownButtonTemplate,e=c.UI.ControlLayoutTemplate;h.controlContainerDisplayType=h.controlContainerDisplayType?h.controlContainerDisplayType:c.UI.ControlLayoutTemplate.ControlContainerDisplayType.Flexible;h.cssClass="dropdownColorPicker"+(h.cssClass?" "+h.cssClass:"");h.layoutContentHTML=f({id:h.id});return e(h);}})(window,WA);(function(d,c,b){if(!c.UI.ColorPickerDropdownOption){c.UI.ColorPickerDropdownOption=a;}function a(j,i,t){i=i||{};var q=this,v="WA.UI.ColorPickerDropdownOption",w=j,p=i.parentComponent,s=j.resources;q.toString=function(){return v;};q.OptionClick=c.Tools.EventHandlers.createHandlers(q,{id:"OptionClick"});q.RenderComplete=c.Tools.EventHandlers.createHandlers(q,{id:"RenderComplete"});q.Dispose=c.Tools.EventHandlers.createHandlers(q,{id:"Dispose"});q.ValueChanged=c.Tools.EventHandlers.createHandlers(q,{id:"Dispose"});var f,e;q.init=h;q.render=r;q.setCustomColors=u;function r(){return c.UI.ColorPickerDropdownOptionTemplate(w);}function u(x){e.setCustomColors(x);}function o(y,x){f=c.$(w.id+c.UI.ColorPickerDropdownOptionTemplate.Postfix);c.addHandler(f,"click",l);c.addHandler(f,"mouseover",n);c.addHandler(f,"mouseout",m);q.RenderComplete.fireHandlers();}function n(x){}function m(x){}function l(x){var y=c.getEventTags(x);if(w.action){w.action();}if(y){q.OptionClick.fireHandlers({eventTags:y});}}function k(y,x){q.ValueChanged.fireHandlers(x);}function h(){e=new c.UI.ColorPicker({id:w.id+c.UI.ColorPickerDropdownOptionTemplate.Postfix,attr:w.attr,value:w.value,automaticValue:w.automaticValue,resources:s},{parentComponent:q});e.ValueChanged.addHandler(k);p.RenderComplete.addHandler(o);p.Dispose.addHandler(g);}function g(){q.Dispose.fireHandlers();p.RenderComplete.removeHandler(o);p.Dispose.removeHandler(g);if(f){c.removeHandler(f,"click",l);c.removeHandler(f,"mouseover",n);c.removeHandler(f,"mouseout",m);}e=null;w=null;p=null;q.OptionClick=null;q.RenderComplete=null;q.Dispose=null;}}})(window,WA);(function(d,c,b){if(!c.UI.ColorPickerDropdownOptionTemplate){c.UI.ColorPickerDropdownOptionTemplate=a;c.UI.ColorPickerDropdownOptionTemplate.Postfix="_colorPicker";}function a(f){var e=c.UI.ContainerTemplate;return e({cssClass:"colorPickerDropdownOption",id:f.id+"_colorPickerDropdownOption",attr:f.attr,contentHTML:c.UI.ColorPickerTemplate({id:f.id+c.UI.ColorPickerDropdownOptionTemplate.Postfix,attr:f.attr,cssClass:"colorPicker",resources:f.resources})});}})(window,WA);(function(d,c,b){if(!c.UI.ColorPickerDropdownButton){c.UI.ColorPickerDropdownButton=a;}function a(w,v,H){v=v||{};var E=this,O="WA.UI.ColorPickerDropdownButton",Q=w,D=v.parentComponent,G=w.resources;E.toString=function(){return O;};E.ColorSelected=c.Tools.EventHandlers.createHandlers(E,{id:"ColorSelected"});E.RenderComplete=c.Tools.EventHandlers.createHandlers(E,{id:"RenderComplete"});E.Dispose=c.Tools.EventHandlers.createHandlers(E,{id:"Dispose"});E.init=u;E.render=F;E.enableColorPickerButton=q;E.disableColorPickerButton=h;E.setPreviewIconColor=J;E.setCustomColors=I;E.isEnabled=true;var g,j,p=false,m=Q.id+"_dropDown",r=Q.id+"_globalMouseDown",t=50,o={top:0},n="colorPickerDropDown",l="colorPickerDownListContainer",k={verticalAlign:c.UI.WaDropDown.VerticalAlign.Bottom,horizontalAlign:c.UI.WaDropDown.HorizontalAlign.Left,verticalOpenDirection:c.UI.WaDropDown.VerticalOpenDirection.Bottom,horizontalOpenDirection:c.UI.WaDropDown.HorizontalOpenDirection.Right},M=Q.targetElementId||Q.id,f,N;function q(){var S=Q.frameWindow||d;var R=c.$(Q.id,S);c.Dom.removeClassName(R,c.Templates.UI.Css.ColorPickerDropdownButtonTemplate.DisabledCssClass);E.isEnabled=true;}function h(){var S=Q.frameWindow||d;var R=c.$(Q.id,S);c.Dom.addClassName(R,c.Templates.UI.Css.ColorPickerDropdownButtonTemplate.DisabledCssClass);K();J();E.isEnabled=false;}function L(){if(p){return;}j.showDropDown();c.Dom.addClassName(g,"active");}function s(){if(!p){return;}j.hideDropDown();c.Dom.removeClassName(g,"active");}function I(S){var R=j.getOptions()[0];R.setCustomColors(S);}function J(R){if(!R||R.toLowerCase()=="transparent"||R.toLowerCase()=="automatic"){c.Dom.addClassName(f,"transparent");f.style.backgroundColor="";}else{c.Dom.removeClassName(f,"transparent");f.style.backgroundColor=R.toLowerCase();}K(R);}function K(R){if(!R||R.toLowerCase()=="automatic"){N.innerHTML=c.UI.ColorPickerDropdownButtonTemplate.Texts.AutomaticColor;return;}if(R.toLowerCase()=="transparent"){N.innerHTML=c.UI.ColorPickerDropdownButtonTemplate.Texts.TransparentColor;return;}N.innerHTML=R.toUpperCase();}function C(S,R){g=c.$(Q.id);c.addHandler(g,"click",y);f=c.$(Q.id+"_colorPickerPreviewIcon");N=c.$(Q.id+"_colorPickerTitle");J(Q.selectedColor);E.RenderComplete.fireHandlers();}function y(S,R){if(!E.isEnabled){return;}if(p){s();return;}L();}function A(S,R){c.addGlobalMouseDown(B,r);p=true;}function z(S,R){c.Dom.removeClassName(g,"active");c.removeGlobalHandler(r);c.throttle(P,200);}function P(){p=false;}function B(R){var T=c.getEventTarget(R);var S=c.jq$(T).parents("#"+m).length>0;if(!S){s();}}function x(S,R){s();E.ColorSelected.fireHandlers({selectedColor:R.value});J(R.value);}function F(){return c.Templates.UI.ColorPickerDropdownButtonTemplate(Q);}function u(){D.RenderComplete.addHandler(C);D.Dispose.addHandler(i);j=new c.UI.WaDropDown({id:m,cssClass:n,containerCssClass:l,targetElementId:M,align:k,offset:o,dropDownOptionModels:[{id:Q.id+"_dropDown_option",resources:G,value:Q.selectedColor}],optionsType:c.UI.ColorPickerDropdownOption},{parentComponent:E,session:H,zIndex:40000});j.DropDownShown.addHandler(A);j.DropDownHidden.addHandler(z);j.ValueChanged.addHandler(x);}function e(){c.clearThrottle(s);}function i(){e();E.Dispose.fireHandlers();D.RenderComplete.removeHandler(C);D.Dispose.removeHandler(i);if(g){c.removeHandler(g,"click",y);}Q=null;g=null;p=false;D=null;f=null;N=null;E.ColorSelected=null;E.RenderComplete=null;E.Dispose=null;}}})(window,WA);(function(d,c,b){if(!c.UI.ColorPickerDropdownButtonTemplate){c.UI.ColorPickerDropdownButtonTemplate=a;c.Templates.UI.Css.ColorPickerDropdownButtonTemplate={DisabledCssClass:"Disabled"};}function a(f){var e=c.UI.ContainerTemplate;return e({cssClass:"colorPickerDropdownButton",id:f.id,attr:{eventTags:f.eventTags},contentHTML:e({cssClass:"colorPickerPreviewContainer",id:f.id+"_colorPickerPreviewContainer",attr:{eventTags:f.eventTags},contentHTML:e({cssClass:"colorPickerPreviewIcon",id:f.id+"_colorPickerPreviewIcon",attr:{eventTags:f.eventTags}})})+e({cssClass:"colorPickerTitleContainer",id:f.id+"_colorPickerTitleContainer",attr:{eventTags:"colorPickerTitleContainer"},contentHTML:e({cssClass:"colorPickerTitle",id:f.id+"_colorPickerTitle",attr:{eventTags:f.eventTags}})})+e({cssClass:"colorPickerArrow",id:f.id+"_colorPickerArrow",attr:{eventTags:f.eventTags}})});}c.UI.ColorPickerDropdownButtonTemplate.Texts={TransparentColor:"Transparent",AutomaticColor:"Automatic"};})(window,WA);(function(c,b){if(!b.UI.EditableList){b.UI.EditableList=a;b.UI.EditableList.TypeName="WA.UI.EditableList";b.UI.EditableList.LazyInitChunkSize=50;b.UI.EditableList.LazyInitTimeout=10;}function a(s,p){p=p||{};p.currentWindow=p.currentWindow||c;var H=this,P=b.UI.EditableList.TypeName,F=p.parentComponent,Q=s;H.toString=function(){return P;};H.ValueChanged=b.Tools.EventHandlers.createHandlers(H,{id:"ValueChanged"});H.RenderComplete=b.Tools.EventHandlers.createHandlers(H,{id:"RenderComplete"});H.ValidationFailed=b.Tools.EventHandlers.createHandlers(H,{id:"ValidationFailed"});H.Dispose=b.Tools.EventHandlers.createHandlers(H,{id:"Dispose"});H.VisualStateChanged=b.Tools.EventHandlers.createHandlers(H,{id:"VisualStateChanged"});H.ContentScroll=b.Tools.EventHandlers.createHandlers(H,{id:"ContentScroll"});H.AddButtonClick=b.Tools.EventHandlers.createHandlers(H,{id:"AddButtonClick"});H.EditableListInitialized=b.Tools.EventHandlers.createHandlers(H,{id:"EditableListInitialized"});H.render=J;H.dispose=k;H.isAdditionEnabled=t;H.isDeletionEnabled=u;H.addElement=g;H.processScroll=G;H.setErrorState=L;H.isInitialized=v;H.renderComplete=C;var l,h=[],i={},f=0,m,d,e,x=!!Q.lazyInit,y=Q.lazyInitTimeout||b.UI.EditableList.LazyInitTimeout,q=!x?Q.elements.length:(Q.lazyInitChunkSize||b.UI.EditableList.LazyInitChunkSize),w=false,N=Q.showElementNumbers===true,O;function v(){return h.length==Q.elements.length;}function L(S){for(var R=0,T=h.length;Rk.elements.length;}function g(k){return(k.minElements||0)',"Dialog HTML","",'',c.UI.DropdownColorPickerTemplate({id:"EventDividerDialog_colorPicker"}),"
"];return h.join("");}function f(i){var h=['','','',"
"];return h.join("");}}})(window,WA);(function(d,c,b){if(!c.UI.EditDividerDialogContent){c.UI.EditDividerDialogContent=a;}function a(m,l){l=l||{};var v=this,y="WA.UI.Dialogs.EditDividerDialogContent",z=m,u=l.parentComponent,x=z.resources;v.toString=function(){return y;};v.RenderComplete=c.Tools.EventHandlers.createHandlers(v,{id:"RenderComplete"});v.Dispose=c.Tools.EventHandlers.createHandlers(v,{id:"Dispose"});v.init=k;v.render=w;v.dispose=h;v.getParameters=j;var f,n,i,g="#000000",o,p;function j(){e();var A={cssClass:i.getSelectedClass(),inlineStyle:i.getSelectedInlineStyle()};return A;}function w(){return c.UI.EditDividerDialogContentTemplate(z);}function r(B,A){if(A.weight==null){n.disable();n.setValue("");}else{n.enable();n.setValue(A.weight);}if(A.borderColor==null){f.disableColorPicker();}else{f.enableColorPicker();f.setColor(A.borderColor);}}function q(B,A){o=A.selectedColor;}function s(B,A){p=n.getValue();}function e(){i.setWidth(p);i.setColor(o);}function t(B,A){v.RenderComplete.fireHandlers();}function k(){i=c.Object.create(c.UI.DividerList,[{id:z.id+"_dividerList",parameters:z.parameters,resources:{dividerStyles:x.dividerStyles}},{parentComponent:v}]);i.ValueChanged.addHandler(r);f=new c.UI.DropdownColorPicker({id:z.id+"_colorPicker",value:z.value||g,resources:{customColorLabel:"Select",enterHexColorLabel:"Hex code #",setAutomaticColorLabel:"Automatic",themeColorsLabel:"Theme Colors",themeColors:x.themeColors}},{parentComponent:v});f.ValueChanged.addHandler(q);n=new c.UI.NumberTextbox({id:z.id+"_lineWeight",minValue:1,maxValue:99,resources:{intMinValue:-3777773,intMaxValue:3777773}},{parentComponent:v});n.ValueChanged.addHandler(s);u.RenderComplete.addHandler(t);u.Dispose.addHandler(h);}function h(){v.Dispose.fireHandlers();u.RenderComplete.removeHandler(t);u.Dispose.removeHandler(h);z=null;u=null;f=null;n=null;i=null;v.RenderComplete=null;v.Dispose=null;}}})(window,WA);(function(d,c,b){if(!c.UI.EditDividerDialogContentTemplate){c.UI.EditDividerDialogContentTemplate=a;c.UI.EditDividerDialogContentTemplate.Postfix="EditDividerDialogContent";}function a(g){var f=c.UI.ContainerTemplate,e=c.UI.DropdownColorPickerTemplate,h=c.UI.NumberTextboxTemplate;return f({cssClass:"dividerListContainer",contentHTML:c.UI.DividerListTemplate({id:g.id+"_dividerList"})})+e({id:g.id+"_colorPicker",controlContainerDisplayType:c.UI.ControlLayoutTemplate.ControlContainerDisplayType.Fixed,width:135,prefix:c.UI.EditDividerDialogContentTemplate.Texts.Label_ColorPicker})+h({id:g.id+"_lineWeight",prefix:c.UI.EditDividerDialogContentTemplate.Texts.Label_Weight,postfix:c.UI.EditDividerDialogContentTemplate.Texts.Label_Weight_Postfix});}c.UI.EditDividerDialogContentTemplate.Texts={Label_ColorPicker:"Select color",Label_Weight:"Line weight",Label_Weight_Postfix:"px"};})(window,WA);(function(d,c,b){if(!c.UI.DividerList){c.UI.DividerList=a;}function a(s,o){o=o||{};var D=this,W="WA.UI.DividerList",X=s,C=o.parentComponent,F=X.resources;D.toString=function(){return W;};D.RenderComplete=c.Tools.EventHandlers.createHandlers(D,{id:"RenderComplete"});D.Dispose=c.Tools.EventHandlers.createHandlers(D,{id:"Dispose"});D.ValueChanged=c.Tools.EventHandlers.createHandlers(D,{id:"ValueChanged"});D.init=n;D.render=E;D.setColor=T;D.setWidth=V;D.getSelectedClass=l;D.getSelectedInlineStyle=m;D.isSingleBorderStyle=x;D.isDoubleBorderStyle=t;D.isImageStyle=u;var v=false,w=false,z,y,H=X.selectedDivNum||0,G,i=F.dividerStyles;var Q="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAYAAAALCAYAAABcUvyWAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA2RpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDowOTgwMTE3NDA3MjA2ODExODA4M0YxRkJDOTBBNjVCNCIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZD",R=Q+"pFNkY5MTBDQzk1M0QxMUUyQjQ3NEU0MTM5NTQ5M0NFQyIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDpFNkY5MTBDQjk1M0QxMUUyQjQ3NEU0MTM5NTQ5M0NFQyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IFdpbmRvd3MiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDoxQTI0MDA1NzNCOTVFMjExQjAxM0EzNTA0NkFDQUFCOCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDowOTgwMTE3NDA3MjA2ODExODA4M0YxRkJDOTBBNjVCNCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Pqm7qXsAAACtSURBVHjaYmRAAJYFpzJCBES48tjYWfRZoIJsi89n9QqL8+TAVYFw76aoGCEx7pz///8x/GdgBEIGBiYg5hGT5csHCwLxzfNPX6bZzV0K0iHIzc+m/g8oCAJTynYveHr33T6QBBcTMyP7v38gif8M96+93gdkHAfb8e/fXyAFMRsI3gDxF5AEI8xSIAECYK1g5/79+48BphzZuQz//v+FqP7PiCbx7x8DOgAIMACJREEDiIy2/AAAAABJRU5ErkJggg==",S=Q+"o0MDA4OTg3Qzk1M0UxMUUyOTJGNkUwNTNFQTRGODU0MSIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDo0MDA4OTg3Qjk1M0UxMUUyOTJGNkUwNTNFQTRGODU0MSIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IFdpbmRvd3MiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDoxQTI0MDA1NzNCOTVFMjExQjAxM0EzNTA0NkFDQUFCOCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDowOTgwMTE3NDA3MjA2ODExODA4M0YxRkJDOTBBNjVCNCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PtSM47oAAADFSURBVHjaYtz2tOzrr59/Ln54821igtmMtQwMDH+AmIGJgZGBi42TxVJMhm/FkvNZ/UAxNrDEv///Gf7//8fwD4gFxbhzejdFxwLFWZgy7OYuvXnu+UsGkIJ//xjEZPnygBI8TE/uvls0uWzXgn9AQRDk5mdVB0oIMgGJ4/evvd4HMgokycTMyA4U42IBEl+A+A1IkBHI+A8igHaAJP4DMVD8L5BihHIZGFkYoABkFFwYpAUu8ReogxEhhaTjL9wCEAAIMABMFFRm+aTYNwAAAABJRU5ErkJggg==",P=Q+"o1MDdFNEY2Qzk1M0UxMUUyQjYwNkQ4N0UyOEEwQzZCQSIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDo1MDdFNEY2Qjk1M0UxMUUyQjYwNkQ4N0UyOEEwQzZCQSIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IFdpbmRvd3MiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDoxQTI0MDA1NzNCOTVFMjExQjAxM0EzNTA0NkFDQUFCOCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDowOTgwMTE3NDA3MjA2ODExODA4M0YxRkJDOTBBNjVCNCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PnGxFNYAAADBSURBVHjaYmSAAINFV+LOQ5j/GeJ0FhuyQCUY/v77CyQZwQgE4BL///1j+M/4n4HxPyOqxN//f4GCDAz/GBA6GM08ZEXBOoDm/Pn19zfIAJbsPit1OS2Bln///4GNf/3s8zMg9YdFx0bsOtwOIH1q++M9QOobyz+gACMjA9iYM7uenNk658Y6oMR7ll+//v59+eDz++NbHp86uOr+MqDgVSD+AjK2HWQ0EN+ACj4H4l8gCW2QmSDtIJUgi0F2AgQYAKsKU4jP7aD/AAAAAElFTkSuQmCC",O=Q+"pGOEI4MTA5Qzk1M0QxMUUyQUQxQ0ZBMUZFRDA3MkQzRSIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDpGOEI4MTA5Qjk1M0QxMUUyQUQxQ0ZBMUZFRDA3MkQzRSIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IFdpbmRvd3MiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDoxQTI0MDA1NzNCOTVFMjExQjAxM0EzNTA0NkFDQUFCOCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDowOTgwMTE3NDA3MjA2ODExODA4M0YxRkJDOTBBNjVCNCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PlEawAAAAAC9SURBVHjaYmRgYDBYdDXuPMN/IAtIxOksNgQyLrCAuH///mVgBAsjAFji3/9/qKJwiX//gDpQZZhAJvz+8ecXSPLfv/8M5p5yYkAxRmYgIWLmKePHLcAmANKjpCusrqgrtB+k49upHY/3gHT8//eXgVeY1czISfI2SAfD7XNvvojJcatLKvNKgewC6QRJ/AHiHxf2P3/27fNvDl4hNkFOXlZ2Rqgj2IBYEoh1gFgdiEUZ0ZzOA8SCQMwFEGAAgwY91PGQnkYAAAAASUVORK5CYII=",K="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAABCAYAAAAW/mTzAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA2RpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDowOTgwMTE3NDA3MjA2ODExODA4M0YxRkJDOTBBNjVCNCIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDo",J=K+"zMUZDNjc3Qzk1M0UxMUUyOUY4NEREMkYxMzQxRjZGQiIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDozMUZDNjc3Qjk1M0UxMUUyOUY4NEREMkYxMzQxRjZGQiIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IFdpbmRvd3MiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDoxQTI0MDA1NzNCOTVFMjExQjAxM0EzNTA0NkFDQUFCOCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDowOTgwMTE3NDA3MjA2ODExODA4M0YxRkJDOTBBNjVCNCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Pqi4XqUAAAAaSURBVHjaYmRgYDBYci3hPAMUxGgtMAQIMAAtRgQyrsZCigAAAABJRU5ErkJggg==",L=K+"1RENCMDBGQzk1M0UxMUUyOEE5N0E4NDA0NDhFODUzNiIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDo1RENCMDBGQjk1M0UxMUUyOEE5N0E4NDA0NDhFODUzNiIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IFdpbmRvd3MiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDoxQTI0MDA1NzNCOTVFMjExQjAxM0EzNTA0NkFDQUFCOCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDowOTgwMTE3NDA3MjA2ODExODA4M0YxRkJDOTBBNjVCNCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PuklnXkAAAAfSURBVHjaYmRgYDBYcj3x/P//QBbDf4ZYrQWGAAEGAEpKBzIhNgiTAAAAAElFTkSuQmCC",N="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAFCAYAAACEhIafAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA2RpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDowOTgwMTE3NDA3MjA2ODExODA4M0YxRkJDOTBBNjVCNCIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDo",M=N+"xQjAxRDVGQzk1M0UxMUUyQjRBMDk4NzNCNUNDRTIxMiIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDoxQjAxRDVGQjk1M0UxMUUyQjRBMDk4NzNCNUNDRTIxMiIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IFdpbmRvd3MiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDoxQTI0MDA1NzNCOTVFMjExQjAxM0EzNTA0NkFDQUFCOCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDowOTgwMTE3NDA3MjA2ODExODA4M0YxRkJDOTBBNjVCNCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Pux15EoAAAAdSURBVHjaYtj+vPw/0////xnABAj0MwOJlwABBgCmYgqORzAhLAAAAABJRU5ErkJggg==",I=N+"yNjg3RDE0Qzk1M0UxMUUyOEQwMEEyMkJERUI2Q0E5QSIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDoyNjg3RDE0Qjk1M0UxMUUyOEQwMEEyMkJERUI2Q0E5QSIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IFdpbmRvd3MiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDoxQTI0MDA1NzNCOTVFMjExQjAxM0EzNTA0NkFDQUFCOCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDowOTgwMTE3NDA3MjA2ODExODA4M0YxRkJDOTBBNjVCNCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PoDQm40AAAAhSURBVHjaYph+OuA/079//xmY/v//xwAC/cxA4iVAgAEAnVMKKIprovoAAAAASUVORK5CYII=";function n(){r();C.RenderComplete.addHandler(B);C.Dispose.addHandler(h);}function E(){return c.UI.DividerListTemplate(X);}function B(Z,Y){v=true;j();}function j(){if(v&&w){D.RenderComplete.fireHandlers();}}function r(){y=frames[X.id+"_dividerListIFrameName"];if(y&&y.document&&!y.isIFrameReloading&&y.document.getElementById("idEndOfPageDiv")&&i){y.document.body.style.backgroundColor=X.backgroundColor;y.document.body.innerHTML=k();z=c.$(X.id+"_dividerListIFrameId");z.setAttribute("scrolling","none");y.document.querySelector("HTML").style.overflow="hidden";U();c.addHandler(y,"resize",U);G=new c.UI.ScrollablePanelV2({id:X.id+c.UI.DividerListTemplate.DividerListScrollablePanelIdPostfix},{parentComponent:D});c.addHandler("Divider","click",g,{window:y,name:"InsertDividerClick"});q();p();w=true;j();}else{setTimeout(r,100);}}function U(){z.style.height=y.document.body.offsetHeight+"px";}function x(Z){var Y=(Z.indexOf("divider_style_border_solid")!==-1||Z.indexOf("divider_style_border_dotted")!==-1||Z.indexOf("divider_style_border_dashed")!==-1);return Y;}function t(Z){var Y=(Z.indexOf("divider_style_border_double_solid")!==-1||Z.indexOf("divider_style_border_double_solid_2_to_1")!==-1);return Y;}function u(ab){var Z=x(ab);var Y=t(ab);var aa=!Z&&(!Y);return aa;}function T(Y){if(!y){return;}var Z=y.document.getElementById("idDivider_"+H);Z.style.borderColor=Y;}function V(Z){if(!y){return;}var Y=y.document.getElementById("idDivider_"+H);if(x(Y.className)){Y.style.borderTopWidth=Z+"px";}else{if(t(Y.className)){Y.style.borderTopWidth=Z+"px";if(Y.className.indexOf("divider_style_border_double_solid_2_to_1")!==-1){Y.style.borderBottomWidth=Math.floor(Z/2)+"px";Y.style.height=Math.floor(Z/2)+"px";}else{Y.style.borderBottomWidth=Z+"px";Y.style.height=Z+"px";}}}e(Y);}function l(){var Y=y.document.getElementById("idDivider_"+H);return Y.className;}function m(){var Y=y.document.getElementById("idDivider_"+H);return Y.style.cssText;}function q(){var Y=s.parameters.iFrameBgColor||"rgb(255, 255, 255)",Z=s.parameters.iFrameBgImage||"none";y.document.body.style.backgroundColor=Y;y.document.body.style.backgroundImage=Z;}function p(){var Y;for(var Z=0;Z=0){Y.style.cssText=s.parameters.inlineStyle;H=Z;A();}}H=0;A();}var f={};function e(Y){var Z=Y.parentNode.offsetHeight,aa=Math.floor((Z-Y.offsetHeight)/2);Y.parentNode.style.height=(Z-aa)+"px";Y.parentNode.style.paddingTop=aa+"px";if(c.Browser.isGecko){if(f[Y.id]<7){f[Y.id]++;setTimeout(function(){e(Y);},100*f[Y.id]);}else{f[Y.id]=0;}}}function g(Y){if(!y){return;}H=Y.target.getAttribute("data-divider");A();}function A(){var ad,ab,ae,ac,aa,Z,af,Y=[];for(ad=0;ad';Y+=' ';Y+=' ';Y+='
';Y+='
';Y+='
';Y+='
';Y+="
";Y+='
';Y+='
';Y+='
';Y+='
';Y+="
";Y+='
';Y+='
';Y+='
';Y+='
';Y+="
";Y+="
";Y+="";}return Y;}function h(){D.Dispose.fireHandlers();c.removeHandler(y,"resize",U);c.removeHandler("Divider","click",g,{window:y,name:"InsertDividerClick"});C.RenderComplete.removeHandler(B);C.Dispose.removeHandler(h);X=null;C=null;D.RenderComplete=null;D.Dispose=null;D.ValueChanged=null;y.innerHTML="";y=null;}}})(window,WA);(function(e,d,c){if(!d.UI.DividerListTemplate){d.UI.DividerListTemplate=b;d.UI.DividerListTemplate.DividerListContentIdPostfix="_dividerListContent";d.UI.DividerListTemplate.DividerListScrollablePanelIdPostfix="_scrollablePanel";}function b(g){var h=d.UI.ScrollablePanelV2Template,f=d.UI.ContainerTemplate;return f({id:g.id+d.UI.DividerListTemplate.DividerListContentIdPostfix,cssClass:"dividerListContentWrapper",contentHTML:h({id:g.id+d.UI.DividerListTemplate.DividerListScrollablePanelIdPostfix,contentHTML:f({cssClass:"dividerListContent",contentHTML:a(g)})})});}function a(g){var f='';return f;}})(window,WA);(function(f,e,c){var d="WA.UI.EditHTMLDialog";if(!e.UI.EditHTMLDialog){e.UI.EditHTMLDialog=e.Object.create(b);}var a=[".CodeMirror { font-family: monospace; height: 300px; }",".CodeMirror-scroll { overflow: auto; }",".CodeMirror-lines { padding: 4px 0; }",".CodeMirror pre { padding: 0 4px; }",".CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler { background-color: white; }",".CodeMirror-gutters { border-right: 1px solid #ddd; background-color: #f7f7f7; white-space: nowrap; }",".CodeMirror-linenumbers {}",".CodeMirror-linenumber { padding: 0 3px 0 5px; min-width: 20px; text-align: right; color: #999; }",".CodeMirror div.CodeMirror-cursor { border-left: 1px solid black; z-index: 3; }",".CodeMirror div.CodeMirror-secondarycursor { border-left: 1px solid silver; }",".CodeMirror.cm-keymap-fat-cursor div.CodeMirror-cursor { width: auto; border: 0; background: #7e7; z-index: 1; }",".CodeMirror div.CodeMirror-cursor.CodeMirror-overwrite {}",".cm-tab { display: inline-block; }",".cm-s-default .cm-keyword {color: #708;}",".cm-s-default .cm-atom {color: #219;}",".cm-s-default .cm-number {color: #164;}",".cm-s-default .cm-def {color: #00f;}",".cm-s-default .cm-variable {color: black;}",".cm-s-default .cm-variable-2 {color: #05a;}",".cm-s-default .cm-variable-3 {color: #085;}",".cm-s-default .cm-property {color: black;}",".cm-s-default .cm-operator {color: black;}",".cm-s-default .cm-comment {color: #a50;}",".cm-s-default .cm-string {color: #a11;}",".cm-s-default .cm-string-2 {color: #f50;}",".cm-s-default .cm-meta {color: #555;}",".cm-s-default .cm-qualifier {color: #555;}",".cm-s-default .cm-builtin {color: #30a;}",".cm-s-default .cm-bracket {color: #997;}",".cm-s-default .cm-tag {color: #170;}",".cm-s-default .cm-attribute {color: #00c;}",".cm-s-default .cm-header {color: blue;}",".cm-s-default .cm-quote {color: #090;}",".cm-s-default .cm-hr {color: #999;}",".cm-s-default .cm-link {color: #00c;}",".cm-negative {color: #d44;}",".cm-positive {color: #292;}",".cm-header, .cm-strong {font-weight: bold;}",".cm-em {font-style: italic;}",".cm-link {text-decoration: underline;}",".cm-s-default .cm-error {color: #f00;}",".cm-invalidchar {color: #f00;}","div.CodeMirror span.CodeMirror-matchingbracket {color: #0f0;}","div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #f22;}",".CodeMirror-activeline-background {background: #e8f2ff;}",".CodeMirror { line-height: 1; position: relative; overflow: hidden; background: white; color: black; }",".CodeMirror-scroll { margin-bottom: -30px; margin-right: -30px; padding-bottom: 30px; padding-right: 30px; height: 100%; outline: none; position: relative; -moz-box-sizing: content-box; box-sizing: content-box; }",".CodeMirror-sizer { position: relative; }",".CodeMirror-vscrollbar, .CodeMirror-hscrollbar, .CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler { position: absolute; z-index: 6; display: none; }",".CodeMirror-vscrollbar { right: 0; top: 0; overflow-x: hidden; overflow-y: scroll; }",".CodeMirror-hscrollbar { bottom: 0; left: 0; overflow-y: hidden; overflow-x: scroll; }",".CodeMirror-scrollbar-filler { right: 0; bottom: 0; }",".CodeMirror-gutter-filler { left: 0; bottom: 0; }",".CodeMirror-gutters { position: absolute; left: 0; top: 0; padding-bottom: 30px; z-index: 3; }",".CodeMirror-gutter { white-space: normal; height: 100%; -moz-box-sizing: content-box; box-sizing: content-box; padding-bottom: 30px; margin-bottom: -32px; display: inline-block;","*zoom:1;","*display:inline;","}",".CodeMirror-gutter-elt { position: absolute; cursor: default; z-index: 4; }",".CodeMirror-lines { cursor: text; }",".CodeMirror pre { -moz-border-radius: 0; -webkit-border-radius: 0; border-radius: 0; border-width: 0; background: transparent; font-family: inherit; font-size: inherit; margin: 0; white-space: pre; word-wrap: normal; line-height: inherit; color: inherit; z-index: 2; position: relative; overflow: visible; }",".CodeMirror-wrap pre { word-wrap: break-word; white-space: pre-wrap; word-break: normal; }",".CodeMirror-code pre { border-right: 30px solid transparent; width: -webkit-fit-content; width: -moz-fit-content; width: fit-content; }",".CodeMirror-wrap .CodeMirror-code pre { border-right: none; width: auto; }",".CodeMirror-linebackground { position: absolute; left: 0; right: 0; top: 0; bottom: 0; z-index: 0; }",".CodeMirror-linewidget { position: relative; z-index: 2; overflow: auto; }",".CodeMirror-widget {}",".CodeMirror-wrap .CodeMirror-scroll { overflow-x: hidden; }",".CodeMirror-measure { position: absolute; width: 100%; height: 0; overflow: hidden; visibility: hidden; }",".CodeMirror-measure pre { position: static; }",".CodeMirror div.CodeMirror-cursor { position: absolute; visibility: hidden; border-right: none; width: 0; }",".CodeMirror-focused div.CodeMirror-cursor { visibility: visible; }",".CodeMirror-selected { background: #d9d9d9; }",".CodeMirror-focused .CodeMirror-selected { background: #d7d4f0; }",".cm-searching { background: #ffa; background: rgba(255, 255, 0, .4); }",".CodeMirror span { *vertical-align: text-bottom; }","@media print { .CodeMirror div.CodeMirror-cursor { visibility: hidden; }}",".CodeMirror-matchingtag { background-color: #FFCCAA; }"];document.write('");function b(){var i=this;i.toString=function(){return d;};i.init=function(){};i.dispose=function(){};i.getContentHTML=g;i.getFooterHTML=h;function g(k){var j=['',"
"];return j.join("");}function h(k){var j=['','','',"
"];return j.join("");}}})(window,WA,WA.topWindow);window.CodeMirror=(function(){var aZ=/gecko\/\d/i.test(navigator.userAgent);var bo=/MSIE \d/.test(navigator.userAgent);var bq=bo&&(document.documentMode==null||document.documentMode<8);var br=bo&&(document.documentMode==null||document.documentMode<9);var bp=/Trident\/([7-9]|\d{2,})\./.test(navigator.userAgent);var ej=/WebKit\//.test(navigator.userAgent);var db=ej&&/Qt\/\d+\.\d+/.test(navigator.userAgent);var C=/Chrome\//.test(navigator.userAgent);var cQ=/Opera\//.test(navigator.userAgent);var du=/Apple Computer/.test(navigator.vendor);var bL=/KHTML\//.test(navigator.userAgent);var b9=/Mac OS X 1\d\D([7-9]|\d\d)\D/.test(navigator.userAgent);var ca=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(navigator.userAgent);var c2=/PhantomJS/.test(navigator.userAgent);var bz=/AppleWebKit/.test(navigator.userAgent)&&/Mobile\/\w+/.test(navigator.userAgent);var cv=bz||/Android|webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(navigator.userAgent);var b8=bz||/Mac/.test(navigator.platform);var eo=/win/i.test(navigator.platform);var cR=cQ&&navigator.userAgent.match(/Version\/(\d*\.\d*)/);if(cR){cR=Number(cR[1]);}if(cR&&cR>=15){cQ=false;ej=true;}var aW=b8&&(db||cQ&&(cR==null||cRet.maxLineLength){et.maxLineLength=ev;et.maxLine=ew;}});}function dE(et){var es=bt(et.gutters,"CodeMirror-linenumbers");if(es==-1&&et.lineNumbers){et.gutters=et.gutters.concat(["CodeMirror-linenumbers"]);}else{if(es>-1&&!et.lineNumbers){et.gutters=et.gutters.slice(0);et.gutters.splice(es,1);}}}function eb(es){var et=es.display,eu=es.doc.height;var ey=eu+cX(et);et.sizer.style.minHeight=et.heightForcer.style.top=ey+"px";et.gutters.style.height=Math.max(ey,et.scroller.clientHeight-dz)+"px";var ex=Math.max(ey,et.scroller.scrollHeight);var ev=et.scroller.scrollWidth>(et.scroller.clientWidth+1);var ew=ex>(et.scroller.clientHeight+1);if(ew){et.scrollbarV.style.display="block";et.scrollbarV.style.bottom=ev?dx(et.measure)+"px":"0";et.scrollbarV.firstChild.style.height=(ex-et.scroller.clientHeight+et.scrollbarV.clientHeight)+"px";}else{et.scrollbarV.style.display="";et.scrollbarV.firstChild.style.height="0";}if(ev){et.scrollbarH.style.display="block";et.scrollbarH.style.right=ew?dx(et.measure)+"px":"0";et.scrollbarH.firstChild.style.width=(et.scroller.scrollWidth-et.scroller.clientWidth+et.scrollbarH.clientWidth)+"px";}else{et.scrollbarH.style.display="";et.scrollbarH.firstChild.style.width="0";}if(ev&&ew){et.scrollbarFiller.style.display="block";et.scrollbarFiller.style.height=et.scrollbarFiller.style.width=dx(et.measure)+"px";}else{et.scrollbarFiller.style.display="";}if(ev&&es.options.coverGutterNextToScrollbar&&es.options.fixedGutter){et.gutterFiller.style.display="block";et.gutterFiller.style.height=dx(et.measure)+"px";et.gutterFiller.style.width=et.gutters.offsetWidth+"px";}else{et.gutterFiller.style.display="";}if(b9&&dx(et.measure)===0){et.scrollbarV.style.minWidth=et.scrollbarH.style.minHeight=ca?"18px":"12px";et.scrollbarV.style.pointerEvents=et.scrollbarH.style.pointerEvents="none";}}function eh(et,eu,ex){var ew=et.scroller.scrollTop,ev=et.wrapper.clientHeight;if(typeof ex=="number"){ew=ex;}else{if(ex){ew=ex.top;ev=ex.bottom-ex.top;}}ew=Math.floor(ew-cW(et));var es=Math.ceil(ew+ev);return{from:bT(eu,ew),to:bT(eu,es)};}function f(et){var ev=et.display;if(!ev.alignWidgets&&(!ev.gutters.firstChild||!et.options.fixedGutter)){return;}var eu=U(ev)-ev.scroller.scrollLeft+et.doc.scrollLeft;var ew=ev.gutters.offsetWidth,ey=eu+"px";for(var ez=ev.lineDiv.firstChild;ez;ez=ez.nextSibling){if(ez.alignable){for(var ex=0,es=ez.alignable;ex=et.display.showingFrom&&eB.to<=et.display.showingTo){break;}}if(ez){dN(et,"update",et);if(et.display.showingFrom!=ew||et.display.showingTo!=ex){dN(et,"viewportChange",et,et.display.showingFrom,et.display.showingTo);}}return ez;}function d5(et,es,eL,eA){var ev=et.display,ew=et.doc;if(!ev.wrapper.clientWidth){ev.showingFrom=ev.showingTo=ew.first;ev.viewOffset=0;return;}if(!eA&&es.length==0&&eL.from>ev.showingFrom&&eL.toeK&&ev.showingTo-eK<20){eK=Math.min(ey,ev.showingTo);}if(dv){eB=bZ(ei(ew,a4(ew,eB)));while(eK=eE[0].to){eE=[];}else{eE=V(eE,es);}if(dv){for(var eD=0;eDeJ.from){eJ.to=eH;}else{eE.splice(eD--,1);break;}}}}var eF=0;for(var eD=0;eDeK){eJ.to=eK;}if(eJ.from>=eJ.to){eE.splice(eD--,1);}else{eF+=eJ.to-eJ.from;}}if(!eA&&eF==eK-eB&&eB==ev.showingFrom&&eK==ev.showingTo){eg(et);return;}eE.sort(function(eM,eN){return eM.from-eN.from;});try{var ez=document.activeElement;}catch(ex){}if(eF<(eK-eB)*".7"){ev.lineDiv.style.display="none";}c1(et,eB,eK,eE,eI);ev.lineDiv.style.display="";if(ez&&document.activeElement!=ez&&ez.offsetHeight){ez.focus();}var eu=eB!=ev.showingFrom||eK!=ev.showingTo||ev.lastSizeC!=ev.wrapper.clientHeight;if(eu){ev.lastSizeC=ev.wrapper.clientHeight;dW(et,400);}ev.showingFrom=eB;ev.showingTo=eK;ev.gutters.style.height="";d8(et);eg(et);return true;}function d8(eu){var ew=eu.display;var eA=ew.lineDiv.offsetTop;for(var ez=ew.lineDiv.firstChild,ex;ez;ez=ez.nextSibling){if(ez.lineObj){if(bq){var es=ez.offsetTop+ez.offsetHeight;ex=es-eA;eA=es;}else{var et=ba(ez);ex=et.bottom-et.top;}var ev=ez.lineObj.height-ex;if(ex<2){ex=d1(ew);}if(ev>parseFloat(".001")||ev<-parseFloat(".001")){ea(ez.lineObj,ex);var eB=ez.lineObj.widgets;if(eB){for(var ey=0;ey=eB.to){ex.push(eB);}else{if(es.from>eB.from){ex.push({from:eB.from,to:es.from});}if(es.toez){while(eu.lineObj!=eH){eu=eC(eu);}if(eA&&eE<=ez&&eu.lineNumber){dI(eu.lineNumber,b0(es.options,ez));}eu=eu.nextSibling;}else{if(eH.widgets){for(var eG=0,eL=eu,eK;eL&&eG<20;++eG,eL=eL.nextSibling){if(eL.lineObj==eH&&/div/i.test(eL.nodeName)){eK=eL;break;}}}var eI=s(es,eH,ez,ev,eK);if(eI!=eK){et.insertBefore(eI,eu);}else{while(eu!=eK){eu=eC(eu);}eu=eu.nextSibling;}eI.lineObj=eH;}}++ez;});while(eu){eu=eC(eu);}}function s(eu,eE,eG,ev,eL){var et=r(eu,eE),eF=et.pre;var eH=eE.gutterMarkers,ew=eu.display,eO;var es=et.bgClass?et.bgClass+" "+(eE.bgClass||""):eE.bgClass;if(!eu.options.lineNumbers&&!eH&&!es&&!eE.wrapClass&&!eE.widgets){return eF;}if(eL){eL.alignable=null;var eC=true,eN=0,eB=null;for(var eI=eL.firstChild,eJ;eI;eI=eJ){eJ=eI.nextSibling;if(!/\bCodeMirror-linewidget\b/.test(eI.className)){eL.removeChild(eI);}else{for(var ez=0;ez3){es(eQ,eR.top,null,eR.bottom);eQ=eB;if(eR.bottomeH.bottom||eT.bottom==eH.bottom&&eT.right>eH.right){eH=eT;}if(eQ0){et.blinker=setInterval(function(){et.cursor.style.visibility=et.otherCursor.style.visibility=(eu=!eu)?"":"hidden";},es.options.cursorBlinkRate);}}function dW(es,et){if(es.doc.mode.startState&&es.doc.frontier=et.display.showingTo){return;}var ev=+new Date+et.options.workTime;var ex=af(eu.mode,bb(et,eu.frontier));var es=[],ew;eu.iter(eu.frontier,Math.min(eu.first+eu.size,et.display.showingTo+500),function(eA){if(eu.frontier>=et.display.showingFrom){var eB=eA.styles;eA.styles=bl(et,eA,ex,true);var ez=!eB||eB.length!=eA.styles.length;for(var ey=0;!ez&&eyev){dW(et,et.options.workDelay);return true;}});if(es.length){cS(et,function(){for(var ey=0;eyev;--eB){if(eB<=et.first){return et.first;}var ew=a4(et,eB-1);if(ew.stateAfter&&(!eA||eB<=et.frontier)){return eB;}var eu=ag(ew.text,null,es.options.tabSize);if(ey==null||ex>eu){ey=eB-1;ex=eu;}}return ey;}function bb(es,ev,ex){var eu=es.doc,et=es.display;if(!eu.mode.startState){return true;}var ew=aT(es,ev,ex),ey=ew>eu.first&&a4(eu,ew-1).stateAfter;if(!ey){ey=dV(eu.mode);}else{ey=af(eu.mode,ey);}eu.iter(ew,ev,function(ez){c9(es,ez.text,ey);var eA=ew==ev-1||ew%5==0||ew>=et.showingFrom&&ewet?"left":ezet?eA.left:eA.right,top:eA.top,bottom:eA.bottom};}function aQ(et,ev){var es=et.display.measureLineCache;for(var eu=0;eu=eu.options.crudeMeasuringFrom){return ai(eu,eC);}var ex=eu.display,eE=aE(eC.text.length);var eJ=r(eu,eC,eE,true).pre;if(bo&&!bq&&!eu.options.lineWrapping&&eJ.childNodes.length>100){var ez=document.createDocumentFragment();var es=10,eG=eJ.childNodes.length;for(var eA=0,et=Math.ceil(eG/es);eAeD){eO=eD;}if(eT<0){eT=0;}for(var eP=eM.length-2;eP>=0;eP-=2){var eS=eM[eP],eQ=eM[eP+1];if(eS>eO||eQ=eO||eT<=eS&&eO>=eQ||Math.min(eO,eQ)-Math.max(eT,eS)>=(eO-eT)>>1){eM[eP]=Math.min(eT,eS);eM[eP+1]=Math.max(eO,eQ);break;}}if(eP<0){eP=eM.length;eM.push(eT,eO);}return{left:eR.left-eI.left,right:eR.right-eI.left,top:eP,bottom:null};}function ey(eO){eO.bottom=eM[eO.top+1];eO.top=eM[eO.top];}for(var eA=0,ev;eA1){eK=ew[eA]=eF(eL[0]);eK.rightSide=eF(eL[eL.length-1]);}}if(!eK){eK=ew[eA]=eF(ba(eH));}if(ev.measureRight){eK.right=ba(ev.measureRight).left-eI.left;}if(ev.leftSide){eK.leftSide=eF(ba(ev.leftSide));}}}dj(eu.display.measure);for(var eA=0,ev;eA=et.options.crudeMeasuringFrom){return co(et,ex,ex.text.length,es&&es.measure,"right").right;}var ey=r(et,ex,null,true).pre;var eu=ey.appendChild(eq(et.display.measure));dk(et.display.measure,ey);return ba(eu).right-ba(et.display.lineDiv).left;}function F(es){es.display.measureLineCache.length=es.display.measureLineCachePos=0;es.display.cachedCharWidth=es.display.cachedTextHeight=null;if(!es.options.lineWrapping){es.display.maxLineChanged=true;}es.display.lineNumChars=null;}function cY(){return window.pageXOffset||(document.documentElement||document.body).scrollLeft;}function cZ(){return window.pageYOffset||(document.documentElement||document.body).scrollTop;}function by(es,ev,ex,et){if(ev.widgets){for(var eu=0;eueE.from){return ev(eD-1);}return ev(eD,eG);}var ez=a9(ex),es=eB.ch;if(!ez){return ev(es);}var eA=a1(ez,es);var eC=ew(es,eA);if(m!=null){eC.other=ew(es,m);}return eC;}function c8(et,es,eu,ew){var ev=new c3(et,es);ev.xRel=ew;if(eu){ev.outside=true;}return ev;}function aa(es,eA,eB){var et=es.doc;eB+=es.display.viewOffset;if(eB<0){return c8(et.first,0,true,-1);}var ew=bT(et,eB),ev=et.first+et.size-1;if(ew>ev){return c8(et.first+et.size-1,a4(et,ev).text.length,true,1);}if(eA<0){eA=0;}for(;;){var ex=a4(et,ew);var eu=ab(es,ex,ew,eA,eB);var ey=O(ex);var ez=ey&&ey.find();if(ey&&(eu.ch>ez.from.ch||eu.ch==ez.from.ch&&eu.xRel>0)){ew=ez.to.line;}else{return eu;}}}function ab(ev,eE,eD,eO,eQ){var eC=eQ-bj(ev,eE);var eN=false,es=2*ev.display.wrapper.clientWidth;var eF=cp(ev,eE);function eA(eR){var eS=aj(ev,c3(eD,eR),"line",eE,eF);eN=true;if(eC>eS.bottom){return eS.left-es;}else{if(eCeM){return c8(eD,eK,eL,1);}for(;;){if(et?eK==ex||eK==cA(eE,ex,1):eK-ex<=1){var eu=eOeO){eK=eG;eM=eH;if(eL=eN){eM+=1000;}ew=eJ;}else{ex=eG;ez=eH;ey=eN;ew-=eJ;}}}var cs;function d1(es){if(es.cachedTextHeight!=null){return es.cachedTextHeight;}if(cs==null){cs=aD("pre");for(var eu=0;eu<49;++eu){cs.appendChild(document.createTextNode("x"));cs.appendChild(aD("br"));}cs.appendChild(document.createTextNode("x"));}dk(es.measure,cs);var et=cs.offsetHeight/50;if(et>3){es.cachedTextHeight=et;}dj(es.measure);return et||1;}function B(et){if(et.cachedCharWidth!=null){return et.cachedCharWidth;}var es=aD("span","x");var eu=aD("pre",[es]);dk(et.measure,eu);var ev=es.offsetWidth;if(ev>2){et.cachedCharWidth=ev;}return ev||10;}var cD=0;function dU(es){es.curOp={changes:[],forceUpdate:false,updateInput:null,userSelChange:null,textChanged:null,selectionChanged:false,cursorActivity:false,updateMaxLine:false,updateScrollPos:false,id:++cD};if(!an++){ao=[];}}function aF(es){var eC=es.curOp,ew=es.doc,ev=es.display;es.curOp=null;if(eC.updateMaxLine){W(es);}if(ev.maxLineChanged&&!es.options.lineWrapping&&ev.maxLine){var eG=cr(es,ev.maxLine);ev.sizer.style.minWidth=Math.max(0,eG+3+dz)+"px";ev.maxLineChanged=false;var eA=Math.max(0,ev.sizer.offsetLeft+ev.sizer.offsetWidth-ev.scroller.clientWidth);if(eA-1){bs(et,eD.head.line,"smart");break;}}}}if(eE.length>1000||eE.indexOf("\n")>-1){ey.value=et.display.prevInput="";}else{et.display.prevInput=eE;}if(eH){aF(et);}et.state.pasteIncoming=false;return true;}function dq(es,ex){var ev,ew,eu=es.doc;if(!c4(eu.sel.from,eu.sel.to)){es.display.prevInput="";ev=bg&&(eu.sel.to.line-eu.sel.from.line>100||(ew=es.getSelection()).length>1000);var et=ev?"-":ew||es.getSelection();es.display.input.value=et;if(es.state.focused){dC(es.display.input);}if(bo&&!br){es.display.inputHasSelection=et;}}else{if(ex){es.display.prevInput=es.display.input.value="";if(bo&&!br){es.display.inputHasSelection=null;}}}es.display.inaccurateSelection=ev;}function aX(es){if(es.options.readOnly!="nocursor"&&(!cv||document.activeElement!=es.display.input)){es.display.input.focus();}}function bE(es){return es.options.readOnly||es.doc.cantEdit;}function di(es){var et=es.display;cG(et.scroller,"mousedown",cS(es,cO));if(bo){cG(et.scroller,"dblclick",cS(es,function(eA){if(dM(es,eA)){return;}var eB=c5(es,eA);if(!eB||H(es,eA)||aI(es.display,eA)){return;}az(eA);var eC=aU(a4(es.doc,eB.line).text,eB);aK(es.doc,eC.from,eC.to);}));}else{cG(et.scroller,"dblclick",function(eA){dM(es,eA)||az(eA);});}cG(et.lineSpace,"selectstart",function(eA){if(!aI(et,eA)){az(eA);}});if(!x){cG(et.scroller,"contextmenu",function(eA){cI(es,eA);});}cG(et.scroller,"scroll",function(){if(et.scroller.clientHeight){dG(es,et.scroller.scrollTop);dF(es,et.scroller.scrollLeft,true);dL(es,"scroll",es);}});cG(et.scrollbarV,"scroll",function(){if(et.scroller.clientHeight){dG(es,et.scrollbarV.scrollTop);}});cG(et.scrollbarH,"scroll",function(){if(et.scroller.clientHeight){dF(es,et.scrollbarH.scrollLeft);}});cG(et.scroller,"mousewheel",function(eA){cP(es,eA);});cG(et.scroller,"DOMMouseScroll",function(eA){cP(es,eA);});function ex(){if(es.state.focused){setTimeout(o(aX,es),0);}}cG(et.scrollbarH,"mousedown",ex);cG(et.scrollbarV,"mousedown",ex);cG(et.wrapper,"scroll",function(){et.wrapper.scrollTop=et.wrapper.scrollLeft=0;});var ey;function ev(){if(ey==null){ey=setTimeout(function(){ey=null;et.cachedCharWidth=et.cachedTextHeight=bM=null;F(es);ds(es,o(dh,es));},100);}}cG(window,"resize",ev);function ez(){for(var eA=et.wrapper.parentNode;eA&&eA!=document.body;eA=eA.parentNode){}if(eA){setTimeout(ez,5000);}else{cF(window,"resize",ev);}}setTimeout(ez,5000);cG(et.input,"keyup",cS(es,function(eA){if(dM(es,eA)||es.options.onKeyEvent&&es.options.onKeyEvent(es,c(eA))){return;}if(eA.keyCode==16){es.doc.sel.shift=false;}}));cG(et.input,"input",function(){if(bo&&!br&&es.display.inputHasSelection){es.display.inputHasSelection=null;}aN(es);});cG(et.input,"keydown",cS(es,cM));cG(et.input,"keypress",cS(es,cN));cG(et.input,"focus",o(cL,es));cG(et.input,"blur",o(cH,es));function eu(eA){if(dM(es,eA)||es.options.onDragEvent&&es.options.onDragEvent(es,c(eA))){return;}aA(eA);}if(es.options.dragDrop){cG(et.scroller,"dragstart",function(eA){cJ(es,eA);});cG(et.scroller,"dragenter",eu);cG(et.scroller,"dragover",eu);cG(et.scroller,"drop",cS(es,cK));}cG(et.scroller,"paste",function(eA){if(aI(et,eA)){return;}aX(es);aN(es);});cG(et.input,"paste",function(){if(ej&&!es.state.fakedLastChar&&!(new Date-es.state.lastMiddleDown<200)){var eB=et.input.selectionStart,eA=et.input.selectionEnd;et.input.value+="$";et.input.selectionStart=eB;et.input.selectionEnd=eA;es.state.fakedLastChar=true;}es.state.pasteIncoming=true;aN(es);});function ew(){if(et.inaccurateSelection){et.prevInput="";et.inaccurateSelection=false;et.input.value=es.getSelection();dC(et.input);}}cG(et.input,"cut",ew);cG(et.input,"copy",ew);if(bL){cG(et.sizer,"mouseup",function(){if(document.activeElement==et.input){et.input.blur();}aX(es);});}}function aI(es,et){for(var eu=aC(et);eu!=es.wrapper;eu=eu.parentNode){if(!eu||eu.ignoreEvents||eu.parentNode==es.sizer&&eu!=es.mover){return true;}}}function c5(es,eu,ev){var et=es.display;if(!ev){var ex=aC(eu);if(ex==et.scrollbarH||ex==et.scrollbarH.firstChild||ex==et.scrollbarV||ex==et.scrollbarV.firstChild||ex==et.scrollbarFiller||ex==et.gutterFiller){return null;}}var ey,ez,ew=ba(et.lineSpace);try{ey=eu.clientX;ez=eu.clientY;}catch(eu){return null;}return aa(es,ey-ew.left,ez-ew.top);}var bN,bO;function cO(ez){if(dM(this,ez)){return;}var es=this,eu=es.display,ev=es.doc,eG=ev.sel;eG.shift=ez.shiftKey;if(aI(eu,ez)){if(!ej){eu.scroller.draggable=false;setTimeout(function(){eu.scroller.draggable=true;},100);}return;}if(H(es,ez)){return;}var eH=c5(es,ez);switch(ax(ez)){case 3:if(x){cI.call(es,es,ez);}return;case 2:if(ej){es.state.lastMiddleDown=+new Date;}if(eH){aK(es.doc,eH);}setTimeout(o(aX,es),20);az(ez);return;}if(!eH){if(aC(ez)==eu.scroller){az(ez);}return;}if(!es.state.focused){cL(es);}var eF=+new Date,eK="single";if(bO&&bO.time>eF-400&&c4(bO.pos,eH)){eK="triple";az(ez);setTimeout(o(aX,es),20);dD(es,eH.line);}else{if(bN&&bN.time>eF-400&&c4(bN.pos,eH)){eK="double";bO={time:eF,pos:eH};az(ez);var eM=aU(a4(ev,eH.line).text,eH);aK(es.doc,eM.from,eM.to);}else{bN={time:eF,pos:eH};}}var eC=eH;if(es.options.dragDrop&&aw&&!bE(es)&&!c4(eG.from,eG.to)&&!c7(eH,eG.from)&&!c7(eG.to,eH)&&eK=="single"){var ey=cS(es,function(eN){if(ej){eu.scroller.draggable=false;}es.state.draggingText=false;cF(document,"mouseup",ey);cF(eu.scroller,"drop",ey);if(Math.abs(ez.clientX-eN.clientX)+Math.abs(ez.clientY-eN.clientY)<10){az(eN);aK(es.doc,eH);aX(es);}});if(ej){eu.scroller.draggable=true;}es.state.draggingText=ey;if(eu.scroller.dragDrop){eu.scroller.dragDrop();}cG(document,"mouseup",ey);cG(eu.scroller,"drop",ey);return;}az(ez);if(eK=="single"){aK(es.doc,J(ev,eH));}var eJ=eG.from,eI=eG.to,eD=eH;function ex(eN){if(c4(eD,eN)){return;}eD=eN;if(eK=="single"){aK(es.doc,J(ev,eH),eN);return;}eJ=J(ev,eJ);eI=J(ev,eI);if(eK=="double"){var eO=aU(a4(ev,eN.line).text,eN);if(c7(eN,eJ)){aK(es.doc,eO.from,eI);}else{aK(es.doc,eJ,eO.to);}}else{if(eK=="triple"){if(c7(eN,eJ)){aK(es.doc,eI,J(ev,c3(eN.line,0)));}else{aK(es.doc,eJ,J(ev,c3(eN.line+1,0)));}}}}var eA=ba(eu.wrapper);var et=0;function eB(eP){var eO=++et;var eN=c5(es,eP,true);if(!eN){return;}if(!c4(eN,eC)){if(!es.state.focused){cL(es);}eC=eN;ex(eN);var eR=eh(eu,ev);if(eN.line>=eR.to||eN.lineeA.bottom?20:0;if(eQ){setTimeout(cS(es,function(){if(et!=eO){return;}eu.scroller.scrollTop+=eQ;eB(eP);}),50);}}}function ew(eN){et=Infinity;az(eN);aX(es);cF(document,"mousemove",eE);cF(document,"mouseup",eL);}var eE=cS(es,function(eN){if(!bo&&!ax(eN)){ew(eN);}else{eB(eN);}});var eL=cS(es,ew);cG(document,"mousemove",eE);cG(document,"mouseup",eL);}function bc(es,eu,eE,eC,eD){try{var eA=eu.clientX,eB=eu.clientY;}catch(eu){return false;}if(eA>=Math.floor(ba(es.display.gutters).right)){return false;}if(eC){az(eu);}var et=es.display;var ez=ba(et.lineDiv);if(eB>ez.bottom||!bh(es,eE)){return ay(eu);}eB-=ez.top-et.viewOffset;for(var ex=0;ex=eA){var ey=bT(es.doc,eB);var ew=es.options.gutters[ex];eD(es,eE,es,ey,ew,eu);return ay(eu);}}}function Z(es,et){if(!bh(es,"gutterContextMenu")){return false;}return bc(es,et,"gutterContextMenu",false,dL);}function H(es,et){return bc(es,et,"gutterClick",true,dN);}var bP=0;function cK(ev){var es=this;if(dM(es,ev)||aI(es.display,ev)||(es.options.onDragEvent&&es.options.onDragEvent(es,c(ev)))){return;}az(ev);if(bo){bP=+new Date;}var eA=c5(es,ev,true),ew=ev.dataTransfer.files;if(!eA||bE(es)){return;}if(ew&&ew.length&&window.FileReader&&window.File){var ez=ew.length,eC=Array(ez),eB=0;var ey=function(eD,eE){var eF=new FileReader;eF.onload=function(){eC[eE]=eF.result;if(++eB==ez){eA=J(es.doc,eA);cb(es.doc,{from:eA,to:eA,text:dT(eC.join("\n")),origin:"paste"},"around");}};eF.readAsText(eD);};for(var ex=0;exeA.clientWidth||ex&&eA.scrollHeight>eA.clientHeight)){return;}if(ex&&b8&&ej){for(var eu=ey.target;eu!=eA;eu=eu.parentNode){if(eu.lineObj){et.display.currentWheelTarget=eu;break;}}}if(ew&&!aZ&&!cQ&&ek!=null){if(ex){dG(et,Math.max(0,Math.min(eA.scrollTop+ex*ek,eA.scrollHeight-eA.clientHeight)));}dF(et,Math.max(0,Math.min(eA.scrollLeft+ew*ek,eA.scrollWidth-eA.clientWidth)));az(ey);ev.wheelStartX=null;return;}if(ex&&ek!=null){var ez=ex*ek;var eB=et.doc.scrollTop,es=eB+ev.wrapper.clientHeight;if(ez<0){eB=Math.max(0,eB+ez-50);}else{es=Math.min(et.doc.height,es+ez+50);}d4(et,[],{top:eB,bottom:es});}if(el<20){if(ev.wheelStartX==null){ev.wheelStartX=eA.scrollLeft;ev.wheelStartY=eA.scrollTop;ev.wheelDX=ew;ev.wheelDY=ex;setTimeout(function(){if(ev.wheelStartX==null){return;}var eC=eA.scrollLeft-ev.wheelStartX;var eD=eA.scrollTop-ev.wheelStartY;var eE=(eD&&ev.wheelDY&&eD/ev.wheelDY)||(eC&&ev.wheelDX&&eC/ev.wheelDX);ev.wheelStartX=ev.wheelStartY=null;if(!eE){return;}ek=(ek*el+eE)/(el+1);++el;},200);}else{ev.wheelDX+=ew;ev.wheelDY+=ex;}}}function au(et,es,ew){if(typeof es=="string"){es=R[es];if(!es){return false;}}if(et.display.pollingFast&&dc(et)){et.display.pollingFast=false;}var eu=et.doc,ex=eu.sel.shift,ev=false;try{if(bE(et)){et.state.suppressEdits=true;}if(ew){eu.sel.shift=false;}ev=es(et)!=c0;}finally{eu.sel.shift=ex;et.state.suppressEdits=false;}return ev;}function g(es){var et=es.state.keyMaps.slice(0);if(es.options.extraKeys){et.push(es.options.extraKeys);}et.push(es.options.keyMap);return et;}var cm;function bf(es,et){var ey=a3(es.options.keyMap),ex=ey.auto;clearTimeout(cm);if(ex&&!bD(et)){cm=setTimeout(function(){if(a3(es.options.keyMap)==ey){es.options.keyMap=(ex.call?ex.call(null,es):ex);bI(es);}},50);}var ew=bJ(et,true),eu=false;if(!ew){return false;}var ev=g(es);if(et.shiftKey){eu=b6("Shift-"+ew,ev,function(ez){return au(es,ez,true);})||b6(ew,ev,function(ez){if(typeof ez=="string"?/^go[A-Z]/.test(ez):ez.motion){return au(es,ez);}});}else{eu=b6(ew,ev,function(ez){return au(es,ez);});}if(eu){az(et);dr(es);if(br){et.oldKeyCode=et.keyCode;et.keyCode=0;}dN(es,"keyHandled",es,ew,et);}return eu;}function be(et,eu,es){var ev=b6("'"+es+"'",g(et),function(ew){return au(et,ew,true);});if(ev){az(eu);dr(et);dN(et,"keyHandled",et,"'"+es+"'",eu);}return ev;}var bQ=null;function cM(eu){var es=this;if(!es.state.focused){cL(es);}if(dM(es,eu)||es.options.onKeyEvent&&es.options.onKeyEvent(es,c(eu))){return;}if(bo&&eu.keyCode==27){eu.returnValue=false;}var et=eu.keyCode;es.doc.sel.shift=et==16||eu.shiftKey;var ev=bf(es,eu);if(cQ){bQ=ev?et:null;if(!ev&&et==88&&!bg&&(b8?eu.metaKey:eu.ctrlKey)){es.replaceSelection("");}}}function cN(ev){var eu=this;if(dM(eu,ev)||eu.options.onKeyEvent&&eu.options.onKeyEvent(eu,c(ev))){return;}var ew=ev.keyCode,et=ev.charCode;if(cQ&&ew==bQ){bQ=null;az(ev);return;}if(((cQ&&(!ev.which||ev.which<10))||bL)&&bf(eu,ev)){return;}var es=String.fromCharCode(et==null?ew:et);if(be(eu,ev,es)){return;}if(bo&&!br){eu.display.inputHasSelection=null;}aN(eu);}function cL(es){if(es.options.readOnly=="nocursor"){return;}if(!es.state.focused){dL(es,"focus",es);es.state.focused=true;if(es.display.wrapper.className.search(/\bCodeMirror-focused\b/)==-1){es.display.wrapper.className+=" CodeMirror-focused";}if(!es.curOp){dq(es,true);if(ej){setTimeout(o(dq,es,true),0);}}}dP(es);dr(es);}function cH(es){if(es.state.focused){dL(es,"blur",es);es.state.focused=false;es.display.wrapper.className=es.display.wrapper.className.replace(" CodeMirror-focused","");}clearInterval(es.display.blinker);setTimeout(function(){if(!es.state.focused){es.doc.sel.shift=false;}},150);}var aq;function cI(es,eu){if(dM(es,eu,"contextmenu")){return;}var et=es.display,eC=es.doc.sel;if(aI(et,eu)||Z(es,eu)){return;}var ex=c5(es,eu),eB=et.scroller.scrollTop;if(!ex||cQ){return;}var eA=es.options.resetSelectionOnContextMenu;if(eA&&(c4(eC.from,eC.to)||c7(ex,eC.from)||!c7(ex,eC.to))){cS(es,dH)(es.doc,ex,ex);}var ew=et.input.style.cssText;et.inputDiv.style.position="absolute";et.input.style.cssText="position: fixed; width: 30px; height: 30px; top: "+(eu.clientY-5)+"px; left: "+(eu.clientX-5)+"px; z-index: 1000; background: transparent; outline: none;border-width: 0; outline: none; overflow: hidden; opacity: .05; -ms-opacity: .05; filter: alpha(opacity=5);";aX(es);dq(es,true);if(c4(eC.from,eC.to)){et.input.value=et.prevInput=" ";}function ey(){if(et.input.selectionStart!=null){var eD=et.input.value="\u200b"+(c4(eC.from,eC.to)?"":et.input.value);et.prevInput="\u200b";et.input.selectionStart=1;et.input.selectionEnd=eD.length;}}function ez(){et.inputDiv.style.position="relative";et.input.style.cssText=ew;if(br){et.scrollbarV.scrollTop=et.scroller.scrollTop=eB;}dP(es);if(et.input.selectionStart!=null){if(!bo||br){ey();}clearTimeout(aq);var eD=0,eE=function(){if(et.prevInput=="\u200b"&&et.input.selectionStart==0){cS(es,R.selectAll)(es);}else{if(eD++<10){aq=setTimeout(eE,500);}else{dq(es);}}};aq=setTimeout(eE,200);}}if(bo&&!br){ey();}if(x){aA(eu);var ev=function(){cF(window,"mouseup",ev);setTimeout(ez,20);};cG(window,"mouseup",ev);}else{setTimeout(ez,50);}}var y=N.changeEnd=function(es){if(!es.text){return es.to;}return c3(es.from.line+es.text.length-1,b7(es.text).length+(es.text.length==1?es.from.ch:0));};function K(eu,es,ex){if(!c7(es.from,ex)){return J(eu,ex);}var et=(es.text.length-1)-(es.to.line-es.from.line);if(ex.line>es.to.line+et){var ey=ex.line-et,ew=eu.first+eu.size-1;if(ey>ew){return c3(ew,a4(eu,ew).text.length);}return L(ex,a4(eu,ey).text.length);}if(ex.line==es.to.line+et){return L(ex,b7(es.text).length+(es.text.length==1?es.from.ch:0)+a4(eu,es.to.line).text.length-es.to.ch);}var ev=ex.line-es.from.line;return L(ex,es.text[ev].length+(ev?0:es.from.ch));}function X(eu,et,ew){if(ew&&typeof ew=="object"){return{anchor:K(eu,et,ew.anchor),head:K(eu,et,ew.head)};}if(ew=="start"){return{anchor:et.from,head:et.from};}var ev=y(et);if(ew=="around"){return{anchor:et.from,head:ev};}if(ew=="end"){return{anchor:ev,head:ev};}var es=function(ez){if(c7(ez,et.from)){return ez;}if(!c7(et.to,ez)){return ev;}var ey=ez.line+et.text.length-(et.to.line-et.from.line)-1,ex=ez.ch;if(ez.line==et.to.line){ex+=ev.ch-et.to.ch;}return c3(ey,ex);};return{anchor:es(eu.sel.anchor),head:es(eu.sel.head)};}function aO(et,es,ev){var eu={canceled:false,from:es.from,to:es.to,text:es.text,origin:es.origin,cancel:function(){this.canceled=true;}};if(ev){eu.update=function(ew,ez,ey,ex){if(ew){this.from=J(et,ew);}if(ez){this.to=J(et,ez);}if(ey){this.text=ey;}if(ex!==undefined){this.origin=ex;}};}dL(et,"beforeChange",et,eu);if(et.cm){dL(et.cm,"beforeChange",et.cm,eu);}if(eu.canceled){return null;}return{from:eu.from,to:eu.to,text:eu.text,origin:eu.origin};}function cb(et,es,ew,ev){if(et.cm){if(!et.cm.curOp){return cS(et.cm,cb)(et,es,ew,ev);}if(et.cm.state.suppressEdits){return;}}if(bh(et,"beforeChange")||et.cm&&bh(et.cm,"beforeChange")){es=aO(et,es,true);if(!es){return;}}var ex=dw&&!ev&&dn(et,es.from,es.to);if(ex){for(var eu=ex.length-1;eu>=1;--eu){cd(et,{from:ex[eu].from,to:ex[eu].to,text:[""]});}if(ex.length){cd(et,{from:ex[0].from,to:ex[0].to,text:es.text},ew);}}else{cd(et,es,ew);}}function cd(et,es,ew){if(es.text.length==1&&es.text[0]==""&&c4(es.from,es.to)){return;}var ev=X(et,es,ew);d(et,es,ev,et.cm?et.cm.curOp.id:NaN);ce(et,es,ev,dY(et,es));var eu=[];b4(et,function(ex,ey){if(!ey&&bt(eu,ex.history)==-1){dd(ex.history,es);eu.push(ex.history);}ce(ex,es,null,dY(ex,es));});}function cc(ev,eB){if(ev.cm&&ev.cm.state.suppressEdits){return;}var ey=ev.history;var ew=(eB=="undo"?ey.done:ey.undone).pop();if(!ew){return;}var et={changes:[],anchorBefore:ew.anchorAfter,headBefore:ew.headAfter,anchorAfter:ew.anchorBefore,headAfter:ew.headBefore,generation:ey.generation};(eB=="undo"?ey.undone:ey.done).push(et);ey.generation=ew.generation||++ey.maxGeneration;var ex=bh(ev,"beforeChange")||ev.cm&&bh(ev.cm,"beforeChange");for(var ez=ew.changes.length-1;ez>=0;--ez){var eu=ew.changes[ez];eu.origin=eB;if(ex&&!aO(ev,eu,false)){(eB=="undo"?ey.done:ey.undone).length=0;return;}et.changes.push(bn(ev,eu));var es=ez?X(ev,eu,null):{anchor:ew.anchorBefore,head:ew.headBefore};ce(ev,eu,es,ct(ev,eu));var eA=[];b4(ev,function(eC,eD){if(!eD&&bt(eA,eC.history)==-1){dd(eC.history,eu);eA.push(eC.history);}ce(eC,eu,null,ct(eC,eu));});}}function dK(et,es){function eu(ev){return c3(ev.line+es,ev.ch);}et.first+=es;if(et.cm){dh(et.cm,et.first,et.first,es);}et.sel.head=eu(et.sel.head);et.sel.anchor=eu(et.sel.anchor);et.sel.from=eu(et.sel.from);et.sel.to=eu(et.sel.to);}function ce(et,es,ev,ex){if(et.cm&&!et.cm.curOp){return cS(et.cm,ce)(et,es,ev,ex);}if(es.to.lineet.lastLine()){return;}if(es.from.lineeu){es={from:es.from,to:c3(eu,a4(et,eu).text.length),text:[es.text[0]],origin:es.origin};}es.removed=a0(et,es.from,es.to);if(!ev){ev=X(et,es,null);}if(et.cm){cf(et.cm,es,ex,ev);}else{d6(et,es,ex,ev);}}function cf(ev,es,eD,eC){var ey=ev.doc,ex=ev.display,ez=es.from,eE=es.to;var eB=false,eu=ez.line;if(!ev.options.lineWrapping){eu=bZ(ei(ey,a4(ey,ez.line)));ey.iter(eu,eE.line+1,function(eF){if(eF==ex.maxLine){eB=true;return true;}});}if(!c7(ey.sel.head,es.from)&&!c7(es.to,ey.sel.head)){ev.curOp.cursorActivity=true;}d6(ey,es,eD,eC,aG(ev));if(!ev.options.lineWrapping){ey.iter(eu,ez.line+es.text.length,function(eG){var eF=bY(ey,eG);if(eF>ex.maxLineLength){ex.maxLine=eG;ex.maxLineLength=eF;ex.maxLineChanged=true;eB=false;}});if(eB){ev.curOp.updateMaxLine=true;}}ey.frontier=Math.min(ey.frontier,ez.line);dW(ev,400);var eA=es.text.length-(eE.line-ez.line)-1;dh(ev,ez.line,eE.line+1,eA);if(bh(ev,"change")){var et={from:ez,to:eE,text:es.text,removed:es.removed,origin:es.origin};if(ev.curOp.textChanged){for(var ew=ev.curOp.textChanged;ew.next;ew=ew.next){}ew.next=et;}else{ev.curOp.textChanged=et;}}}function dp(et,es,eu,ex,ev){if(!ex){ex=eu;}if(c7(ex,eu)){var ew=ex;ex=eu;eu=ew;}if(typeof es=="string"){es=dT(es);}cb(et,{from:eu,to:ex,text:es,origin:ev},null);}function c3(et,es){if(!(this instanceof c3)){return new c3(et,es);}this.line=et;this.ch=es;}N.Pos=c3;function c4(es,et){return es.line==et.line&&es.ch==et.ch;}function c7(es,et){return es.lineet){return c3(et,a4(es,et).text.length);}return L(eu,a4(es,eu.line).text.length);}function L(eu,et){var es=eu.ch;if(es==null||es>et){return c3(eu.line,et);}else{if(es<0){return c3(eu.line,0);}else{return eu;}}}function bC(es,et){return et>=es.first&&et=et.ch:eD.to>et.ch))){if(eA){dL(ez,"beforeCursorEnter");if(ez.explicitlyCleared){if(!ey.markedSpans){break;}else{--ex;continue;}}}if(!ez.atomic){continue;}var eB=ez.find()[eu<0?"from":"to"];if(c4(eB,et)){eB.ch+=eu;if(eB.ch<0){if(eB.line>ev.first){eB=J(ev,c3(eB.line-1));}else{eB=null;}}else{if(eB.ch>ey.text.length){if(eB.line(window.innerHeight||document.documentElement.clientHeight)){ew=false;}}if(ew!=null&&!c2){var ex=aD("div","\u200b",null,"position: absolute; top: "+(eu.top-ev.viewOffset)+"px; height: "+(eu.bottom-eu.top+dz)+"px; left: "+eu.left+"px; width: 2px;");et.display.lineSpace.appendChild(ex);ex.scrollIntoView(ew);et.display.lineSpace.removeChild(ex);}}function dB(et,ey,ev,ex){if(ex==null){ex=0;}for(;;){var es=false,eu=aj(et,ey);var ew=!ev||ev==ey?eu:aj(et,ev);var ez=w(et,Math.min(eu.left,ew.left),Math.min(eu.top,ew.top)-ex,Math.max(eu.left,ew.left),Math.max(eu.bottom,ew.bottom)+ex);var eB=et.doc.scrollTop,eA=et.doc.scrollLeft;if(ez.scrollTop!=null){dG(et,ez.scrollTop);if(Math.abs(et.doc.scrollTop-eB)>1){es=true;}}if(ez.scrollLeft!=null){dF(et,ez.scrollLeft);if(Math.abs(et.doc.scrollLeft-eA)>1){es=true;}}if(!es){return eu;}}}function dA(es,eu,ew,ev,ex){var et=w(es,eu,ew,ev,ex);if(et.scrollTop!=null){dG(es,et.scrollTop);}if(et.scrollLeft!=null){dF(es,et.scrollLeft);}}function w(ev,eG,eI,eH,eJ){var ew=ev.display,eF=d1(ev.display);if(eI<0){eI=0;}var eB=ew.scroller.clientHeight-dz,eD=ew.scroller.scrollTop,eA={};var ex=ev.doc.height+cX(ew);var eu=eIex-eF;if(eIeD+eB){var ez=Math.min(eI,(es?ex:eJ)-eB);if(ez!=eD){eA.scrollTop=ez;}}}var eE=ew.scroller.clientWidth-dz,eC=ew.scroller.scrollLeft;eG+=ew.gutters.offsetWidth;eH+=ew.gutters.offsetWidth;var ey=ew.gutters.offsetWidth;var et=eGeE+eC-3){eA.scrollLeft=eH+10-eE;}}return eA;}function ec(es,et,eu){es.curOp.updateScrollPos={scrollLeft:et==null?es.doc.scrollLeft:et,scrollTop:eu==null?es.doc.scrollTop:eu};}function e(es,et,ew){var eu=es.curOp.updateScrollPos||(es.curOp.updateScrollPos={scrollLeft:es.doc.scrollLeft,scrollTop:es.doc.scrollTop});var ev=es.display.scroller;eu.scrollTop=Math.max(0,Math.min(ev.scrollHeight-ev.clientHeight,eu.scrollTop+ew));eu.scrollLeft=Math.max(0,Math.min(ev.scrollWidth-ev.clientWidth,eu.scrollLeft+et));}function bs(et,eC,ex,es){var ew=et.doc;if(ex==null){ex="add";}if(ex=="smart"){if(!et.doc.mode.indent){ex="prev";}else{var eE=bb(et,eC);}}var eF=et.options.tabSize;var eB=a4(ew,eC),eu=ag(eB.text,null,eF);var ev=eB.text.match(/^\s*/)[0],ez;if(!es&&!/\S/.test(eB.text)){ez=0;ex="not";}else{if(ex=="smart"){ez=et.doc.mode.indent(eE,eB.text.slice(ev.length),eB.text);if(ez==c0){if(!es){return;}ex="prev";}}}if(ex=="prev"){if(eC>ew.first){ez=ag(a4(ew,eC-1).text,null,eF);}else{ez=0;}}else{if(ex=="add"){ez=eu+et.options.indentUnit;}else{if(ex=="subtract"){ez=eu-et.options.indentUnit;}else{if(typeof ex=="number"){ez=eu+ex;}}}}ez=Math.max(0,ez);var eA="",eD=0;if(et.options.indentWithTabs){for(var ey=Math.floor(ez/eF);ey;--ey){eD+=eF;eA+="\t";}}if(eD=ev.first+ev.size){return(eE=false);}ez=eK;return eA=a4(ev,eK);}function eB(eK){var eL=(eJ?cA:cz)(eA,es,eu,true);if(eL==null){if(!eK&&ew()){if(eJ){es=(eu<0?b1:bX)(eA);}else{es=eu<0?eA.text.length:0;}}else{return(eE=false);}}else{es=eL;}return true;}if(eI=="char"){eB();}else{if(eI=="column"){eB(true);}else{if(eI=="word"||eI=="group"){var eG=null,ey=eI=="group";for(var ex=true;;ex=false){if(eu<0&&!eB(!ex)){break;}var et=eA.text.charAt(es)||"\n";var eH=bF(et)?"w":!ey?null:/\s/.test(et)?null:"p";if(eG&&eG!=eH){if(eu<0){eu=1;eB();}break;}if(eH){eG=eH;}if(eu>0&&!eB(!ex)){break;}}}}}var eF=dO(ev,c3(ez,es),eC,true);if(!eE){eF.hitSide=true;}return eF;}function aS(es,ew,et,ey){var eu=es.doc,ez=ew.left,eA;if(ey=="page"){var ev=Math.min(es.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight);eA=ew.top+et*(ev-(et<0?parseFloat("1.5"):parseFloat(".5"))*d1(es.display));}else{if(ey=="line"){eA=et>0?ew.bottom+3:ew.top-3;}}for(;;){var ex=aa(es,ez,eA);if(!ex.outside){break;}if(et<0?eA<=0:eA>=eu.height){ex.hitSide=true;break;}eA+=et*5;}return ex;}function aU(eu,ev){var ew=ev.ch,et=ev.ch;if(eu){if((ev.xRel<0||et==eu.length)&&ew){--ew;}else{++et;}var ex=eu.charAt(ew);var es=bF(ex)?bF:/\s/.test(ex)?function(ey){return/\s/.test(ey);}:function(ey){return !/\s/.test(ey)&&!bF(ey);};while(ew>0&&es(eu.charAt(ew-1))){--ew;}while(et>1;if((ev?ex[ev*2-1]:0)>=eu){es=ev;}else{if(ex[ev*2+1]et){eu=et;es=true;}}var ev=a4(this.doc,eu);return by(this,a4(this.doc,eu),{top:0,left:0},ew||"page").top+(es?ev.height:0);},defaultTextHeight:function(){return d1(this.display);},defaultCharWidth:function(){return B(this.display);},setGutterMarker:cS(null,function(et,es,eu){return z(this,et,function(ev){var ew=ev.gutterMarkers||(ev.gutterMarkers={});ew[es]=eu;if(!eu&&bA(ew)){ev.gutterMarkers=null;}return true;});}),clearGutter:cS(null,function(eu){var es=this,et=es.doc,ev=et.first;et.iter(function(ew){if(ew.gutterMarkers&&ew.gutterMarkers[eu]){ew.gutterMarkers[eu]=null;dh(es,ev,ev+1);if(bA(ew.gutterMarkers)){ew.gutterMarkers=null;}}++ev;});}),addLineClass:cS(null,function(et,eu,es){return z(this,et,function(ev){var ew=eu=="text"?"textClass":eu=="background"?"bgClass":"wrapClass";if(!ev[ew]){ev[ew]=es;}else{if(new RegExp("(?:^|\\s)"+es+"(?:$|\\s)").test(ev[ew])){return false;}else{ev[ew]+=" "+es;}}return true;});}),removeLineClass:cS(null,function(et,eu,es){return z(this,et,function(ey){var ez=eu=="text"?"textClass":eu=="background"?"bgClass":"wrapClass";var ev=ey[ez];if(!ev){return false;}else{if(es==null){ey[ez]=null;}else{var ex=ev.match(new RegExp("(?:^|\\s+)"+es+"(?:$|\\s+)"));if(!ex){return false;}var ew=ex.index+ex[0].length;ey[ez]=ev.slice(0,ex.index)+(!ex.index||ew==ev.length?"":" ")+ev.slice(ew)||null;}}return true;});}),addLineWidget:cS(null,function(es,et,eu){return a(this,es,et,eu);}),removeLineWidget:function(es){es.clear();},lineInfo:function(es){if(typeof es=="number"){if(!bC(this.doc,es)){return null;}var et=es;es=a4(this.doc,es);if(!es){return null;}}else{var et=bZ(es);if(et==null){return null;}}return{line:et,handle:es,text:es.text,gutterMarkers:es.gutterMarkers,textClass:es.textClass,bgClass:es.bgClass,wrapClass:es.wrapClass,widgets:es.widgets};},getViewport:function(){return{from:this.display.showingFrom,to:this.display.showingTo};},addWidget:function(ex,ew,ey,eA,et){var es=this.display;ex=aj(this,J(this.doc,ex));var ez=ex.bottom,ev=ex.left;ew.style.position="absolute";es.sizer.appendChild(ew);if(eA=="over"){ez=ex.top;}else{if(eA=="above"||eA=="near"){var eB=Math.max(es.wrapper.clientHeight,this.doc.height),eu=Math.max(es.sizer.clientWidth,es.lineSpace.clientWidth);if((eA=="above"||ex.bottom+ew.offsetHeight>eB)&&ex.top>ew.offsetHeight){ez=ex.top-ew.offsetHeight;}else{if(ex.bottom+ew.offsetHeight<=eB){ez=ex.bottom;}}if(ev+ew.offsetWidth>eu){ev=eu-ew.offsetWidth;}}}ew.style.top=ez+"px";ew.style.left=ew.style.right="";if(et=="right"){ev=es.sizer.clientWidth-ew.offsetWidth;ew.style.right="0px";}else{if(et=="left"){ev=0;}else{if(et=="middle"){ev=(es.sizer.clientWidth-ew.offsetWidth)/2;}}ew.style.left=ev+"px";}if(ey){dA(this,ev,ez,ev+ew.offsetWidth,ez+ew.offsetHeight);}},triggerOnKeyDown:cS(null,cM),execCommand:function(es){return R[es](this);},findPosH:function(ev,es,ex,ey){var eu=1;if(es<0){eu=-1;es=-es;}for(var ew=0,et=J(this.doc,ev);ew2){et.dependencies=[];for(var es=2;es0&&et.ch=this.string.length;},sol:function(){return this.pos==this.lineStart;},peek:function(){return this.string.charAt(this.pos)||undefined;},next:function(){if(this.poset;},eatSpace:function(){var es=this.pos;while(/[\s\u00a0]/.test(this.string.charAt(this.pos))){++this.pos;}return this.pos>es;},skipToEnd:function(){this.pos=this.string.length;},skipTo:function(es){var et=this.string.indexOf(es,this.pos);if(et>-1){this.pos=et;return true;}},backUp:function(es){this.pos-=es;},column:function(){if(this.lastColumnPos0){return null;}if(ev&&eu!==false){this.pos+=ev[0].length;}return ev;}},current:function(){return this.string.slice(this.start,this.pos);},hideFirstChars:function(et,es){this.lineStart+=et;try{return es();}finally{this.lineStart-=et;}}};N.StringStream=dZ;function d2(es,et){this.lines=[];this.type=et;this.doc=es;}N.TextMarker=d2;aJ(d2);d2.prototype.clear=function(){if(this.explicitlyCleared){return;}var es=this.doc.cm,eB=es&&!es.curOp;if(eB){dU(es);}if(bh(this,"clear")){var et=this.find();if(et){dN(this,"clear",et.from,et.to);}}var ey=null,ex=null;for(var eu=0;eues.display.maxLineLength){es.display.maxLine=eA;es.display.maxLineLength=ev;es.display.maxLineChanged=true;}}}if(ey!=null&&es){dh(es,ey,ex+1);}this.lines.length=0;this.explicitlyCleared=true;if(this.atomic&&this.doc.cantEdit){this.doc.cantEdit=false;if(es){dg(es);}}if(eB){aF(es);}};d2.prototype.find=function(es){var eu,ey;for(var ev=0;ev=es.display.showingFrom&&ev.line=ez:ey.to>ez);(ew||(ew=[])).push({from:ey.from,to:es?null:ey.to,marker:ev});}}}return ew;}function ci(ey,es,ev){if(ey){for(var eu=0,ex;eu=es:ez.to>es);if(et||ez.from==es&&ew.type=="bookmark"&&(!ev||ez.marker.insertLeft)){var eA=ez.from==null||(ew.inclusiveLeft?ez.from<=es:ez.from0&&ev){for(var ez=0;ez=0&&eD<=0||ev<=0&&eD>=0){continue;}if(ev<=0&&(M(et.to,eu)||aM(eA.marker)-aL(ez))>0||ev>=0&&(M(et.from,eC)||aL(eA.marker)-aM(ez))<0){return true;}}}}function ei(es,et){var eu;while(eu=Q(et)){et=a4(es,eu.find().from.line);}return et;}function bV(es,eu){var ew=dv&&eu.markedSpans;if(ew){for(var ev,et=0;etes.options.maxHighlightLength){ew=false;if(ex){c9(es,eD,eA,eB.pos);}eB.pos=eD.length;eC=null;}else{eC=ey.token(eB,eA);}if(!ew||eu!=eC){if(eteC){ez.splice(ev,1,eC,ez[ev+1],eD);}ev+=2;es=Math.min(eC,eD);}if(!eF){return;}if(ey.opaque){ez.splice(eE,ev-eE,eC,eF);ev=eE+2;}else{for(;eE="\ud800"&&et<"\udbff"&&eveE)){if(eF.to!=null&&eD>eF.to){eD=eF.to;eG="";}if(eC.className){eJ+=" "+eC.className;}if(eC.startStyle&&eF.from==eE){eI+=" "+eC.startStyle;}if(eC.endStyle&&eF.to==eD){eG+=" "+eC.endStyle;}if(eC.title&&!eN){eN=eC.title;}if(eC.collapsed&&(!ev||T(ev.marker,eC)<0)){ev=eF;}}else{if(eF.from>eE&&eD>eF.from){eD=eF.from;}}if(eC.type=="bookmark"&&eF.from==eE&&eC.replacedWith){ex.push(eC);}}if(ev&&(ev.from||0)==eE){q(eu,(ev.to==null?eA:ev.to)-eE,ev.marker,ev.from==null);if(ev.to==null){return ev.marker.find();}}if(!ev&&ex.length){for(var ez=0;ez=eA){break;}var eP=Math.min(eA,eD);while(true){if(eM){var ew=eE+eM.length;if(!ev){var eO=ew>eP?eM.slice(0,eP-eE):eM;eu.addToken(eu,eO,eK?eK+eJ:eJ,eI,eE+eO.length==eD?eG:"",eN);}if(ew>=eP){eM=eM.slice(eP-eE);eE=eP;break;}eE=ew;eI="";}eM=es.slice(et,et=eL[ey++]);eK=bx(eL[ey++],eu);}}}function d6(eu,et,eD,eF,ew){function eG(eK){return eD?eD[eK]:null;}function eJ(eK,eM,eL){d9(eK,eM,eL,ew);dN(eK,"change",eK,et);}var ey=et.from,eI=et.to,eH=et.text;var ex=a4(eu,ey.line),eA=a4(eu,eI.line);var eC=b7(eH),eB=eG(eH.length-1),eE=eI.line-ey.line;if(ey.ch==0&&eI.ch==0&&eC==""&&(!eu.cm||eu.cm.options.wholeLineUpdateBefore)){for(var ez=0,ev=eH.length-1,es=[];ez1){eu.remove(ey.line+1,eE-1);}eu.insert(ey.line+1,es);}}}dN(eu,"change",eu,et);dH(eu,eF.anchor,eF.head,null,true);}function bR(ev){this.lines=ev;this.parent=null;for(var eu=0,es=ev.length,et=0;eu50){while(et.lines.length>50){var ez=et.lines.splice(et.lines.length-25,25);var ey=new bR(ez);et.height-=ey.height;this.children.splice(ew+1,0,ey);ey.parent=this;}this.maybeSpill();}break;}es-=eA;}},maybeSpill:function(){if(this.children.length<=10){return;}var et=this;do{var ew=et.children.splice(et.children.length-5,5);var ev=new p(ew);if(!et.parent){var es=new p(et.children);es.parent=et;et.children=[es,ev];et=es;}else{et.size-=ev.size;et.height-=ev.height;var eu=bt(et.parent.children,et);et.parent.children.splice(eu+1,0,ev);}ev.parent=et.parent;}while(et.children.length>10);et.parent.maybeSpill();},iterN:function(es,ew,ex){for(var ev=0,eu=this.children.length;ev=eu.ch)){et.push(ev.marker.parent||ev.marker);}}}return et;},getAllMarks:function(){var es=[];this.iter(function(eu){var ev=eu.markedSpans;if(ev){for(var et=0;eteu){es=eu;return true;}eu-=ew;++et;});return J(this,c3(et,es));},indexFromPos:function(es){es=J(this,es);var et=es.ch;if(es.lineet){et=eu.from;}if(eu.to!=null&&eu.toez-eu.cm.options.historyEventDelay)||es.origin.charAt(0)=="*"))){var ew=b7(et.changes);if(c4(es.from,es.to)&&c4(es.from,ew.to)){ew.to=y(es);}else{et.changes.push(bn(eu,es));}et.anchorAfter=ey.anchor;et.headAfter=ey.head;}else{et={changes:[bn(eu,es)],generation:ev.generation,anchorBefore:eu.sel.anchor,headBefore:eu.sel.head,anchorAfter:ey.anchor,headAfter:ey.head};ev.done.push(et);ev.generation=++ev.maxGeneration;while(ev.done.length>ev.undoDepth){ev.done.shift();}}ev.lastTime=ez;ev.lastOp=ex;ev.lastOrigin=es.origin;}function dl(eu){if(!eu){return null;}for(var es=0,et;es-1){b7(eA)[eC]=es[eC];delete es[eC];}}}}}}return eu;}function df(eu,et,ev,es){if(ev0;}N.on=cG;N.off=cF;N.signal=dL;function aJ(es){es.prototype.on=function(eu,et){cG(this,eu,et);};es.prototype.off=function(eu,et){cF(this,eu,et);};}var dz=30;var c0=N.Pass={toString:function(){return"CodeMirror.Pass";}};function am(){this.id=null;}am.prototype={set:function(et,es){clearTimeout(this.id);this.id=setTimeout(es,et);}};function ag(ex,es,ey,ev,ew){if(es==null){es=ex.search(/[^\s\u00a0]/);if(es==-1){es=ex.length;}}for(var et=ev||0,eu=ew||0;et"\x80"&&(es.toUpperCase()!=es.toLowerCase()||cE.test(es));}function bA(et){for(var es in et){if(et.hasOwnProperty(es)&&et[es]){return false;}}return true;}var bB=/[\u0300-\u036F\u0483-\u0487\u0488-\u0489\u0591-\u05BD\u05BF\u05C1-\u05C2\u05C4-\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7-\u06E8\u06EA-\u06ED\uA66F\u1DC0-\u1DFF\u20D0-\u20FF\uA670-\uA672\uA674-\uA67D\uA69F\udc00-\udfff\uFE20-\uFE2F]/;function aD(ex,et,es,ew){var eu=document.createElement(ex);if(es){eu.className=es;}if(ew){eu.style.cssText=ew;}if(typeof et=="string"){dI(eu,et);}else{if(et){for(var ev=0;ev0;--es){et.removeChild(et.firstChild);}return et;}function dk(et,es){return dj(et).appendChild(es);}function dI(es,et){if(br){es.innerHTML="";es.appendChild(document.createTextNode(et));}else{es.textContent=et;}}function ba(es){return es.getBoundingClientRect();}N.replaceGetRect=function(es){ba=es;};var aw=function(){if(br){return false;}var es=aD("div");return"draggable" in es||"dragDrop" in es;}();function dS(){return false;}if(aZ){dS=function(et,es){return et.charCodeAt(es-1)==36&&et.charCodeAt(es)==39;};}else{if(du&&!/Version\/([6-9]|\d\d)\b/.test(navigator.userAgent)){dS=function(et,es){return/\-[^ \-?]|\?[^ !\'\"\),.\-\/:;\?\]\}]/.test(et.slice(es-1,es+1));};}else{if(ej&&/Chrome\/(?:29|[3-9]\d|\d\d\d)\./.test(navigator.userAgent)){dS=function(eu,et){var es=eu.charCodeAt(et-1);return es>=8208&&es<=8212;};}else{if(ej){dS=function(et,es){if(es>1&&et.charCodeAt(es-1)==45){if(/\w/.test(et.charAt(es-2))&&/[^\-?\.]/.test(et.charAt(es))){return true;}if(es>2&&/[\d\.,]/.test(et.charAt(es-2))&&/[\d\.,]/.test(et.charAt(es))){return false;}}return/[~!#%&*)=+}\]\\|\"\.>,:;][({[<]|-[^\-?\.\u2010-\u201f\u2026]|\?[\w~`@#$%\^&*(_=+{[|><]|\u2026[\w~`@#$%\^&*(_=+{[><]/.test(et.slice(es-1,es+1));};}}}}var bM;function dx(es){if(bM!=null){return bM;}var et=aD("div",null,null,"width: 50px; height: 50px; overflow-x: scroll");dk(es,et);if(et.offsetWidth){bM=et.offsetHeight-et.clientHeight;}return bM||0;}var er;function eq(es){if(er==null){var et=aD("span","\u200b");dk(es,aD("span",[et,document.createTextNode("x")]));if(es.firstChild.offsetHeight!=0){er=et.offsetWidth<=1&&et.offsetHeight>2&&!bq;}}if(er){return aD("span","\u200b");}else{return aD("span","\u00a0",null,"display: inline-block; width: 1px; margin-right: -1px");}}var dT="\n\nb".split(/\n/).length!=3?function(ey){var ev=0,ew=[],es=ey.length;while(ev<=es){var eu=ey.indexOf("\n",ev);if(eu==-1){eu=ey.length;}var et=ey.slice(ev,ey.charAt(eu-1)=="\r"?eu-1:eu);var ex=et.indexOf("\r");if(ex!=-1){ew.push(et.slice(0,ex));ev+=ex+1;}else{ew.push(et);ev=eu+1;}}return ew;}:function(es){return es.split(/\r\n?|\n/);};N.splitLines=dT;var bi=window.getSelection?function(et){try{return et.selectionStart!=et.selectionEnd;}catch(es){return false;}}:function(eu){try{var et=eu.ownerDocument.selection.createRange();}catch(es){}if(!et||et.parentElement()!=eu){return false;}return et.compareEndPoints("StartToEnd",et)!=0;};var bg=(function(){var es=aD("div");if("oncopy" in es){return true;}es.setAttribute("oncopy","return;");return typeof es.oncopy=="function";})();var bK={3:"Enter",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",91:"Mod",92:"Mod",93:"Mod",109:"-",107:"=",127:"Delete",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",63276:"PageUp",63277:"PageDown",63275:"End",63273:"Home",63234:"Left",63232:"Up",63235:"Right",63233:"Down",63302:"Insert",63272:"Delete"};N.keyNames=bK;(function(){for(var es=0;es<10;es++){bK[es+48]=String(es);}for(var es=65;es<=90;es++){bK[es]=String.fromCharCode(es);}for(var es=1;es<=12;es++){bK[es+111]=bK[es+63235]="F"+es;}})();function bG(ew,eu,ey,es){if(!ew){return es(eu,ey,"ltr");}var et=false;for(var ev=0;eveu||eu==ey&&ex.to==eu){es(Math.max(ex.from,eu),Math.min(ex.to,ey),ex.level==1?"rtl":"ltr");et=true;}}if(!et){es(eu,ey,"ltr");}}function k(es){return es.level%2?es.to:es.from;}function n(es){return es.level%2?es.from:es.to;}function bX(es){var et=a9(es);return et?k(et[0]):0;}function b1(es){var et=a9(es);if(!et){return es.text.length;}return n(b7(et));}function b2(et,ev){var eu=a4(et.doc,ev);var ex=ei(et.doc,eu);if(ex!=eu){ev=bZ(ex);}var ew=a9(ex);var es=!ew?0:ew[0].level%2?b1(ex):bX(ex);return c3(ev,es);}function bU(et,ev){var ew,eu;while(ew=O(eu=a4(et.doc,ev))){ev=ew.find().to.line;}var ex=a9(eu);var es=!ex?eu.text.length:ex[0].level%2?bX(eu):b1(eu);return c3(ev,es);}function S(ev,es,et){var eu=ev[0].level;if(es==eu){return true;}if(et==eu){return false;}return esew){return eu;}if((es.from==ew||es.to==ew)){if(et==null){et=eu;}else{if(S(ev,es.level,ev[et].level)){if(es.from!=es.to){m=et;}return eu;}else{if(es.from!=es.to){m=eu;}return et;}}}}return et;}function cy(eu,ev,et,es){if(!es){return ev+et;}do{ev+=et;}while(ev>0&&bB.test(eu.text.charAt(ev)));return ev;}function cA(ev,ey,eu,et){var es=a9(ev);if(!es){return cz(ev,ey,eu,et);}var ex=a1(es,ey),ew=es[ex];var ez=cy(ev,ey,ew.level%2?-eu:eu,et);for(;;){if(ez>ew.from&&ez0)==ew.level%2?ew.to:ew.from;}else{ew=es[ex+=eu];if(!ew){return null;}if((eu>0)==ew.level%2){ez=cy(ev,ew.to,-1,et);}else{ez=cy(ev,ew.from,1,et);}}}}function cz(eu,ev,et,es){var ew=ev+et;if(es){while(ew>0&&bB.test(eu.text.charAt(ew))){ew+=et;}}return ew<0||ew>eu.text.length?null:ew;}var l=(function(){var ez="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLL";var es="rrrrrrrrrrrr,rNNmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmrrrrrrrnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmNmmmmrrrrrrrrrrrrrrrrrr";function eu(eB){if(eB<=255){return ez.charAt(eB);}else{if(1424<=eB&&eB<=1524){return"R";}else{if(1536<=eB&&eB<=1791){return es.charAt(eB-1536);}else{if(1792<=eB&&eB<=2220){return"r";}else{return"L";}}}}}var et=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;var ex=/[stwN]/,ey=/[LRr]/,ev=/[Lb1n]/,ew=/[1n]/;var eA="L";return function(eQ){if(!et.test(eQ)){return false;}var eI=eQ.length,eS=[];for(var eG=0,eR;eG0?s.charAt(q.ch-1):"";if(i==m&&CodeMirror.isWordChar(r)){return CodeMirror.Pass;}if(s.length==q.ch||g.indexOf(t)>=0||f.test(t)){p.replaceSelection(i+m,{head:o,anchor:o});}else{return CodeMirror.Pass;}};if(i!=m){j["'"+m+"'"]=l;}})(k.charAt(h),k.charAt(h+1));}return j;}function a(g){return function(i){var j=i.getCursor(),h=c(i,j);if(!h||g.indexOf(h)%2!=0){return CodeMirror.Pass;}i.operation(function(){var k=CodeMirror.Pos(j.line+1,0);i.replaceSelection("\n\n",{anchor:k,head:k},"+input");i.indentLine(j.line+1,null,true);i.indentLine(j.line+2,null,true);});};}})();(function(){CodeMirror.defineOption("autoCloseTags",false,function(f,i,h){if(h!=CodeMirror.Init&&h){f.removeKeyMap("autoCloseTags");}if(!i){return;}var g={name:"autoCloseTags"};if(typeof i!="object"||i.whenClosing){g["'/'"]=function(j){return b(j);};}if(typeof i!="object"||i.whenOpening){g["'>'"]=function(j){return a(j);};}f.addKeyMap(g);});var c=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"];var d=["applet","blockquote","body","button","div","dl","fieldset","form","frameset","h1","h2","h3","h4","h5","h6","head","html","iframe","layer","legend","object","ol","p","select","table","ul"];function a(f){var o=f.getCursor(),r=f.getTokenAt(o);var l=CodeMirror.innerMode(f.getMode(),r.state),p=l.state;if(l.mode.name!="xml"||!p.tagName){return CodeMirror.Pass;}var n=f.getOption("autoCloseTags"),j=l.mode.configuration=="html";var i=(typeof n=="object"&&n.dontCloseTags)||(j&&c);var k=(typeof n=="object"&&n.indentTags)||(j&&d);var q=p.tagName;if(r.end>o.ch){q=q.slice(0,q.length-r.end+o.ch);}var m=q.toLowerCase();if(!q||r.type=="string"&&(r.end!=o.ch||!/[\"\']/.test(r.string.charAt(r.string.length-1))||r.string.length==1)||r.type=="tag"&&p.type=="closeTag"||r.string.indexOf("/")==(r.string.length-1)||i&&e(i,m)>-1||CodeMirror.scanForClosingTag&&CodeMirror.scanForClosingTag(f,o,q,Math.min(f.lastLine()+1,o.line+50))){return CodeMirror.Pass;}var h=k&&e(k,m)>-1;var g=h?CodeMirror.Pos(o.line+1,0):CodeMirror.Pos(o.line,o.ch+1);f.replaceSelection(">"+(h?"\n\n":"")+""+q+">",{head:g,anchor:g});if(h){f.indentLine(o.line+1);f.indentLine(o.line+2);}}function b(f){var h=f.getCursor(),k=f.getTokenAt(h);var g=CodeMirror.innerMode(f.getMode(),k.state),i=g.state;if(k.type=="string"||k.string.charAt(0)!="<"||k.start!=h.ch-1||g.mode.name!="xml"){return CodeMirror.Pass;}var j=i.context&&i.context.tagName;if(j){f.replaceSelection("/"+j+">","end");}}function e(f,h){if(f.indexOf){return f.indexOf(h);}for(var j=0,g=f.length;j=0?h[2]:(parseInt(h[3],10)+1)+".";e.replaceSelection("\n"+f+d+c,"end");};}());(function(){var d=/MSIE \d/.test(navigator.userAgent)&&(document.documentMode==null||document.documentMode<8);var g=CodeMirror.Pos;var f={"(":")>",")":"(<","[":"]>","]":"[<","{":"}>","}":"{<"};function c(h,A,y){var x=h.state.matchBrackets;var r=(x&&x.maxScanLineLength)||10000;var s=(x&&x.maxScanLines)||100;var j=A||h.getCursor(),p=h.getLineHandle(j.line),t=j.ch-1;var q=(t>=0&&f[p.text.charAt(t)])||f[p.text.charAt(++t)];if(!q){return null;}var m=q.charAt(1)==">",k=m?1:-1;if(y&&m!=(t==j.ch)){return null;}var z=h.getTokenTypeAt(g(j.line,t+1));var w=[p.text.charAt(t)],u=/[(){}[\]]/;function v(C,D,G){if(!C.text){return;}var F=m?0:C.text.length-1,B=m?C.text.length:-1;if(C.text.length>r){return null;}if(G!=null){F=G+k;}for(;F!=B;F+=k){var i=C.text.charAt(F);if(u.test(i)&&h.getTokenTypeAt(g(D,F+1))==z){var E=f[i];if(E.charAt(1)==">"==m){w.push(i);}else{if(w.pop()!=E.charAt(0)){return{pos:F,match:false};}else{if(!w.length){return{pos:F,match:true};}}}}}}for(var o=j.line,n,l=m?Math.min(o+s,h.lineCount()):Math.max(-1,o-s);o!=l;o+=k){if(o==j.line){n=v(p,o,t);}else{n=v(h.getLineHandle(o),o);}if(n){break;}}return{from:g(j.line,t),to:n&&g(o,n.pos),match:n&&n.match,forward:m};}function e(j,h){var l=j.state.matchBrackets.maxHighlightLineLength||1000;var k=c(j);if(!k||j.getLine(k.from.line).length>l||k.to&&j.getLine(k.to.line).length>l){return;}var n=k.match?"CodeMirror-matchingbracket":"CodeMirror-nonmatchingbracket";var m=j.markText(k.from,g(k.from.line,k.from.ch+1),{className:n});var o=k.to&&j.markText(k.to,g(k.to.line,k.to.ch+1),{className:n});if(d&&j.state.focused){j.display.input.focus();}var i=function(){j.operation(function(){m.clear();o&&o.clear();});};if(h){setTimeout(i,800);}else{return i;}}var a=null;function b(h){h.operation(function(){if(a){a();a=null;}if(!h.somethingSelected()){a=e(h,false);}});}CodeMirror.defineOption("matchBrackets",false,function(h,j,i){if(i&&i!=CodeMirror.Init){h.off("cursorActivity",b);}if(j){h.state.matchBrackets=typeof j=="object"?j:{};h.on("cursorActivity",b);}});CodeMirror.defineExtension("matchBrackets",function(){e(this,true);});CodeMirror.defineExtension("findMatchingBracket",function(h,i){return c(this,h,i);});})();(function(){CodeMirror.defineOption("matchTags",false,function(d,f,e){if(e&&e!=CodeMirror.Init){d.off("cursorActivity",b);d.off("viewportChange",c);a(d);}if(f){d.state.matchBothTags=typeof f=="object"&&f.bothTags;d.on("cursorActivity",b);d.on("viewportChange",c);b(d);}});function a(d){if(d.state.tagHit){d.state.tagHit.clear();}if(d.state.tagOther){d.state.tagOther.clear();}d.state.tagHit=d.state.tagOther=null;}function b(d){d.state.failedTagMatch=false;d.operation(function(){a(d);if(d.somethingSelected()){return;}var e=d.getCursor(),i=d.getViewport();i.from=Math.min(i.from,e.line);i.to=Math.max(e.line+1,i.to);var g=CodeMirror.findMatchingTag(d,e,i);if(!g){return;}if(d.state.matchBothTags){var f=g.at=="open"?g.open:g.close;if(f){d.state.tagHit=d.markText(f.from,f.to,{className:"CodeMirror-matchingtag"});}}var h=g.at=="close"?g.open:g.close;if(h){d.state.tagOther=d.markText(h.from,h.to,{className:"CodeMirror-matchingtag"});}else{d.state.failedTagMatch=true;}});}function c(d){if(d.state.failedTagMatch){b(d);}}CodeMirror.commands.toMatchingTag=function(d){var e=CodeMirror.findMatchingTag(d,d.getCursor());if(e){var f=e.at=="close"?e.open:e.close;if(f){d.setSelection(f.to,f.from);}}};})();CodeMirror.defineOption("showTrailingSpace",false,function(a,c,b){if(b==CodeMirror.Init){b=false;}if(b&&!c){a.removeOverlay("trailingspace");}else{if(!b&&c){a.addOverlay({token:function(f){for(var e=f.string.length,d=e;d&&/\s/.test(f.string.charAt(d-1));--d){}if(d>f.pos){f.pos=d;return null;}f.pos=e;return"trailingspace";},name:"trailingspace"});}}});CodeMirror.registerHelper("fold","brace",function(a,o){var j=o.line,k=a.getLine(j);var p,s;function f(u){for(var i=o.ch,v=0;;){var t=i<=0?-1:k.lastIndexOf(u,i-1);if(t==-1){if(v==1){break;}v=1;i=k.length;continue;}if(v==1&&ta.lastLine()){return null;}var m=a.getTokenAt(CodeMirror.Pos(k,1));if(!/\S/.test(m.string)){m=a.getTokenAt(CodeMirror.Pos(k,m.end+1));}if(m.type!="keyword"||m.string!="import"){return null;}for(var j=k,h=Math.min(a.lastLine(),k+10);j<=h;++j){var n=a.getLine(j),l=n.indexOf(";");if(l!=-1){return{startCh:m.end,end:CodeMirror.Pos(j,l)};}}}var g=g.line,c=d(g),f;if(!c||d(g-1)||((f=d(g-2))&&f.end.line==g-1)){return null;}for(var b=c.end;;){var e=d(b.line+1);if(e==null){break;}b=e.end;}return{from:a.clipPos(CodeMirror.Pos(g,c.startCh+1)),to:b};});CodeMirror.importRangeFinder=CodeMirror.fold["import"];CodeMirror.registerHelper("fold","include",function(a,f){function d(g){if(ga.lastLine()){return null;}var h=a.getTokenAt(CodeMirror.Pos(g,1));if(!/\S/.test(h.string)){h=a.getTokenAt(CodeMirror.Pos(g,h.end+1));}if(h.type=="meta"&&h.string.slice(0,8)=="#include"){return h.start+8;}}var f=f.line,c=d(f);if(c==null||d(f-1)!=null){return null;}for(var b=f;;){var e=d(b+1);if(e==null){break;}++b;}return{from:CodeMirror.Pos(f,c+1),to:a.clipPos(CodeMirror.Pos(b))};});CodeMirror.includeRangeFinder=CodeMirror.fold.include;CodeMirror.registerGlobalHelper("fold","comment",function(a){return a.blockCommentStart&&a.blockCommentEnd;},function(b,r){var m=b.getModeAt(r),t=m.blockCommentStart,f=m.blockCommentEnd;if(!t||!f){return;}var k=r.line,l=b.getLine(k);var s;for(var a=r.ch,p=0;;){var g=a<=0?-1:l.lastIndexOf(t,a-1);if(g==-1){if(p==1){return;}p=1;a=l.length;continue;}if(p==1&&gc.firstLine()){k=CodeMirror.Pos(k.line-1,0);l=f(false);}}if(!l||l.cleared||e==="unfold"){return;}var i=b(j);CodeMirror.on(i,"mousedown",function(){h.clear();});var h=c.markText(l.from,l.to,{replacedWith:i,clearOnEnter:true,__isFold:true});h.on("clear",function(m,n){CodeMirror.signal(c,"unfold",c,m,n);});CodeMirror.signal(c,"fold",c,l.from,l.to);}function b(c){var e=(c&&c.widget)||"\u2194";if(typeof e=="string"){var d=document.createTextNode(e);e=document.createElement("span");e.appendChild(d);e.className="CodeMirror-foldmarker";}return e;}CodeMirror.newFoldFunction=function(c,d){return function(e,f){a(e,f,{rangeFinder:c,widget:d});};};CodeMirror.defineExtension("foldCode",function(e,d,c){a(this,e,d,c);});CodeMirror.commands.fold=function(c){c.foldCode(c.getCursor());};CodeMirror.registerHelper("fold","combine",function(){var c=Array.prototype.slice.call(arguments,0);return function(d,g){for(var f=0;f20||n.from-o.to>20){k(l);}else{l.operation(function(){if(o.fromn.to){j(l,n.to,o.to);n.to=o.to;}});}},m.updateViewportTimeSpan||400);}function d(l,m){var o=l.state.foldGutter,n=m.line;if(n>=o.from&&nj){h=g;}else{if(!/\S/.test(c)){}else{break;}}}if(h){return{from:CodeMirror.Pos(k.line,e.length),to:CodeMirror.Pos(h,a.getLine(h).length)};}});CodeMirror.indentRangeFinder=CodeMirror.fold.indent;(function(){var h=CodeMirror.Pos;function a(p,q){return p.line-q.line||p.ch-q.ch;}var f="A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD";var e=f+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040";var o=new RegExp("<(/?)(["+f+"]["+e+"]*)","g");function d(q,r,p,s){this.line=r;this.ch=p;this.cm=q;this.text=q.getLine(r);this.min=s?s.from:q.firstLine();this.max=s?s.to-1:q.lastLine();}function j(q,p){var r=q.cm.getTokenTypeAt(h(q.line,p));return r&&/\btag\b/.test(r);}function g(p){if(p.line>=p.max){return;}p.ch=0;p.text=p.cm.getLine(++p.line);return true;}function i(p){if(p.line<=p.min){return;}p.text=p.cm.getLine(--p.line);p.ch=p.text.length;return true;}function m(q){for(;;){var p=q.text.indexOf(">",q.ch);if(p==-1){if(g(q)){continue;}else{return;}}if(!j(q,p+1)){q.ch=p+1;continue;}var r=q.text.lastIndexOf("/",p);var s=r>-1&&!/\S/.test(q.text.slice(r+1,p));q.ch=p+1;return s?"selfClose":"regular";}}function n(p){for(;;){var q=p.ch?p.text.lastIndexOf("<",p.ch-1):-1;if(q==-1){if(i(p)){continue;}else{return;}}if(!j(p,q+1)){p.ch=q;continue;}o.lastIndex=q;p.ch=q;var r=o.exec(p.text);if(r&&r.index==q){return r;}}}function k(q){for(;;){o.lastIndex=q.ch;var p=o.exec(q.text);if(!p){if(g(q)){continue;}else{return;}}if(!j(q,p.index+1)){q.ch=p.index+1;continue;}q.ch=p.index+p[0].length;return p;}}function l(q){for(;;){var p=q.ch?q.text.lastIndexOf(">",q.ch-1):-1;if(p==-1){if(i(q)){continue;}else{return;}}if(!j(q,p+1)){q.ch=p;continue;}var r=q.text.lastIndexOf("/",p);var s=r>-1&&!/\S/.test(q.text.slice(r+1,p));q.ch=p+1;return s?"selfClose":"regular";}}function b(r,w){var t=[];for(;;){var s=k(r),p,v=r.line,u=r.ch-(s?s[0].length:0);if(!s||!(p=m(r))){return;}if(p=="selfClose"){continue;}if(s[1]){for(var q=t.length-1;q>=0;--q){if(t[q]==s[2]){t.length=q;break;}}if(q<0&&(!w||w==s[2])){return{tag:s[2],from:h(v,u),to:h(r.line,r.ch)};}}else{t.push(s[2]);}}}function c(s,w){var u=[];for(;;){var t=l(s);if(!t){return;}if(t=="selfClose"){n(s);continue;}var q=s.line,p=s.ch;var v=n(s);if(!v){return;}if(v[1]){u.push(v[2]);}else{for(var r=u.length-1;r>=0;--r){if(u[r]==v[2]){u.length=r;break;}}if(r<0&&(!w||w==v[2])){return{tag:v[2],from:h(s.line,s.ch),to:h(q,p)};}}}}CodeMirror.registerHelper("fold","xml",function(q,u){var s=new d(q,u.line,0);for(;;){var t=k(s),r;if(!t||s.line!=u.line||!(r=m(s))){return;}if(!t[1]&&r!="selfClose"){var u=h(s.line,s.ch);var p=b(s,t[2]);return p&&{from:u,to:p.from};}}});CodeMirror.tagRangeFinder=CodeMirror.fold.xml;CodeMirror.findMatchingTag=function(p,t,u){var s=new d(p,t.line,t.ch,u);if(s.text.indexOf(">")==-1&&s.text.indexOf("<")==-1){return;}var q=m(s),w=q&&h(s.line,s.ch);var v=q&&n(s);if(!q||q=="selfClose"||!v||a(s,t)>0){return;}var r={from:h(s.line,s.ch),to:w,tag:v[2]};if(v[1]){return{open:c(s,v[2]),close:r,at:"close"};}else{s=new d(p,w.line,w.ch,u);return{open:r,close:b(s,v[2]),at:"open"};}};CodeMirror.findEnclosingTag=function(q,u,v){var s=new d(q,u.line,u.ch,v);for(;;){var t=c(s);if(!t){break;}var r=new d(q,u.line,u.ch,v);var p=b(r,t.tag);if(p){return{open:t,close:p};}}};CodeMirror.scanForClosingTag=function(p,t,s,q){var r=new d(p,t.line,t.ch,q?{from:0,to:q}:null);return !!b(r,s);};})();CodeMirror.defineMode("css",function(c,i){if(!i.propertyKeywords){i=CodeMirror.resolveMode("text/css");}var e=c.indentUnit,r=i.tokenHooks,g=i.mediaTypes||{},f=i.mediaFeatures||{},m=i.propertyKeywords||{},b=i.colorKeywords||{},v=i.valueKeywords||{},a=i.allowNested;var u,h;function o(x,y){u=y;return x;}function q(A,z){var x=A.next();if(r[x]){var y=r[x](A,z);if(y!==false){return y;}}if(x=="@"){A.eatWhile(/[\w\\\-]/);return o("def",A.current());}else{if(x=="="||(x=="~"||x=="|")&&A.eat("=")){return o(null,"compare");}else{if(x=='"'||x=="'"){z.tokenize=t(x);return z.tokenize(A,z);}else{if(x=="#"){A.eatWhile(/[\w\\\-]/);return o("atom","hash");}else{if(x=="!"){A.match(/^\s*\w*/);return o("keyword","important");}else{if(/\d/.test(x)||x=="."&&A.eat(/\d/)){A.eatWhile(/[\w.%]/);return o("number","unit");}else{if(x==="-"){if(/[\d.]/.test(A.peek())){A.eatWhile(/[\w.%]/);return o("number","unit");}else{if(A.match(/^[^-]+-/)){return o("meta","meta");}}}else{if(/[,+>*\/]/.test(x)){return o(null,"select-op");}else{if(x=="."&&A.match(/^-?[_a-z][_a-z0-9-]*/i)){return o("qualifier","qualifier");}else{if(/[:;{}\[\]\(\)]/.test(x)){return o(null,x);}else{if(x=="u"&&A.match("rl(")){A.backUp(1);z.tokenize=s;return o("property","word");}else{if(/[\w\\\-]/.test(x)){A.eatWhile(/[\w\\\-]/);return o("property","word");}else{return o(null,null);}}}}}}}}}}}}}function t(y,x){return function(C,B){var A=false,z;while((z=C.next())!=null){if(z==y&&!A){if(x){C.backUp(1);}break;}A=!A&&z=="\\";}if(!A){B.tokenize=null;}return o("string","string");};}function s(y,x){y.next();if(!y.match(/\s*[\"\']/,false)){x.tokenize=t(")",true);}else{x.tokenize=null;}return o(null,"(");}function d(z,x,y){this.type=z;this.indent=x;this.prev=y;}function n(x,y){x.context=new d(y,x.context.indent+e,x.context);return y;}function l(x){x.context=x.context.prev;return x.context.type;}function j(z,y,x){return p[x.context.type](z,y,x);}function k(B,A,z,y){for(var x=y||1;x>0;x--){z.context=z.context.prev;}return j(B,A,z);}function w(x){var y=x.current().toLowerCase();if(v.hasOwnProperty(y)){h="atom";}else{if(b.hasOwnProperty(y)){h="keyword";}else{h="variable";}}}var p={};p.top=function(z,x,y){if(z=="{"){return n(y,"block");}else{if(z=="}"&&y.context.prev){return l(y);}else{if(z=="@media"){return n(y,"media");}else{if(z&&z.charAt(0)=="@"){return n(y,"at");}else{if(z=="hash"){h="builtin";}else{if(z=="word"){h="tag";}else{if(z=="variable-definition"){return"maybeprop";}else{if(z=="interpolation"){return n(y,"interpolation");}else{if(z==":"){return"pseudo";}else{if(a&&z=="("){return n(y,"params");}}}}}}}}}}return y.context.type;};p.block=function(z,y,x){if(z=="word"){if(m.hasOwnProperty(y.current().toLowerCase())){h="property";return"maybeprop";}else{if(a){h="tag";return"block";}else{h+=" error";return"maybeprop";}}}else{if(z=="meta"){return"block";}else{if(!a&&(z=="hash"||z=="qualifier")){h="error";return"block";}else{return p.top(z,y,x);}}}};p.maybeprop=function(z,y,x){if(z==":"){return n(x,"prop");}return j(z,y,x);};p.prop=function(z,y,x){if(z==";"){return l(x);}if(z=="}"||z=="{"){return k(z,y,x);}if(z=="("){return n(x,"parens");}if(z=="hash"&&!/^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/.test(y.current())){h+=" error";}else{if(z=="word"){w(y);}else{if(z=="interpolation"){return n(x,"interpolation");}}}return"prop";};p.parens=function(z,y,x){if(z=="{"||z=="}"){return k(z,y,x);}if(z==")"){return l(x);}return"parens";};p.pseudo=function(z,y,x){if(z=="word"){h="variable-3";return x.context.type;}return j(z,y,x);};p.media=function(z,y,x){if(z=="("){return n(x,"media_parens");}if(z=="}"){return k(z,y,x);}if(z=="{"){return l(x)&&n(x,a?"block":"top");}if(z=="word"){var A=y.current().toLowerCase();if(A=="only"||A=="not"||A=="and"){h="keyword";}else{if(g.hasOwnProperty(A)){h="attribute";}else{if(f.hasOwnProperty(A)){h="property";}else{h="error";}}}}return x.context.type;};p.media_parens=function(z,y,x){if(z==")"){return l(x);}if(z=="{"||z=="}"){return k(z,y,x,2);}return p.media(z,y,x);};p.at=function(z,y,x){if(z==";"){return l(x);}if(z=="{"||z=="}"){return k(z,y,x);}if(z=="word"){h="tag";}else{if(z=="hash"){h="builtin";}}return"at";};p.interpolation=function(z,y,x){if(z=="}"){return l(x);}if(z=="{"||z==";"){return k(z,y,x);}if(z!="variable"){h="error";}return"interpolation";};p.params=function(z,y,x){if(z==")"){return l(x);}if(z=="{"||z=="}"){return k(z,y,x);}if(z=="word"){w(y);}return"params";};return{startState:function(x){return{tokenize:null,state:"top",context:new d("top",x||0,null)};},token:function(y,x){if(!x.tokenize&&y.eatSpace()){return null;}var z=(x.tokenize||q)(y,x);if(z&&typeof z=="object"){u=z[1];z=z[0];}h=z;x.state=p[x.state](u,y,x);return h;},indent:function(y,z){var x=y.context;if(/^\}/.test(z)&&x.prev){x=x.prev;}if(/^\{/.test(z)&&x.type=="media"){x=x.prev;}return x.indent;},electricChars:"}",blockCommentStart:"",fold:"brace"};});(function(){function d(o){var q={};for(var p=0;p")){p.match("-->");o.tokenize=null;}else{p.skipToEnd();}return["comment","comment"];}CodeMirror.defineMIME("text/css",{mediaTypes:g,mediaFeatures:e,propertyKeywords:i,colorKeywords:b,valueKeywords:m,tokenHooks:{"<":function(p,o){if(!p.match("!--")){return false;}o.tokenize=l;return l(p,o);},"/":function(p,o){if(!p.eat("*")){return false;}o.tokenize=k;return k(p,o);}},name:"css"});CodeMirror.defineMIME("text/x-scss",{mediaTypes:g,mediaFeatures:e,propertyKeywords:i,colorKeywords:b,valueKeywords:m,allowNested:true,tokenHooks:{"/":function(p,o){if(p.eat("/")){p.skipToEnd();return["comment","comment"];}else{if(p.eat("*")){o.tokenize=k;return k(p,o);}else{return["operator","operator"];}}},":":function(o){if(o.match(/\s*{/)){return[null,"{"];}return false;},"$":function(o){o.match(/^[\w-]+/);if(o.match(/^\s*:/,false)){return["variable-2","variable-definition"];}return["variable-2","variable"];},"#":function(o){if(!o.eat("{")){return false;}return[null,"interpolation"];}},name:"css",helperType:"scss"});CodeMirror.defineMIME("text/x-less",{mediaTypes:g,mediaFeatures:e,propertyKeywords:i,colorKeywords:b,valueKeywords:m,allowNested:true,tokenHooks:{"/":function(p,o){if(p.eat("/")){p.skipToEnd();return["comment","comment"];}else{if(p.eat("*")){o.tokenize=k;return k(p,o);}else{return["operator","operator"];}}},"@":function(o){if(o.match(/^(media|import)\b/,false)){return false;}o.eatWhile(/[\w\\\-]/);if(o.match(/^\s*:/,false)){return["variable-2","variable-definition"];}return["variable-2","variable"];},"&":function(){return["atom","atom"];}},name:"css",helperType:"less"});})();CodeMirror.defineMode("htmlmixed",function(b,j){var f=CodeMirror.getMode(b,{name:"xml",htmlMode:true});var d=CodeMirror.getMode(b,"css");var l=[],m=j&&j.scriptTypes;l.push({matches:/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^$/i,mode:CodeMirror.getMode(b,"javascript")});if(m){for(var g=0;g"){var o=q.string.slice(Math.max(0,q.pos-100),q.pos).match(/\btype\s*=\s*("[^"]+"|'[^']+'|\S+)[^<]*$/i);o=o?o[1]:"";if(o&&/[\"\']/.test(o.charAt(0))){o=o.slice(1,o.length-1);}for(var n=0;n"){p.token=c;p.localMode=d;p.localState=d.startState(f.indent(p.htmlState,""));}}return r;}function h(q,p,r){var n=q.current();var i=n.search(p),o;if(i>-1){q.backUp(n.length-i);}else{if(o=n.match(/<\/?$/)){q.backUp(n.length);if(!q.match(p,false)){q.match(n);}}}return r;}function k(n,i){if(n.match(/^<\/\s*script\s*>/i,false)){i.token=e;i.localState=i.localMode=null;return e(n,i);}return h(n,/<\/\s*script\s*>/,i.localMode.token(n,i.localState));}function c(n,i){if(n.match(/^<\/\s*style\s*>/i,false)){i.token=e;i.localState=i.localMode=null;return e(n,i);}return h(n,/<\/\s*style\s*>/,d.token(n,i.localState));}return{startState:function(){var i=f.startState();return{token:e,localMode:null,localState:null,htmlState:i};},copyState:function(n){if(n.localState){var i=CodeMirror.copyState(n.localMode,n.localState);}return{token:n.token,localMode:n.localMode,localState:i,htmlState:CodeMirror.copyState(f,n.htmlState)};},token:function(n,i){return i.token(n,i);},indent:function(i,n){if(!i.localMode||/^\s*<\//.test(n)){return f.indent(i.htmlState,n);}else{if(i.localMode.indent){return i.localMode.indent(i.localState,n);}else{return CodeMirror.Pass;}}},innerMode:function(i){return{state:i.localState||i.htmlState,mode:i.localMode||f};}};},"xml","javascript","css");CodeMirror.defineMIME("text/html","htmlmixed");CodeMirror.defineMode("javascript",function(o,ae){var J=o.indentUnit;var ar=ae.statementIndent;var O=ae.json;var M=ae.typescript;var P=function(){function aH(aL){return{type:aL,style:"keyword"};}var aB=aH("keyword a"),aE=aH("keyword b"),aF=aH("keyword c");var aI=aH("operator"),aC={type:"atom",style:"atom"};var aG={"if":aH("if"),"while":aB,"with":aB,"else":aE,"do":aE,"try":aE,"finally":aE,"return":aF,"break":aF,"continue":aF,"new":aF,"delete":aF,"throw":aF,"var":aH("var"),"const":aH("var"),let:aH("var"),"function":aH("function"),"catch":aH("catch"),"for":aH("for"),"switch":aH("switch"),"case":aH("case"),"default":aH("default"),"in":aI,"typeof":aI,"instanceof":aI,"true":aC,"false":aC,"null":aC,"undefined":aC,"NaN":aC,"Infinity":aC,"this":aH("this"),module:aH("module"),"class":aH("class"),"super":aH("atom"),yield:aF,"export":aH("export"),"import":aH("import"),"extends":aF};if(M){var aK={type:"variable",style:"variable-3"};var aJ={"interface":aH("interface"),"extends":aH("extends"),constructor:aH("constructor"),"public":aH("public"),"private":aH("private"),"protected":aH("protected"),"static":aH("static"),string:aK,number:aK,bool:aK,any:aK};for(var aD in aJ){aG[aD]=aJ[aD];}}return aG;}();var L=/[+\-*&%=<>!?|~^]/;function aa(aE,aB){var aC=false,aD;while((aD=aE.next())!=null){if(aD==aB&&!aC){return false;}aC=!aC&&aD=="\\";}return aC;}var ax,r;function ap(aD,aC,aB){ax=aD;r=aB;return aC;}function at(aE,aD){var aB=aE.next();if(aB=='"'||aB=="'"){aD.tokenize=aw(aB);return aD.tokenize(aE,aD);}else{if(aB=="."&&aE.match(/^\d+(?:[eE][+\-]?\d+)?/)){return ap("number","number");}else{if(aB=="."&&aE.match("..")){return ap("spread","meta");}else{if(/[\[\]{}\(\),;\:\.]/.test(aB)){return ap(aB);}else{if(aB=="="&&aE.eat(">")){return ap("=>");}else{if(aB=="0"&&aE.eat(/x/i)){aE.eatWhile(/[\da-f]/i);return ap("number","number");}else{if(/\d/.test(aB)){aE.match(/^\d*(?:\.\d*)?(?:[eE][+\-]?\d+)?/);return ap("number","number");}else{if(aB=="/"){if(aE.eat("*")){aD.tokenize=au;return au(aE,aD);}else{if(aE.eat("/")){aE.skipToEnd();return ap("comment","comment");}else{if(aD.lastType=="operator"||aD.lastType=="keyword c"||aD.lastType=="sof"||/^[\[{}\(,;:]$/.test(aD.lastType)){aa(aE,"/");aE.eatWhile(/[gimy]/);return ap("regexp","string-2");}else{aE.eatWhile(L);return ap("operator",null,aE.current());}}}}else{if(aB=="`"){aD.tokenize=av;return av(aE,aD);}else{if(aB=="#"){aE.skipToEnd();return ap("error","error");}else{if(L.test(aB)){aE.eatWhile(L);return ap("operator",null,aE.current());}else{aE.eatWhile(/[\w\$_]/);var aF=aE.current(),aC=P.propertyIsEnumerable(aF)&&P[aF];return(aC&&aD.lastType!=".")?ap(aC.type,aC.style,aF):ap("variable","variable",aF);}}}}}}}}}}}}function aw(aB){return function(aD,aC){if(!aa(aD,aB)){aC.tokenize=at;}return ap("string","string");};}function au(aE,aD){var aC=false,aB;while(aB=aE.next()){if(aB=="/"&&aC){aD.tokenize=at;break;}aC=(aB=="*");}return ap("comment","comment");}function av(aE,aD){var aB=false,aC;while((aC=aE.next())!=null){if(!aB&&(aC=="`"||aC=="$"&&aE.eat("{"))){aD.tokenize=at;break;}aB=!aB&&aC=="\\";}return ap("quasi","string-2",aE.current());}var j="([{}])";function z(aI,aH){if(aH.fatArrowAt){aH.fatArrowAt=null;}var aB=aI.string.indexOf("=>",aI.start);if(aB<0){return;}var aE=0,aG=false;for(var aF=aB-1;aF>=0;--aF){var aD=aI.string.charAt(aF);var aC=j.indexOf(aD);if(aC>=0&&aC<3){if(!aE){++aF;break;}if(--aE==0){break;}}else{if(aC>=3&&aC<6){++aE;}else{if(/[$\w]/.test(aD)){aG=true;}else{if(aG&&!aE){++aF;break;}}}}}if(aG&&!aE){aH.fatArrowAt=aF;}}var h={atom:true,number:true,variable:true,string:true,regexp:true,"this":true};function N(aD,aC,aG,aB,aF,aE){this.indented=aD;this.column=aC;this.type=aG;this.prev=aF;this.info=aE;if(aB!=null){this.align=aB;}}function K(aC,aE){for(var aD=aC.localVars;aD;aD=aD.next){if(aD.name==aE){return true;}}for(var aB=aC.context;aB;aB=aB.prev){for(var aD=aB.vars;aD;aD=aD.next){if(aD.name==aE){return true;}}}}function ad(aE,aG,aH,aD,aF){var aB=aE.cc;t.state=aE;t.stream=aF;t.marked=null,t.cc=aB;if(!aE.lexical.hasOwnProperty("align")){aE.lexical.align=true;}while(true){var aC=aB.length?aB.pop():O?w:aq;if(aC(aH,aD)){while(aB.length&&aB[aB.length-1].lex){aB.pop()();}if(t.marked){return t.marked;}if(aH=="variable"&&K(aE,aD)){return"variable-2";}return aG;}}}var t={state:null,column:null,marked:null,cc:null};function af(){for(var aB=arguments.length-1;aB>=0;aB--){t.cc.push(arguments[aB]);}}function p(){af.apply(null,arguments);return true;}function ao(aD){function aB(aE){for(var aF=aE;aF;aF=aF.next){if(aF.name==aD){return true;}}return false;}var aC=t.state;if(aC.context){t.marked="def";if(aB(aC.localVars)){return;}aC.localVars={name:aD,next:aC.localVars};}else{if(aB(aC.globalVars)){return;}if(ae.globalVars){aC.globalVars={name:aD,next:aC.globalVars};}}}var u={name:"this",next:{name:"arguments"}};function al(){t.state.context={prev:t.state.context,vars:t.state.localVars};t.state.localVars=u;}function ah(){t.state.localVars=t.state.context.vars;t.state.context=t.state.context.prev;}function am(aD,aB){var aC=function(){var aF=t.state,aE=aF.indented;if(aF.lexical.type=="stat"){aE=aF.lexical.indented;}aF.lexical=new N(aE,t.stream.column(),aD,null,aF.lexical,aB);};aC.lex=true;return aC;}function ai(){var aB=t.state;if(aB.lexical.prev){if(aB.lexical.type==")"){aB.indented=aB.lexical.indented;}aB.lexical=aB.lexical.prev;}}ai.lex=true;function v(aB){return function(aC){if(aC==aB){return p();}else{if(aB==";"){return af();}else{return p(arguments.callee);}}};}function aq(aB,aC){if(aB=="var"){return p(am("vardef",aC.length),az,v(";"),ai);}if(aB=="keyword a"){return p(am("form"),w,aq,ai);}if(aB=="keyword b"){return p(am("form"),aq,ai);}if(aB=="{"){return p(am("}"),i,ai);}if(aB==";"){return p();}if(aB=="if"){return p(am("form"),w,aq,ai,S);}if(aB=="function"){return p(G);}if(aB=="for"){return p(am("form"),B,ai,aq,ai);}if(aB=="variable"){return p(am("stat"),W);}if(aB=="switch"){return p(am("form"),w,am("}","switch"),v("{"),i,ai,ai);}if(aB=="case"){return p(w,v(":"));}if(aB=="default"){return p(v(":"));}if(aB=="catch"){return p(am("form"),al,v("("),F,v(")"),aq,ai,ah);}if(aB=="module"){return p(am("form"),al,c,ah,ai);}if(aB=="class"){return p(am("form"),k,ab,ai);}if(aB=="export"){return p(am("form"),a,ai);}if(aB=="import"){return p(am("form"),b,ai);}return af(am("stat"),w,v(";"),ai);}function w(aB){return x(aB,false);}function y(aB){return x(aB,true);}function x(aE,aD){if(t.state.fatArrowAt==t.stream.start){var aB=aD?g:f;if(aE=="("){return p(al,am(")"),m(ag,")"),ai,v("=>"),aB,ah);}else{if(aE=="variable"){return af(al,ag,v("=>"),aB,ah);}}}var aC=aD?Y:X;if(h.hasOwnProperty(aE)){return p(aC);}if(aE=="function"){return p(G);}if(aE=="keyword c"){return p(aD?U:T);}if(aE=="("){return p(am(")"),T,n,v(")"),ai,aC);}if(aE=="operator"||aE=="spread"){return p(aD?y:w);}if(aE=="["){return p(am("]"),e,ai,aC);}if(aE=="{"){return q(ac,"}",null,aC);}return p();}function T(aB){if(aB.match(/[;\}\)\],]/)){return af();}return af(w);}function U(aB){if(aB.match(/[;\}\)\],]/)){return af();}return af(y);}function X(aB,aC){if(aB==","){return p(w);}return Y(aB,aC,false);}function Y(aE,aF,aD){var aC=aD==false?X:Y;var aB=aD==false?w:y;if(aF=="=>"){return p(al,aD?g:f,ah);}if(aE=="operator"){if(/\+\+|--/.test(aF)){return p(aC);}if(aF=="?"){return p(w,v(":"),aB);}return p(aB);}if(aE=="quasi"){t.cc.push(aC);return an(aF);}if(aE==";"){return;}if(aE=="("){return q(y,")","call",aC);}if(aE=="."){return p(aj,aC);}if(aE=="["){return p(am("]"),T,v("]"),ai,aC);}}function an(aB){if(!aB){;}if(aB.slice(aB.length-2)!="${"){return p();}return p(w,s);}function s(aB){if(aB=="}"){t.marked="string-2";t.state.tokenize=av;return p();}}function f(aB){z(t.stream,t.state);if(aB=="{"){return af(aq);}return af(w);}function g(aB){z(t.stream,t.state);if(aB=="{"){return af(aq);}return af(y);}function W(aB){if(aB==":"){return p(ai,aq);}return af(X,v(";"),ai);}function aj(aB){if(aB=="variable"){t.marked="property";return p();}}function ac(aB,aC){if(aB=="variable"){t.marked="property";if(aC=="get"||aC=="set"){return p(H);}}else{if(aB=="number"||aB=="string"){t.marked=aB+" property";}else{if(aB=="["){return p(w,v("]"),d);}}}if(h.hasOwnProperty(aB)){return p(d);}}function H(aB){if(aB!="variable"){return af(d);}t.marked="property";return p(G);}function d(aB){if(aB==":"){return p(y);}if(aB=="("){return af(G);}}function m(aD,aB){function aC(aF){if(aF==","){var aE=t.state.lexical;if(aE.info=="call"){aE.pos=(aE.pos||0)+1;}return p(aD,aC);}if(aF==aB){return p();}return p(v(aB));}return function(aE){if(aE==aB){return p();}return af(aD,aC);};}function q(aE,aB,aD){for(var aC=3;aC=0;--aE){var aB=aG.cc[aE];if(aB==ai){aF=aF.prev;}else{if(aB!=S){break;}}}if(aF.type=="stat"&&aD=="}"){aF=aF.prev;}if(ar&&aF.type==")"&&aF.prev.type=="stat"){aF=aF.prev;}var aI=aF.type,aC=aD==aI;if(aI=="vardef"){return aF.indented+(aG.lastType=="operator"||aG.lastType==","?aF.info+1:0);}else{if(aI=="form"&&aD=="{"){return aF.indented;}else{if(aI=="form"){return aF.indented+J;}else{if(aI=="stat"){return aF.indented+(aG.lastType=="operator"||aG.lastType==","?ar||J:0);}else{if(aF.info=="switch"&&!aC&&ae.doubleIndentSwitch!=false){return aF.indented+(/^(?:case|default)\b/.test(aH)?J:2*J);}else{if(aF.align){return aF.column+(aC?0:1);}else{return aF.indented+(aC?0:J);}}}}}}},electricChars:":{}",blockCommentStart:O?null:"",lineComment:O?null:"//",fold:"brace",helperType:O?"json":"javascript",jsonMode:O};});CodeMirror.defineMIME("text/javascript","javascript");CodeMirror.defineMIME("text/ecmascript","javascript");CodeMirror.defineMIME("application/javascript","javascript");CodeMirror.defineMIME("application/ecmascript","javascript");CodeMirror.defineMIME("application/json",{name:"javascript",json:true});CodeMirror.defineMIME("application/x-json",{name:"javascript",json:true});CodeMirror.defineMIME("text/typescript",{name:"javascript",typescript:true});CodeMirror.defineMIME("application/typescript",{name:"javascript",typescript:true});CodeMirror.defineMode("xml",function(i,t){var m=i.indentUnit;var r=t.multilineTagIndentFactor||1;var s=t.multilineTagIndentPastTag||true;var p=t.htmlMode?{autoSelfClosers:{area:true,base:true,br:true,col:true,command:true,embed:true,frame:true,hr:true,img:true,input:true,keygen:true,link:true,meta:true,param:true,source:true,track:true,wbr:true},implicitlyClosed:{dd:true,li:true,optgroup:true,option:true,p:true,rp:true,rt:true,tbody:true,td:true,tfoot:true,th:true,tr:true},contextGrabbers:{dd:{dd:true,dt:true},dt:{dd:true,dt:true},li:{li:true},option:{option:true,optgroup:true},optgroup:{optgroup:true},p:{address:true,article:true,aside:true,blockquote:true,dir:true,div:true,dl:true,fieldset:true,footer:true,form:true,h1:true,h2:true,h3:true,h4:true,h5:true,h6:true,header:true,hgroup:true,hr:true,menu:true,nav:true,ol:true,p:true,pre:true,section:true,table:true,ul:true},rp:{rp:true,rt:true},rt:{rp:true,rt:true},tbody:{tbody:true,tfoot:true},td:{td:true,th:true},tfoot:{tbody:true},th:{td:true,th:true},thead:{tbody:true,tfoot:true},tr:{tr:true}},doNotIndent:{pre:true},allowUnquoted:true,allowMissing:true}:{autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:false,allowMissing:false};var a=t.alignCDATA;var x,y,w;function o(F,E){function B(G){E.tokenize=G;return G(F,E);}var A=F.next();if(A=="<"){if(F.eat("!")){if(F.eat("[")){if(F.match("CDATA[")){return B(l("atom","]]>"));}else{return null;}}else{if(F.match("--")){return B(l("comment","-->"));}else{if(F.match("DOCTYPE",true,true)){F.eatWhile(/[\w\._\-]/);return B(j(1));}else{return null;}}}}else{if(F.eat("?")){F.eatWhile(/[\w\._\-]/);E.tokenize=l("meta","?>");return"meta";}else{var C=F.eat("/");x="";var z;while((z=F.eat(/[^\s\u00a0=<>\"\'\/?]/))){x+=z;}if(!x){return"tag error";}y=C?"closeTag":"openTag";E.tokenize=n;return"tag";}}}else{if(A=="&"){var D;if(F.eat("#")){if(F.eat("x")){D=F.eatWhile(/[a-fA-F\d]/)&&F.eat(";");}else{D=F.eatWhile(/[\d]/)&&F.eat(";");}}else{D=F.eatWhile(/[\w\.\-:]/)&&F.eat(";");}return D?"atom":"error";}else{F.eatWhile(/[^&<]/);return null;}}}function n(C,B){var z=C.next();if(z==">"||(z=="/"&&C.eat(">"))){B.tokenize=o;y=z==">"?"endTag":"selfcloseTag";return"tag";}else{if(z=="="){y="equals";return null;}else{if(z=="<"){B.tokenize=o;B.state=f;B.tagName=B.tagStart=null;var A=B.tokenize(C,B);return A?A+" error":"error";}else{if(/[\'\"]/.test(z)){B.tokenize=k(z);B.stringStartCol=C.column();return B.tokenize(C,B);}else{C.eatWhile(/[^\s\u00a0=<>\"\']/);return"word";}}}}}function k(A){var z=function(C,B){while(!C.eol()){if(C.next()==A){B.tokenize=n;break;}}return"string";};z.isInAttribute=true;return z;}function l(z,A){return function(C,B){while(!C.eol()){if(C.match(A)){B.tokenize=o;break;}C.next();}return z;};}function j(z){return function(C,B){var A;while((A=C.next())!=null){if(A=="<"){B.tokenize=j(z+1);return B.tokenize(C,B);}else{if(A==">"){if(z==1){B.tokenize=o;break;}else{B.tokenize=j(z-1);return B.tokenize(C,B);}}}}return"meta";};}function v(B,C,A){var z=p.doNotIndent.hasOwnProperty(C)||(B.context&&B.context.noIndent);B.context={prev:B.context,tagName:C,indent:B.indented,startOfLine:A,noIndent:z};}function u(z){if(z.context){z.context=z.context.prev;}}function q(B,z){var A;while(true){if(!B.context){return;}A=B.context.tagName.toLowerCase();if(!p.contextGrabbers.hasOwnProperty(A)||!p.contextGrabbers[A].hasOwnProperty(z)){return;}u(B);}}function f(C,B,A){if(C=="openTag"){A.tagName=x;A.tagStart=B.column();return d;}else{if(C=="closeTag"){var z=false;if(A.context){if(A.context.tagName!=x){if(p.implicitlyClosed.hasOwnProperty(A.context.tagName.toLowerCase())){u(A);}z=!A.context||A.context.tagName!=x;}}else{z=true;}if(z){w="error";}return z?h:g;}else{return f;}}}function g(B,z,A){if(B!="endTag"){w="error";return g;}u(A);return f;}function h(B,A,z){w="error";return g(B,A,z);}function d(D,A,z){if(D=="word"){w="attribute";return c;}else{if(D=="endTag"||D=="selfcloseTag"){var B=z.tagName,C=z.tagStart;z.tagName=z.tagStart=null;if(D=="selfcloseTag"||p.autoSelfClosers.hasOwnProperty(B.toLowerCase())){q(z,B.toLowerCase());}else{q(z,B.toLowerCase());v(z,B,C==A.indentation());}return f;}}w="error";return d;}function c(B,A,z){if(B=="equals"){return e;}if(!p.allowMissing){w="error";}else{if(B=="word"){w="attribute";return d;}}return d(B,A,z);}function e(B,A,z){if(B=="string"){return b;}if(B=="word"&&p.allowUnquoted){w="string";return d;}w="error";return d(B,A,z);}function b(B,A,z){if(B=="string"){return b;}return d(B,A,z);}return{startState:function(){return{tokenize:o,state:f,indented:0,startOfLine:true,tagName:null,tagStart:null,context:null};},token:function(A,z){if(!z.tagName&&A.sol()){z.startOfLine=true;z.indented=A.indentation();}if(A.eatSpace()){return null;}x=y=null;var B=z.tokenize(A,z);if((B||y)&&B!="comment"){w=null;z.state=z.state(y||B,A,z);if(w){B=w=="error"?B+" error":w;}}z.startOfLine=false;return B;},indent:function(B,C,A){var z=B.context;if(B.tokenize.isInAttribute){return B.stringStartCol+1;}if((B.tokenize!=n&&B.tokenize!=o)||z&&z.noIndent){return A?A.match(/^(\s*)/)[0].length:0;}if(B.tagName){if(s){return B.tagStart+B.tagName.length+2;}else{return B.tagStart+m*r;}}if(a&&/",configuration:t.htmlMode?"html":"xml",helperType:t.htmlMode?"html":"xml"};});CodeMirror.defineMIME("text/xml","xml");CodeMirror.defineMIME("application/xml","xml");if(!CodeMirror.mimeModes.hasOwnProperty("text/html")){CodeMirror.defineMIME("text/html",{name:"xml",htmlMode:true});}(function(d,c,b){if(!c.UI.EditHtmlDialog){c.UI.EditHtmlDialog=a;}function a(t,s,M){s=s||{};var I=this,O="WA.UI.EditHtmlDialog",Q=t,H=s.parentComponent,x=Q.modelAccessor,K=Q.resources;I.toString=function(){return O;};I.ChangeCancel=c.Tools.EventHandlers.createHandlers(I,{id:"ChangeCancel"});I.ValidationFailed=c.Tools.EventHandlers.createHandlers(I,{id:"ValidationFailed"});I.RenderComplete=c.Tools.EventHandlers.createHandlers(I,{id:"RenderComplete"});I.ValueChanged=c.Tools.EventHandlers.createHandlers(I,{id:"ValueChanged"});I.Dispose=c.Tools.EventHandlers.createHandlers(I,{id:"Dispose"});I.render=J;I.getType=function(){return Q.layoutControlType;};var G=Q.openDialogButtonType||c.UI.EditHtmlDialogTemplate.OpenDialogButtonType.Button,R=Q.windowResizeWatcherEnabled!=b?Q.windowResizeWatcherEnabled:true,m=null,j=null,f=[],F=null,L=null,e=null,n,u,w=false,v=false,o=null;function J(){return c.UI.EditHtmlDialogTemplate(Q);}function g(){var U,V,W,T,S=[],X={dataSource:M?M.dataSource:b,modelAccessor:x};for(U=0,V=Q.elements.length;U|$)/ig,ae=/[\S\s]+##placeholder:[A-Z0-9]+##[\S\s]+/i,ai=/